Problem: Let $p_1, p_2, p_3, \dots$ be the prime numbers
listed in increasing order,
and let $0 < x_0 < 1$ be a real number between 0 and 1.
For each positive integer $k$, define
\[ x_k = \begin{cases} 0 & \mbox{if} \; x_{k-1} = 0, \\[.1in]
  {\displaystyle \left\{ \frac{p_k}{x_{k-1}} \right\}}
  & \mbox{if} \; x_{k-1} \neq 0,
  \end{cases}  \]
where $\{x\}$ denotes the fractional part of $x$.
Find, with proof, all $x_0$ satisfying $0 < x_0 < 1$
for which the sequence $x_0, x_1, x_2, \dots$ eventually becomes $0$.

Solution: The answer is $x_0$ rational.

If $x_0$ is irrational, then all $x_i$ are irrational by induction.
So the sequence cannot become zero.

If $x_0$ is rational, then all are.
Now one simply observes that the denominators of $x_n$
are strictly decreasing, until we reach $0 = \frac 01$.
This concludes the proof.

\begin{remark*}
  The sequence $p_k$ could have been any sequence of integers.
\end{remark*}