|
|
A226135
|
|
Let abcd... be the decimal expansion of n. Number of iterations of the map n -> f(n) needed to reach a number < 10, where f(n) = a^b + c^d + ... which ends in an exponent or a base according as the number of digits is even or odd.
|
|
1
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 5, 2, 21, 2, 1, 1, 1, 3, 2, 3, 6, 8, 19, 6, 1, 1, 2, 5, 21, 3, 4, 12, 17, 4, 1, 1, 3, 2, 3, 5, 4, 15, 4, 3, 1, 1, 7, 2, 4, 14, 16, 4, 16, 4, 1, 1, 5, 6, 3, 2, 5, 11, 13, 15, 1, 1, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
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;
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:
# 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))):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|