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

A349543 a(n) = A001414(A277272(n)).

Original entry on oeis.org

2, 4, 6, 3, 6, 9, 9, 9, 15, 5, 5, 10, 8, 8, 8, 10, 10, 10, 14, 7, 7, 7, 21, 9, 12, 10, 16, 12, 15, 25, 20, 14, 12, 16, 22, 11, 11, 11, 11, 11, 11, 33, 12, 12, 18, 16, 26, 13, 13, 13, 13, 39, 21, 14, 12, 18, 18, 12, 14, 22, 32, 20, 45, 27, 24, 34, 17, 17, 17, 17
Offset: 1

Views

Author

Michael De Vlieger, Nov 21 2021

Keywords

Comments

Although terms k in A277272 are distinct, terms m in this sequence may appear A000607(m) times, even consecutively.
The restriction of the number of appearances of m to A000607(m) is a consequence of distinct k such that A001414(k) = m. Distinct k for which A001414(k) = m relates to the number of prime partitions of m and are listed in row m of A064364. For example, k in {7, 10, 12} have A001414(k) = 7. Once these k have appeared in A277272, there is no other way to obtain m = 7 in this sequence. Hence m = 7 is exhausted in this sequence.
Terms are greater than 1.

Crossrefs

Programs

  • Mathematica
    m = 2, n = 1, s[] = c[] = 0; s[2] = 2; c[2]++; {2}~Join~Reap[Do[k = 3; While[Nand[GCD[If[s[k] == 0, Set[s[k], Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[k]]], s[k]], s[m]] > 1, c[k] == 0], k++]; Set[n, k]; Sow[s[k]]; c[n]++; m = n, 70]][[-1, -1]]

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

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

A354075 Lexicographically earliest infinite sequence of distinct positive integers such that A(a(n+1)) is prime to A(a(n)) but not to A(a(n-1)), where A is A001414.

Original entry on oeis.org

2, 3, 4, 14, 15, 20, 16, 24, 18, 26, 33, 5, 7, 6, 10, 21, 12, 8, 94, 9, 124, 27, 25, 38, 30, 62, 32, 11, 35, 28, 36, 40, 39, 45, 42, 48, 44, 54, 46, 57, 86, 49, 74, 51, 13, 50, 22, 55, 56, 60, 63, 64, 75, 65, 80, 66, 90, 70, 96, 68, 69, 92, 84, 105, 85, 112, 87
Offset: 1

Views

Author

David James Sycamore, Jun 11 2022

Keywords

Comments

2,3,4 is the earliest string of three consecutive numbers which satisfy the definition, therefore the sequence begins a(1)=2, a(2)=3, a(3)=4.
Sequence is infinite since there always exists a k which has not occurred before such that A(k) is prime to A(a(n)) but not to A(a(n-1)). Since A001414 covers N/{1} a number m can be found such that A(m)=k. Thus k can be chosen for a(n+1) unless there is a smaller number with the same property.
Similar to the Yellowstone sequence (A098550) in terms of coprime relations.
The first seven primes are in natural order but then we have ...,17,23,19,31,37,43,41,47,29,...
Conjectured to be a permutation of N/{0,1}.

Examples

			a(4)=14 because A(14)=9 is prime to A(a(3))=4 but not to A(a(2))=3, and is the smallest number not already seen in the sequence which has this property.
		

Crossrefs

Programs

  • PARI
    f(n) = my(f=factor(n)); f[, 1]~*f[, 2]; \\ A001414
    lista(nn) = {my(va = vector(nn)); va[1] = 2; va[2] = 3; for (n=3, nn, my(k=1); while ((gcd(f(va[n-1]), f(k)) != 1) || (gcd(f(va[n-2]), f(k)) == 1) || #select(x->(x==k), va), k++); va[n] = k;); va;} \\ Michel Marcus, Jun 12 2022

Extensions

Corrected and extended by Michel Marcus, Jun 12 2022

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