I'm trying to work through Ireland and Rosen's *A Classical Introduction to Modern Number Theory* as I've heard good things about it. This is Exercise 12 from Chapter 2. Here $\mu$ is the Moebius function, and $\phi$ the totient function.

Find formulas for $\sum_{d|n}\mu(d)\phi(d)$, $\sum_{d|n}\mu(d)^2\phi(d)^2$, and $\sum_{d|n}\mu(d)/\phi(d)$.

Playing around with the first sum, I know I can just sum over all square-free divisors $d$ of $n$, since otherwise $\mu(d)=0$. From that, if I let $\{p_1,\dots,p_m\}$ be the primes in the factorization of $n$, I believe that $\sum_{d|n}\mu(d)\phi(d)$ essentially subtracts $\phi(d)$ for all $d$ a single prime divisor of $n$, and then adds $\phi(d)$ for all $d=p_ip_j$ for $i\lt j$, then subtracts $\phi(d)$ for all $d=p_ip_jp_k$, $i\lt j\lt k$, etc., finally adding $(-1)^n\phi(d)$ for $d=p_1\cdots p_n$ and an extra $1$ for $\mu(1)\phi(1)=1$.

I think the same analysis for the third sum applies, except I would be adding or subtracting $1/\phi(d)$ in each summand above instead. For the second sum, I think it would be almost identical for the first sum, except I would be adding $\phi(d)^2$ for all possible combinations of different primes in the factorization of $n$.

I don't know how to express these sums in a nice way like I think the authors intend. I'd be grateful for suggestions on "nice" ways to express these, even though nice is a subjective term. Thanks.