Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #25 Jun 02 2024 08:23:15
%S 2,3,4,25,29,603,6363181,21366409911,279238341033925,2907021742443974,
%T 11220808305309952,11885037375341198280
%N Numbers k such that the average of the k-th and (k+1)-th primes is a repdigit.
%F (prime(k) + prime(k+1))/2 = repdigit.
%o (Python)
%o from itertools import count, islice
%o from sympy import isprime, prevprime, primepi
%o def agen():
%o for d in count(1):
%o ru = int("1"*d)
%o for r in range(ru, 10*ru, ru):
%o if r > 2:
%o p = prevprime(r)
%o if isprime(r + (r-p)) and prevprime(r+(r-p)) == p:
%o yield primepi(p)
%o print(list(islice(agen(), 7))) # _Michael S. Branicky_, Jun 30 2022
%Y Cf. A054268.
%Y Corresponding primes A104387, A104388, repdigits A104389.
%K nonn,base,hard,more
%O 1,1
%A _Zak Seidov_, Mar 04 2005
%E a(8) from _Giovanni Resta_, Apr 05 2006
%E a(9) from _Michael S. Branicky_, Jul 02 2022
%E a(10)-a(12) from _Chai Wah Wu_, Jun 01 2024