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.

A370497 a(1) = 1; for n > 1, a(n) is smallest unused number such that a(n) is coprime to a(n-1), sopfr(a(n)) is coprime to sopfr(a(n-1)), and Omega(a(n)) does not equal Omega(a(n-1)), where sopfr(k) is the sum of the primes dividing k, with repetition.

Original entry on oeis.org

1, 2, 27, 4, 3, 10, 11, 6, 7, 8, 5, 9, 13, 12, 17, 14, 19, 15, 23, 16, 29, 18, 31, 20, 21, 37, 22, 41, 24, 25, 28, 33, 40, 39, 43, 26, 45, 32, 47, 30, 53, 34, 59, 35, 48, 49, 44, 57, 52, 51, 56, 55, 54, 61, 36, 67, 38, 63, 46, 71, 42, 73, 50, 79, 58, 75, 62, 83, 60, 89, 64, 97, 65, 76, 69, 68
Offset: 1

Views

Author

Scott R. Shannon, Feb 20 2024

Keywords

Comments

In the first 100000 terms the primes 11, 7 and 5 appear in reverse order, but all others appear in their natural order. In the same range the fixed points begin 1, 2, 4, 13, 294, 295, 296, 299, 304, 309, 640, 649. The sequence is conjectured to be a permutation of the positive numbers.

Examples

			a(3) = 27 as a(2) = 2 and 27 is the smallest unused number that is coprime to 2, sopfr(27) = 9 is coprime to sopfr(2) = 2, and Omega(27) = 3 does not equal Omega(2) = 1.
		

Crossrefs

Programs

  • Python
    from math import gcd
    from sympy import factorint
    from functools import cache
    from itertools import count, islice
    @cache
    def sW(n):
        f = factorint(n)
        return (sum(p*e for p,e in f.items()), sum(f.values()))
    def agen(): # generator of terms
        yield 1
        aset, an, mink = {1, 2}, 2, 3
        while True:
            yield an
            s, W = sW(an)
            an = next(k for k, sk, Wk in ((k,)+sW(k) for k in count(mink)) if k not in aset and gcd(k, an)==1 and gcd(sk, s)==1 and Wk!=W)
            aset.add(an)
            while mink in aset: mink += 1
    print(list(islice(agen(), 76))) # Michael S. Branicky, Feb 21 2024