Let $f: \mathbb{Q} \cap [0,1] \to K$ and set $F(n) = \sum_{k = 1}^n f(\frac k n)$, $F^*(n) = \sum_{k = 1, (k,n) = 1}^n f(\frac k n)$.
Show that $F^* = \mu * F$ where $*$ is the Dirichlet product.
$\mu * F (n) = \sum_{d|n} \mu(d) F(\frac n d) = \sum_{k = 1}^n\sum_{d|n} \mu(d) f(\frac k n)$
Context
This is a previous step to obtain $\mu(n) = \sum_{k = 1, (k,n) = 1} exp(2 \pi i\frac k n)$ which can be concluded from the fact that $F(n) = e(n) = \sum_{d | n} \mu(d)$ using Möbius inversion formula. This result is also done in: The Möbius function is the sum of the primitive $n$th roots of unity..
References
Tom Apostol, Introduction to Analytic Number Theory, page 48.