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

A360209 Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 2, a(n) shares a factor with a(n-2) + a(n-1) but shares no factor with a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 15, 7, 8, 9, 17, 10, 12, 11, 23, 14, 37, 27, 16, 43, 59, 18, 21, 13, 20, 22, 33, 25, 26, 24, 35, 295, 32, 36, 51, 29, 28, 19, 47, 30, 44, 259, 39, 34, 73, 107, 38, 40, 45, 119, 41, 46, 42, 55, 97, 48, 50, 49, 57, 52, 109, 63, 54, 65, 77, 56, 76, 69, 75, 58, 91, 149, 60, 66
Offset: 1

Views

Author

Scott R. Shannon, Jan 29 2023

Keywords

Comments

To ensure the sequence is infinite another criterion must be satisfied when choosing a(n), namely a(n) + a(n-1) must contain a factor not in a(n-1). If this were not the case, a(n+1) = a(n) + a(n-1) would share a factor with both a(n) + a(n-1) and a(n-1), terminating the sequence.
In the first 100000 terms the fixed points for n > 2 are 3, 6, 441, 1677, 3629, 9701, 17131, although it is likely more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(7) = 15 as a(5) + a(6) = 4 + 6 = 10, and 15 is the smallest positive unused number that shares a factor with 10 but not with a(5) = 4.
a(41) = 44 as a(39) + a(40) = 47 + 30 = 77, and 44 shares a factor with 77 but not with a(39) = 47. Note that 42 also satisfies these criteria but 30 + 42 = 72 which shares all its factors with a(40) = 30, thus setting a(41) = 42 would make it impossible to find a(42).
		

Crossrefs

Cf. A251604 (does not share with a(n-1)), A098550, A336957, A337136, A359557, A353239.

Extensions

a(6) and above corrected by Scott R. Shannon, Mar 17 2023

A379165 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest unused positive number that is either coprime to both a(n-1) and a(n-2) or shares a factor with both a(n-1) and a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 9, 8, 6, 10, 11, 13, 12, 17, 19, 14, 15, 18, 20, 16, 21, 23, 22, 25, 27, 26, 24, 28, 29, 31, 30, 37, 41, 32, 33, 35, 34, 39, 36, 42, 38, 40, 43, 47, 44, 45, 48, 49, 53, 46, 51, 54, 55, 50, 57, 59, 52, 61, 63, 58, 56, 60, 62, 64, 65, 67, 66, 71, 73, 68, 69, 72, 75, 70, 78, 74, 76, 77, 79, 80, 81, 83, 82, 85, 87, 86, 84, 88, 89, 91
Offset: 1

Views

Author

Scott R. Shannon, Dec 17 2024

Keywords

Comments

For the terms studied the primes appear in their natural order. The fixed points being 3, 8, 10, 11, 18, 21, 26, 28, 29, 43, 51, 64... . After 10 million terms 3211449 of them, approximately 32.1%, share a factor with both previous terms - it is unknown what this ratio is as n -> infinity. The sequence is almost certainly a permutation of the positive numbers.

Examples

			a(4) = 5 as 5 is coprime to both a(3) = 3 and a(2) = 2, and 5 has not previously appeared.
a(9) = 6 as 6 shares a factor with both a(8) = 8 and a(7) = 9, and 6 has not previously appeared.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; c[_] := False; Do[Set[{a[n], c[k]}, {n, True}], {n, 2}];
      i = a[1]; j = a[2]; u = 3;
    Do[k = u;
      While[Or[c[k], Nor[And[#1, #2], Nor[#1, #2]]] &[
        CoprimeQ[k, i], CoprimeQ[k, j]], k++];
      Set[{a[n], c[k], i, j}, {k, True, j, k}];
      If[k == u, While[c[u], u++]], {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Dec 17 2024 *)

A379166 Numbers in A379165 that share a factor with both previous terms, in order of appearance.

Original entry on oeis.org

6, 10, 18, 20, 16, 24, 28, 36, 42, 38, 40, 48, 54, 50, 56, 60, 62, 64, 72, 75, 70, 78, 74, 76, 84, 88, 96, 102, 98, 100, 108, 114, 110, 112, 118, 120, 126, 130, 132, 136, 138, 144, 150, 156, 154, 160, 162, 158, 164, 166, 168, 174, 180, 176, 182, 186, 190, 192, 194, 196, 204, 200, 206, 210, 214, 216, 228, 230, 226, 234, 240, 238, 244, 246, 248, 250, 258, 260
Offset: 1

Views

Author

Scott R. Shannon, Dec 17 2024

Keywords

Comments

See A379165 for further details.

Crossrefs

Programs

  • Mathematica
    nn = 2^8; c[_] := False; i = 1; j = 2; c[1] = c[2] = True; u = 3;
    Reap[Do[k = u;
      While[
        Or[c[k], Nor[And[#1, #2], Nor[#1, #2]]] &[
         CoprimeQ[k, i], CoprimeQ[k, j]], k++];
      Set[{c[k], i, j}, {True, j, k}];
      If[AllTrue[{{i, k}, {j, k}}, ! CoprimeQ[##] & @@ # &], Sow[k] ];
    If[k == u, While[c[u], u++]], {n, 3, nn}] ][[-1, 1]] (* Michael De Vlieger, Dec 20 2024 *)

A360931 a(1) = 2, a(2) = 3; for n > 2, a(n) is the smallest number greater than 1 that has not appeared such that |a(n) - a(n-1)| has a common factor with a(n-2).

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, Feb 25 2023

Keywords

Comments

In the first 100000 terms the fixed points are 10, 16, 42, 52, 66; it is likely no more exist. The sequence is conjectured to be a permutation of the positive integers > 1.

Examples

			a(6) = 7 as |7 - a(5)| = |7 - 13| = 6 which shares a common factor with a(4) = 8.
		

Crossrefs

Programs

Showing 1-4 of 4 results.