I found the following problem:
$$\lim_{n\to\infty}\left(\frac{1}{n^2}\sum_{m=1}^{n}n\space\text{mod}\space m\right)$$
and decided to give it a go. I got an answer of $1-\frac{\pi^2}{12}$, but I am not sure if this is correct. It was posted with no source/context, and I wasn't able to find the solution online. I did find that the inner sum is sometimes referred to as the "sum of remainders" function, however.
Does anyone know where this problem comes from, and if my answer is correct?
Edit: Here's my working out:
I first noticed that, for large $n$:
$$n\space\text{mod}\space \left(n-k\right)\equiv k, \space\space\space n-k>\frac{n}{2}$$ $$n\space\text{mod}\space \left(\left[\frac{n}{2}\right]-k\right)\equiv 2k, \space\space\space \left[\frac{n}{2}\right]-k>\frac{n}{3}$$ $$n\space\text{mod}\space \left(\left[\frac{n}{3}\right]-k\right)\equiv 3k, \space\space\space \left[\frac{n}{3}\right]-k>\frac{n}{4}$$
$$\vdots$$
I visualised these as right triangles with base $\frac{n}{m(m+1)}$ and height $\frac{n}{m+1}$, which gave a new expression for the sum for large $n$ as the sum of areas of these triangles: $$\frac{1}{2}\sum_{m=1}^{a}\frac{n^2}{m(m+1)^2}, \space\space\space a=O(\sqrt{n})$$
The new limit is then:
$$\lim_{n\to\infty}\left(\frac{1}{2}\sum_{m=1}^{n}\frac{1}{m(m+1)^2}\right)$$
Partial fraction decomposition into a telescoping sum gave me: $$\frac{1}{2}\sum_{m=1}^{\infty}\frac{1}{m(m+1)^2}=\frac{1}{2}\left(2-\sum_{n=1}^{\infty}\frac{1}{n^2}\right)=1-\frac{\pi^2}{12}$$
Yes, the answer $1-\frac{\pi^2}{12}$ and your proof are correct. As a further reference I suggest the paper The Humble Sum of Remainders Function by Michael Z. Spivey.
This is the sketch of an alternative proof.
1) Show that $$\sum_{m = 1}^{n} n \bmod m = n^{2} - \sum_{k = 1}^{n} \sigma (k)$$ where $\sigma(k)$ is the sum of positive divisors of $k$.
2) Then use $$\sum_{k=1}^n\sigma(k)=\frac{\pi^2}{12}n^2+o(n^2).$$ See Sum of the sum-of-divisors function.