OFFSET
1,4
LINKS
T. D. Noe, Table of n, a(n) for n=1..10000
Paul Ellis, Jason Shi, Thotsaporn Aek Thanatipanonda, and Andrew Tu, Two Games on Arithmetic Functions: SALIQUANT and NONTOTIENT, arXiv:2309.01231 [math.NT], 2023. See p. 7.
FORMULA
a(n) = a(n-phi(n))+1, a(1) = 0.
a(n) = A076640(n)-1.
EXAMPLE
cototient(6) = 4, cototient(4) = 2, cototient(2) = 1, hence a(6) = 3.
MATHEMATICA
cot[n_] := n - EulerPhi[n]; a[n_] := -1 + Length @ NestWhileList[cot, n, # > 1 &]; Array[a, 100] (* Amiram Eldar, May 19 2022 *)
PROG
(PARI) for(n=1, 150, s=n; t=0; while(s!=1, t++; s=s-eulerphi(s); if(s==1, print1(t, ", "); ); ))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 31 2002
EXTENSIONS
Prepended a(1)=0 and changed offset. - T. D. Noe, Dec 03 2008
STATUS
approved