OFFSET
1,6
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
G.f.: Sum_{k>=1} k * x^(k^2) / (1 + x^k).
a(n) = 1 if n = 1 or n is an odd prime (A006005) or n = 4 or n = 8. - Bernard Schott, Dec 18 2021
MATHEMATICA
Table[DivisorSum[n, (-1)^(# + n/#) # &, # <= Sqrt[n] &], {n, 1, 80}]
nmax = 80; CoefficientList[Series[Sum[k x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sumdiv(n, d, if (d<=sqrt(n), (-1)^(d + n/d)*d)); \\ Michel Marcus, Oct 25 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Oct 25 2021
STATUS
approved