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.

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

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Feb 20 2024

Keywords

Comments

In the first 100000 terms the primes appear in their natural order. In the same range the fixed points begin 1, 2, 3, 4, 5, 20, 134, 136, 403, 598, 608, 649, 667. The sequence is conjectured to be a permutation of the positive numbers.

Examples

			a(9) = 8 as a(8) = 11 and 8 is the smallest unused number that is coprime to 11, while sopfr(8) = 6 is coprime to sopfr(11) = 11.
		

Crossrefs

Programs

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