Probability of getting a total sum of n when rolling 3 dice I'm having a bit of trouble understanding the probability of getting a number n when rolling multiple dice. When rolling $2$ dice, I noticed that the probability of getting the numbers $2-12$ goes like this:
$1/36, 2/36, 3/36, 4/36, 5/36, 6/36, 5/36, 4/36, 3/36, 2/36, 1/36$
Makes sense to me. However for $3$ dice, the pattern seems to be different, for values $3-18$.
$1/216, 3/216, 6/216, 10/216, 15/216, 21/216, 25/216, 27/216, 27/216, 25/216, 21/216, 15/216, 10/216, 6/216, 3/216, 1/216.$
Initially I thought it was just increasing by $1/216$, then $2/16$, then $3/216$, and so on but then when trying to get the value $9$ it becomes $25/216$ instead of $28/216$, breaking the pattern. So is there a mathematical sequence happening here, and if so what is it, I can't seem to find the formula online. I know that these probabilities can be calculated by getting the different permutations, but I want to know if there's a general formula for getting the probability of getting a value $x$ with $3$ dice, or even y amount of dice.
 A: Assume we throw $k$ fair dice, each having $m$ faces, numbered from $1$ to $m$.
As any possible ordered $k$-tuple is equiprobable the problem is essentially equivalent to finding the number of positive solutions to the equation:
$$
x_1+x_2+\cdots x_k=n,\quad\text{with}\quad 1\le x_i\le m.
$$
The problem is well-known and its solution is:
$$
N(n,k,m)=\sum_{j\ge0}(-1)^j\binom kj\binom{n-1-m j}{k-1},\tag1
$$
with the convention $\binom pq=0$ if $p<q$.
Dividing $N(n,k,m)$ by $m^k$ you will obtain the probability of getting the total sum $n$.
A: You can use the probability-generating function for a single roll, which is $$\mathbb{E}[z^{X_1}] = \sum_{x = 1}^6 \mathbb{P}(X = x) z^x=\frac{z+z^2+z^3+z^4+z^5+z^6}{6}$$
And for sum of three independent rolls it is the product of the generating functions:
$$\mathbb{E}[z^{X_1+X_2+X_3}] = \left(\sum_{x = 1}^6 \mathbb{P}(X = x) z^x\right)^3=\left(\frac{z+z^2+z^3+z^4+z^5+z^6}{6}\right)^3$$
Multiplying out the brackets we get
$$=\frac1{216}\cdot (z^{18} + 3 z^{17} + 6 z^{16} + 10 z^{15} + 15 z^{14} + 21 z^{13} + 25 z^{12} + 27 z^{11} + 27 z^{10} + 25 z^9 + 21 z^{8}+...$$ $$...+ 15 z^7 + 10 z^6 + \color{green} 6 z^{\color{red}5} + 3 z^4 + x^3\large)$$
The leading coefficients indicates the number of combination which leads to the corresponding sums (exponents). For instance, the sum of $\color{red}5$ can be obtained in $\color{green} 6$ ways: $(122), (221), (212), (311), (131), (113)$
