OFFSET
1,2
FORMULA
G.f.: 1/(1-x) * Sum_{k>=1} x^k/(1+x^k)^5 = -1/(1-x) * Sum_{k>=1} binomial(k+3,4) * (-x)^k/(1-x^k).
PROG
(PARI) a(n) = sum(k=1, n, (-1)^(k-1)*binomial(k+3, 4)*(n\k));
(Python)
from math import isqrt
from sympy import rf
def A366939(n): return ((rf(s:=isqrt(m:=n>>1), 3)*(s+1)*((s**2<<2)+13*s+8)<<3)-rf(t:=isqrt(n), 5)*(t+1)+sum((((q:=m//w)+1)*(-q*(q+2)*((q**2<<2)+13*q+8)-5*w*(w+1)*((r:=w<<1)+1)*(r+3))<<3) for w in range(1, s+1))+sum(rf(q:=n//w, 5)+5*(q+1)*rf(w, 4) for w in range(1, t+1)))//120 # Chai Wah Wu, Oct 29 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Oct 29 2023
STATUS
approved