A378929 Number of steps it takes for the chain of f(n) = n * d(n) / gcd(n, d(n))^2 to reach a cycle from a starting number n.
0, 1, 1, 3, 1, 0, 1, 2, 2, 0, 1, 2, 1, 0, 3, 4, 1, 2, 1, 4, 3, 0, 1, 2, 1, 0, 4, 4, 1, 3, 1, 6, 3, 0, 1, 4, 1, 0, 3, 2, 1, 3, 1, 4, 4, 0, 1, 5, 1, 0, 3, 4, 1, 4, 1, 2, 3, 0, 1, 2, 1, 0, 4, 8, 1, 3, 1, 4, 3, 0, 1, 1, 1, 0, 0, 4, 1, 3, 1, 3, 1, 0, 1, 2, 1, 0, 3, 2
Offset: 1
Keywords
Links
- Viliam Furík, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
f[n_] := Module[{d = DivisorSigma[0, n]}, n*d/GCD[n, d]^2]; a[n_] := Module[{s = NestWhileList[f, n, UnsameQ, All]}, FirstPosition[s, s[[-1]]][[1]] - 1]; Array[a, 100] (* Amiram Eldar, Dec 16 2024 *)
Comments