Problem

Source: Baltic Way 1996 Q7

Tags: number theory proposed, number theory



A sequence of integers $a_1,a_2,\ldots $ is such that $a_1=1,a_2=2$ and for $n\ge 1$, \[a_{n+2}=\left\{\begin{array}{cl}5a_{n+1}-3a_{n}, &\text{if}\ a_n\cdot a_{n+1}\ \text{is even},\\ a_{n+1}-a_{n}, &\text{if}\ a_n\cdot a_{n+1}\ \text{is odd},\end{array}\right. \] Prove that $a_n\not= 0$ for all $n$.