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!)
A114370 Primes p such that the sum of numbers from prime p to nextprime(p)-1 is a repdigit. 0
2, 3, 5, 53, 55555553, 55555555555555555555555553, 2777777777777777777777777777777777777 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The sequence is built under the (reasonable) assumption that 100+2*log(p)^2 is an upper bound to the largest gap between a prime p and nextprime(p). Under this assumption there are no other terms with less than 100 digits.
LINKS
EXAMPLE
nextprime(55555555555555555555555553) is 55555555555555555555555559 and the sum
from 55555555555555555555555553 to 55555555555555555555555558 gives the repdigit 333333333333333333333333333.
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime
from sympy.abc import x, y
from sympy.solvers.diophantine.diophantine import diop_quadratic
def A114370_gen(): # generator of terms
for l in count(1):
c = []
for m in range(1, 10):
k = m*(10**l-1)//9<<1
for a, b in diop_quadratic((x-y)*(x+y-1)-k):
if isprime(b) and a == nextprime(b):
c.append(b)
yield from sorted(c)
A114370_list = list(islice(A114370_gen(), 6)) # Chai Wah Wu, Jun 02 2024
CROSSREFS
Sequence in context: A100850 A309607 A060085 * A114725 A136340 A029961
KEYWORD
base,nonn,more
AUTHOR
Giovanni Resta, Feb 09 2006
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 August 13 06:03 EDT 2024. Contains 375113 sequences. (Running on oeis4.)