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