Expected number of rolls until a number appears $k$ consecutive times

Solution 1:

You can prove this by induction. Let $a_k$ be the expected number of rolls until the same number appears $k$ consecutive times. Clearly $a_1=1=(6^1-1)/5$. Now assume $a_{k-1}=(6^{k-1}-1)/5$.

To get $k$ consecutive rolls with the same number, you first need to get $k-1$, and this is expected to take $a_{k-1}$ rolls. On the next roll, you have a $1$ in $6$ chance to finish and a $5$ in $6$ chance to go back to square one. Thus

$$a_k=a_{k-1}+\frac16\cdot1+\frac56\cdot a_k\;,$$

or

$$a_k=6a_{k-1}+1\;.$$

Substituting $a_{k-1}=(6^{k-1}-1)/5$ yields $a_k=(6^k-1)/5$.