# Number of ways a dice can roll every side equally many times for the first time after x rolls

This problem is best viewed as a walk on a $d$-dimensional integer lattice with integer steps corresponding to various results of a dice roll. For a normal 6-sided dice, these would be (1,0,0),(-1,0,0), (0,1,0), (0,-1,0), (0,0,1) and (0,0,-1) on a standard cubic integer lattice. If we start at the origin - $0$, every side has appeared equally many times when we arrive at $0$ again. For a $d$-sided dice, we denote the number of paths leading to $0$ after $d\cdot n$ steps for $n\in \mathbb{N}$ as $P_d(n)$, such that: $$P_d(n)=\binom{dn}{n}\cdot \binom{(d-1)n}{n}...\binom{2n}{n}\binom{n}{n}$$ As we have this many ways to arrange an equal number $n$ of $d$ dice results. Notice that if we have a number of steps not divisible by $d$, than the path cannot end at $0$. I came up with an equation for $A_d(n)$ - the number of walks from 0 to 0 of length $d\cdot n$ that do not cross zero on occasions other than beginning and end: $$A_d(n)=P_d(n)-\left(\left(\sum\limits_{k=1}^{n-1}P_d(k)P_d(n-k)\right)-\sum\limits_{1≤i<j}^{n-1}P_d(i)P_d(j-i)P_d(n-j)\right)$$ In the first sum we subtract all the paths from $P_d(n)$ that cross $0$ on $(k\cdot d)$th step (on all steps before $dn$), and the second sum subtracts all paths that were counted twice in the former sum from it.

The summations are, however, very difficult. How could I possibly go about simplifying or approximating these equations for some $d$? How would I estimate the error?

• You'll have to describe the walk more clearly. I you'd have to had a die result of $j$ move the walk via a vector $(x_i)$ where $x_i=\begin{cases}-1&i\neq j\\d-1&i=j\end{cases}$. Or something like that, but you'll need to be more specific, or you are just stating results. – Thomas Andrews Jan 30 '16 at 15:31
• You can write $P_d(n)$ as a multinomial, $\binom{dn}{n,n,\dots,n}$. – Thomas Andrews Jan 30 '16 at 15:34
• Thomas Andrews - I just rushed through the reasoning, but I could go more in depth. My question is, however, mainly about evaluation of the function. – Bruno KM Jan 30 '16 at 15:39
• This partial answer should be provided at the question is answers: math.stackexchange.com/a/1633425 – Eric Towers Jan 30 '16 at 17:35