A247816 a(n) is the smallest k such that prime(k+i) = 1 (mod 6) for i = 0, 1,...,n-1.
4, 11, 36, 271, 271, 271, 2209, 11199, 13717, 13717, 34369, 172146, 172146, 3094795, 3094795, 4308948, 12762142, 23902561, 72084956, 72084956, 72084956, 1052779161, 1052779161, 1857276773, 1857276773, 19398320447, 57446769091, 57446769091, 57446769091
Offset: 1
Examples
a(1)= 4 => prime(4) (mod 6)= 1; a(2)= 11 => prime(11)(mod 6)= 1, prime(12)(mod 6) = 1; a(3)= 36 => prime(36)(mod 6)= 1, prime(37)(mod 6)= 1, prime(38)(mod 6)= 1. The resulting primes are: 7; 31, 37; 151, 157, 163; 1741, 1747, 1753, 1759; 1741, 1747, 1753, 1759, 1777; 1741, 1747, 1753, 1759, 1777, 1783; 19471, 19477, 19483, 19489, 19501, 19507, 19531; ... - _Michel Marcus_, Sep 29 2014
Links
- Giovanni Resta, Table of n, a(n) for n = 1..35
- D. K. L. Shiu, Strings of Congruent Primes, J. Lond. Math. Soc. 61 (2) (2000) 359-373 [MR1760689]
Programs
-
Maple
for n from 1 to 22 do : ii:=0: for k from 3 to 10^5 while (ii=0)do : s:=0: for i from 0 to n-1 do: r:=irem(ithprime(k+i),6): if r = 1 then s:=s+1: else fi: od: if s=n and ii=0 then printf ( "%d %d \n",n,k):ii:=1: else fi: od: od:
-
Mathematica
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 *)
-
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
Formula
a(n) = primepi(A057620(n)). - Michel Marcus, Sep 30 2014
Extensions
a(12)-a(21) from A057620 by Michel Marcus, Oct 03 2014
a(22)-a(29) from Giovanni Resta, Oct 03 2018
Comments