A057621 Initial prime in first sequence of n primes congruent to 2 modulo 3.
2, 23, 47, 251, 1889, 7793, 43451, 243161, 726893, 759821, 1820111, 1820111, 10141499, 19725473, 19725473, 136209239, 400414121, 400414121, 489144599, 489144599, 766319189, 766319189, 21549657539, 21549657539, 21549657539, 140432294381, 140432294381
Offset: 1
Keywords
Examples
a(12) = 1820111 because this number is the first in a sequence of 12 consecutive primes all of the form 3*n + 2.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..35 (terms < 4*10^14)
- J. K. Andersen, Consecutive Congruent Primes.
Programs
-
Mathematica
NextPrime[ n_Integer ] := Module[ {k = n + 1}, While[ ! PrimeQ[ k ], k++ ]; Return[ k ] ]; PrevPrime[ n_Integer ] := Module[ {k = n - 1}, While[ ! PrimeQ[ k ], k-- ]; Return[ k ] ]; p = 0; Do[ a = Table[ -1, {n} ]; k = Max[ 1, p ]; While[ Union[ a ] != {2}, k = NextPrime[ k ]; a = Take[ AppendTo[ a, Mod[ k, 3 ] ], -n ] ]; p = NestList[ PrevPrime, k, n ]; Print[ p[ [ -2 ] ] ]; p = p[ [ -1 ] ], {n, 1, 18} ]
Formula
Extensions
More terms from Jens Kruse Andersen, May 30 2006
Comments