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

A354721 Absolute values of first differences of A354687.

Original entry on oeis.org

1, 2, 4, 6, 8, 3, 9, 10, 12, 5, 15, 14, 18, 16, 20, 39, 13, 22, 33, 21, 27, 24, 11, 26, 28, 23, 46, 48, 7, 30, 34, 32, 49, 35, 36, 51, 45, 42, 25, 44, 55, 38, 66, 19, 57, 40, 87, 58, 54, 102, 52, 56, 50, 68, 85, 62, 60, 75, 65, 63, 108, 69, 64, 70, 72, 141, 17, 74, 88, 76, 78, 148, 80, 91, 77, 81
Offset: 1

Views

Author

Scott R. Shannon, Jun 04 2022

Keywords

Comments

See A354687 for further details.

Examples

			a(5) = 8 as | A354687(6) - A354687(5) | = | 6 - 14 | = 8.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = d[] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; {1}~Join~Reap[Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, ! CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; Sow[Abs[k - j]]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]][[-1, -1]] (* Michael De Vlieger, Jun 04 2022 *)
  • Python
    from math import gcd
    from sympy import isprime, nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, diffset, an, mink = {1, 2}, {1}, 2, 3
        yield from [1]
        for n in count(3):
            k = mink
            while k in aset or abs(an-k) in diffset or gcd(an, k) == 1: k += 1
            aset.add(k); diffset.add(abs(k-an)); yield abs(an-k); an = k
            while mink in aset: mink += 1
    print(list(islice(agen(), 76))) # Michael S. Branicky, Jun 04 2022

A354688 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1) and the difference | a(n) - a(n-1) | is distinct from all previous differences.

Original entry on oeis.org

1, 2, 5, 3, 7, 12, 19, 4, 13, 21, 8, 25, 6, 17, 11, 23, 9, 29, 39, 10, 31, 15, 37, 14, 41, 16, 47, 65, 18, 53, 20, 57, 83, 22, 61, 27, 55, 79, 24, 67, 26, 71, 33, 73, 43, 75, 119, 30, 89, 32, 81, 28, 93, 35, 86, 149, 34, 101, 45, 91, 127, 36, 107, 38, 111, 49, 97, 139, 40, 117, 167, 42, 121, 46
Offset: 1

Views

Author

Scott R. Shannon, Jun 03 2022

Keywords

Comments

All of the terms are concentrated along four lines - this is in contrast to A352588 where they all concentrated along one line. See the linked image. The primes do not occur in their natural order. The sequence is conjectured to be a permutation of the positive integers.
See A354731 for the differences between terms.

Examples

			a(6) = 12 as a(5) = 7, and 12 is the smallest unused number that is coprime to 7 and whose difference from the previous term, | 12 - 7 | = 5, has not appeared. Note that 4,6,8,9,10,11 are all coprime to 7 but their differences from 7 have all appeared as differences between previous terms so none can be chosen.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = d[] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Jun 04 2022 *)
  • Python
    from math import gcd
    from sympy import isprime, nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, diffset, an, mink = {1}, set(), 1, 2
        yield 1
        for n in count(2):
            k = mink
            while k in aset or abs(an-k) in diffset or gcd(an, k) != 1: k += 1
            aset.add(k); diffset.add(abs(k-an)); an = k; yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 74))) # Michael S. Branicky, Jun 04 2022

A354727 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that shares a factor with a(n-1) and the difference a(n) - a(n-1) is distinct from all previous differences.

Original entry on oeis.org

1, 2, 4, 8, 6, 3, 9, 12, 20, 5, 10, 22, 11, 33, 15, 24, 14, 7, 21, 28, 16, 26, 13, 39, 18, 34, 17, 51, 27, 42, 36, 32, 50, 25, 45, 40, 64, 30, 55, 35, 56, 48, 75, 66, 38, 19, 57, 76, 44, 72, 46, 23, 69, 92, 52, 65, 95, 60, 93, 31, 62, 94, 47, 141, 54, 90, 63, 49, 84, 68, 85, 125, 70, 112, 58
Offset: 1

Views

Author

Scott R. Shannon, Jun 05 2022

Keywords

Comments

This sequences uses similar a similar rule to A354687 but here the sign of the difference between a(n-1) and a(n) is considered. The terms show an overall similar behavior to A354687 although here only two lines show a higher concentration of terms than the other lines. See the linked image.
In the first 100000 terms the fixed points are 1,2,15,32,100,115,300,720. It is plausible no more exist although this is unknown.. The sequence is conjectured to be a permutation of the positive integers.
See A354739 for the differences between terms.

