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

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

A354687 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, 14, 6, 3, 12, 22, 10, 5, 20, 34, 16, 32, 52, 13, 26, 48, 15, 36, 9, 33, 44, 18, 46, 23, 69, 21, 28, 58, 24, 56, 7, 42, 78, 27, 72, 30, 55, 11, 66, 104, 38, 19, 76, 116, 29, 87, 141, 39, 91, 35, 85, 17, 102, 40, 100, 25, 90, 153, 45, 114, 50, 120, 192, 51, 68, 142, 54, 130, 208, 60
Offset: 1

Views

Author

Scott R. Shannon, Jun 03 2022

Keywords

Comments

The terms are concentrated along many different lines, although three lines contain a higher concentration of terms than the others; these are similar to the three lines seen in A064413. See the linked image. The primes do not occur in their natural order, and unlike A064413, the terms proceeding and following a prime term can be high multiples of the prime.
In the first 200000 terms the fixed points are 1,2,6,10,68. It is plausible no more exist although this is unknown. The sequence is conjectured to be a permutation of the positive integers.
See A354721 for the differences between terms.

Examples

			a(4) = 8 as a(3) = 4, and 8 is the smallest unused number that shares a factor with 4 and whose difference from the previous term,| 8 - 4 | = 4, has not appeared. Note 6 shares a factor with 4 but | 6 - 4 | = 2, and a difference of 2 has already occurred between as | a(3) - a(2) |, so 6 cannot 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, 2}, {1}, 2, 3
        yield from [1, 2]
        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)); an = k; yield an
            while mink in aset: mink += 1
    print(list(islice(agen(), 73))) # 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

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

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

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

Showing 1-7 of 7 results.