TITLE: Prove that $\sum_{d|n} \mu(d)\sigma(d) = (-1)^{k} \prod_{i=1}^{k} p_i$
QUESTION [7 upvotes]: In my notes: 
$$\sum_{d|n} \mu(d)\sigma(d) = (-1)^{k} \prod_{i=1}^{k} p_i$$
where $\mu(d)$ is the Möbius function and $\sigma(d)$ is the sum of all positive divisors of $d$.
And I have no idea how they got the expression on the right hand side. Could anyone help me explain how this works?
Thanks,

REPLY [5 votes]: This looks more like a special case of Möbius Inversion Formula. You need to choose an appropriate $f$ and $g$.
Note that $n = p_1^{\alpha_1} p_2^{\alpha_2} \ldots p_k^{\alpha_k}$ and $n = p_1 p_2 \ldots p_k$ should give the same answer. (Essentially you are removing the $\mu(d) = 0$ terms on the left side).
Hence, we could just deal with $n = p_1 p_2 \ldots p_k$. 
Now let $f(n) = n$ and $g(n) = \displaystyle \sum_{d|n} f(d)$.
$g(n)$ is nothing but the sum of divisors of $n$ i.e. $g(n) = \sigma(n)$.
Note that $\mu(d) = (-1)^k \mu \left( \frac{n}{d} \right)$ when $n = p_1 p_2 \ldots p_k$. 
By Möbius Inversion Formula, $$n = \sum_{d|n} \mu(d) g\left( \frac{n}{d} \right) = (-1)^k \sum_{d|n} \mu\left( \frac{n}{d} \right) g \left( \frac{n}{d} \right) = (-1)^k \sum_{d|n} \mu\left( d \right) g \left( d \right)$$
Hence, $$\sum_{d|n} \mu\left( d \right) \sigma \left( d \right) = (-1)^k p_1 p_2 \ldots p_k$$