<s>[INST] Comparing series Can anyone explain why if I compare the coefficient of $x^{n}$ of the equation
$$\sum_{k=0}^{\infty}a(n)x^n= \frac{1}{1-x}-\frac{x}{1-x^3}+\frac{x^2}{1-x^5}-\frac{x^3}{1-x^7}+...$$
I can get
$$a(n)=k_{1}(4n+1)-k_{3}(4n+1)$$ where $k_{i}(m)$ is the number of divisors of $m$ that are congruent to $j$ modulo $4$? 
 [/INST] $$
\begin{align}
\sum_{n=0}^\infty(-1)^n\frac{x^n}{1-x^{2n+1}}
&=\sum_{n=0}^\infty\sum_{k=0}^\infty(-1)^nx^{n+(2n+1)k}\\
\end{align}
$$

The coefficient of $x^m$ is the the number of factors of $2m+1=(2n+1)(2k+1)$ that are $1$ mod $4$ ($n$ even) minus the number that are $3$ mod $4$ ($n$ odd). This confirms the formula in the question.


Each prime factor, $p$, of $2m+1$ that is $3$ mod $4$, which has an exponent of $k$, contributes to this difference of factor counts, a factor of
$$
\overbrace{1-1+1-1+\cdots+(-1)^k}^{\text{$k+1$ terms}}
$$
which is $1$ if $k$ is even and $0$ if $k$ is odd.
Each prime factor, $p$, of $2m+1$ that is $1$ mod $4$, which has an exponent of $k$, contributes to this difference of factor counts, a factor of
$$
\overbrace{1+1+1+1+\cdots+1}^{\text{$k+1$ terms}}
$$
which is $k+1$.

Thus, if we break $2m+1$ into $p_1$, the product of primes that are $1$ mod $4$, and $p_3$, the product of primes that are $3$ mod $4$, then the coefficient of $x^m$ is the number of factors of $p_1$ if $p_3$ is a square, and $0$ if $p_3$ is not a square.

Note that if $m$ is odd, then $2m+1\equiv3\pmod4$. This means that $2m+1$ has at least one prime factor that is $3$ mod $4$ to an odd power. Thus, the coefficient of $x^m$ is $0$ if $m$ is odd.
Here are the terms up to $x^{50}$:
$$
1 + 2 x^2 + x^4 + 2 x^6 + 2 x^8 + 3 x^{12} + 2 x^{14} + 2 x^{18} + 2 x^{20} + 2 x^{22} + x^{24}\\ + 2 x^{26} + 2 x^{30} + 4 x^{32} + 2 x^{36} + x^{40} + 4 x^{42} + 2 x^{44} + 2 x^{48} + 2 x^{50}
$$
</s>