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.

A353905 a(1) = 1; for n > 1, a(n) = smallest positive number that has not appeared that has a common factor with a(n-1) + the smallest unseen positive number.

Original entry on oeis.org

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

Views

Author

Scott R. Shannon, May 10 2022

Keywords

Comments

The sequence is conjectured to be a permutation of the positive integers. In the first 100000 terms the number 18869 holds the record for the greatest number of terms for which it is the lowest unseen number, 4769 terms in all. In the same range there are fifteen fixed points, the last being a(1204), and it is likely no more exist.

Examples

			a(2) = 3 as a(1) = 1, the smallest unseen positive number is 2, and 1 + 2 = 3, and 3 is the smallest number that has not yet appeared that shares a factor with 3.
a(5) = 6 as a(4) = 7, the smallest unseen positive number is 2, and 7 + 2 = 9, and 6 is the smallest number that has not yet appeared that shares a factor with 9.
		

Crossrefs

Programs

  • Mathematica
    nn = 120; a[1] = c[1] = 1; u = 2; Do[k = u; While[Nand[c[k] == 0, ! CoprimeQ[#, k]], k++] &[a[i - 1] + u]; Set[{a[i], c[k]}, {k, i}]; If[k == u, While[c[u] > 0, u++]], {i, 2, nn}]; Array[a, nn] (* Michael De Vlieger, May 15 2022 *)