Question 127
Let $A$ and $B$ be positive integers. Consider a sequence of positive integers $(x_{n})_{n \geq 1}$ such that
$$
x_{n+1} = A \cdot \operatorname{gcd}(x_{n}, x_{n-1}) + B \quad \text{ for every } n \geq 2
$$
Prove that the sequence attains only finitely many different values.
Remark. We denote by $\operatorname{gcd}(a, b)$ the greatest common divisor of positive integers $a$ and $b$.
$$
x_{n+1} = A \cdot \operatorname{gcd}(x_{n}, x_{n-1}) + B \quad \text{ for every } n \geq 2
$$
Prove that the sequence attains only finitely many different values.
Remark. We denote by $\operatorname{gcd}(a, b)$ the greatest common divisor of positive integers $a$ and $b$.