OFFSET
1,2
COMMENTS
Extension of A342718 to rational numbers. I assume the map reaches only 3 possible cycles: [1], [(4/3) <-> (7/6)], [(3/4) <-> (6/7)], but have no proof for this.
EXAMPLE
n = 11; 11 -> s(11)/d(11) = 6 -> s(6)/d(6) = 3 -> s(3)/d(3) = 2 -> s(2)/d(2) = 3/2 -> (s(3)*d(2))/(d(3)*s(2)) = 4/3 -> (s(4)*d(3))/(d(4)*s(3)) = 7/6 -> (s(7)*d(6))/(d(7)*s(6)) = 4/3 ..., so a(11) = 5 steps needed to reach a cycle [4/3 <-> 7/6]; s(x) = A000203(x), d(x) = A000005(x).
n = 16; 16 -> 31/5 -> 16/3 -> 31/10 -> 32/9 -> 63/26 -> 104/63 -> 315/208 -> 260/217 -> 49/64 -> 133/127 -> 5/8 -> 4/5 -> 7/9 -> 12/13 -> 2/3 -> 3/4 -> 6/7 -> 3/4 ->..., so a(16) = 16 steps needed to reach a cycle [3/4 <-> 6/7].
MATHEMATICA
f[n_] := Divide @@ DivisorSigma[{1, 0}, n]; g[x_] := Divide @@ (f /@ {Numerator[x], Denominator[x]}); a[1] = 0; a[n_] := Length @ NestWhileList[g, n, UnsameQ, All] - 3; Array[a, 100] (* Amiram Eldar, Mar 21 2021 *)
PROG
(PARI) a(n) = my(v=List([n]), s, t, x, y); for(k=1, oo, x=numerator(v[k]); y=denominator(v[k]); s=1; listput(v, t=sigma(x)*numdiv(y)/sigma(y)/numdiv(x)); while(v[s]!=t, s++); if(s<=k, return(s-1))); \\ Jinyuan Wang, Mar 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Mar 20 2021
STATUS
approved