Probability of rolling a sum of N with up to infinite rolls of a die

Solution 1:

Let $q(x)=\frac{1}{6}\left(x^1+x^2+x^3+x^4+x^5+x^6\right)$. Write:

$$\begin{align}G(x)&=\sum_{n=0}^\infty q(x)^n\\&=\frac{1}{1-q(x)}\\&=\frac{6}{6-x-x^2-x^3-x^4-x^5-x^6} \end{align}$$

Then the coefficient of $x^N$ in $G(x)$ is your probability.

So you need to know something about the roots of the denominator. $1$ is one such root, but you are going to need to deal with complex roots, as well, or at least get an upper bound for the roots.

The formula is:

$$p(N)=a_1\alpha_1^N+a_2\alpha_2^N+\cdots a_6\alpha_6^N$$

For some constants $a_i$ and with the $\alpha_i$ the inverse roots of the denominator.

According to Wolfram Alpha, the roots of the denominator are $1$ and a bunch of values (one real, four complex) with absolute value greater than $1$.

So for large enough $N$, $p(N)\approx a_1$.

We can find $a_1$ by doing the usual partial fractions computation:

$$\lim_{x\to 1} G(x)(1-x)=\frac{2}{7}=\frac{1}{3.5}$$ which is what Arthur conjectured in comments above.

It turns out for $i>1$, $|\alpha_i|<\frac{3}{4}$, so we have:

$$p(N)=\frac{2}{7} + o\left(\left(\frac 34\right)^N\right)$$


We can also get a recursion:

$$P(n+6)=\frac{1}{6}\left(P(n)+P(n+1)+P(n+2)+P(n+3)+P(n+4)+P(n+5)\right)$$

We get $P(28)=.2857\dots.$ For $n\geq 88$ we get:

$$P(n)=0.285714285714\dots$$ which is $12$ digits of accuracy to $\frac{2}{7}=0.\overline{285714}.$

We also get that $$\frac{P(100)-\frac{2}{7}}{\left(\frac34\right)^{100}}\approx -0.016$$

and

$$\frac{P(1000)-\frac{2}{7}}{\left(\frac34\right)^{1000}}\approx 7.34\times 10^{-13}$$

(Computing the left side with python Fraction class to get exact value, then converted to float.)

This gives:

$$P(1000)-\frac{2}{7}\approx 8.45\times 10^{-138}$$

Solution 2:

Let $P(N)$ be the probability rolling a sum of $N$ with any number of dice. If we consider the number of ways we can roll $m$ dice to sum to $N$, it should just be number of ways we can roll $(m-1)$ dice and get within $6$ of $N$, times the probability of getting the roll we need.

For example considering $N=43$, then $P(43)$ should be equal to $P(42)$ times the probability of rolling a $1$, plus $P(41)$ times the probabilty of rolling a $2$, plus ..., plus $P(37)$ times the probability of rolling a $6$.

For $N > 6$ we can define $P(N)$ recursively as: $$ \begin{align} P(N) &= \frac{1}{6}P(N-1) + \frac{1}{6}P(N-2) + \dotsb + \frac{1}{6}P(N-6) \\ &= \frac{1}{6}\Big(P(N-1) + P(N-2) + \dotsb + P(N-6)\Big) \\ &= \frac{1}{6}\sum_{i=N-1}^{N-6}P(i) \end{align} $$

We should consider $N \leq 6$ separately because there are not six previous terms: $$ P(N) = \frac{1}{6}\sum_{i=0}^{N-1}P(i) $$ (Note that we let $P(0) = 1$ since we can always roll $0$ dice for a sum of $0$.)

So for each $N$ after $6$, $P(N)$ is just average of the six previous $P$. I'm sure there should be a closed form for this, but it is outside of my ability to find this closed form.