IMO Shortlist 2017 problem A7
Dodao/la:
arhiva3. listopada 2019. Let $a_0,a_1,a_2,\ldots$ be a sequence of integers and $b_0,b_1,b_2,\ldots$ be a sequence of positive integers such that $a_0=0,a_1=1$, and
\[
a_{n+1} =
\begin{cases}
a_nb_n+a_{n-1} & \text{if $b_{n-1}=1$} \\
a_nb_n-a_{n-1} & \text{if $b_{n-1}>1$}
\end{cases}\qquad\text{for }n=1,2,\ldots.
\]for $n=1,2,\ldots.$ Prove that at least one of the two numbers $a_{2017}$ and $a_{2018}$ must be greater than or equal to $2017$.
Izvor: https://www.imo-official.org/problems/IMO2017SL.pdf