This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A342718 #29 Mar 23 2021 15:56:43 %S A342718 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 A342718 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 A342718 2,2,2,1,4,1,1,1,2,3,2,1,1,1 %N A342718 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 A342718 a(n) = 1 for n >= 2, n from A049642. %e A342718 n = 3; 3 -> s(3)/d(3) = 2 -> s(2)/d(2) = 3/2, a(3) = 2; %e A342718 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 A342718 n = 20; 20 -> s(20)/d(20) = 7 -> s(7)/d(7) = 4 -> s(4)/d(4) = 7/3, a(20) = 3; %e A342718 s(x) = A000203(x), d(x) = A000005(x). %t A342718 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 A342718 (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 A342718 Cf. A000005, A000203, A003601, A049642. %Y A342718 Cf. A019294 for a similar iteration. %K A342718 nonn %O A342718 1,3 %A A342718 _Ctibor O. Zizka_, Mar 19 2021