cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A247816 a(n) is the smallest k such that prime(k+i) = 1 (mod 6) for i = 0, 1,...,n-1.

This page as a plain text file.
%I A247816 #46 May 07 2023 11:18:29
%S A247816 4,11,36,271,271,271,2209,11199,13717,13717,34369,172146,172146,
%T A247816 3094795,3094795,4308948,12762142,23902561,72084956,72084956,72084956,
%U A247816 1052779161,1052779161,1857276773,1857276773,19398320447,57446769091,57446769091,57446769091
%N A247816 a(n) is the smallest k such that prime(k+i) = 1 (mod 6) for i = 0, 1,...,n-1.
%C A247816 Equivalently, "mod 6" can be replaced by "mod 3". See A247967 for the variant "= 5 (mod 6)" and A276414 for runs of primes congruent to each other (mod 3). - _M. F. Hasler_, Sep 02 2016
%C A247816 The sequence is infinite, by Shiu's theorem. - _Jonathan Sondow_, Jun 22 2017
%H A247816 Giovanni Resta, <a href="/A247816/b247816.txt">Table of n, a(n) for n = 1..35</a>
%H A247816 D. K. L. Shiu, <a href="http://dx.doi.org/10.1112/S0024610799007863">Strings of Congruent Primes</a>, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [<a href="http://www.ams.org/mathscinet-getitem?mr=1760689">MR1760689</a>]
%F A247816 a(n) = primepi(A057620(n)). - _Michel Marcus_, Sep 30 2014
%e A247816 a(1)= 4 => prime(4) (mod 6)= 1;
%e A247816 a(2)= 11 => prime(11)(mod 6)= 1, prime(12)(mod 6) = 1;
%e A247816 a(3)= 36 => prime(36)(mod 6)= 1, prime(37)(mod 6)= 1, prime(38)(mod 6)= 1.
%e A247816 The resulting primes are:
%e A247816 7;
%e A247816 31, 37;
%e A247816 151, 157, 163;
%e A247816 1741, 1747, 1753, 1759;
%e A247816 1741, 1747, 1753, 1759, 1777;
%e A247816 1741, 1747, 1753, 1759, 1777, 1783;
%e A247816 19471, 19477, 19483, 19489, 19501, 19507, 19531;
%e A247816 ... - _Michel Marcus_, Sep 29 2014
%p A247816 for n from 1 to 22 do :
%p A247816 ii:=0:
%p A247816    for k from 3 to 10^5 while (ii=0)do :
%p A247816      s:=0:
%p A247816       for i from 0 to n-1 do:
%p A247816         r:=irem(ithprime(k+i),6):
%p A247816         if r = 1
%p A247816         then
%p A247816         s:=s+1:
%p A247816         else
%p A247816         fi:
%p A247816       od:
%p A247816        if s=n and ii=0
%p A247816        then
%p A247816        printf ( "%d %d \n",n,k):ii:=1:
%p A247816        else
%p A247816        fi:
%p A247816     od:
%p A247816 od:
%t A247816 With[{m6=If[Mod[#,6]==1,1,0]&/@Prime[Range[5*10^6]]},Flatten[Table[SequencePosition[ m6,PadRight[{},n,1],1],{n,16}],1]][[;;,1]] (* _Harvey P. Dale_, May 07 2023 *)
%o A247816 (PARI) m=c=i=0;forprime(p=1,, i++;p%6!=1&&(!c||!c=0)&&next; c++>m||next; print1(1+i-m=c,",")) \\ _M. F. Hasler_, Sep 02 2016
%Y A247816 Cf. A057620, A247967; A276414.
%K A247816 nonn,hard
%O A247816 1,1
%A A247816 _Michel Lagneau_, Sep 28 2014
%E A247816 a(12)-a(21) from A057620 by _Michel Marcus_, Oct 03 2014
%E A247816 a(22)-a(29) from _Giovanni Resta_, Oct 03 2018