[Math] Generating functions for partitions of n with an even number of parts and odd number of parts, and their difference.

combinatoricsinteger-partitions

I've been trying to figure this out for more than 10 hours.

So far I have, for even number of partitions, $$P_e(x)=\sum_{k\ge1}(x^{2k}\prod_{i=1}^{2k}\frac{1}{1-x^i})$$ and for odd numbers
$$P_o(x)=\sum_{k\ge1}(x^{2k-1}\prod_{i=1}^{2k-1}\frac{1}{1-x^i})$$
Hopefully you can see the direction I'm headed in. According the the problem, the difference of the two
$$P_e(x) – P_o(x)$$ is supposed to equal $$\prod_{n\ge1}\frac{1}{1+x^n}$$

I have tried subtracting my results and cannot get anywhere. Can anyone shed some light on how to approach this problem?

Best Answer

You don’t need your expressions for $P_e(x)$ and $P_o(x)$; just expand

$$\prod_{k\ge 1}\frac1{1+x^k}=\prod_{k\ge 1}(1-x^k+x^{2k}-+\ldots\;,$$

and notice that the individual $x^n=x^{k_1}x^{k_2}\ldots x^{k_m}$ terms of the outer product are positive or negative according as $m$ is even or odd, so the coefficient of $x^k$ in

$$\prod_{k\ge 1}\frac1{1+x^k}$$

is the number of partitions of $k$ with an even number of parts minus the number with an odd number of parts.

You may find this question and its answers of interest; it goes beyond your present problem, but I shouldn’t be surprised if you found yourself dealing with the topic soon.