Problem

Source: Thailand Online MO 2021 P3

Tags: Sequence, number theory



Let $a_1,a_2,\cdots$ be an infinity sequence of positive integers such that $a_1=2021$ and $$a_{n+1}=(a_1+a_2+\cdots+a_n)^2-1$$for all positive integers $n$. Prove that for any integer $n\ge 2$, $a_n$ is the product of at least $2n$ (not necessarily distinct) primes.