Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #29 Mar 23 2021 15:56:43
%S 0,1,2,1,3,3,2,1,1,1,4,1,3,4,4,1,2,1,2,3,2,2,2,1,1,1,2,1,5,2,2,1,2,1,
%T 2,1,3,5,5,1,3,2,3,5,4,2,2,1,3,1,2,1,3,5,2,5,4,1,3,5,3,2,1,1,3,2,2,3,
%U 2,2,2,1,4,1,1,1,2,3,2,1,1,1
%N a(1) = 0; for n >= 2, a(n) is the number of iterations needed for the map x -> A000203(x)/A000005(x) to reach a number that is not an integer, when starting from x = n.
%C a(n) = 1 for n >= 2, n from A049642.
%e n = 3; 3 -> s(3)/d(3) = 2 -> s(2)/d(2) = 3/2, a(3) = 2;
%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, a(11) = 4;
%e n = 20; 20 -> s(20)/d(20) = 7 -> s(7)/d(7) = 4 -> s(4)/d(4) = 7/3, a(20) = 3;
%e s(x) = A000203(x), d(x) = A000005(x).
%t f[n_] := Divide @@ DivisorSigma[{1, 0}, n]; a[n_] := Length @ NestWhileList[f, n, IntegerQ[#] && # > 1 &] - 1; Array[a, 100] (* _Amiram Eldar_, Mar 19 2021 *)
%o (PARI) a(n) = if (n==1, 0, my(nb=1, k); while(denominator(k=sigma(n)/numdiv(n)) == 1, n = k; nb++); nb); \\ _Michel Marcus_, Mar 21 2021
%Y Cf. A000005, A000203, A003601, A049642.
%Y Cf. A019294 for a similar iteration.
%K nonn
%O 1,3
%A _Ctibor O. Zizka_, Mar 19 2021