%I #16 Jan 30 2022 02:44:25
%S 0,0,2,3,3,2,3,3,1,2,1,2,3,3,2,3,3,1,2,2,2,3,3,2,3,3,1,2,2,2,3,3,2,3,
%T 3,1,2,2,2,2,3,2,3,3,1,2,2,2,2,3,2,3,3,1,2,2,2,2,3,2,3,3,1,2,2,2,2,3,
%U 2,2,3,1,2,2,2,2,3,2,2,3,1,2,2,2,2,3,2
%N Number of iterations of the map n -> (sum of the decimal digits of n)^3 before reaching the last number of the cycle.
%C a(n) is the number of times that the cube of the sum of the digits must be calculated before reaching the last number of the cycle.
%e 0 is in the sequence twice because 0 -> 0 and 1 -> 1;
%e a(3) = 3:
%e 3 -> 3^3 = 27;
%e 27 -> (2+7)^3 = 729;
%e 729 -> (7+2+9)^3 = 18^3 = 5832 is the end of the map because 5832 -> (5+8+3+2)^3 = 18^3 is already in the trajectory. Hence we obtain the map: 3 -> 27 -> 729 -> 5832 with 3 iterations.
%p A182128 := proc(n)
%p local traj ,c;
%p traj := n ;
%p c := [n] ;
%p while true do
%p traj := A118880(traj) ;
%p if member(traj,c) then
%p return nops(c)-1 ;
%p end if;
%p c := [op(c),traj] ;
%p end do:
%p end proc:
%p seq(A182128(n),n=0..80) ; # _R. J. Mathar_, Jul 08 2012
%Y Cf. A177148, A178481, A118880.
%K nonn,base
%O 0,3
%A _Michel Lagneau_, Apr 13 2012