<s>[INST] Probability of getting a particular sum from n m-sided dice c# I am trying to generate a probability of getting a specific number x from n dice, with no guarantee of them having the same number of sides. (eg, 1d6 + 2d10)
Does there exist a mathematical formula for this?
Does there exist a formula for getting above x?
 [/INST] The real trick here is to use generating functions.
The way they work is by assigning the probabilities to a polynomial, with each term having coefficient equal to its probability of being rolled, and power the value of the roll.
Then, one simply looks at the coefficient of the term with power equivalent to the desired sum for the probability.
For example, let's take your situation of 1 fair 6 sided dice and 2 fair ten sided die. The polynomial we write is $$(\frac16x+\frac16x^2+\frac16x^3+\frac16x^4+\frac16x^5+\frac16x^6)\cdot(\frac1{10}x+\frac1{10}x^2+\frac1{10}x^3+\frac1{10}x^4+\frac1{10}x^5+\frac1{10}x^6+\frac1{10}x^7+\frac1{10}x^8+\frac1{10}x^9+\frac1{10}x^{10})^2$$$$\frac1{600}\cdot(x+x^2+x^3+x^4+x^5+x^6)\cdot(x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^{10})^2$$
Let's find the coefficient of $x^{15}$. Using Wolfram Alpha, I found the coefficient to be 0.085. This tells us the probability of the sum totalling 15 is $\color{red}{0.085}$
</s>