OFFSET
0,1
FORMULA
EXAMPLE
a(7) = 2 is the least prime which starts several sequences of 1+7 primes, e.g., (2, 23, 239, 2393, ..., 23399339) and others leading at most to 29399999 = A232129(2), where a digit is appended 7 times to yield a prime after each step, while it is not possible in any of the "branches" to append one more digit to the last term, preserving primality.
PROG
(Python)
from sympy import isprime, nextprime
def a(n):
p = 2
while True:
extends, reach = -1, {p}
while len(reach) > 0:
candidates = (int(str(e)+d) for d in "1379" for e in reach)
reach1 = set(filter(isprime, candidates))
extends, reach = extends + 1, reach1
if extends == n: return p
p = nextprime(p)
for n in range(12): print(a(n), end=", ") # Michael S. Branicky, Aug 15 2021
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Michel Marcus and M. F. Hasler, Nov 19 2013
EXTENSIONS
a(12)-a(13) from Michael S. Branicky, Aug 15 2021
STATUS
approved