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 A176839 #12 Apr 09 2024 08:51:53 %S A176839 0,1,1,2,2,3,2,3,3,3,3,4,3,4,4,5,5,5,4,6,5,6,5,7,5,7,6,7,6,8,6,7,7,7, %T A176839 7,9,8,8,7,8,8,10,8,9,9,11,9,9,9,10,10,10,10,10,10,10,10,11,11,11,10, %U A176839 11,11,12,11,12,12,12,12,12,12,13,11,12,13,13,12,13,13,13,12,13,14,14,14 %N A176839 The number of iterations to reach 1 under the map x -> x-tau(phi(x)), starting at n. %C A176839 Tau(n) = A000005(n) is the number of divisors of n, and phi(n) = A000010(n) is the Euler totient function. %e A176839 a(12)=4 because %e A176839 f(12) = 12 - tau(phi(12)) = 12 - tau(4) = 12 - 3 = 9; %e A176839 f(9) = 9 - tau(phi(9)) = 9 - tau(6) = 9 - 4 = 5; %e A176839 f(5) = 5 - tau(phi(5)) = 5 - tau(4) = 5 - 3 = 2; %e A176839 f(2) = 2 - tau(phi(2)) = 2 - tau(1) = 2 - 1 = 1, and a(12) = 4. %p A176839 A062821 := proc(n) %p A176839 numtheory[tau](numtheory[phi](n)) ; %p A176839 end proc: %p A176839 A176839 := proc(n) %p A176839 a := 0 ; %p A176839 x := n ; %p A176839 while x <> 1 do %p A176839 x := x-A062821(x) ; %p A176839 a := a+1 ; %p A176839 end do: %p A176839 a ; %p A176839 end proc: # _R. J. Mathar_, Oct 11 2011 %t A176839 f[n_] := If[n == 1, 1, n - DivisorSigma[0, EulerPhi[n]]]; %t A176839 a[n_] := Length[FixedPointList[f, n]] - 2; %t A176839 Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Apr 09 2024 *) %Y A176839 Cf. A062821. %K A176839 nonn %O A176839 1,4 %A A176839 _Michel Lagneau_, Apr 27 2010