OFFSET
1,1
FORMULA
(prime(k) + prime(k+1))/2 = repdigit.
PROG
(Python)
from itertools import count, islice
from sympy import isprime, prevprime, primepi
def agen():
for d in count(1):
ru = int("1"*d)
for r in range(ru, 10*ru, ru):
if r > 2:
p = prevprime(r)
if isprime(r + (r-p)) and prevprime(r+(r-p)) == p:
yield primepi(p)
print(list(islice(agen(), 7))) # Michael S. Branicky, Jun 30 2022
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Zak Seidov, Mar 04 2005
EXTENSIONS
a(8) from Giovanni Resta, Apr 05 2006
a(9) from Michael S. Branicky, Jul 02 2022
a(10)-a(12) from Chai Wah Wu, Jun 01 2024
STATUS
approved