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