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.

A104389 Repdigits which are the average of two successive primes.

Original entry on oeis.org

4, 6, 9, 99, 111, 4444, 111111111, 555555555555, 9999999999999999, 111111111111111111, 444444444444444444, 555555555555555555555, 777777777777777777777777, 333333333333333333333333333333333, 444444444444444444444444444444444444
Offset: 1

Views

Author

Zak Seidov, Mar 04 2005

Keywords

Crossrefs

Corresponding primes: A104387, A104388.

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, prevprime
    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 r
    print(list(islice(agen(), 15))) # Michael S. Branicky, Jun 30 2022

Formula

a(n) = (A104387(n)+A104388(n))/2.

Extensions

More terms from Giovanni Resta, Apr 05 2006