Partitioning 18 into odd number of even components

combinatoricsinteger-partitionsnumber theory

I need to find a total number of ways $18$ can be partitioned into odd number of even components.

Does the function below satisfy the "odd number of components" requirement?
$$
P_{1,3,5,7,9}(X) = \frac{1}{1-x} \cdot \frac{1}{1-x^3} \cdot \frac{1}{1-x^5} \cdot \frac{1}{1-x^7} \cdot \frac{1}{1-x^9}
$$

Given that $n$ is even, then every partition of $n$ has an even number of odd parts.
Can it be said that if $n$ is even, then every partition of $n$ has an odd number of even parts?

How can I add to that the requirement that components are supposed to be even?
I have spent 6 hours reading about self-conjugation, odd and distinct parts and generating functions and I'm clueless.

Best Answer

It may be quickest to just write the numbers down: you should be able to find $16$ cases.

$$18 =2+2+14=2+4+12=2+6+10=2+8+8=4+4+10 \\=4+6+8=6+6+6 =2+2+2+2+10=2+2+2+4+8\\=2+2+2+6+6=2+2+4+4+6 =2+4+4+4+4 \\= 2+2+2+2+2+2+6=2+2+2+2+2+4+4 \\ =2+2+2+2+2+2+2+2+2$$

One approach could be to say that, by dividing each part by $2$, the number of ways $18$ can be partitioned into an odd number of even parts is equal to the number of ways $9$ can be partitioned into an odd number of parts of any parity. That just pushes the issue further down to a question which has been considered slightly more. OEIS A027193 enumerates these but does not in my view give a simple expression for finding the number of such partitions.

The easiest one to use that I know is that the number of ways $n$ can be partitioned into an odd number of parts is $p(n-1^2)-p(n-2^2)+p(n-3^2)-\cdots$ where $p(n)$ is the total number of partitions of $n$. So here in the case of $n=9$ you get $p(8)-p(5)+p(0) = 22-7+1=16$.