We throw the dice until we throw a six or a second time a five (not necessarily in a row), and then we finish throwing. What is the probability that we have finished throwing after exactly n throws?
As @lulu said, there are 2 possibilities:
- (the n-th roll was the first $6$ and there was no $5$ before) or (the n-th roll was the first $6$ and there was one $5$ before it)
- the n-th roll was a $5$ and there were no prior $6$′s and exactly one prior $5$
Now I will try to count the possibilities treating each throw as an independent lottery.
$1$'st case (we fix $6$ at n-th place):
- no $5$ before $\implies \frac{1}{6} \cdot \left( \frac{4}{6} \right)^{n-1}$ , we choose one of $4$ possibilities in $n-1$ lotteries.
- one $5$ before $\implies \left( \frac{1}{6} \right)^2 \cdot (n-1) \left( \frac{4}{6} \right)^{n-2}$, we choose one of $n-1$ places for $5$, then we choose one of $4$ possibilities in $n-2$ lotteries.
$2$'nd case (we fix $5$ at n-th place):
- no $6$ before $+$ one $5$ before $\implies \left( \frac{1}{6} \right)^2 \cdot (n-1) \left( \frac{4}{6} \right)^{n-2}$ , we choose one of $n-1$ places for $5$, then we choose one of $4$ possibilities in $n-2$ lotteries.
Combined probability:
$$\mathbb{P}(A) = \frac{1}{6} \cdot \left( \frac{4}{6} \right)^{n-1} + \left( \frac{1}{6} \right)^2 \cdot (n-1) \left( \frac{4}{6} \right)^{n-2} + \left( \frac{1}{6} \right)^2 \cdot (n-1) \left( \frac{4}{6} \right)^{n-2}$$
Is that correct?