Wikipedia has the result that Gauss proved that for a prime number $p$ the sum of its primitive roots is congruent to $\mu(p − 1) \pmod{p}$ in Article 81.
I read it, but is there a faster proof using Moebius inversion instead of case by case checking?
I tried the following:
Let $f(d)$ be the sum of all the $d$th roots of unity. Then I think we have $$ \sum_{d\mid p-1}f(d)\equiv \sum_{x\in\mathbb{Z}_p^\times}x\equiv 0\pmod{p} $$ since every element of $\mathbb{Z}_p^\times$ is a $d$th root of unity for some $d\mid p-1$.
So I define $F(n)=\sum_{d\mid n}f(d)$. By Moebius inversion, $$ f(n)=\sum_{d\mid n}\mu(d)F(n/d). $$ The sum in question is the case where $n=p-1$, so $$ f(p-1)=\sum_{d\mid p-1}\mu(p-1)F((p-1)/d) $$ and I want to show this is congruent to $\mu(p-1)\pmod{p}$. Since $f(1)=1$, $F(1)=1$, so I'm just trying to show $F((p-1)/d)\equiv 0$ when $(p-1)/d\neq 1$ and I believe the result would follow. Does anyone know how to show that if it is true, or fix the argument otherwise?