Examples

			a(9) = 20 as a(8) = 12, and 20 is the smallest unused number that shares a factor with 12 and whose difference from the previous term, 20 - 12 = 8, has not appeared. Note that 10,14,15,16,18 all share a factor with 12 but their differences from 12, namely -2,2,3,4,6, have already appeared as differences between previous pairs of terms.
		

Crossrefs

A359799 a(1) = 1, a(2) = 3; for n > 2, a(n) is the smallest positive number which has not appeared that shares a factor with |a(n-1) - a(n-2)| while the difference |a(n) - a(n-1)| is distinct from all previous differences |a(i) - a(i-1)|, i=2..n-1.

Original entry on oeis.org

1, 3, 6, 12, 2, 10, 14, 26, 4, 11, 28, 17, 22, 35, 65, 5, 20, 36, 8, 32, 9, 23, 42, 76, 18, 38, 56, 15, 41, 16, 25, 54, 87, 21, 48, 27, 63, 24, 66, 7, 59, 13, 44, 93, 49, 84, 30, 62, 100, 19, 69, 106, 37, 90, 212, 34, 74, 122, 33, 89, 46, 129, 249, 39, 86, 141, 40, 101, 183, 50, 95, 159, 52
Offset: 1

Views

Author

Scott R. Shannon, Mar 07 2023

Keywords

Comments

In the first 100000 terms the only fixed point is a(1) = 1; it is unknown if more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(5) = 2 as |a(4) - a(3)| = |12 - 6| = 6, and 2 is the smallest unused number that shares a factor with 6 while the difference |2 - a(4)| = |2 - 12| = 10 is distinct from all previous differences.
		

Crossrefs

A354575 a(1) = 1; for n > 1, a(n) is the smallest positive number that has not yet appeared that is coprime to a(n-1) and the difference a(n) - a(n-1) is distinct from all previous differences.

Original entry on oeis.org

1, 2, 5, 3, 7, 4, 9, 8, 15, 11, 6, 17, 10, 19, 13, 21, 23, 12, 25, 16, 31, 14, 33, 20, 37, 18, 41, 26, 47, 22, 49, 27, 43, 29, 35, 53, 24, 55, 28, 57, 34, 59, 38, 71, 30, 67, 32, 73, 36, 79, 39, 61, 45, 77, 46, 81, 91, 40, 87, 44, 83, 50, 99, 52, 97, 42, 95, 51, 65, 89, 63, 101, 48, 103, 54, 113
Offset: 1

Views

Author

Scott R. Shannon, Jun 05 2022

Keywords

Comments

This sequence uses a similar rule to A354688 but here the sign of the difference between a(n-1) and a(n) is considered. This leads to the terms showing much more erratic behavior than A354688; see the linked image.
In the first 200000 terms the fixed points are 1,2,8,35, and it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.
See A354679 for the differences between terms.

Examples

			a(9) = 15 as a(8) = 8, and 15 is the smallest unused number that is coprime to 8 and whose difference from the previous term, 15 - 8 = 7, has not appeared. Note that 11 and 13 are coprime to 8 but their differences from 8, namely 3 and 5, have already appeared as differences between previous pairs of terms.
a(15) = 13 as a(14) = 19, and 13 is the smallest unused number that is coprime to 19 and whose difference from the previous term, 13 - 19 = -6, has not appeared. Note that 12 is coprime to 19 and smaller than 13 but its difference from 19, namely -7, has already appeared as a difference between a(13) and a(12).
		

Crossrefs

A354679 First differences of A354575.

Original entry on oeis.org

1, 3, -2, 4, -3, 5, -1, 7, -4, -5, 11, -7, 9, -6, 8, 2, -11, 13, -9, 15, -17, 19, -13, 17, -19, 23, -15, 21, -25, 27, -22, 16, -14, 6, 18, -29, 31, -27, 29, -23, 25, -21, 33, -41, 37, -35, 41, -37, 43, -40, 22, -16, 32, -31, 35, 10, -51, 47, -43, 39, -33, 49, -47, 45, -55, 53, -44, 14, 24, -26
Offset: 1

Views

Author

Scott R. Shannon, Jun 05 2022

Keywords

Comments

See A354575 for further details.

Examples

			a(3) = -2 as A354575(4) - A354575(3) = 3 - 5 = -2.
		

Crossrefs

