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.

User: Hayden Chesnut

Hayden Chesnut's wiki page.

Hayden Chesnut has authored 2 sequences.

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

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

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

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