A333781 G.f.: Sum_{k>=1} (-1)^(k + 1) * x^(k^2) / (1 - x^k).
1, 1, 1, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 2, -1, 1, 1, 1, -1, 2, 0, 1, 0, 2, 0, 2, -1, 1, 2, 1, -1, 2, 0, 2, -1, 1, 0, 2, 0, 1, 0, 1, -1, 3, 0, 1, -1, 2, 1, 2, -1, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 3, -2, 2, 0, 1, -1, 2, 2, 1, -2, 1, 0, 3, -1, 2, 0, 1, -1, 3, 0, 1, 0, 2, 0, 2, -2, 1, 2
Offset: 1
Keywords
Programs
-
Mathematica
nmax = 90; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k^2)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
-
PARI
a(n) = sumdiv(n, d, if (d^2<=n, if (d%2, 1, -1))); \\ Michel Marcus, Apr 05 2020
Comments