I will be very happy to understand how to solve this problem with generating function: How many solutions are there to the equation $$x_1 + x_2 + x_3 + x_4 + x_5 = 31$$ where $x_i$ is a nonnegative integer, and $x_2$ is even and $x_3$ is odd?
thanks!
The generating function is $(1/(1-x))^3 \times 1/(1-x^2) \times x/(1-x^2)$. (Why?) The coefficient of $x^{31}$ in the series expansion gives you your answer.