login

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”).

A068105
Smallest prime starting with n 5s.
5
2, 5, 557, 5557, 555521, 555557, 55555517, 55555553, 5555555501, 5555555557, 555555555551, 555555555551, 5555555555551, 555555555555529, 555555555555557, 55555555555555519, 555555555555555559, 555555555555555559, 55555555555555555567, 5555555555555555555087
OFFSET
0,1
LINKS
FORMULA
a(n) <= A065588(n). - Michael S. Branicky, Feb 05 2021
PROG
(Python)
from sympy import isprime
def a(n):
if n < 2: return list([2, 5])[n]
n5s, i, pow10 = int('5'*n), 1, 1
while True:
i = 1
while i < pow10:
t = n5s * pow10 + i
if isprime(t): return t
i += 2
pow10 *= 10
print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 05 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy, Feb 20 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Feb 21 2002
Corrected by Don Reble, Jan 17 2007
STATUS
approved