Choose any positive integer $n$. Then roll an unbiased six-sided die as many times as needed until the sum of the results is either exactly equal to $n$ (you win) or greater than $n$ (you lose).
If you were to play this game; what number $n$ would you select in order to maximise the chance of winning and what is the probability of it?
(For example, choose $n=7$, then you would roll a die and if you get $6$ on the 1st throw and $1$ on the 2nd throw you would stop since you reached $n$).
Denote by $p_{k}$ the probability that a sum of $k$ is observed. Clearly $$p_{1}=\frac{1}{6}$$ For $p_{2}$, there is a $\frac{1}{6}$ chance of rolling a $2$ and a $\frac{1}{6}$ chance of rolling a $1$, followed by another one. This can be written as $$p_{2}=\frac{1}{6}+\frac{p_{1}}{6}=\frac{1}{6}(1+p_{1})$$
For $p_{3}$, there is a $\frac{1}{6}$ chance of rolling a $3$ and winning. The only other ways to win are to roll a $1$ or $2$, each with probability $\frac{1}{6}$. If we roll a $1$, then our odds of winning are $p_{2}$ and if we roll a $2$, our odds of winning are $p_{1}$. Therefore $$p_{3}=\frac{1}{6}+\frac{p_{1}}{6}+\frac{p_{2}}{6}=\frac{1}{6}(1+p_{1}+p_{2})$$ Similarly we have $$p_{4}=\frac{1}{6}(1+p_{1}+p_{2}+p_{3})$$ $$p_{5}=\frac{1}{6}(1+p_{1}+p_{2}+p_{3}+p_{4})$$ $$p_{6}=\frac{1}{6}(1+p_{1}+p_{2}+p_{3}+p_{4}+p_{5})$$ Now, for $k>6$ we cannot win in one roll so we have $$p_{k}=\frac{1}{6}(p_{k-1}+p_{k-2}+p_{k-3}+p_{k-4}+p_{k-5}+p_{k-6})$$ Observe that for any $k>6$, $$p_{k}=\frac{1}{6}\sum_{m=1}^{6}p_{k-m}<\frac{1}{6}\cdot 6\max_{m=1,2,3,4,5,6}p_{k-m}=\max_{m=1,2,3,4,5,6}p_{k-m}$$ This proves that the winning choice is not bigger than $6$, and in fact must be the max of $p_{1},p_{2},...p_{6}$. Clearly this is $p_{6}$, so we should choose $n=6$ to maximize the odds of winning.