Problem

Source: Bulgaria National Olympiad 2020

Tags: number theory, Integer sequence



Let $a_1\in\mathbb{Z}$, $a_2=a_1^2-a_1-1$, $\dots$ ,$a_{n+1}=a_n^2-a_n-1$. Prove that $a_{n+1}$ and $2n+1$ are coprime.