OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} binomial(k+1,2) * floor(n/k).
G.f.: 1/(1-x) * Sum_{k>=1} x^k/(1-x^k)^3 = 1/(1-x) * Sum_{k>=1} binomial(k+1,2) * x^k/(1-x^k).
MATHEMATICA
Table[Sum[Binomial[Floor[n/k+2], 3], {k, n}], {n, 50}] (* Harvey P. Dale, Aug 04 2024 *)
PROG
(PARI) a(n) = sum(k=1, n, binomial(n\k+2, 3));
(Python)
from math import isqrt
def A364970(n): return (-(s:=isqrt(n))**2*(s+1)*(s+2)+sum((q:=n//k)*(3*k*(k+1)+(q+1)*(q+2)) for k in range(1, s+1)))//6 # Chai Wah Wu, Oct 26 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Oct 23 2023
STATUS
approved