OFFSET
1,2
EXAMPLE
For n = 2 there are a(2) = 8 iterations to reach 1: 2 -> 3 -> 4 -> 7 -> 8 -> 15 -> 5 -> 6 -> 1.
For n = 9 there are a(9) = 8 iterations to reach 1: 9 -> 13 -> 14 -> 7 -> 8 -> 15 -> 5 -> 6 -> 1.
MATHEMATICA
f[n_] := Module[{s = DivisorSigma[1, n], g}, g = GCD[n, s]; If[g == 1, s, n/g]]; a[n_] := -1 + Length@ NestWhileList[f, n, # > 1 &]; Array[a, 100] (* Amiram Eldar, Nov 12 2024 *)
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Ctibor O. Zizka, Nov 12 2024
STATUS
approved