Problem

Source: 2024 Korea Summer Program Practice Test P3

Tags: number theory



Define the sequence $\{a_n\}_{n=1}^\infty$ as \[ a_1 = a_2 = 1,\quad a_{n+2} = 14a_{n+1} - a_n \; (n \geq 1) \]Prove that if $p$ is prime and there exists a positive integer $n$ such that $\frac{a_n}p$ is an integer, then $\frac{p-1}{12}$ is also an integer.