login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104386 Numbers k such that the average of the k-th and (k+1)-th primes is a repdigit. 3
2, 3, 4, 25, 29, 603, 6363181, 21366409911, 279238341033925 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Cf. A054268.
Corresponding primes A104387, A104388, repdigits A104389.
Sequence in context: A055006 A139050 A043309 * A171558 A044906 A255312
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
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 13 11:28 EDT 2024. Contains 371640 sequences. (Running on oeis4.)