|
|
A180633
|
|
a(n) is the number of iterations of function f(x) = phi(x)-1 needed before zero is reached, when starting from the initial value x = n.
|
|
1
|
|
|
0, 1, 1, 2, 2, 3, 2, 4, 3, 4, 3, 5, 3, 6, 4, 5, 5, 6, 4, 7, 5, 6, 5, 7, 5, 8, 6, 7, 6, 8, 5, 9, 6, 8, 6, 8, 6, 9, 7, 8, 6, 9, 6, 10, 8, 8, 7, 9, 6, 10, 8, 10, 8, 11, 7, 9, 8, 9, 8, 10, 6, 11, 9, 9, 10, 10, 8, 11, 10, 11, 8, 12, 8, 13, 9, 9, 9, 11, 8, 12, 10, 12, 9, 13, 8, 10, 10, 10, 9, 11, 8, 13, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
FORMULA
|
|
|
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
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Name changed and value of a(0) changed from 1 to 0 by Antti Karttunen, Aug 07 2017
|
|
STATUS
|
approved
|
|
|
|