login
A033873
Difference between first prime > 10^n (A003617) and 10^n.
28
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,4
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.
FORMULA
a(n) = A003617(n) - 10^n = A013632(10^n). - Robert Israel, Aug 10 2015
EXAMPLE
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.
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 *)
PROG
(PARI) a(n)=nextprime(10^n)-10^n \\ Charles R Greathouse IV, Jul 16 2011
(Magma) [NextPrime(10^n)-10^n: n in [0..65]]; // Vincenzo Librandi, Sep 13 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Vasiliy Danilov (danilovv(AT)usa.net)
EXTENSIONS
More terms from Patrick De Geest
STATUS
approved