A118798 Numbers n such that the closest primes surrounding 10^n have the same last two digits.
79, 178, 179, 186, 210, 284, 300, 349, 391, 456, 594, 595, 599, 624, 645, 654, 659, 704, 712, 713, 860, 871, 892, 904, 924, 990, 1015, 1089, 1097, 1110, 1118, 1151, 1165, 1374, 1396, 1459, 1709, 1721, 1826, 1831, 1911, 1943, 1956, 2005, 2061, 2082, 2089
Offset: 1
Examples
79 is in the sequence since the two primes nearest primes 10^79 are 10^79 - 251 and 10^79 + 49.
Links
- V. Danilov, Smallest and largest n-digit primes.n
Crossrefs
Cf. A115564.
Programs
-
Mathematica
NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ@k, k++ ]; k]; PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ@k, k-- ]; k]; fQ[n_] := Mod[NextPrim[10^n], 100] == Mod[PrevPrim[10^n], 100]; Do[ If[ fQ@n, Print@n], {n, 2, 1250}] (* Robert G. Wilson v, May 27 2006 *) Select[Range[2100],Mod[NextPrime[10^#],100]==Mod[NextPrime[10^#,-1],100]&] (* Harvey P. Dale, Mar 09 2019 *)
-
PARI
g(n) = for(j=1,n,x=precprime(10^j);y=nextprime(10^j);if(x%100==y%100,print1 (j",")))
Formula
Extensions
More terms from Robert G. Wilson v, May 27 2006 - Jun 14 2006
Comments