%I #21 May 15 2016 13:35:21
%S 5,53,503,5003,50021,500009,5000011,50000017,500000003,5000000029,
%T 50000000021,500000000023,5000000000053,50000000000053,
%U 500000000000057,5000000000000023,50000000000000051,500000000000000021
%N Smallest prime in which the n-th significant digit is a 5.
%H Abhiram R Devesh, <a href="/A069592/b069592.txt">Table of n, a(n) for n = 1..100</a>
%p 5,seq(nextprime(5*10^j),j=1..32);
%t 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 *)
%t Join[{5},NextPrime[5*10^Range[20]]] (* _Harvey P. Dale_, May 15 2016 *)
%o (Python)
%o import sympy
%o i=0
%o print(5)
%o i=i+1
%o while i > -1:
%o ....a=5*(10**i)
%o ....p=sympy.nextprime(a)
%o ....print(p)
%o ....i=i+1
%o ## _Abhiram R Devesh_, Jul 31 2014
%o (PARI) a(n) = nextprime(5*10^n); \\ _Michel Marcus_, Aug 07 2014
%Y Cf. A069588, A069589, A069590, A069591.
%K base,nonn
%O 1,1
%A _Amarnath Murthy_, Mar 25 2002
%E More terms from _Sascha Kurz_, Mar 28 2002
|