login
Values in A101115 which are records.
4

%I #9 Jul 26 2024 12:33:25

%S 0,5,9,14,15,18,19,20,22

%N Values in A101115 which are records.

%C All primes up to 1000003 have been tested.

%o (Python)

%o from sympy import isprime, nextprime

%o def agen(): # generator of tuple of terms of (A101116, A101117, A101118)

%o n, pn, record = 0, 1, -1

%o while True:

%o n += 1

%o pn = nextprime(pn)

%o s, c, found = str(pn), 0, True

%o while found:

%o found = False

%o for d in "123456789":

%o if isprime(int(d+s)):

%o s, c, found = d+s, c+1, True

%o break

%o if c > record:

%o record = c

%o yield record, pn, int(s)

%o g = agen()

%o print([next(g)[0] for n in range(1, 7)]) # _Michael S. Branicky_, Jun 24 2022

%Y Cf. A053583, A024785, A000040, A101115, A101117, A101118.

%K base,more,nonn

%O 1,2

%A Chuck Seggelin (seqfan(AT)plastereddragon.com), Dec 02 2004

%E a(7)-a(8) from _Michael S. Branicky_, Jun 24 2022

%E a(9) from _Michael S. Branicky_, Jul 26 2024