challenging sum 
Let $\phi$ the Euler totient, and $f : [0,1] \to \mathbb{C}$ piecewise continuous. Prove that 
  $$
\lim_{n\to\infty} \frac{1}{\phi(n)} \sum_{\substack{1\leq k \leq n\\ \gcd(k,n)=1}} f\Bigl(\frac{k}{n}\Bigr) = \int_{0}^{1} f(x)\,dx
$$

 A: The Jacobstahl function is defined by $j(n)$ = the maximal distance between consecutive integers coprime to $n$.
It can be shown that (see here) that $j(n)=O(\ln^2(n))$, which proves that the mesh size of the partition has limit $0$ as $n\to\infty$, hence the conclusion.
A: Possible sketch of an elementary (though not simple) proof
Let $f$ be a piecewise continuous, complex valued function defined on $[0,1]$.
Consider, for all $n\ge1$ :
$$F(n)=\sum_{k=1}^nf\left(\frac kn\right)\quad\mathrm{and}\quad F^\star(n)=\sum^\star f\left(\frac kn\right)$$
where $\displaystyle{\sum^\star}$ denotes $\displaystyle{\sum_{\substack{1\le k\le n\cr gcd(k,n)=1}}}$
It can be shown that $F$ and $F^\star$ are Möbius transforms of each other. I can post the details if required.
Using Möbius inversion formula, we see that :
$$F^\star(n)=\sum_{d\mid n}\mu(d)F\left(\frac nd\right)$$
where $\mu$ is the Möbius function. Recall that $\mu(1)=1$, $\mu(n)=(-1)^r$ if $n$ is the product of $r$ pairwise distinct primes and $\mu(n)=0$ otherwise.
I would like to prove that, whenever $f$ is a step function, we have :
$$\lim_{n\to\infty}\frac{1}{\varphi(n)}F^\star(n)=\int_0^1f\tag{1}$$
where $\varphi$ is Euler's totient function.
If this is true, then (1) will also hold in the general case (that is : when $f$ is piecewise continuous), because every piecewise continuous function on $[0,1]$ can be uniformly approximated on this interval by step functions.
