Problem

Source: 2025 Vietnam National Olympiad - Problem 2

Tags: modular arithmetic, number theory



For each non-negative integer $n$, let $u_n = \left( 2+\sqrt{5} \right)^n + \left( 2-\sqrt{5} \right)^n$. a) Prove that $u_n$ is a positive integer for all $n \geq 0$. When $n$ changes, what is the largest possible remainder when $u_n$ is divided by $24$? b) Find all pairs of positive integers $(a, b)$ such that $a, b < 500$ and for all odd positive integers $n$, $u_n \equiv a^n - b^n \pmod {1111}$.