# Throwing the dice, sum of the points

We are throwing the die (original cube for the board games). How many are ways to get the sum of the points equal to $n$ ?

I've heard this problem today in the morning and still can't deal with it, which is tiring. The only way I see it, is that I am looking for the number of solutions of equations: $\sum_{i=1}^k x_i = n$ for all possible $k$, where $1\le x_i\le 6$ for all $1\le i\le k$. So if I find the coefficient before $x^n$ in expansion to series this sum: $$\sum_{k=1}^n (x+x^2+x^3+x^4+x^5+x^6)^k=\sum_{k=1}^n\left(\frac{1-x^7}{1-x}\right)^k$$ it will be over. But I completely don't know how to do that. Or maybe there is a simpler solution for this problem?

-
See my answer here: math.stackexchange.com/questions/107329/… –  Byron Schmuland Aug 30 '12 at 18:52
To simplify the computations, one could include every $k\geqslant0$ in the sum in the LHS since the additional terms do not contribute to the coefficient of $x^n$ and note that the result is $1/(1-z)$ with $z=x+\cdots+x^6$. –  Did Aug 30 '12 at 18:52
@ByronSchmuland It seems that here the number of throws is not specified. Unlike in the answer you indicate, or am I missing something? –  Did Aug 30 '12 at 18:54
@did You are quite right, I simply missed that point. I'll leave my comment up anyways. Perhaps it will prove useful. –  Byron Schmuland Aug 30 '12 at 18:56

If the number of ways is $a(n)$ then $$a(n) = a(n-1)+ a(n-2) +a(n-3)+a(n-4)+a(n-5)+a(n-6)$$ starting with $a(0)=1$, and $a(n)=0$ for $-5 \le n \le -1$.
So the generating function is $$\frac{1}{1-x-x^2-x^3-x^4-x^5-x^6}$$ and you want the coefficient of $x^n$.