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.

A116548 a(n) = smallest divisor d of n that occurs earlier in the sequence fewer than a(d) times.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 4, 3, 5, 11, 4, 13, 7, 5, 8, 17, 6, 19, 5, 7, 11, 23, 6, 5, 13, 9, 7, 29, 6, 31, 8, 11, 17, 7, 9, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 8, 7, 10, 17, 13, 53, 18, 11, 14, 19, 29, 59, 10, 61, 31, 21, 16, 13, 11, 67, 17, 23, 10, 71, 12, 73, 37, 15, 19, 11, 13, 79, 10
Offset: 1

Views

Author

Keywords

Comments

When n is prime, no smaller divisor is available, so a(n) = n. It can be shown than a(n) < n if n is composite. Similar to Golomb's sequence (A001462), but with the added condition that a(n) divides n.

Crossrefs

Programs

  • Python
    from sympy import divisors
    def A(maxn):
        A = []
        for n in range(1,maxn+1):
            d = divisors(n)
            for j in range(0,len(d)):
                if d[j] > len(A): break
                if A.count(d[j]) < A[d[j]-1]: break
            A.append(d[j])
        return(A) # John Tyler Rascoe, Mar 04 2023