OFFSET
0,3
COMMENTS
Additive persistence with powers of decimal digits: number of steps for "add digit(i) ^ digit(i)" operation to stabilize when started at n.
Or number of distinct values obtained by iterating n -> A045503(n).
We take 0^0 = 1.
It is conjectured that the trajectory for every number converges to a single number. The growth of a(n) is very slow; for example, a(457) = 211, a(10337) = 213, a(16669) = 214, ...
LINKS
Michel Lagneau, Table of n, a(n) for n = 0..10000
EXAMPLE
a(0) = 1 because 0 -> 0^0 = 1 with 1 iteration;
a(1) = 0 because 1 -> 1^1 => 0 iteration;
a(354) = 4 because:
354 -> 3^3 + 5^5 + 4^4 = 3408;
3408 -> 3^3 + 4^4 + 0^0 + 8^8 = 16777500;
16777500 -> 1^1 + 6^6 + 7^7 + 7^7 + 7^7 + 5^5 + 0^0 + 0^0 = 2520413;
2520413 -> 2^2 + 5^5 + 2^2 + 0^0 + 4^4 + 1^1 + 3^3 = 3418 and
3418 is the last number of the cycle because 3418 -> 16777500 is already in the trajectory. We obtain 4 iterations: 354 -> 3408 -> 16777500 -> 2520413 -> 3418.
MAPLE
A000312:=proc(n)
if n = 0 then 1;
else add(d^d, d=convert(n, base, 10)) ;
end if;
end proc:
A226036:= proc(n)
local traj , c;
traj := n ;
c := [n] ;
while true do
traj := A000312(traj) ;
if member(traj, c) then
return nops(c)-1 ;
end if;
c := [op(c), traj] ;
end do:
end proc:
seq(A226036(n), n=0..100) ;
MATHEMATICA
Unprotect[Power]; 0^0 = 1; Protect[Power]; f[n_] := (cnt++; id = IntegerDigits[n]; Total[id^id]); a[n_] := (cnt = 0; NestWhile[f, n, UnsameQ, All]; cnt-1); Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 24 2013 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 24 2013
STATUS
approved