The number of ways to write $10$ as the sum of five natural numbers not equal to $3$ How many answers are there for the equation
$$x_1+x_2+x_3+x_4+x_5=10$$
given that $x_1,x_2\dots x_5\in\Bbb{Z^{0+}}\setminus\{3\}$.
 A: The number of solutions of the equation 
$$x_1 + x_2 + x_3 + x_4 + x_5 = 10$$
is the number of ways four addition signs can be inserted into a row of ten ones, which is $\binom{10 + 4}{4} = \binom{14}{4}$.  From these, we must exclude those solutions in which one or more of the numbers is equal to $3$.  Since $3 \cdot 3 = 9 < 10 < 12 = 4 \cdot 3$, at most three of the addends are equal to $3$.  
If one of the addends is equal to $3$, then the sum of the four remaining addends is equal to $10 - 3 = 7$.  The number of solutions of the equation 
$$y_1 + y_2 + y_3 + y_4 = 7$$
in the nonnegative integers is $\binom{7 + 3}{3} = \binom{10}{3}$.  Since there are five ways in which one of the five addends could equal $3$, the number of solutions in which at least one addend is equal to $3$ is $\binom{5}{1}\binom{10}{3}$.  
If two of the addends are equal to $3$, then the sum of the three remaining addends is equal to $10 - 2 \cdot 3 = 4$.  The number of solutions of the equation 
$$z_1 + z_2 + z_3 = 4$$
in the nonnegative integers is $\binom{4 + 2}{2} = \binom{6}{2}$.  Since there are $\binom{5}{2}$ ways in which two of the five addends could equal $3$, the number of solutions in which at least two addends are equal to $3$ is $\binom{5}{2}\binom{6}{2}$.
If three of the addends are equal to $3$, then the sum of the two remaining addends is equal to $10 - 3 \cdot 3 = 1$.  The number of solutions of the equation 
$$w_1 + w_2 = 1$$
in the nonnegative integers is $\binom{1 + 1}{1} = \binom{2}{1}$.  Since there are $\binom{5}{3}$ ways in which three of the five addends could equal $3$, the number of solutions in which three addends are equal to $3$ is $\binom{5}{3}\binom{2}{1}$.  
By the Inclusion-Exclusion Principle, the number of solutions of the equation
$$x_1 + x_2 + x_3 + x_4 + x_5 = 10$$
in which none of the addends is equal to $3$ is 
$$\binom{14}{4} - \binom{5}{1}\binom{10}{3} + \binom{5}{2}\binom{6}{2} - \binom{5}{3}\binom{2}{1} = 531$$
A: Assuming you allow zeros, you are looking for the coefficient of $x^{10}$ in the expansion of  $\left(\dfrac{1}{1-x} -x^3\right)^5$ which seems to be $531$.
A: The generating function for the number of ways to sum to $k$ with these numbers is
$$
\begin{align}
&\left(\frac1{1-x}-x^3\right)^5\\
&=\frac1{(1-x)^5}-\frac{5x^3}{(1-x)^4}+\frac{10x^6}{(1-x)^3}-\frac{10x^9}{(1-x)^2}+\frac{5x^{12}}{1-x}-x^{15}\\
&=\sum_{k=0}^\infty\left[\binom{k+4}{k}x^k-5\binom{k+3}{k}x^{k+3}+10\binom{k+2}{k}x^{k+6}\right]\\
&+\sum_{k=0}^\infty\left[-10\binom{k+1}{k}x^{k+9}+5\binom{k}{k}x^{k+12}-\binom{k-1}{k}x^{k+15}\right]\\[3pt]
&\small=\sum_{k=0}^\infty\left[\binom{k+4}{k}-5\binom{k}{k-3}+10\binom{k-4}{k-6}-10\binom{k-8}{k-9}+5\binom{k-12}{k-12}-\binom{k-16}{k-15}\right]x^k
\end{align}
$$
Thus, the number of ways to solve $x_1+x_2+x_3+x_4+x_5=k$ where each $x_j$ is a non-negative integer not equal to $3$ is
$$
\small\binom{k+4}{k}-5\binom{k}{k-3}+10\binom{k-4}{k-6}-10\binom{k-8}{k-9}+5\binom{k-12}{k-12}-\binom{k-16}{k-15}
$$
Setting $k=10$ gives
$$
\binom{14}{10}-5\binom{10}{7}+10\binom{6}{4}-10\binom{2}{1}=531
$$
Note that the second to last term is $0$ for $k\lt12$ and the last term is $0$ for $k\ne15$.
A: Counting solutions to $x_1+\cdots+x_k=n$ with integers $x_1,\cdots,x_k\ge0$ is known as stars and bars, see the link for details. The formula is $\left( \! \binom{k}{n} \! \right) :=\binom{n+k-1}{n}$ (which equals $\binom{n+k-1}{k-1}$).
Now invoke the inclusion-exclusion principle.
$$ $$
A: As noted by @Henry, the answer is the coefficient of $x^{10}$ in $f(x)=[(1-x)^{-1}-x^3]^5$.  
The numerical result can be obtained by pencil and paper methods, as follows. First expand $f(x)$ by the binomial theorem:
$$f(x) = (1-x)^{-5}-5(1-x)^{-4}x^3+10 (1-x)^{-3}x^6 -10 (1-x)^{-2}x^9 +5 (1-x)^{-1}x^{12}-x^{15}$$
Again by the Binomial Theorem, $(1-x)^{-n} = \sum_{i=0}^{\infty}\binom{n+i-1}{i} x^i$, so we can pick out the coefficents of $x^{10}$ in the expansion of $f(x)$:
$$[x^{10}]f(x)=\binom{5+10-1}{10}-5\binom{4+7-1}{7}+10\binom{3+4-1}{4}-10\binom{2+1-1}{1}=531$$
(Not that I have anything against the use of a CAS, but it's nice to know when a computer is not required.  Although I cheated a bit and used a spreadsheet to do the arithmetic.)
A: What's easy to compute is we know $j$ of them is equal to $3$, say the result is $S_j$
$$S_j=\binom{5}{j}\binom{10-3j+(5-j-1)}{(5-j-1)}=\binom{5}{j}\binom{14-4j}{4-j},$$
notice that $0\le j\le 3.$ And that $(10-3j)$, $(5-j-1)$ are what called Stars, Bars respectively. By exactly-IEP we have
$$\begin{align}E_0&=\sum_{j=0}^{3}(-1)^j\binom{j}{0}S_j\\
&=\sum_{j=0}^3(-1)^j\binom{5}{j}\binom{14-4j}{4-j}\\
&=+\binom{14}{4}-\binom{5}{1}\binom{10}{3}+\binom{5}{2}\binom{6}{2}-\binom{5}{3}\binom{2}{1}\\
&=531.\quad\quad\square
\end{align}$$
