login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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