A069592 Smallest prime in which the n-th significant digit is a 5.
5, 53, 503, 5003, 50021, 500009, 5000011, 50000017, 500000003, 5000000029, 50000000021, 500000000023, 5000000000053, 50000000000053, 500000000000057, 5000000000000023, 50000000000000051, 500000000000000021
Offset: 1
Links
- Abhiram R Devesh, Table of n, a(n) for n = 1..100
Programs
-
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 *)
-
PARI
a(n) = nextprime(5*10^n); \\ Michel Marcus, Aug 07 2014
-
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
Extensions
More terms from Sascha Kurz, Mar 28 2002