For example, if I want to roll n=6,
with 1 die it can be thrown in $$\binom {5} {0} = 1$$ way, with 2 dice $$\binom {5} {1} = 5$$ 3 dice $$\binom {5} {2} = 10$$ 4 dice $$\binom {5} {3} = 10$$ 5 dice $$\binom {5} {4} = 5$$ 6 dice $$\binom {5} {5} = 1$$ The sum of these is 32 - the correct answer, I believe.
I thought that the answer for any number n (where the number of dice is d) is $$\sum_{d=1}^{d=n} \binom {n-1} {d-1}$$ It seems that this isn't working, though. For example the correct answer for n=8 is 125, but this equation gives me 128. Where am I going wrong? Thanks in advance.