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.

A104388 Lesser of two successive primes the average of which is a repdigit.

This page as a plain text file.
%I A104388 #15 Jun 30 2022 10:41:50
%S A104388 3,5,7,97,109,4441,111111109,555555555551,9999999999999937,
%T A104388 111111111111111091,444444444444444419,555555555555555555491,
%U A104388 777777777777777777777767,333333333333333333333333333333293,444444444444444444444444444444444391
%N A104388 Lesser of two successive primes the average of which is a repdigit.
%H A104388 Chai Wah Wu, <a href="/A104388/b104388.txt">Table of n, a(n) for n = 1..31</a>
%F A104388 a(n) = prime(A104386(n)).
%o A104388 (Python)
%o A104388 from itertools import count, islice
%o A104388 from sympy import isprime, prevprime
%o A104388 def agen():
%o A104388     for d in count(1):
%o A104388         ru = int("1"*d)
%o A104388         for r in range(ru, 10*ru, ru):
%o A104388             if r > 2:
%o A104388                 p = prevprime(r)
%o A104388                 if isprime(r + (r-p)) and prevprime(r+(r-p)) == p:
%o A104388                     yield p
%o A104388 print(list(islice(agen(), 15))) # _Michael S. Branicky_, Jun 30 2022
%Y A104388 Cf. A054268, A104386, A104387 (larger primes), A104389 (repdigits).
%K A104388 nonn,base
%O A104388 1,1
%A A104388 _Zak Seidov_, Mar 04 2005
%E A104388 More terms from _Giovanni Resta_, Feb 09 2006