Hi Need Help to solve this problem
How many rolls required for a dice to get any number consecutively $3$ times? for example $111, 222, 333$ ??
I've seen some formula, but most of them looking for certain number instead of any.
please show me the logical structure step by step, so I could understand clearly.
thanks
Presumably, you want the expected number of rolls.
An easy approach is via recursion.
For $k\in\{0,1,2\}$, let $e_k$ be the expected number of rolls to get three consecutive equal values, assuming $k$ is the length of the maximum block of immediately preceding rolls with equal values.
Then we have the system \begin{align*} e_0&=1+e_1\\[4pt] e_1&=1+{\small{\frac{5}{6}}}e_1+{\small{\frac{1}{6}}}e_2\\[4pt] e_2&=1+{\small{\frac{5}{6}}}e_1\\[4pt] \end{align*} of $3$ linear equations in $3$ unknowns.
Solving the system yields $e_0=43$.
To explain the recursion . . .