OFFSET
2,5
LINKS
Antti Karttunen, Table of n, a(n) for n = 2..16385
FORMULA
It seems that sum(k=1, n, a(k)) is asymptotic to C*n*log(n) with C < 1.
EXAMPLE
cophi(10) -> 6, cophi(6) -> 4, cophi(4) -> 2 and 2 divides 10. Hence 3 iterations are needed and a(10) = 3.
MATHEMATICA
Table[Length@ NestWhileList[# - EulerPhi@ # &, n, Or[# == n, ! Divisible[n, #]] &, 1, 12] - 1, {n, 2, 106}] (* Michael De Vlieger, Dec 22 2017 *)
PROG
(PARI) a(n)=if(n<0, 0, c=1; s=n; while(n%(s-eulerphi(s))>0, s=s-eulerphi(s); c++); c)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Aug 23 2002
STATUS
approved