OFFSET
1,2
COMMENTS
The sequence is conjectured to be a permutation of the positive integers. In the first 500000 terms the fixed points are 1, 2, 3, 4, 6, 9, 12. It is unlikely more exist although this is unknown.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 200000 terms. The green line is a(n) = n.
Michael De Vlieger, Annotated log-log scatterplot of a(n), n = 1..2^14, showing records in red and local minima in blue, highlighting primes in green and other prime powers in gold. Extreme records and local minima are labeled in red and blue respectively, and composite prime powers in orange.
EXAMPLE
a(8) = 5 as a(7) = 8 and sigma(8) = A000203(8) = 15, and 5 is the smallest unused number that shares a factor with 15.
MATHEMATICA
nn = 120; c[_] = False; Array[Set[{a[#], c[#]}, {#, True}] &, 2]; u = 3; Do[Set[{k, s}, {u, DivisorSigma[1, a[n - 1]]}]; While[Or[c[k], CoprimeQ[s, k]], k++]; Set[{a[n], c[k]}, {k, True}]; If[k == u, While[c[u], u++]], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Nov 05 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 02 2022
STATUS
approved