Problem

Source: MEMO 2023 T8

Tags: number theory



Let $A, B \in \mathbb{N}$. Consider a sequence $x_1, x_2, \ldots$ such that for all $n\geq 2$, $$x_{n+1}=A \cdot \gcd(x_n, x_{n-1})+B. $$Show that the sequence attains only finitely many distinct values.