Counting problem: generating function using partitions of odd numbers and permuting them We have building blocks of the following lengths: $3, 5, 7, 9, 11$ and so on, including all other odd numbers other than $1$. Each length is available in two colors, red and blue. For a given number $n$, how many ways can we combine blocks in a unique order (with respect to colors and lengths used) that have a total length of $n$?
Example: $n=9$ has $10$ total ways. We see that we can use a sequence of $3$ blocks of length $3$, each with $2$ color choices, so that makes $2^3=8$ ways. We also can use a $1$ block of $9$ in red or blue. Therefore the total is $10$.
Eventually we may use generating functions to find the number of combinations for any $n$, and I have been looking at the generating function for partitions using odd numbers. There are a few ways this problem differs from the problem of finding how many ways we can use odd numbers to sum to a given $n$. First, we are looking at permutations of these blocks, not just combinations. Second, each block has two colors to choose from, so a combination of $5$ blocks has $2^5$ ways to assign these colors.
Any advice on how to approach this using generating functions or just in general?
 A: Assuming you are meaning partitions, the generating function you are looking for is
$$
 P_{odd,redblue}(z) = \prod_{n=1}^{\infty} \frac{1}{1-2z^{2n+1}}.
$$
I don't know yet if the function has a nicer form or what the properties of the function are.
How to get there: 
You should first be familiar with the multiset construction, from Flajolet's book Analytic Combinatorics, page 29 ff.
For a combinatorial class $\mathcal B$ (with $\mathcal B_0 = \emptyset$), the multiset construction is defined as
$$
 \mathrm{MSET}(\mathcal B) = \prod_{ \beta \in \mathcal B} \mathrm{SEQ}( \{ \beta \}).
$$The generating function of the "normal" partitions is
$$
 P(z) = \prod_{n=1}^{\infty} \frac{1}{1-z^n}.
$$
If we may only use odd integers larger than one, we get correspondingly:
$$
 P_{odd}(z) = \prod_{n=1}^{\infty} \frac{1}{1-z^{2n+1}}.
$$
Now we have two possibilities for each odd number, so we simply double the coefficient of $z$:
$$
 P_{odd,redblue}(z) = \prod_{n=1}^{\infty} \frac{1}{(1-z^{2n+1})^2}.
$$
The coefficients of $n=8..12$ are $4,6,7,8,13$, respectively.
