Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
See my answer here:… – 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
up vote 1 down vote accepted

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$.

With an offset this is OEIS A001592 (Hexanacci numbers).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.