Problem

Source: Moldova TST 2022

Tags: number theory



Let $(x_n)_{n\geq1}$ be a sequence that verifies: $$x_1=1, \quad x_2=7, \quad x_{n+1}=x_n+3x_{n-1}, \forall n \geq 2.$$Prove that for every prime number $p$ the number $x_p-1$ is divisible by $3p.$