login
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).
8
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, 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, 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
OFFSET
1,3
LINKS
EXAMPLE
n=255: list={255,144,360,288,[432,480],432,...}, t=transient=4, c=cycle=2, a(255)=t+c=6;
n=244: list={244,180,144,360,288,[432,480],432,...}, t=5, c=2, a(244)=7.
MATHEMATICA
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 21 2004
STATUS
approved