How to calculate dice roll probability with more dice? [duplicate]

Here's an approach that I haven't found before, but you can build up from it quite easily without remembering formulae. We start from the distribution of a single die. It's easy, and we cross it with itself.

1 | 1  1  1  1  1  1
2 | 1  1  1  1  1  1
3 | 1  1  1  1  1  1
4 | 1  1  1  1  1  1  
5 | 1  1  1  1  1  1
6 | 1  1  1  1  1  1
   —————————————————
    1  2  3  4  5  6

Then we count the diagonals, which are $12$ in total. This gives the distribution for 2 dice:

2  | 1
3  | 2
4  | 3
5  | 4
6  | 5
7  | 6
8  | 5
9  | 4
10 | 3
11 | 2
12 | 1

For three dice we cross the count for $1$ die and $2$ dice. For each entry we multiply the number of combinations that are possible for $x$ and $y$.

  x
1 | 1  2  3  4  5  6  5  4   3   2   1
2 | 1  2  3  4  5  6  5  4   3   2   1  
3 | 1  2  3  4  5  6  5  4   3   2   1
4 | 1  2  3  4  5  6  5  4   3   2   1
5 | 1  2  3  4  5  6  5  4   3   2   1
6 | 1  2  3  4  5  6  5  4   3   2   1
   ——————————————————————————————————— y
    2  3  4  5  6  7  8  9  10  11  12

When we add columns we get the counts for $3$ dice, again, by summing over diagonals. That is a total of $16$ diagonals. The count looks like:

3  | 1
4  | 3
5  | 6
6  | 10
7  | 15
8  | 21
9  | 25
10 | 27
11 | 27
12 | 25
13 | 21
14 | 15
15 | 10
16 | 6
17 | 3
18 | 1

This is evidently not the most efficient way to do it, but you don't really need to remember anything as long as you can compute the tables. Want you can optimize is the choice of which tables to calculate e.g. for $13$ dice, calculate the tables for $(1,2,4,6,12,13)$ in that order. Again, this isn't the surgical solution, but it's memory-proof.