login
A069592
Smallest prime in which the n-th significant digit is a 5.
6
5, 53, 503, 5003, 50021, 500009, 5000011, 50000017, 500000003, 5000000029, 50000000021, 500000000023, 5000000000053, 50000000000053, 500000000000057, 5000000000000023, 50000000000000051, 500000000000000021
OFFSET
1,1
LINKS
MAPLE
5, seq(nextprime(5*10^j), j=1..32);
MATHEMATICA
a069592[n_Integer] := Module[{f}, f[1] = 5; f[i_] := NextPrime[5*10^(i - 1)]; f[n]]; Map[a069592, Range[100]] (* Michael De Vlieger, Aug 06 2014 *)
Join[{5}, NextPrime[5*10^Range[20]]] (* Harvey P. Dale, May 15 2016 *)
PROG
(Python)
import sympy
i=0
print(5)
i=i+1
while i > -1:
....a=5*(10**i)
....p=sympy.nextprime(a)
....print(p)
....i=i+1
## Abhiram R Devesh, Jul 31 2014
(PARI) a(n) = nextprime(5*10^n); \\ Michel Marcus, Aug 07 2014
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 25 2002
EXTENSIONS
More terms from Sascha Kurz, Mar 28 2002
STATUS
approved