A101116 Values in A101115 which are records.
0, 5, 9, 14, 15, 18, 19, 20, 22
Offset: 1
Programs
-
Python
from sympy import isprime, nextprime def agen(): # generator of tuple of terms of (A101116, A101117, A101118) n, pn, record = 0, 1, -1 while True: n += 1 pn = nextprime(pn) s, c, found = str(pn), 0, True while found: found = False for d in "123456789": if isprime(int(d+s)): s, c, found = d+s, c+1, True break if c > record: record = c yield record, pn, int(s) g = agen() print([next(g)[0] for n in range(1, 7)]) # Michael S. Branicky, Jun 24 2022
Extensions
a(7)-a(8) from Michael S. Branicky, Jun 24 2022
a(9) from Michael S. Branicky, Jul 26 2024
Comments