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.

Showing 1-4 of 4 results.

A104387 Larger of two successive primes the average of which is a repdigit.

Original entry on oeis.org

5, 7, 11, 101, 113, 4447, 111111113, 555555555559, 10000000000000061, 111111111111111131, 444444444444444469, 555555555555555555619, 777777777777777777777787, 333333333333333333333333333333373, 444444444444444444444444444444444497
Offset: 1

Views

Author

Zak Seidov, Mar 04 2005

Keywords

Comments

Lesser primes A104388, repdigits A104389. What is the next term?
The next term is 444444444444444444444444444444444497. The first term with more than 100 digits is a(22) which has 109 digits. - Harvey P. Dale, Jun 28 2011

Crossrefs

Programs

  • Mathematica
    Union[Flatten[Table[NextPrime/@Select[FromDigits/@Table[PadLeft[{i},n,i], {n,45}], Mean[{NextPrime[#],NextPrime[#,-1]}]==#&], {i,9}]]] (* Harvey P. Dale, Jun 28 2011 *)
  • 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 2*r - p
    print(list(islice(agen(), 15))) # Michael S. Branicky, Jun 30 2022

Formula

a(n) = prime(A104386(n)+1).

Extensions

More terms from Giovanni Resta, Apr 05 2006

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

A104386 Numbers k such that the average of the k-th and (k+1)-th primes is a repdigit.

Original entry on oeis.org

2, 3, 4, 25, 29, 603, 6363181, 21366409911, 279238341033925, 2907021742443974, 11220808305309952, 11885037375341198280
Offset: 1

Views

Author

Zak Seidov, Mar 04 2005

Keywords

Crossrefs

Cf. A054268.
Corresponding primes A104387, A104388, repdigits A104389.

Programs

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

Formula

(prime(k) + prime(k+1))/2 = repdigit.

Extensions

a(8) from Giovanni Resta, Apr 05 2006
a(9) from Michael S. Branicky, Jul 02 2022
a(10)-a(12) from Chai Wah Wu, Jun 01 2024

A114373 Lesser of two successive primes the sum of which is a repdigit.

Original entry on oeis.org

2, 3, 109, 4441, 111111109, 111111111111111091, 444444444444444419, 333333333333333333333333333333293, 444444444444444444444444444444444391, 3333333333333333333333333333333333313
Offset: 1

Views

Author

Giovanni Resta, Feb 09 2006

Keywords

Examples

			nextprime(4441)=4447 and 4441+4447=8888.
		

Crossrefs

Cf. A104388.
Showing 1-4 of 4 results.