I need to make a generating function for the following:
In how many ways can we select $r$ crayons from six different colors (red, yellow, blue, green, purple, orange), with an odd number of red and yellow?
Here is what I have so far:
$6$ colors to choose $r$ crayons from makes $e_1 + e_2 + e_3 + e_4 + e_5 + e_6 = r$
Now, on the basis that we just choose $r$ crayons , then we'd have $(1 + x^1 + x^2 + ... + x^n)^6 $.
But, where I get stuck is on the constraint of an odd number of red and yellow. I know that a general tried and true formula for an odd number is $2n + 1$. Considering this fact, then for determining an odd amount, would it be legal for me to do this:
$2(1 + x^1 + x^2 + ... + x^n) + 1$
And furthermore have $(2(1 + x^1 + x^2 + ... + x^n) + 1)^2(1 + x^1 + x^2 + ... + x^n)^4$ as a generating function?