cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A118798 Numbers n such that the closest primes surrounding 10^n have the same last two digits.

Original entry on oeis.org

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

Views

Author

Cino Hilliard, May 23 2006

Keywords

Comments

79 {251, 49}, 178 {239, 261}, 179 {221, 979}, 186 {479, 721}, 210 {171, 1129}, 284 {467, 133}, 300 {69, 331}, 349 {2603, 297}, 391 {123, 477}, 456 {633, 567}, 594 {11, 789}, 595 {503, 297}, 599 {2339, 2161}, 624 {413, 187}, 645 {3291, 109}, 654 {1811, 1089}, 659 {2363, 937}, 704 {3489, 211},
712 {171, 1029}, 713 {801, 2299}, 860 {1193, 2907}, 871 {827, 1473}, 892 {629, 271}, 904 {503, 597}, 924 {303, 4797}, 990 {3, 1197}, 1015 {71, 1029}, 1089 {4403, 5997}, 1097 {2271, 1429}, 1110 {2373, 2527}, 1118 {1767, 2233}, 1151 {2703, 97}, 1165 {33, 3867}, 1374 {689, 1411},
1396 {1023, 3477}, 1459 {10211, 489}, 1709 {2859, 4241}, 1721 {10311, 189}, 1826 {1761, 1539}, 1831 {17751, 1449}, 1911 {4179, 2621}, 1943 {1279, 1721}, 1956 {541, 9459}, 2005 {141, 14259}, 2061 {6607, 3293}, 2082 {9537, 4563}, 2089 {597, 203}, 2091 {2517, 9783}, 2135 {7287, 3513}, ...,.

Examples

			79 is in the sequence since the two primes nearest primes 10^79 are 10^79 - 251 and 10^79 + 49.
		

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

A033873 + A033874 == 0 (mod 100). - Robert G. Wilson v, May 27 2006

Extensions

More terms from Robert G. Wilson v, May 27 2006 - Jun 14 2006