OFFSET
0,4
COMMENTS
Since phi(n) < n it follows that phi(n)-1 < n-1; therefore, after each iteration the argument decreases and eventually will reach zero.
Solution of equation phi(-1 + phi(-1 + phi(-1 + ...(phi(n))...))) = 1 where the totient function phi is applied a(n) times. (The original name of the sequence.)
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..10000
FORMULA
a(0) = 0; for n >= 1, a(n) = 1 + a(A000010(n)-1). - Antti Karttunen, Aug 07 2017
EXAMPLE
a(11)=5 since phi(-1+phi(-1+phi(-1+phi(-1+phi(-1+phi(11))))))=
phi(-1+phi(-1+phi(-1+phi(-1+phi(-1+10)))))=
phi(-1+phi(-1+phi(-1+phi(-1+6))))=
phi(-1+phi(-1+phi(-1+4)))=
phi(-1+phi(-1+2))=
phi(-1+1)=1 after 5 iterations.
MATHEMATICA
f[n_] := If[n < 3, 1, Length@ NestWhileList[ EulerPhi@# -1 &, n, # != 1 &]]; Array[f, 93, 0] (* Robert G. Wilson v, Sep 25 2010 *)
PROG
(Scheme) (define (A180633 n) (if (zero? n) n (+ 1 (A180633 (+ -1 (A000010 n)))))) ;; Antti Karttunen, Aug 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Carmine Suriano, Sep 13 2010
EXTENSIONS
Corrected a(18), a(19) & a(73) and extended past a(80) by Robert G. Wilson v, Sep 25 2010
Name changed and value of a(0) changed from 1 to 0 by Antti Karttunen, Aug 07 2017
STATUS
approved