cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A226135 #20 Sep 16 2017 00:36:35
%S A226135 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,
%T A226135 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,
%U A226135 14,16,4,16,4,1,1,5,6,3,2,5,11,13,15,1,1,5
%N 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.
%C A226135 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.
%C A226135 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
%H A226135 Michel Lagneau, <a href="/A226135/b226135.txt">Table of n, a(n) for n = 0..10000</a>
%e A226135 a(62) = 7 because:
%e A226135 62 -> 6^2 = 36;
%e A226135 36 -> 3^6 = 729;
%e A226135 729 -> 7^2 + 9^1 = 58;
%e A226135 58 -> 5^8 = 390625;
%e A226135 390625 -> 3^9 + 0^6 + 2^5 = 19715;
%e A226135 19715 -> 1^9 + 7^1 + 5^1 = 13;
%e A226135 13 -> 1^3 = 1;
%e A226135 62 -> 36 -> 729 -> 58 -> 390625 -> 19715 -> 13 -> 1 with 7 iterations.
%p A226135 A133501:= proc(n)
%p A226135      local a, i, n1, n2, t1, t2;
%p A226135      n1:=abs(n); n2:=sign(n); t1:=convert(n1, base, 10); t2:=nops(t1); a:=0;
%p A226135         for i from 0 to floor(t2/2)-1 do
%p A226135          a := a+t1[t2-2*i]^t1[t2-2*i-1];
%p A226135        od:
%p A226135        if t2 mod 2 = 1 then
%p A226135        a:=a+t1[1]; fi; RETURN(n2*a); end;
%p A226135 A226135:= proc(n)
%p A226135     local traj , c;
%p A226135     traj := n ;
%p A226135     c := [n] ;
%p A226135     while true do
%p A226135        traj := A133501(traj) ;
%p A226135        if member(traj, c) then
%p A226135        return nops(c)-1 ;
%p A226135        end if;
%p A226135        c := [op(c), traj] ;
%p A226135     end do:
%p A226135 end proc:
%p A226135 seq(A226135(n), n=0..100) ;
%p A226135 # second Maple program:
%p A226135 f:= n-> `if`(n<10, n, `if`(is(length(n), odd), f(10*n+1),
%p A226135                iquo(irem(n, 100, 'r'), 10, 'h')^h+f(r))):
%p A226135 a:= n-> `if`(n<10, 0, 1+a(f(n))):
%p A226135 seq(a(n), n=0..100);  # _Alois P. Heinz_, May 27 2013
%Y A226135 Cf. A000312, A031348, A031349, A045503, A133500, A225974.
%K A226135 nonn,base
%O A226135 0,25
%A A226135 _Michel Lagneau_, May 27 2013