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