OFFSET
1,4
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
G.f.: Sum_{k>=1} (-1)^(k + 1) * k * x^(k^2) / (1 + x^k).
MATHEMATICA
Table[DivisorSum[n, (-1)^(n/# + 1) # &, # <= Sqrt[n] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[(-1)^(k + 1) k x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sumdiv(n, d, if(sqr(d) <= n, (-1)^(n/d + 1)*d, 0)); \\ Michel Marcus, Oct 28 2021, corrected by Antti Karttunen, Dec 14 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Oct 28 2021
STATUS
approved