How many ways can the numbers on *n* dice add up to *m*?

For example, with two dice, there are three ways to get a total of 4: 1+3, 2+2, and 3+1.

The algorithm run by this page, and the maths behind it are based on an article by Alasdair McAndrew, which can be found here.

I'm very grateful to be able to use the JavaScript BigInteger library version 0.9 by Matthew Crumley, see this page.