A055626 First prime starting a chain of exactly n consecutive primes congruent to 5 modulo 6.
5, 23, 47, 251, 1889, 7793, 43451, 243161, 726893, 759821, 2280857, 1820111, 10141499, 40727657, 19725473, 136209239, 744771077, 400414121, 1057859471, 489144599, 13160911739, 766319189, 38451670931, 119618704427, 21549657539, 141116164769, 140432294381, 437339303279
Offset: 1
Keywords
Links
- Giovanni Resta, Table of n, a(n) for n = 1..35 (terms < 4*10^14)
- J. K. Andersen, Consecutive Congruent Primes.
Programs
-
Mathematica
pp = Table[{p = Prime[n], Mod[p, 6]}, {n, 10^6}]; sp = Split[pp, Mod[#1[[2]], 6] == Mod[#2[[2]], 6]&]; a[n_] := SelectFirst[sp, Length[#] == n && MatchQ[#, {{_Integer, 5} ..}]& ][[1, 1]]; Table[an = a[n]; Print[n, " ", an]; an, {n, 1, 13}] (* Jean-François Alcover, Nov 21 2018 *)
-
PARI
okchain(n, p) = {if ((precprime(p-1) % 6) == 5, return (0)); for (i=1, n, if ((p % 6) != 5, return (0)); p = nextprime(p+1);); if ((p % 6) == 5, 0, 1);} a(n) = {p = 5; while (! okchain(n, p), p = nextprime(p+1)); p;} \\ Michel Marcus, Dec 17 2013
Extensions
a(9)-a(13), including correction of a(9)-a(10) from Reiner Martin, Jul 18 2001
a(14)-a(20) from Hugo Pfoertner, Jul 31 2003
a(21)-a(25) from Jens Kruse Andersen, May 30 2006
a(26) and beyond from Giovanni Resta, Aug 04 2013
Comments