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
 A: One could take a naive approach and note that the possible values of usable perfect squares are $0, 1, 4, 9, 16, 25, 36, 49$ and no two of these add to $57$.
A: $$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.
A: There is Fermat's theorem: 
A number is a sum of two squares if and only if the powers of its prime factors congruent to $3\bmod 4$  are even.
A: $x$ and $y$ are of different parity. With no loss of generality suppose that $x$ is odd and $y$ is even. since $x$ is odd $x^2$ is of the form $8k+1$ for some $k\geq 0$. So
$$8k+1+y^2=57$$ or $$y^2=56-8k=8(7-k)$$. But then since $y$ is even $y^2$ is of the form $4k'^2$ hence $$4k'^2=8(7-k)$$ or $$k'^2=2(7-k)          *$$
Since the RHS is even the LHS must be even too and therefore $k'$ must be even. That is there exists some $t$ with $k'=2t$ rewriting * implies that $$4t^2=2(7-k)$$ or $$2t^2=7-k$$ so $k$ is odd and belongs to $[1,7]$. The last equation is impossible.
A: Let $x = \text{ min } (x,y) \to 57 = x^2+y^2 > 2x^2 \to x^2 < \dfrac{57}{2} = 28.5 \to x \leq 5 \to x = 0,1,2,3,4,5$. None of them gives integer value $y$, hence equation has no solution in $\mathbb{N}$.
