OFFSET
1,3
FORMULA
a(n) = 2*A004125(n).
a(n) = (2 - Pi^2/6) * n^2 + O(n*log(n)). - Amiram Eldar, Mar 30 2024
EXAMPLE
a(5) = 8. The remainder when 10 is divided by 4,6,8, respectively is 2,4,2 and their sum = 8.
MATHEMATICA
Accumulate[Table[4*n - 2*DivisorSigma[1, n] - 2, {n, 1, 100}]] (* Amiram Eldar, Mar 30 2024 *)
PROG
(Python)
from math import isqrt
def A067436(n): return (n**2<<1)+(s:=isqrt(n))**2*(s+1)-sum((q:=n//k)*((k<<1)+q+1) for k in range(1, s+1)) # Chai Wah Wu, Oct 22 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Jan 29 2002
EXTENSIONS
Corrected and extended by several contributors.
STATUS
approved