A037053 Smallest prime containing exactly n 0's.
2, 101, 1009, 10007, 100003, 1000003, 20000003, 100000007, 1000000007, 30000000001, 100000000003, 2000000000003, 40000000000001, 1000000000000037, 6000000000000001, 20000000000000003, 100000000000000003, 1000000000000000003, 60000000000000000007, 500000000000000000003
Offset: 0
Links
- Robert Israel and Robert G. Wilson v, Table of n, a(n) for n = 0..1000 a(0) - a(900) from Robert Israel.
- Hans Havermann, Compactly expressed table of n, a(n) for a large number of n
Crossrefs
Programs
-
Maple
F:= proc(n) local a,b,cands,p; cands:= [seq(seq(10^(n+1)*a+b,b=[1,3,7,9]),a=1..9), seq(seq(seq(10^(n+2)+a*10^j+b,b=[1,3,7,9]),a=1..9),j=1..n+1)]; for p in cands do if isprime(p) then return p fi od; error("No candidate is prime"); end proc: 2, seq(F(n),n=1..40); # Robert Israel, Feb 19 2016
-
Mathematica
f[n_] := Block[{pc}, a = 1; While[a < 10, b = 1; While[b < 10, pc = a*10^(n + 1) + b; If[PrimeQ[pc], Goto[fini]]; b += 2]; a++]; e = 1; While[e < n + 2, b = 1; While[b < 10, c = 1; While[c < 10, pc = 10^(n + 2) + b*10^e + c; If[ PrimeQ[pc], Goto[ fini]]; c += 2]; b++]; e++]; Label[ fini]; pc]; f[0] = 2; Array[f, 25, 0] (* Robert G. Wilson v, Feb 21 2016 *)
-
PARI
A037053(n)={n&&forstep(i=n=10^(n+1),9*n,n,nextprime(i)p*=10, forstep(j=i+p,i+9*p,p,nextprime(j)
M. F. Hasler, Feb 19 2016
Formula
a(n) = prime(A037052(n)). - Amiram Eldar, Jul 21 2025
Extensions
More terms from Victoria A Sapko (vsapko(AT)canes.gsw.edu), Aug 16 2002
Edited by Robert G. Wilson v, Jul 04 2003
Sequence rechecked (by request) and edited by Charles R Greathouse IV, Aug 03 2010
Extended with a(0) = 2 and three lines of data completed by M. F. Hasler, Feb 19 2016
Comments