Roots of unity and function $\mu$ I need to prove that for each positive integer $n$ the sum of the primitive $n$th roots of unity in $\mathbb{C}$ is $\mu(n)$, where $\mu$ is the Möbius function.

Do you know $$\sum_{d\mid m}\mu(d)=1{\rm\ if\ }m=1,\,\,=0{\rm\ else}$$ The sum of the primitive $n$th roots of unity is $$\sum_{\gcd(k,n)=1}e^{2\pi ik/n}=\sum_1^n\sum_{d\mid\gcd(k,n)}\mu(d)e^{2\pi ik/n}=\sum_{d\mid n}\mu(d)\sum_0^{(n/d)-1}e^{2\pi idk/n}$$ The inner sum os the sum of all the $m$th roots of unity where $m=n/d$, so it's zero except for $d=n$ when it's $1$. So, the original sum evaluates to $\mu(n)$. 
