OFFSET
1,2
COMMENTS
a(n) is the number of times you obtain the sums of cubes of digits of n before reaching a fixed point (last number of the cycle).
EXAMPLE
a(3) = 3 because :
3^3 = 27 -> 2^3 + 7^3 = 351;
351 -> 3^3 + 5^3 + 1^3 = 153;
153 -> 1^3+5^3+3^3 = 153 is the end because this number is already in the trajectory. Hence we obtain the map : 3 -> 27 -> 351 -> 153 with 3 iterations.
MAPLE
a:= proc(n) local k, m, s; m:= n; s:= {};
for k from 0 do
m:= add(i^3, i=convert(m, base, 10));
if m in s then return k fi;
s:= s union {m}
od
end:
seq(a(n), n=1..85); # Alois P. Heinz, Mar 01 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Apr 12 2012
STATUS
approved