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.

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

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 229, 439, 2749, 5059, 7369, 9679, 39709, 42019, 6469735249, 5766152219975951659023630035336134306565384015606066326325804059, 5766152219975951659023630035336134306565384015606073747063938869, 5766152219975951659023630035336134306565384015606073747287031739
Offset: 1

Views

Author

Hayden Chesnut, Jan 09 2025

Keywords

Examples

			a(4) = 7
For primes greater than 7:
11 - 7 = 4 is not in A002110
13 - 7 = 6 is in A002110 so a(5) = 13
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, 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 count(0) if isprime(s:=an+A002110(k)))
    print(list(islice(agen(), 18))) # Michael S. Branicky, Jan 10 2025
    
  • Python
    from sympy import isprime
    import primesieve
    it = primesieve.Iterator()
    chain = [2]
    pchain = []
    n = 1
    while len(chain) < 18:
        while True:
            p = it.next_prime()
            if isprime(chain[-1]+n):
                chain.append(chain[-1]+n)
                print(len(chain))
                break
            n *= p
        p = it.skipto(0)
        n = 1
    print(chain) # Hayden Chesnut, Jan 10 2025

Formula

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