<s>[INST] Generating Functions - Counting how many solutions for an exact $x^n$ Having trouble with this problem:
$$ x_1+x_2+x_3+x_4+x_5+x_6 = 13 $$
$$ x\ne 3 $$
Thanks in advance for any further help.
Being able to get to this point:
$$\begin{split}
f(x) &= (x^0+x^1+x^2+x^4+x^5+\cdots)^6\\
&= [(-x^3)+{x^0+x^1+x^2+(x^3)+x^4+x^5+\cdots}]^6\\
&= \left[{(-x^3)} + \frac{1}{(1-x)}\right]^6\\
&=\left[ \frac{-x^3(1-x)+1}{(1-x)}\right]^6\\
&=\left[\frac {x^4-x^3+1}{1}\cdot\frac {1}{1-x}\right]^6\\
&=(x^4-x^3+1)^6 \frac {1}{(1-x)^6}\\
\end{split}$$
Now if I long divide $(x^4-x^3+1)$ with $(1-x)$ I get  $[(-x^3 + \frac {1}{1-x}) (1-x)]^6 $ thus:
$$\begin{split}
f(x)&=\left(\frac {1}{1-x} -x^3\right)^6  \frac {(1-x)^6}{(1-x)^6}\\
&=\left(\frac {1}{1-x} -x^3\right)^6\\
\end{split}$$
That's where I get stuck, honestly.
 [/INST] The P.I.E approach needs to prepare some "ingredients".
There are solutions containing $4$ "bad" $x$'s, $3, 2, 1$ or none "bad" $x$'s.
The numbers involved are the following :
$$ {6\choose 4}{2\choose 1} = 30$$
$$ {6\choose 3}{6\choose 2} = 300$$
$$ {6\choose 2}{10\choose 3} = 1800$$
$$ {6\choose 1}{14\choose 4} = 6006$$
$$ {6\choose 0}{18\choose 5} = 8568$$
For example in $ {6\choose 2}{10\choose 3} $, $ {6\choose 2} $comes by requiring to have at least two bad $x$'s, which can be any two of the six $x$'s and ${10\choose 3} $ comes from stars and bars, while placing $13-3-3$ items in $4$ slots = $ {7+4-1\choose 4-1} $
This solution was not required, but the "coincidence" is worth noting.
</s>