<s>[INST] Prove that the equation $x^2+y^2=57$ has no integer solution. I am trying to prove that equation $x^2+y^2=57,\{x,y\}\in\mathbb{Z}$ has no integers solution. 
In case the equation is of the form  $ax^2+by^2=n,\text{where}~~ a\neq 1 ~~\text{or}~~ b\neq1
,\{a,b,n\}\in\mathbb{Z}$ .
Then applying $ax^2+by^2\pmod a=n \pmod a$. or   $~ax^2+by^2\pmod b=n \pmod b$
was useful .But in this case both $a=b=1$ so how to cope with this situation
 [/INST] $$x^2+y^2\equiv 57\equiv 0\pmod {3}$$
Now, the only quadratic residues modulo $3$ are $0,1$, and since if $a,b\in\{0,1\}$, then $a+b\in\{0,1,2\}$, we know that both $a=0$ and $b=0$ must hold in order for $a+b\equiv 0\pmod{3}$ to be true, and so $$\begin{cases}x^2\equiv 0\pmod{3}\\ y^2\equiv 0\pmod {3}\end{cases}\iff \begin{cases}x\equiv 0\pmod{3}\\ y\equiv 0\pmod{3}\end{cases}\iff\begin{cases} x^2\equiv 0\pmod{9}\\y^2\equiv 0\pmod{9}\end{cases}$$
But then $x^2+y^2\equiv 0+0\equiv 0\equiv 57\equiv 3\pmod{9}$, impossible.
</s>