OFFSET
1,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
It seems that sum(k=1, n, a(k)) is asymptotic to C*n*log(n) with C>1.
EXAMPLE
phi(22) -> 10, phi(10) -> 4, phi(4) -> 2 and 2 divides 22. Hence 3 iterations are needed and a(22) = 3.
MATHEMATICA
a[n_] := Module[{c = 0, k = n}, While[c == 0 || !Divisible[n, k], k = EulerPhi[k]; c++]; c]; Array[a, 105] (* Amiram Eldar, Jul 10 2019 *)
PROG
(PARI) a(n) = if(n<0, 0, c=1; s=n; while(n%eulerphi(s)>0, s=eulerphi(s); c++); c)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Aug 23 2002
STATUS
approved