A354731 Absolute values of first differences of A354688.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Jun 04 2022

Keywords

Comments

See A354688 for further details.

Examples

			a(3) = 2 as | A354688(4) - A354688(3) | = | 3 - 5 | = 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[] = d[] = 0; a[1] = c[1] = 1; a[2] = c[2] = j = 2; u = 3; {1}~Join~Reap[Do[Set[k, u]; While[Nand[c[k] == 0, d[Abs[k - j]] == 0, CoprimeQ[j, k]], k++]; Set[{a[i], c[k], d[Abs[k - j]]}, {k, i, i}]; Sow[Abs[k - j]]; j = k; If[k == u, While[c[u] > 0, u++]], {i, 3, nn}]][[-1, -1]] (* Michael De Vlieger, Jun 04 2022 *)
  • Python
    from math import gcd
    from sympy import isprime, nextprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, diffset, an, mink = {1}, set(), 1, 2
        for n in count(2):
            k = mink
            while k in aset or abs(an-k) in diffset or gcd(an, k) != 1: k += 1
            aset.add(k); diffset.add(abs(k-an)); yield abs(k-an); an = k
            while mink in aset: mink += 1
    print(list(islice(agen(), 76))) # Michael S. Branicky, Jun 04 2022

A354739 First differences of A354727.

Original entry on oeis.org

1, 2, 4, -2, -3, 6, 3, 8, -15, 5, 12, -11, 22, -18, 9, -10, -7, 14, 7, -12, 10, -13, 26, -21, 16, -17, 34, -24, 15, -6, -4, 18, -25, 20, -5, 24, -34, 25, -20, 21, -8, 27, -9, -28, -19, 38, 19, -32, 28, -26, -23, 46, 23, -40, 13, 30, -35, 33, -62, 31, 32, -47, 94, -87, 36, -27, -14, 35, -16, 17
Offset: 1

Views

Author

Scott R. Shannon, Jun 05 2022

Keywords

Comments

See A354727 for further details.

Examples

			a(5) = -3 as A354727(6) - A354727(5) = 3 - 6 = -3.
		

Crossrefs

A354755 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number that shares a factor with a(n-1) and the sum a(n) + a(n-1) is distinct from all previous sums a(i) + a(i-1), i=2..n-1.

Original entry on oeis.org

1, 2, 2, 4, 4, 6, 3, 9, 6, 8, 8, 10, 10, 12, 9, 15, 10, 16, 12, 15, 15, 18, 14, 20, 15, 21, 18, 20, 20, 22, 22, 24, 21, 27, 24, 26, 26, 28, 21, 35, 20, 38, 19, 57, 3, 60, 2, 62, 4, 64, 6, 63, 9, 66, 8, 70, 7, 77, 11, 88, 2, 78, 3, 84, 2, 80, 5, 60, 32, 62, 31, 93, 3, 99, 6, 92, 8, 96, 10, 85, 25
Offset: 1

Views

Author

Scott R. Shannon, Jun 06 2022

Keywords

Comments

In the first 500000 terms the fixed points are 1,2,4,6,2388,2390,2392,2394; it is likely no more exist. In the same range many numbers do not appear, the lowest five being 59,67,73,89,97. It is possible these and many other numbers never appear although this is unknown.

Examples

			a(7) = 3 as a(6) = 6, and 3 is the smallest number that shares a factor with 6 and whose sum with the previous term, 6 + 3 = 9, has not appeared. Note 2 shares a factor with 6 but 6 + 2 = 8, and a sum of 8 has already occurred with a(4) + a(5) = 4 + 4 = 8, so 2 cannot be chosen.
		

Crossrefs

Programs

A361314 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest positive number which has not appeared that shares a factor with a(n-2) + a(n-1) while the sum a(n) + a(n-1) is distinct from all previous sums a(i) + a(i-1), i=2..n-1.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Mar 08 2023

Keywords

Comments

In the first 100000 terms the fixed points are 1, 2, 3, 6, 9, 10, 39, 91, 112; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(23) = 20 as a(21) + a(22) = 47 + 13 = 60, and 20 is the smallest unused number that shares a factor with 60 while the sum a(22) + 20 = 13 + 20 = 33 is distinct from all previous sums. Note that 18 is unused and shares a factor with 60 but the sum a(22) + 18 = 13 + 18 = 31 is the same as a(18) + a(19) = 15 + 16 = 31. This is the first term that differs from A337136.
		

Crossrefs

Showing 1-10 of 10 results.