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-3 of 3 results.

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

Original entry on oeis.org

1, 2, 4, 8, 14, 20, 24, 3, 9, 15, 18, 16, 30, 5, 25, 35, 21, 6, 26, 32, 36, 33, 12, 10, 38, 42, 27, 60, 39, 51, 57, 45, 40, 28, 48, 54, 62, 44, 46, 86, 50, 55, 65, 70, 7, 49, 77, 66, 64, 68, 72, 69, 63, 56, 22, 74, 78, 81, 84, 87, 93, 99, 88, 52, 166, 106, 102, 85, 95, 100, 94, 120, 98, 91, 105
Offset: 1

Views

Author

Scott R. Shannon, Feb 08 2024

Keywords

Comments

In the first 100000 terms the primes appear in their natural order, although they are delayed relative to similarly sized numbers. In the same range the fixed points are 1, 2, 9, 27, 165, 88812. The sequence is conjectured to be a permutation of the positive numbers.

Examples

			a(5) = 14 as a(4) = 8 and 14 is the smallest unused number that shares a factor with 8, while sopfr(14) = 9 shares a factor with sopfr(8) = 6.
		

Crossrefs

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

A370499 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)), Omega(a(n)) does not equal Omega(a(n-1)), the string length of a(n) does not equal the string length of a(n-1), and a(n) has no digit in common with a(n-1), where sopfr(k) is the sum of the primes dividing k, with repetition.

Original entry on oeis.org

1, 20, 7, 15, 208, 5, 12, 305, 17, 4, 11, 6, 13, 8, 19, 200, 3, 10, 223, 9, 23, 100, 27, 101, 22, 103, 24, 107, 25, 104, 29, 105, 2, 45, 109, 26, 113, 28, 111, 40, 117, 32, 147, 38, 127, 30, 149, 33, 112, 37, 102, 43, 106, 47, 108, 35, 124, 39, 116, 49, 125, 34, 151, 36, 157, 42, 131, 44, 115
Offset: 1

Views

Author

Scott R. Shannon, Feb 20 2024

Keywords

Comments

The fixed points begin 1, 2, 11, 13, 40, 357, 2353, 2393, 2465, 2473, 2529, 2649, 2767. It is unknown if the sequence is infinite.

Examples

			a(5) = 208 as a(4) = 15 and 208 is the smallest unused number that is coprime to 15, sopfr(208) = 21 is coprime to sopfr(15) = 8, Omega(208) = 5 does not equal Omega(15) = 2, the string length of "208" = 3 does not equal the string length of "15" = 2, and 208 has no digit in common with 15.
		

Crossrefs

Programs

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