My first guess is that you need to show that the power of 2 dividing $2+\sum_{i=1}^{n-1}a_i^2$ is eventually less than the power of 2 in $n$, and that this somehow involves looking at $a_{2^n}$. I'll keep playing with it for a bit.