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.

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

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

A354858 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 both the sum a(n) + a(n-1) is distinct from all previous sums, a(i) + a(i-1), i=2..n-1, and the product a(n) * a(n-1) is distinct from all previous products, 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, 63, 7, 56, 6, 58, 10, 55, 20, 52, 22, 55, 25, 60, 9, 69, 12, 70, 14, 72, 15, 75, 18, 70, 21, 75, 24, 68, 26, 72, 28, 74, 30, 65
Offset: 1

Views

Author

Scott R. Shannon, Jun 09 2022

Keywords

Comments

This sequence uses a combination of the term selection rules of A354755 and A354753. The first forty-five terms are the same as A354755 beyond which they differ; see the examples below. In the first 500000 terms only six terms are prime, 2,3,7,19, with 2 and 3 occurring twice, the last being a(47) = 7. It is unknown if more appear. The only fixed points are 1,2,4,6, and it is likely no more exist.

Examples

			a(7) = 3 as a(6) = 6, and 3 is the smallest number that shares a factor with 6 and whose sum and product with the previous term, 6 + 3 = 9 and 6 * 3 = 18, have not previously 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.
a(46) = 63 as a(45) = 3, and 63 is the smallest number that shares a factor with 3 and whose sum and product with the previous term, 3 + 63 = 66 and 3 * 63 = 189, have not previously appeared. Note 60 shares a factor with 3 but the product 3 * 60 = 180 has already occurred with a(19) * a(20) = 12 * 15 = 180, so 60 cannot be chosen. This is the first term to differ from A354755.
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = vector(nn), vp = vector(nn-2), vs = vector(nn-2)); va[1] = 1; va[2] = 2; for (n=3, nn, my(k=2); while ((gcd(k, va[n-1]) == 1) || #select(x->(x==k*va[n-1]), vp) || #select(x->(x==k+va[n-1]), vs), k++); va[n] = k; vp[n-2] = k*va[n-1]; vs[n-2] = k+va[n-1];); va; \\ Michel Marcus, Jun 17 2022
Showing 1-3 of 3 results.