login
A086040
Prime p concatenated with next 4 primes is also prime.
6
7, 47, 53, 67, 97, 101, 149, 401, 431, 479, 487, 757, 827, 887, 1061, 1171, 1409, 1429, 1543, 1721, 1789, 1811, 1889, 1987, 2099, 2113, 2137, 2273, 2689, 2719, 2857, 3203, 3571, 3613, 3623, 3761, 3853, 3917, 3929, 4007, 4217, 4441, 4943, 5039, 5209, 5281, 5449
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 7 because 7, 11, 13, 17 and 19 concatenated together yield 711131719, which is prime.
PROG
(Python)
from itertools import islice
from sympy import isprime, nextprime
def agen(): # generator of terms
plst = [2, 3, 5, 7, 11]
slst = list(map(str, plst))
while True:
if isprime(int("".join(slst))):
yield plst[0]
plst = plst[1:] + [nextprime(plst[-1])]
slst = slst[1:] + [str(plst[-1])]
print(list(islice(agen(), 50))) # Michael S. Branicky, Jan 26 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Chuck Seggelin (barkeep(AT)plastereddragon.com), Jul 07 2003
EXTENSIONS
Offset corrected by Arkadiusz Wesolowski, May 10 2012
a(15) and beyond from Michael S. Branicky, Jan 26 2023
STATUS
approved