From the definition of Euler’s phi function, we see that the cardinality |S(d,n)| of S(d,n) is given by φ(nd). \[n = \sum_{d|n} |S(d,n)| = \sum_{d|n} \varphi(\frac{d}{n}) \...From the definition of Euler’s phi function, we see that the cardinality |S(d,n)| of S(d,n) is given by φ(nd). n=∑d|n|S(d,n)|=∑d|nφ(dn)φ(n)=∑d|nμ(d)nd=n∑d|nμ(d)dφ(r∏i=1plii=r∏i=1φ(plii)φ(pl)=pll∑j=0μ(pj)pj=pl(1−1p)