I was playing with the function $ f(n) = \sum_{i=1}^{n}{(n \mod i)} $. After looking at $ \frac{f(2n)}{f(n)}$ for some values it seemed quadratic, and I was wondering about the limit of $ \frac{f(n)}{n^2} $.
I tried to calculate that for big values. I was able to find a method to calculating it in $ O(\sqrt{n}) $, and for $n = 10^{19}$, $f(n) = 17753296657588678168165249620624323219$, and after giving the first few digits to wolfram alpha it seems like it's $1 - \frac{\zeta(2)}2$ (I found it with smaller values, and since it also matches for bigger values it feels likely it's correct).
Is that correct? How can I prove that?