How to prove that $a_{n}$ must be of the form $a^2+b^2$? let $a_{1}=1,a_{2}=2,a_{3}=5$,and 
$$a_{n}=3a_{n-1}a_{n-2}-a_{n-3}$$
show that
$a_{n}=a^2+b^2,a,b\in N$
while $a_{1}=0^2+1^2,a_{2}=2=1^2+1^2,a_{3}=5=2^2+1^2,a_{4}=29=5^2+2^2,a_{5}=433=17^2+12^2$ and so on

Hopefully you already know the very nice theorem from number theory that states that a natural number can be written as the sum of two squares iff every prime divisor of the number which is  equal to $\,3\pmod 4\,$ appears to an even power (primes which are $\;1\pmod 4\;$ or $\;2\;$ make no problems).
You can now use some induction, proving/pointing out that:
-- If $\,p\,,\,q\,$ are two primes $\,p,q=1\pmod 4\implies pq=1\pmod 4\,$
-- The only primes dividing $\,a_n\,,\,\,n\ge 2\;$ , are $\,1\pmod 4\;$ or $\,2\,$
