Problem

Source: Iran 2005

Tags: number theory proposed, number theory



$k$ is an integer. We define the sequence $\{a_n\}_{n=0}^{\infty}$ like this: \[a_0=0,\ \ \ a_1=1,\ \ \ a_n=2ka_{n-1}-(k^2+1)a_{n-2}\ \ (n \geq 2)\] $p$ is a prime number that $p\equiv 3(\mbox{mod}\ 4)$ a) Prove that $a_{n+p^2-1}\equiv a_n(\mbox{mod}\ p)$ b) Prove that $a_{n+p^3-p}\equiv a_n(\mbox{mod}\ p^2)$