The question is :
Write 1009 in the form $(x^2+a\,y^2)$ for $a=1,2,3$. Where $x$ and $y$ are integers.
It is a question where we have to show our work but I know no method other than trial and error which is obviously not allowed... So please tell the correct method/trick to solve the question. Although I found answer for the first part by guess work which is: $(28)^2 + (15)^2 =1009$. But as I mentioned above we can not simply write this we have to show the work so please help.