cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A114370 Primes p such that the sum of numbers from prime p to nextprime(p)-1 is a repdigit.

This page as a plain text file.
%I A114370 #20 Jun 04 2024 11:49:44
%S A114370 2,3,5,53,55555553,55555555555555555555555553,
%T A114370 2777777777777777777777777777777777777
%N A114370 Primes p such that the sum of numbers from prime p to nextprime(p)-1 is a repdigit.
%C A114370 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.
%e A114370 nextprime(55555555555555555555555553) is 55555555555555555555555559 and the sum
%e A114370 from 55555555555555555555555553 to 55555555555555555555555558 gives the repdigit 333333333333333333333333333.
%o A114370 (Python)
%o A114370 from itertools import count, islice
%o A114370 from sympy import isprime, nextprime
%o A114370 from sympy.abc import x,y
%o A114370 from sympy.solvers.diophantine.diophantine import diop_quadratic
%o A114370 def A114370_gen(): # generator of terms
%o A114370     for l in count(1):
%o A114370         c = []
%o A114370         for m in range(1,10):
%o A114370             k = m*(10**l-1)//9<<1
%o A114370             for a, b in diop_quadratic((x-y)*(x+y-1)-k):
%o A114370                 if isprime(b) and a == nextprime(b):
%o A114370                     c.append(b)
%o A114370         yield from sorted(c)
%o A114370 A114370_list = list(islice(A114370_gen(),6)) # _Chai Wah Wu_, Jun 02 2024
%Y A114370 Cf. A010785, A054268.
%K A114370 base,nonn,more
%O A114370 1,1
%A A114370 _Giovanni Resta_, Feb 09 2006