login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055626 First prime starting a chain of exactly n consecutive primes congruent to 5 modulo 6. 7
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The term "exactly" means that before the first and after the last primes of chain, the immediate primes are not congruent to 5 modulo 6.

a(21)>2^31, a(22)= 766319189. - Hugo Pfoertner, Jul 31 2003

See A057622 for the variant where "exactly" is replaced by "at least". See A055625 for the variant "congruent to 1 (mod 6)". - M. F. Hasler, Sep 03 2016

LINKS

Giovanni Resta, Table of n, a(n) for n = 1..35 (terms < 4*10^14)

J. K. Andersen, Consecutive Congruent Primes.

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 *)

PROG

See link in A085516.

(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

CROSSREFS

Cf. A055623, A055624, A055625, A085516.

Sequence in context: A107011 A031387 A057622 * A127200 A147113 A135771

Adjacent sequences:  A055623 A055624 A055625 * A055627 A055628 A055629

KEYWORD

nonn

AUTHOR

Labos Elemer, Jun 05 2000

EXTENSIONS

More terms from Reiner Martin (reinermartin(AT)hotmail.com), Jul 18 2001

More terms from Hugo Pfoertner, Jul 31 2003

More terms from Jens Kruse Andersen, May 30 2006

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 27 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 12 19:41 EST 2019. Contains 329078 sequences. (Running on oeis4.)