<s>[INST] In how many ways the sum of 5 thrown dice is 25? What I thought about is looking for the number of solutions to
$$x_{1}+x_{2}+x_{3}+x_{4}+x_{5}=25$$ such that $1\leq x_{i}\leq6$
for every $i$.
Now I know that the number of solutions to this such that
$0\leq x_{i}$ for every $i$ is $${5+25-1 \choose 5-1}={29 \choose 4}$$
How can I continue from here?
Thanks
 [/INST] In addition to my other answer using generating functions, I want to offer a more elementary solution. First note that
$$ 5 + 5 + 5 + 5 + 5 = 25 $$
and this is the only way to make $25$ without using a $6$.
Now make one of the dice a $6$ (5 possible ways) to get the equation
$$ a + b + c + d = 19 $$
where $1 \le a, b, c, d \le 19$. Again, the best you can do without a $6$ is
$$4 + 5 + 5 + 5 = 19$$
and there are $4$ of these (one for each position of the $4$.
Now remove a second $6$ to get the equation
$$ a + b + c = 13. $$
Without $6$'s this has two solutions:
$$ 3 + 5 + 5 = 13, $$
which occurs three times, and
$$ 4 + 4 + 5, $$
which also occurs three times.
Remove three $6$'s to get
$$ a + b = 7 $$
which has $4$ solutions not involving a $6$.
Finally remove four $6$'s to get
$a = 1$
with exactly one solution.
Hence in total we have
$$ \binom{5}{0}1 + \binom{5}{1} 4 + \binom{5}{2} 6 + \binom{5}{3} 4 + \binom{5}{4} = 126. $$
The binomial coefficients indicate how many $6$'s we have.
</s>