Let $\displaystyle a_n = \sum_{m=1}^{n} (n \mod m)$ where $0 \le n \mod m \le m-1$.
It appears that $a_n \sim Cn^{\alpha}$ with $\alpha = 2$ and $C \approx .177448$. Is this true, and if so why?
Let $\displaystyle a_n = \sum_{m=1}^{n} (n \mod m)$ where $0 \le n \mod m \le m-1$.
It appears that $a_n \sim Cn^{\alpha}$ with $\alpha = 2$ and $C \approx .177448$. Is this true, and if so why?
This is OEIS A004125. Your asymptotics are true and $C=1-\frac{\pi^2}{12}$.
This arises because $$\sum_{m=1}^n(n\bmod m)=n^2-\sum_{m=1}^n m\lfloor n/m\rfloor$$ and Walfisz showed the asymptotics of the latter to be $\frac{\pi^2}{12}n^2$ (see OEIS A024916 or here).