2

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?

1 Answers1

3

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).

Parcly Taxel
  • 103,344
  • Thank you. I also just saw T^2’s answer here: https://mathoverflow.net/questions/195325/how-to-calculate-the-sum-of-remainders-of-n/342889 – Jackson Walters Dec 26 '20 at 03:07