login
a(1)=0; for n >= 2, a(n) is the number of iterations needed for the map (x/y) -> (A000203(x)*A000005(y)) / (A000005(x)*A000203(y)) to reach a cycle, when starting from x = n. If no cycle is reachable, a(n) = -1.
0

%I #29 Jun 14 2022 15:28:04

%S 0,2,3,4,4,4,5,8,10,14,5,5,6,5,5,16,11,6,15,6,9,11,6,6,10,16,15,6,6,

%T 11,17,16,6,11,6,10,16,6,6,11,10,6,12,6,7,7,7,10,16,11,7,12,16,6,7,6,

%U 7,11,12,6,18,7,8,18,10,7,12,10,7,7,11,12,17,9,7,12

%N a(1)=0; for n >= 2, a(n) is the number of iterations needed for the map (x/y) -> (A000203(x)*A000005(y)) / (A000005(x)*A000203(y)) to reach a cycle, when starting from x = n. If no cycle is reachable, a(n) = -1.

%C 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.

%e 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).

%e 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].

%t 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 *)

%o (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

%Y Cf. A000005, A000203, A003601, A049642, A342718.

%K nonn

%O 1,2

%A _Ctibor O. Zizka_, Mar 20 2021