Compute the number of positive integer solutions to the equation $x_{1} + x_{2} + x_{3} = 25$. Where 1 $\leq x_{1}, x_{2}, x_{3}$ $\leq$ 15. The book I am using for my Combinatorics course is Combinatorics:Topics, Techniques, and Algorithms.
Compute the number of positive integer solutions to the equation $x_{1} + x_{2} + x_{3} = 25$. Where 1 $\leq x_{1}, x_{2}, x_{3}$ $\leq$ 15.
This is my rough proof to this question. I was wondering if anybody can look over it and see if I made a mistake or if there is a simpler way of doing this problem. I want to thank you ahead of time it is greatly appreciated.So lets begin:
Proof:

 A: One way to do this is to define $w=x+x^2+x^3+ \cdots +x^{15}$ and then cube $w$ and determine the coefficient of $x^{25}$ in the expanded version of $w^3.$ That coefficient comes out $168$ when I used maple. I don't know any "clever" way to get this without the aid of something like maple, and this approach would be quite a mess by hand. Each term of $w^3$ which contributes to the $x^{25}$ term represents one way to get a sum of 25 using three summands from 1 to 15.
A: The number of unrestricted positive solutions to $x_{1} + x_{2} + x_{3} = 25$ is given by stars and bars and is
$$N_u=\binom{24}{2}$$
To count the number of "negated" solutions that violate $1\le x_{1}, x_{2}, x_{3}\le 15$, note by symmetry that this will be three times the number of solutions for which $x_1>15$ (and $x_2+x_3=25-x_1$). For each such $x_1$, $x_2$ can range from $1$ to $25-x_1-1$, so we get
$$N_n=3\sum_{x_1=16}^{23}{(24-x_1)}=3\sum_{k=1}^{8}{k}=3\frac{8\times9}{2}=108$$
So the number of solutions subject to the restriction is
$$N=N_u-N_n=\binom{24}{2}-108=276-108=168$$
