login
A333781
G.f.: Sum_{k>=1} (-1)^(k + 1) * x^(k^2) / (1 - x^k).
4
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,9
COMMENTS
Number of odd divisors of n that are <= sqrt(n) minus number of even divisors of n that are <= sqrt(n).
MATHEMATICA
nmax = 90; CoefficientList[Series[Sum[(-1)^(k + 1) x^(k^2)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) a(n) = sumdiv(n, d, if (d^2<=n, if (d%2, 1, -1))); \\ Michel Marcus, Apr 05 2020
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Apr 05 2020
STATUS
approved