OFFSET
1,1
COMMENTS
In the first 100000 terms the only fixed point is 9, and it is likely no more exist. In the same range the smallest missing numbers are 4073, 5039, 5261. The sequence is conjectured to be a permutation of the integers >= 2.
From Michael De Vlieger, Nov 28 2023: (Start)
In scatterplot, composites fall in a cototient trajectory just above the line a(n)/n, while primes fall into several trajectories well below the line a(n)/n. This is an effect of finding the next term a(n) such that gcd(a(n), a(n-1)) = 1.
The trajectories T of primes a(n) arrange according to a(n+1)/a(n) = m. Hence, for example, T(m), m = 2 includes {2, 5, 7, 13, 19, 31, 43, ...}, T(3) includes {3, 11, 17} and may be finite, T(4) includes {23, 41, 47, 71, 83, 101, ...}, but T(m) for m in {5, 16, 17, ...} does not appear in the first 2^20 terms. It is evident that the trajectories T(m) are nonlinear.
The smallest missing number in a(1..1048576) is prime(3912) = 36899, followed by primes with indices 3995, 4151, 4179, etc. The smallest missing composite is 1116967. (End)
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20, showing primes in red, composites in dark blue.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing primes in red, composite prime powers in gold, squarefree composites in green, numbers neither squarefree nor prime powers in blue, accentuating numbers of the last category that are also squareful in light blue.
Scott R. Shannon, Image of the first 100000 terms. The green line is a(n) = n.
EXAMPLE
MATHEMATICA
nn = 120; c[_] := False;
f[x_] := f[x] = Total[Times @@@ FactorInteger[x]]; f[1] = 1;
a[1] = j = 2; c[2] = True; u = 3;
Do[k = u; While[Or[c[k], CoprimeQ[j, k]], k++];
Set[{a[n], c[k], j}, {k, True, f[k]}];
If[k == u, While[c[u], u++]], {n, 2, nn}];
Array[a, nn] (* Michael De Vlieger, Nov 28 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Nov 28 2023
STATUS
approved