login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A118782
Numbers k such that closest primes surrounding 10^n have the same last digit.
0
6, 9, 12, 19, 20, 23, 28, 31, 32, 33, 39, 59, 62, 66, 67, 75, 79, 80, 83, 84, 85, 91, 98, 99, 107, 108, 109, 117, 121, 144, 147, 149, 150, 153, 155, 156, 159, 160, 167, 169, 178, 179, 184, 186, 187, 191, 195, 208, 210, 212, 220, 222, 226, 227, 229, 231, 242, 246
OFFSET
1,1
COMMENTS
Do these numbers continue to infinity?
EXAMPLE
999983 and 1000003 are the closest primes surrounding 10^6. they both have the same last digit so 6 is in the table.
MATHEMATICA
Select[Range[246], Mod[NextPrime[10^#], 10]==Mod[NextPrime[10^#, -1], 10]&] (* James C. McMahon, Sep 13 2024 *)
PROG
(PARI) g(n) = for(j=1, n, x=precprime(10^j); y=nextprime(10^j); if(x%10==y%10, print1(j", ")))
CROSSREFS
Sequence in context: A023386 A036999 A290130 * A246356 A335065 A315960
KEYWORD
easy,nonn,base,less
AUTHOR
Cino Hilliard, May 22 2006
STATUS
approved