|
|
A182128
|
|
Number of iterations of the map n -> (sum of the decimal digits of n)^3 before reaching the last number of the cycle.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
MAPLE
|
local traj , c;
traj := n ;
c := [n] ;
while true do
if member(traj, c) then
return nops(c)-1 ;
end if;
c := [op(c), traj] ;
end do:
end proc:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|