OFFSET
0,25
COMMENTS
Inspired by the sequence A133501 (Number of steps for "powertrain" operation to converge when started at n). It is conjectured that the trajectory for each number converges to a single number < 10.
The conjecture is true, since f(x) < x trivially holds for x > 10^10 and I have verified that for every 10 <= x <= 10^10 there is a k such that f^(k)(x) < x, where f^(k) denotes f applied k times. Both the conventions 0^0 = 1 and 0^0 = 0 have been taken into account. - Giovanni Resta, May 28 2013
LINKS
Michel Lagneau, Table of n, a(n) for n = 0..10000
EXAMPLE
a(62) = 7 because:
62 -> 6^2 = 36;
36 -> 3^6 = 729;
729 -> 7^2 + 9^1 = 58;
58 -> 5^8 = 390625;
390625 -> 3^9 + 0^6 + 2^5 = 19715;
19715 -> 1^9 + 7^1 + 5^1 = 13;
13 -> 1^3 = 1;
62 -> 36 -> 729 -> 58 -> 390625 -> 19715 -> 13 -> 1 with 7 iterations.
MAPLE
A133501:= proc(n)
local a, i, n1, n2, t1, t2;
n1:=abs(n); n2:=sign(n); t1:=convert(n1, base, 10); t2:=nops(t1); a:=0;
for i from 0 to floor(t2/2)-1 do
a := a+t1[t2-2*i]^t1[t2-2*i-1];
od:
if t2 mod 2 = 1 then
a:=a+t1[1]; fi; RETURN(n2*a); end;
A226135:= proc(n)
local traj , c;
traj := n ;
c := [n] ;
while true do
traj := A133501(traj) ;
if member(traj, c) then
return nops(c)-1 ;
end if;
c := [op(c), traj] ;
end do:
end proc:
seq(A226135(n), n=0..100) ;
# second Maple program:
f:= n-> `if`(n<10, n, `if`(is(length(n), odd), f(10*n+1),
iquo(irem(n, 100, 'r'), 10, 'h')^h+f(r))):
a:= n-> `if`(n<10, 0, 1+a(f(n))):
seq(a(n), n=0..100); # Alois P. Heinz, May 27 2013
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, May 27 2013
STATUS
approved