login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065588 Smallest prime beginning with exactly n 5's. 4
2, 5, 557, 5557, 555521, 555557, 55555517, 55555553, 5555555501, 5555555557, 5555555555057, 555555555551, 5555555555551, 555555555555529, 555555555555557, 55555555555555519, 5555555555555555021, 555555555555555559, 55555555555555555567, 5555555555555555555087 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..997 (terms 0..200 from M. F. Hasler)
PROG
(Python)
from sympy import isprime
def a(n):
if n < 2: return list([2, 5])[n]
n5s, i, pow10, end_digits = int('5'*n), 1, 1, 0
while True:
i = 1
while i < pow10:
istr = str(i)
if istr[0] == '5' and len(istr) == end_digits:
i += 2 if pow10 <= 10 else pow10 // 10
else:
t = n5s * pow10 + i
if isprime(t): return t
i += 2
pow10 *= 10; end_digits += 1
print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 05 2021, corrected Mar 03 2021
CROSSREFS
Cf. A037063, A065584 - A065592. Different from A068105.
Sequence in context: A283561 A037063 A068105 * A208277 A131748 A240768
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Nov 28 2001
EXTENSIONS
Corrected by N. J. A. Sloane, Jan 11 2007 and by Don Reble, Jan 17 2007
Offset corrected by Michael S. Branicky, Feb 05 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)