We throw 4 dice. We are interested in the number of ways to get at most $k$. So we are looking for the coefficient of $x^k$ in the generating function. The generating function will look like this: i=1,2,3,4 \begin{align} x_1 + x_2 + x_3 + x_4 \leq k \qquad \text{with} \qquad 1 \leq x_i \leq 6. \end{align} \begin{align} x_1 + x_2 + x_3 + x_4 + x' = k \qquad \text{with} \qquad 0 \leq x' \leq k-4 \end{align} So we obtain: \begin{align}(x + x^2 + x^3 + x^4 + x^5 + x^6)^4 \cdot (0 + 1 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^{10}). \end{align} Which can be written like this: \begin{align} \bigg( \frac{1-x^7}{1-x} -1\bigg)^4 \cdot \frac{1}{1-x} = \frac{(x-x^7)^4}{(1-x)^5}. \end{align} How can I extract e.g. the coefficient of $x^{15}$ form this expression?
2026-04-07 01:40:06.1775526006
On
Coefficient $x^{15}$ out of expression
111 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
We can obtain coefficients of $\frac{1}{(1-x)^5}$ by: $p_k = {5+k-1 \choose k}$.
We know that $(x-x^7)^4$ to get $x^{15}$ we only need ${4 \choose 0} \cdot x^{4}$ and ${4 \choose 1} \cdot (x)^{3}(-x)^{7}$. We will need the coefficients of $p_k$ for $x^{11}$ and $x^{5}$.
So: ${4 \choose 0} \cdot {15 \choose 11} x^{15} - {4 \choose 1} \cdot {9 \choose 5} x^{15} = 861x^{15}$. Thus 861 possibilities.
$$ \dfrac{\left(x-x^7\right)^4}{\left(1-x\right)^5} = \dfrac{x^4\,\left(x+1\right)^4\,\left(x^2-x+1\right)^4\,\left(x^2+x+1\right)^4}{1-x} $$ I think this is the best you can do and I sadly do not really know what you mean by extract.