Distinguishable telephone poles being painted Each of n (distinguishable) telephone poles is painted red, white, blue or yellow.  An odd number are painted blue and an even number yellow.  In how many ways can this be done?
Can some give me a hint how to approach this problem?

Consider the generating function given by 
$( R + W + B + Y )^n$
Without restriction, the sum of all coefficients would give the number of ways to paint the distinguishable posts in any of the 4 colors. We substitute $R=W=B=Y = 1$ to find this sum, and it is (unsurprisingly) $4^n$.
Since there are no restrictions on $R$ and $W$, we may replace them with $1$, and still consider the coefficients.
If we have the restriction that we are only interested in cases where the degree of $B$ is odd (ignore $Y$ for now), then since 
$ \frac{1^k - (-1)^k}{2} = \begin{cases} 1 & k \equiv 1 \pmod{2}  \\ 0 & k \equiv 0 \pmod{2} \\ \end{cases}$
the sum of the coefficients when the degree of $B$ is odd, is just the sum of the coefficients of $ \frac{ (R + W + 1 + Y) ^n - ( R + W + (-1) + Y) ^n} { 2} $.
Substituting in $R=W=Y=1$, we get that the number of ways is  
$$ \frac{ (1 + 1 + 1 + 1)^n - (1 + 1 + (-1) +1)^n}{2} = \frac {4^n - 2^n} {2}$$
Now, how do we add in the restriction that the degree of $Y$ is even? Observe that since
$ \frac{1^k + (-1)^k}{2} = \begin{cases} 1 & k \equiv 0 \pmod{2}  \\ 0 & k \equiv 1 \pmod{2} \\ \end{cases}$
the sum of the coefficients when the degree of $B$ is odd and Y is even, is just the sum of the coefficients of 
$$ \frac{ \frac{ (R + W + 1 + 1) ^n - ( R + W + (-1) + 1) ^n} { 2}  + \frac{ (R + W + 1 + (-1)) ^n - ( R + W + (-1) + (-1)) ^n} { 2}  } { 2} $$
Now substituting in $R=W=1$, we get $\frac{ 4^n - 2 ^n + 2^n - 0^n } { 4} = 4^{n-1}$
