Problem

Source: Iranian TST 2019, first exam day 2, problem 6

Tags: number theory



$\{a_{n}\}_{n\geq 0}$ and $\{b_{n}\}_{n\geq 0}$ are two sequences of positive integers that $a_{i},b_{i}\in \{0,1,2,\cdots,9\}$. There is an integer number $M$ such that $a_{n},b_{n}\neq 0$ for all $n\geq M$ and for each $n\geq 0$ $$(\overline{a_{n}\cdots a_{1}a_{0}})^{2}+999 \mid(\overline{b_{n}\cdots b_{1}b_{0}})^{2}+999 $$prove that $a_{n}=b_{n}$ for $n\geq 0$. (Note that $(\overline{x_nx_{n-1}\dots x_0}) = 10^n\times x_n + \dots + 10\times x_1 + x_0$.) Proposed by Yahya Motevassel