Let $\mu (n)$ be the Möbius function. I want to prove the following formula: $$\mu (n)=\sum_{\substack{1\leq k \leq n\\ (k,n)=1}}\cos \frac{2k\pi}{n}.$$
Let $F(n)$ be the right hand side, then by Möbius Inversion, it suffices to show that $(F*1)(n)=\delta(n)$, where $*$ is the dirichlet convolution, $1(n)=1$ is the constant function and $\delta (n)=1$ if $n=1$ and $0$ otherwise is the delta function.
Now, $$(F*1)(n)=\sum_{d|n}\sum_{\substack{1\leq k \leq d\\ (k,d)=1}}\cos \frac{2k\pi}{d}$$ $$=\sum_{d|n}\sum_{\substack{1\leq k \leq d\\ (k,d)=1}}\cos \frac{2ke\pi}{ed}=\sum_{d|n}\sum_{\substack{1\leq k \leq d\\ (k,d)=1}}\cos \frac{2ke\pi}{n}$$, where $e=n/d \in \mathbb{N}$. I want to show that the above sum is equal to $\sum_{j=1}^n\cos \frac{2j\pi}{n}$ and the result will follow quickly as $\sum_{j=1}^n\cos \frac{2j\pi}{n} = \sum_{j=1}^n \operatorname{Re}\zeta_n^{j}$ where $\zeta_n=e^{2\pi i/n}$ is the primitive $n$-th root of unity.
To this end, it suffices to show that there is a bijection between the two sets: $S_1:=\{kn/d| 1\leq k \leq d, (k,d)=1, d|n\}$ and $S_2:=\{1,2\cdots, n\}$.
Now $S_1 \subseteq S_2$ is clear, however I have a hard time proving the other inclusion: for any $l\in S_2$, if $(l,d)=q$, then we set $k=l/q$ such that $(k,d)=1$ and we have $nk/d=nl/dq$ and we are done if we can show $dq=n$.
Actually this is problem 4.13 from the following handout https://web.evanchen.cc/handouts/Summation/Summation.pdf and I wonder if there is any quicker way since my method seems a bit overly complicated.
Thank you so much in advance.
If you divide all the elements of $S_1$ and $S_2$ by $n$, you get the sets $$ \tfrac1nS_1 = \{ \tfrac kd\colon 1\le k\le d,\, (k,d)=1,\, d\mid n\} \quad\text{and}\quad \tfrac1nS_2 = \{ \tfrac jn\colon 1\le j\le n\}. $$ But here it's actually clear that the two sets are in bijection: the elements of $\frac1nS_1$ are simply the reduced-to-lowest-terms forms of the elements of $\frac1nS_2$! (This is the same trick used to prove the identity $\sum_{d\mid n} \phi(d) = n$.)