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.
%I A096859 #15 Nov 18 2017 20:59:43 %S A096859 1,1,2,2,2,2,3,1,2,3,3,1,3,2,2,3,3,4,2,2,4,2,2,3,4,2,4,4,2,3,4,4,4,5, %T A096859 4,3,5,4,4,4,2,5,3,4,4,4,4,2,4,3,4,6,5,5,4,5,5,4,4,2,4,5,3,4,4,3,5,4, %U A096859 5,3,4,2,4,4,3,3,5,3,5,3,4,4,4,3,4,5,5,3,4,3,3,3,5,3,5,2,6,4,3,7,5,3,3,3,5 %N A096859 Function A062401(x) = phi(sigma(x)) = f(x) is iterated. Starting with n, a(n) is the count of distinct terms arising in trajectory; a(n)=t(n)+c(n)=t+c, where t=number of transient terms, c=number of recurrent terms (in the terminal cycle). %H A096859 Antti Karttunen, <a href="/A096859/b096859.txt">Table of n, a(n) for n = 1..16384</a> %e A096859 n=255: list={255,144,360,288,[432,480],432,...}, t=transient=4, c=cycle=2, a(255)=t+c=6; %e A096859 n=244: list={244,180,144,360,288,[432,480],432,...}, t=5, c=2, a(244)=7. %t A096859 fs[x_] :=EulerPhi[DivisorSigma[1, x]] itef[x_, len_] :=NestList[fs, x, len] Table[Length[Union[itef[2^w, 20]]], {w, 1, 256}] (* len=20 at n<=256 is suitable *) %o A096859 (Scheme) (define (A096859 n) (let loop ((visited (list n)) (i 1)) (let ((next (A062401 (car visited)))) (cond ((member next visited) i) (else (loop (cons next visited) (+ 1 i))))))) ;; _Antti Karttunen_, Nov 18 2017 %Y A096859 Cf. A000010, A000203, A062401, A062402, A095955, A096860, A096861, A096865. %Y A096859 Cf. also A096862. %K A096859 nonn %O A096859 1,3 %A A096859 _Labos Elemer_, Jul 21 2004