A003617 Smallest n-digit prime.
2, 11, 101, 1009, 10007, 100003, 1000003, 10000019, 100000007, 1000000007, 10000000019, 100000000003, 1000000000039, 10000000000037, 100000000000031, 1000000000000037, 10000000000000061, 100000000000000003, 1000000000000000003, 10000000000000000051
Offset: 1
References
- O'Hara, J. Rec. Math., 22 (1990), Table on page 278.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- Giovanni Resta, Table of n, a(n) for n = 1..1000 (terms 1..200 from T. D. Noe. _Jon E. Schoenfield_ used Magma to verify that terms 1..200 are primes, Jan 31 2009)
- 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
-
Maple
a:= n-> nextprime(10^(n-1)): seq(a(n), n=1..20); # Alois P. Heinz, Feb 11 2021
-
Mathematica
Table[a := 10^n + 1; While[ ! PrimeQ[a], a++ ]; a, {n, 0, 30}] (* Stefan Steinerberger, Apr 08 2006 *) NextPrime/@(10^Range[0,20]) (* Harvey P. Dale, May 01 2011 *)
-
PARI
a(n)=nextprime(10^(n-1)) \\ Charles R Greathouse IV, Jul 15 2011
-
Python
from sympy import nextprime print([nextprime(10**(n-1)) for n in range(1, 21)]) # Michael S. Branicky, Feb 11 2021
Extensions
More terms from Stefan Steinerberger, Apr 08 2006