Problem

Source: 2015 Peru MO (ONEM) L3 p4 - finals

Tags: recurrence relation, algebra, Sequence



Let $b$ be an odd positive integer. The sequence $a_1, a_2, a_3, a_4$, is definedin the next way: $a_1$ and $a_2$ are positive integers and for all $k \ge 2$, $$a_{k+1}= \begin{cases} \frac{a_k + a_{k-1}}{2} \,\,\, if \,\,\, a_k + a_{k-1} \,\,\, is \,\,\, even \\ \frac{a_k + a_{k-1+b}}{2}\,\,\, if \,\,\, a_k + a_{k-1}\,\,\, is \,\,\,odd\end{cases}$$a) Prove that if $b = 1$, then after a certain term, the sequence will become constant. b) For each $b \ge 3$ (odd), prove that there exist values of $a_1$ and $a_2$ for which the sequence will become constant after a certain term.