I have come across the following problem and have given it a good attempt below. I am wondering if I have proceeded correctly, and if not if someone could show me the correct answer or maybe a more efficient solution, thanks!
How many ways are there to get a sum of $25$ when $10$ distinct dice are rolled?
Each die can be a number from $1$ to $6$. With $10$ dice, our generating function becomes:
$$g(x) = (x+x^2+x^3+x^4+x^5+x^6)^{10}$$
We want to find the coefficient of $x^{25}$. Observe that the expression inside the brackets is a finite geometric series with $a=x, r=x, n=6$. Thus we have
$$(x+x^2+x^3+x^4+x^5+x^6)^{10}$$ $$=\left(\frac{x(1-x^6)}{(1-x)}\right)^{10}$$ $$=x^{10}(1-x^6)^{10}(1-x)^{-10}$$
Then,
$$(1-x^6)^{10}(1-x)^{-10}$$ $$=\sum \binom{10}{i}(-x^6)^i \cdot\sum\binom{-10}{j}(-x)^j$$
In order to get terms that involve $x^{15}$ there are $3$ combinations of $i$ and $j$ to consider so that $6i+j = 15$
Thus we have:
$$\left[ \binom{10}{0}(-1)^0\binom{-10}{15}(-1)^{15}\right] + \left[ \binom{10}{1}(-1)^1 \binom{-10}{9}(-1)^9\right] + \left[\binom{10}{2}(-1)^2\binom{-10}{3}(-1)^3\right]$$ $$ = \left[\binom{10}{0}\binom{-10}{15}(-1)\right]+\left[ \binom{10}{1} \binom{-10}{9} \right] + \left[ \binom{10}{2} \binom{-10}{3}(-1)\right] $$
$$=\left[ \binom{10}{0}\binom{10+15-1}{15}(-1)^{15}(-1)\right] + \left[ \binom{10}{1} \binom{10+9-1}{9}(-1)^9\right] + \left[ \binom{10}{2}\binom{10+3-1}{3}(-1)^3(-1)\right]$$
$$= \left[ \binom{10}{0}\binom{24}{15}\right] - \left[ \binom{10}{1}\binom{18}{9}\right] + \left[ \binom{10}{2}\binom{12}{3}\right]$$
$$= 831204$$
Can't comment yet so adding here: I haven't checked the math, but just for fun https://ideone.com/IKt8OR