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-1 of 1 results.

A380027 a(n) is the largest prime p such that p - a(n-1) is a primorial, starting with a(1) = 2.

Original entry on oeis.org

2, 3, 5, 11, 41, 9699731
Offset: 1

Views

Author

Hayden Chesnut, Jan 09 2025

Keywords

Comments

From Michael S. Branicky, Jan 11 2025: (Start)
The corresponding k are such that 0 <= k < PrimePi(P), so a(n-1)+1 <= a(n) <= a(n-1)+primorial(PrimePi(a(n-1))-1).
a(7) >= 9699731 + primorial(452), which is prime and has 1351 digits, so it is too large to include, even in a b-file. (End)

Examples

			a(3) = 5
For primes less than 5+5#:
31 - 5 = 26 is not in A002110
...
13 - 5 = 8 is not in A002110
11 - 5 = 6 is in A002110 so a(4) = 11
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, primepi, primorial
    def A002110(n): return primorial(n) if n > 0 else 1
    def agen(an=2): # generator of terms
        while True:
            yield an
            an = next(s for k in range(primepi(an)-1, -1, -1) if isprime(s:=an+A002110(k)))
    print(list(islice(agen(), 6))) # Michael S. Branicky, Jan 11 2025

Formula

a(n) = a(n-1) + A002110(A265109(A000720(a(n-1)))), for n > 1. - Michael S. Branicky, Jan 10 2025
Showing 1-1 of 1 results.