login
A067436
a(n) = sum of all the remainders when n-th even number is divided by even numbers < 2n.
9
0, 0, 2, 2, 8, 6, 16, 16, 24, 26, 44, 34, 56, 62, 72, 72, 102, 94, 128, 122, 140, 154, 196, 170, 206, 224, 250, 248, 302, 276, 334, 334, 368, 394, 436, 396, 466, 496, 538, 516, 594, 568, 650, 656, 678, 716, 806, 748, 828, 840, 898, 908, 1010, 984, 1058, 1040
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