For each, give the generating function for the number of solutions to the equation with the constraints given. You do not need to find the number of solutions, just the generating function.
a) $x_1 + x_2 + x_3 = n$ with $x_1$ odd and $x_2$ even and $x_2$ ≤ 20 and $x_3$ ≥ 10.
b) $x_1 + x_2 + x_3 ≤ n$ with $x_1$ odd and $x_2$ even and $x_2$ ≤ 20 and $x_3$ ≥ 10.
c) $x_1 + x_2 + x_3 = n$ with $x_1$ a multiple of 5 and $x_2$ prime and 5 ≤ $x_3$ ≤ 15.
For a)
I found that for $x_1$ i got $1/(1-X^1)$.
For $x_2$ I got $(1-X^{21})/(1-X)$
For $x_3$ I got $X^{10}/(1-X)$
So my final answer was $[X^n](1/(1-X^1))((1-X^{21})/(1-X))(X^{10}/(1-X))$
For part B I am confused on what to do when you have $x_1 + x_2 + x_3 ≤ n$. I thought maybe you would use factorial since it is ≤ n.
For Part C I am not sure how I would represent prime numbers.