A033873 Difference between first prime > 10^n (A003617) and 10^n.
1, 1, 1, 9, 7, 3, 3, 19, 7, 7, 19, 3, 39, 37, 31, 37, 61, 3, 3, 51, 39, 117, 9, 117, 7, 13, 67, 103, 331, 319, 57, 33, 49, 61, 193, 69, 67, 43, 133, 3, 121, 109, 63, 57, 31, 9, 121, 33, 193, 9, 151, 121, 327, 171, 31, 21, 3, 279, 159, 19, 7, 93, 447, 121, 57, 49, 49, 49, 99, 9
Offset: 0
Keywords
Examples
The 23rd term is 117 since 10^23 + 117 = 100000000000000000000117 is prime and all of 100000000.., 100000....001, 1000...002 up through 1000...000116 are composite.
References
- O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
Links
- Matthias Baur, Table of n, a(n) for n = 0..14000 (terms 0..1000 from T. D. Noe, terms 1001..2750 from Robert G. Wilson v, terms 2751..8000 from Giovanni Resta)
- Eric Weisstein's World of Mathematics, Next Prime
- R. G. Wilson, v., Extract from letter to N. J. A. Sloane, May 20 1994, with annotated scanned copy of page 278 of O'Hara article.
Programs
-
Magma
[NextPrime(10^n)-10^n: n in [0..65]]; // Vincenzo Librandi, Sep 13 2016
-
Maple
seq(nextprime(10^n)-10^n,n=0..70); # Emeric Deutsch, Apr 20 2006
-
Mathematica
f[n_]:=Module[{x=10^n},NextPrime[x]-x]; f/@Range[0,75] (* Harvey P. Dale, Mar 30 2011 *)
-
PARI
a(n)=nextprime(10^n)-10^n \\ Charles R Greathouse IV, Jul 16 2011
Formula
Extensions
More terms from Patrick De Geest
Comments