OFFSET
0,1
COMMENTS
a(499) has 1001 digits. - Michael S. Branicky, Oct 02 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..498
EXAMPLE
a(2) = 11311 is a prime that starts with 11 and ends in 11 (two 1's).
PROG
(Python)
from gmpy2 import is_prime
def a(n):
suffix, d = (10**n-1)//9, 2*n+1
while True:
prefix = 10**(d-n)*suffix
for mid in range(0, 10**(d-n), 10**n):
s = str(mid//10**n)
if s[0] == "1" or s[-1] == "1": continue
t = prefix + mid + suffix
if is_prime(t): return t
d += 1
print([a(n) for n in range(16)]) # Michael S. Branicky, Oct 02 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Feb 24 2002
EXTENSIONS
Corrected and extended by Sascha Kurz, Jan 03 2003
More precise name and more terms from Hugo Pfoertner, Oct 11 2023
a(0) = 2 inserted by Michael S. Branicky, Oct 02 2024
STATUS
approved