Let $\{a_n\}$ be a sequence of positive integers such that $a_{n+1} = a_n^2+1$ for all $n \geq 1$. Prove that there is no positive integer $N$ such that $$\prod_{k=1}^N(a_k^2+a_k+1)$$is a perfect square.
Source: 2019 Thailand October Camp TSTST 1.5
Tags: number theory, Sequence
Let $\{a_n\}$ be a sequence of positive integers such that $a_{n+1} = a_n^2+1$ for all $n \geq 1$. Prove that there is no positive integer $N$ such that $$\prod_{k=1}^N(a_k^2+a_k+1)$$is a perfect square.