login
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.
1
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,2
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.
LINKS
Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^14, showing records in red and local minima in blue. Primes and fixed points are highlighted in green and gold, respectively.
Scott R. Shannon, Image of the first 100000 terms. The green line is y = n.
EXAMPLE
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.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, May 10 2022
STATUS
approved