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.

A226036 Let abc... be the decimal expansion of n. a(n) is the number of iterations of the map n -> f(n) needed to reach the last number of the cycle, where f(n) = a^a + b^b + c^c + ...

This page as a plain text file.
%I A226036 #20 Sep 16 2017 00:27:08
%S A226036 1,0,58,66,57,104,46,70,144,98,59,59,105,70,66,107,102,46,150,124,105,
%T A226036 105,145,71,146,47,145,65,69,115,70,70,71,152,142,104,106,106,103,44,
%U A226036 66,66,146,142,189,151,50,62,141,101,107,107,47,104,151,102,186,76
%N A226036 Let abc... be the decimal expansion of n. a(n) is the number of iterations of the map n -> f(n) needed to reach the last number of the cycle, where f(n) = a^a + b^b + c^c + ...
%C A226036 Additive persistence with powers of decimal digits: number of steps for "add digit(i) ^ digit(i)" operation to stabilize when started at n.
%C A226036 Or number of distinct values obtained by iterating n -> A045503(n).
%C A226036 We take 0^0 = 1.
%C A226036 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, ...
%H A226036 Michel Lagneau, <a href="/A226036/b226036.txt">Table of n, a(n) for n = 0..10000</a>
%e A226036 a(0) = 1 because 0 -> 0^0 = 1 with 1 iteration;
%e A226036 a(1) = 0 because 1 -> 1^1 => 0 iteration;
%e A226036 a(354) = 4 because:
%e A226036 354 -> 3^3 + 5^5 + 4^4 = 3408;
%e A226036 3408 -> 3^3 + 4^4 + 0^0 + 8^8 = 16777500;
%e A226036 16777500 -> 1^1 + 6^6 + 7^7 + 7^7 + 7^7 + 5^5 + 0^0 + 0^0 = 2520413;
%e A226036 2520413 -> 2^2 + 5^5 + 2^2 + 0^0 + 4^4 + 1^1 + 3^3 = 3418 and
%e A226036 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.
%p A226036 A000312:=proc(n)
%p A226036     if n = 0 then 1;
%p A226036     else add(d^d, d=convert(n, base, 10)) ;
%p A226036     end if;
%p A226036 end proc:
%p A226036 A226036:= proc(n)
%p A226036     local traj , c;
%p A226036     traj := n ;
%p A226036     c := [n] ;
%p A226036     while true do
%p A226036        traj := A000312(traj) ;
%p A226036        if member(traj, c) then
%p A226036        return nops(c)-1 ;
%p A226036        end if;
%p A226036        c := [op(c), traj] ;
%p A226036     end do:
%p A226036 end proc:
%p A226036 seq(A226036(n), n=0..100) ;
%t A226036 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 *)
%Y A226036 Cf. A000312, A031348, A031349, A045503, A133500, A225974.
%K A226036 nonn,base
%O A226036 0,3
%A A226036 _Michel Lagneau_, May 24 2013