<s>[INST] Integer solution of $a+b+c=15$ with restrictions on $a, b$ and $c$ I'm checking this problem:
Find the integer solutions of $a+b+c=15$ if $a$ is multiple of 3, $b$ is less than 10 and $c$ is multiple of 2. With $a, b, c ≥ 0$ 
We can make a series of polynomials with combinatorics. The polynomials would be:
$$P_a(x)=1+x^3+x^6+x^9+\dots$$
$$P_b(x) = 1 +x+x^2+x^3+\dots + x^9 = \frac{1-x^{10}}{1-x}$$
$$P_c(x) = 1+x^2 + x^4 + x^6 + \dots$$
I want to know if my $P_a(x)$ and $P_c(x)$ are stated correctly and how can they be simplified so that I get to $x^{15}$ in an easier way. 
Big thanks for your help. 
 [/INST] You don't have to make polynomials and solve it by generating functions,
let $a=3k$, and $c=2j$ for $k,j \in \mathbb{N_0}$
$$3k + 2j + b = 15 \iff 3k+2j=15-b$$
This is a classic linear diophantine equation, and since $\gcd(2,3)=1$, it has solutions. So, all we need to do is find initial solutions to $k,j$ in terms of $b$. An obvious one is 
$$j=b \implies3k=15-3b \iff k=5-b$$
So, we know from the properties of linear diophantine equation that 
If $(x^*,y^*)$ is a solution to $ax+by=n$, then all integer solutions are in the form of 
$$\left(x^*+m\frac{b}{\gcd(a,b)},y^*-m\frac{a}{\gcd(a,b)}\right)$$
for some integer $m$. Applying that to our equation, we get:
$$(k,j) \in \left\{((5-b)+2m,b-3m) \ |\ 0 \le b<10, \ \ b \in \mathbb{N_0},m \in \mathbb{Z}\right\}$$
and one more restriction: $k \ge0 \implies m \ge \frac{b-5}{2}$ and $j \ge0 \implies m \le \frac{b}{3}$ 
So to find all solutions, you choose $b$ from this set $\{0,1,2,3,4,5,6,7,8,9\}$ and put every integer 
$$ \left\lfloor \frac{b-5}{2} \right\rfloor \le m \le\left\lfloor \frac{b}{3} \right\rfloor$$
and the resulting set would be 
$$(a,b,c) \in \{(15-3b+6m,b,2b-6m)\}$$
</s>