OFFSET
1,2
FORMULA
a(n) = Sum_{k=1..n} binomial(k+2,3) * floor(n/k).
G.f.: 1/(1-x) * Sum_{k>=1} x^k/(1-x^k)^4 = 1/(1-x) * Sum_{k>=1} binomial(k+2,3) * x^k/(1-x^k).
PROG
(PARI) a(n) = sum(k=1, n, binomial(n\k+3, 4));
(Python)
from math import isqrt, comb
def A365409(n): return -(s:=isqrt(n))**2*comb(s+3, 3)+sum((q:=n//k)*((comb(k+2, 3)<<2)+comb(q+3, 3)) for k in range(1, s+1))>>2 # Chai Wah Wu, Oct 26 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Oct 23 2023
STATUS
approved