Problem

Source: Irish MO 2017 paper 1 problem 5

Tags: number theory, recurrence relation, algebra



The sequence $a = (a_0, a_1,a_2,...)$ is defined by $a_0 = 0, a_1 =2$ and $$a_{n+2} = 2a_{n+1} + 41a_n$$Prove that $a_{2016}$ is divisible by $2017.$