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 A385744 #7 Jul 11 2025 01:27:35 %S A385744 0,1,2,3,4,2,3,4,5,4,5,3,4,3,5,6,7,5,6,4,4,5,6,5,6,4,6,6,7,5,6,7,5,7, %T A385744 6,6,7,6,6,7,8,4,5,6,8,6,7,6,7,6,8,7,8,6,8,6,7,7,8,6,7,6,7,7,7,5,6,7, %U A385744 7,6,7,8,9,7,7,7,7,6,7,7,8,8,9,7,8,5,7 %N A385744 The number of iterations of the infinitary analog of the totient function A384247 that are required to reach from n to 1. %C A385744 First differs from A049865 at n = 24. %H A385744 Amiram Eldar, <a href="/A385744/b385744.txt">Table of n, a(n) for n = 1..10000</a> %F A385744 a(n) = a(A384247(n)) + 1 for n >= 2. %e A385744 n | a(n) | iterations %e A385744 --+------+---------------------- %e A385744 2 | 1 | 2 -> 1 %e A385744 3 | 2 | 3 -> 2 -> 1 %e A385744 4 | 3 | 4 -> 3 -> 2 -> 1 %e A385744 5 | 4 | 5 -> 4 -> 3 -> 2 -> 1 %e A385744 6 | 2 | 6 -> 2 -> 1 %t A385744 f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; %t A385744 a[n_] := Length @ NestWhileList[iphi, n, # != 1 &] - 1; Array[a, 100] %o A385744 (PARI) iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));} %o A385744 a(n) = if(n == 1, 0, 1 + a(iphi(n))); %Y A385744 Cf. A384247, A385745, A385746, A385747. %Y A385744 Similar sequences: A003434, A049865, A225320, A333609. %K A385744 nonn,easy %O A385744 1,3 %A A385744 _Amiram Eldar_, Jul 08 2025