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.
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
Offset: 0
Examples
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.
Links
- Michel Lagneau, Table of n, a(n) for n = 0..10000
Programs
-
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
Comments