Is this Riemann sum formula for definite integral using of prime numbers true? While answering another question in MSE, I had used the following result which I thought was a trivial consequence of the prime number theorem and equidistribution.  However, I realized from the comments that many people  thought that this was not either true or counter intuitive. Hence I am posting this as a question looking for a proof or disproof.

Let $p_k$ be the $k$-th prime and $f$ be a continuous function
  Riemann integrable in $(0,1)$ such that 
$$\lim_{n \to \infty}\frac{1}{n}\sum_{r = 1}^{n}f\Big(\frac{r}{n}\Big)
= \int_{0}^{1}f(x)dx.  $$ 
Then,    $$ \lim_{n \to \infty}\frac{1}{n}\sum_{r =
1}^{n}f\Big(\frac{p_r}{p_n}\Big) = \int_{0}^{1}f(x)dx. $$

My proof was based on showing that as $n \to \infty$, the ratios $p_r/p_n$ approached equidistribution in $(0,1)$ hence the integral follows as a trivial property of equidistributed sequence.
Motivation: There are several identities, limits etc on prime numbers which can be easily proven using this simple formula, including all answers to all three questions on the arithmetic, geometric and harmonic means of primes mentioned in the above link.

Posting this as an answer rather than a comment because it contains the actual answer. Since I did not get a conclusive answer in MSE, I posted the question in MO where a rigorous proof was provided.
https://mathoverflow.net/questions/311085/calculating-limits-using-integration-for-sequence-of-prime-numbers
