Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #9 Feb 05 2021 16:46:48
%S 2,5,557,5557,555521,555557,55555517,55555553,5555555501,5555555557,
%T 555555555551,555555555551,5555555555551,555555555555529,
%U 555555555555557,55555555555555519,555555555555555559,555555555555555559,55555555555555555567,5555555555555555555087
%N Smallest prime starting with n 5s.
%H Michael S. Branicky, <a href="/A068105/b068105.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) <= A065588(n). - _Michael S. Branicky_, Feb 05 2021
%o (Python)
%o from sympy import isprime
%o def a(n):
%o if n < 2: return list([2, 5])[n]
%o n5s, i, pow10 = int('5'*n), 1, 1
%o while True:
%o i = 1
%o while i < pow10:
%o t = n5s * pow10 + i
%o if isprime(t): return t
%o i += 2
%o pow10 *= 10
%o print([a(n) for n in range(20)]) # _Michael S. Branicky_, Feb 05 2021
%Y Cf. A065584, A068103, A068104, A065587, A065588.
%K base,easy,nonn
%O 0,1
%A _Amarnath Murthy_, Feb 20 2002
%E Edited and extended by _Robert G. Wilson v_, Feb 21 2002
%E Corrected by _Don Reble_, Jan 17 2007