The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 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

%I #20 Jul 02 2022 09:29:14

%S 2,3,4,25,29,603,6363181,21366409911,279238341033925

%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

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.

Last modified May 18 01:49 EDT 2024. Contains 372613 sequences. (Running on oeis4.)