For $z_1 > z_2 \geq 0$ define $$M(z_1,z_2) = \sum_{z_2 < a \leq z_1 } \mu(a),$$ where $\mu$ is the Möbius' function. Prove that
$$\sum_{k=1}^{\infty} M\left(\frac{n}{k}, 0\right) = 1\,\text{ and that }\, \sum_{k=1}^{\infty} M\left(\frac{n}{2k-1}, \frac{n}{2k}\right) = -1.$$
The only relevant useful identity I could think of using here is $${\displaystyle \mu (n)=\sum _{\stackrel {1\leq k\leq n}{\gcd(k,\,n)=1}}e^{2\pi i{\frac {k}{n}}}}$$ - would it help? Any help appreciated!
As reuns commented, the interchange of sums is the main idea.
The first sum is $$ \sum_{k=1}^{\infty} M\left( \frac nk, 0\right) = \sum_{k\leq n}\sum_{d\leq \frac nk} \mu(d) = \sum_{u\leq n} \sum_{d|u}\mu(d). $$ The inner sum is $1$ if $u=1$, and it is $0$ if $u>1$. Thus, the first sum equals $1$.
The second sum is $$ \sum_{k=1}^{\infty} M\left( \frac n{2k-1}, \frac n{2k}\right) = \sum_{k\leq n} (-1)^{k-1} \sum_{d\leq \frac nk} \mu(d) = -\sum_{u\leq n}\sum_{d|u}\mu(d)(-1)^{\frac ud}. $$
Let $f(n)$ be an arithmetic function such that $(-1)^n=\sum_{d|n} f(d)$, then we have $f(u)=\sum_{d|u} \mu(d)(-1)^{\frac ud}$ by Mobius inversion. The arithmetic function $f(n)$ is easily verified to be $$ f(n)=\begin{cases} -1 &\mbox{ if } n=1,\\ 2 &\mbox{ if } n=2, \\ 0 &\mbox{ otherwise.}\end{cases} $$ Therefore, we obtain the desired second sum result for $n\geq 2$.