[Math] Partitions of $n$ into distinct odd and even parts proof

combinatoricsinteger-partitions

Let $p_\text{odd}(n)$ denote the number of partitions of $n$ into an odd number of parts, and let $p_\text{even}(n)$ denote the number of partitions of $n$ into an even number of parts.
How do I prove that

  1. $|p_\text{even}(n) – p_\text{odd}(n)|$ is equal to the partitions of $n$ into distinct odd parts.

  2. Show that the number of partitions of $n$ for which no part appears exactly once is equal to the number of partitions of n for which every part is divisible by 2 or 3.

  3. Show that the number of partitions of $n$ for which no part appears more than twice is equal to the number of partitions of $n$ for which no part is divisible by 3.

Best Answer

For the sake of completeness here is a slightly different approach to part one, which then continues along the path in the link from Brian Scott.

The generating function of the set of partitions by the number of parts is given by $$ G(z,u) = \prod_{k\ge 1} \frac{1}{1-uz^k}.$$ It follows that the generating function of the set of partitions with an even number of parts is given by $$ G_1(z) = \frac{1}{2} G(z, 1) + \frac{1}{2} G(z, -1) = \frac{1}{2} \prod_{k\ge 1} \frac{1}{1-z^k} + \frac{1}{2} \prod_{k\ge 1} \frac{1}{1+z^k}.$$ Similarly for an odd number of parts, $$ G_2(z) = \frac{1}{2} G(z, 1) - \frac{1}{2} G(z, -1) = \frac{1}{2} \prod_{k\ge 1} \frac{1}{1-z^k} - \frac{1}{2} \prod_{k\ge 1} \frac{1}{1+z^k}.$$ Therefore $$ G_1(z) - G_2(z) = Q(z) = \prod_{k\ge 1} \frac{1}{1+z^k}$$ and this is the generating function of the difference between the number of partitions into an even and odd number of parts.

Now observe that this is $$\prod_{k\ge 1} \frac{1-z^k}{1-z^{2k}} = \prod_{k\ge 0} (1-z^{2k+1})$$ because the denominator cancels all the factors with even powers in the numerator.

Here is an important observation: the above expression of $Q(z)$ enumerates partitions into unique odd parts in a generating function of signed coefficients where the sign indicates the parity of the number of parts. There is no cancellation between partitions that add up to the same value because the counts of constituent parts have the same parity. Moreover as all parts are odd, partitions of odd numbers must have an odd number of parts and of even numbers, an even number. Therefore the coefficients of $Q(z)$ alternate in sign.

To get the series that generates the absolute values of these coefficients, we create generating functions for the even powers and the odd ones, inverting the sign of the coefficients of the odd ones. The even ones are generated by $$\frac{1}{2} Q(z) + \frac{1}{2} Q(-z)$$ and the odd ones by $$-\left(\frac{1}{2} Q(z) - \frac{1}{2} Q(-z)\right)$$ Adding these gives $$ Q(-z).$$ But this is $$\prod_{k\ge 0} (1-(-z)^{2k+1}) = \prod_{k\ge 0} (1-(-1)^{2k+1} z^{2k+1}) = \prod_{k\ge 0} (1+ z^{2k+1}),$$ precisely the generating function of partitions into distinct odd parts.

This is sequence A000700 from the OEIS.