%I #66 Sep 08 2022 08:44:51
%S 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,
%T 103,331,319,57,33,49,61,193,69,67,43,133,3,121,109,63,57,31,9,121,33,
%U 193,9,151,121,327,171,31,21,3,279,159,19,7,93,447,121,57,49,49,49,99,9
%N Difference between first prime > 10^n (A003617) and 10^n.
%D O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
%H Matthias Baur, <a href="/A033873/b033873.txt">Table of n, a(n) for n = 0..14000</a> (terms 0..1000 from T. D. Noe, terms 1001..2750 from Robert G. Wilson v, terms 2751..8000 from Giovanni Resta)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/NextPrime.html">Next Prime</a>
%H R. G. Wilson, v., <a href="/A003617/a003617.pdf">Extract from letter to N. J. A. Sloane, May 20 1994</a>, with annotated scanned copy of page 278 of O'Hara article.
%F a(n) = A003617(n) - 10^n = A013632(10^n). - _Robert Israel_, Aug 10 2015
%e 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.
%p seq(nextprime(10^n)-10^n,n=0..70); # _Emeric Deutsch_, Apr 20 2006
%t f[n_]:=Module[{x=10^n},NextPrime[x]-x]; f/@Range[0,75] (* _Harvey P. Dale_, Mar 30 2011 *)
%o (PARI) a(n)=nextprime(10^n)-10^n \\ _Charles R Greathouse IV_, Jul 16 2011
%o (Magma) [NextPrime(10^n)-10^n: n in [0..65]]; // _Vincenzo Librandi_, Sep 13 2016
%Y Cf. A003617, A013632, A033874, A097517.
%K nonn
%O 0,4
%A Vasiliy Danilov (danilovv(AT)usa.net)
%E More terms from _Patrick De Geest_