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, 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
Keywords
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.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- 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.
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 *)
Comments