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.

A082433 a(n) = A072181(n) - p, where p is the largest prime < A072181(n) - 1.

Original entry on oeis.org

3, 5, 7, 7, 11, 11, 11, 11, 13, 23, 17, 17, 17, 41, 191, 47, 31, 53, 53, 53, 31, 179, 61, 61, 337, 131, 523, 523, 419, 223, 223, 223, 223, 79, 3821, 3821, 3821, 23399, 21269, 21269, 3607
Offset: 3

Views

Author

Naohiro Nomoto, Apr 25 2003

Keywords

Comments

Are all terms prime?
All terms are odd. - Michael S. Branicky, Sep 05 2021

Examples

			a(4) = A072181(4)-7 = 12-7 = 5.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    def afindn(terms):
        prev_factors, prevan, prevk, n = dict(), 1, None, 2
        for n in range(2, terms+1):
            n_factors, an = factorint(n), 1
            for pi in set(prev_factors.keys()) | set(n_factors.keys()):
                ei = prev_factors[pi] if pi in prev_factors else 1
                fi = n_factors[pi] if pi in n_factors else 1
                an *= pi**(ei*fi)
            if n >= 3:
                if an != prevan:
                    k = 3
                    while not isprime(an - k): k += 2
                else:
                    k = prevk
                print(k, end=", ")
                prevk = k
            prev_factors, prevan = factorint(an), an
    afindn(36) # Michael S. Branicky, Sep 05 2021

Extensions

a(36)-a(40) from Jinyuan Wang, Sep 05 2020
a(41)-a(43) from Michael S. Branicky, Sep 05 2021
Showing 1-1 of 1 results.