A182128 Number of iterations of the map n -> (sum of the decimal digits of n)^3 before reaching the last number of the cycle.
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, 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, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2, 2, 3, 1, 2, 2, 2, 2, 3, 2
Offset: 0
Examples
0 is in the sequence twice because 0 -> 0 and 1 -> 1; a(3) = 3: 3 -> 3^3 = 27; 27 -> (2+7)^3 = 729; 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.
Programs
-
Maple
A182128 := proc(n) local traj ,c; traj := n ; c := [n] ; while true do traj := A118880(traj) ; if member(traj,c) then return nops(c)-1 ; end if; c := [op(c),traj] ; end do: end proc: seq(A182128(n),n=0..80) ; # R. J. Mathar, Jul 08 2012
Comments