Rolling an $n$-sided die until repeat is found Problem: We are rolling an $n$-sided die. You roll until you reach a number which you have rolled previously. I need to calculate the probability $p_m$ that we have rolled $m$ times for such a repeat.
My first thought was to try some inputs. I took $n=6$. I noticed that when $m=1$, we will always get a probability of $0$, since you are only rolling one time. Also, for $m>7$, we will also have $0$, since we will never reach that case. Now, I don't get how to find a general formula for when $1<m<8$

Hint: If you rolled $m$ times, that means the first $m-1$ must all have been different results, and the $m$th roll is one of the first $m-1$.
For example, if $m=3$, that means the first two rolls must be distinct, and then the third roll must match one of the first two. So this is $\frac{6}{6} \cdot \frac{5}{6} \cdot \frac{2}{6}$. (There is a $5/6$ chance that the second roll does not match the first. There is a $2/6$ chance that the third roll matches one of the first two).

 In general, $\frac{\frac{6!}{(7-m)!} \cdot (m-1)}{6^m}$.

