Show that the equation has non integer solution $x^2-3y = 5$ 
Show that the equation has non integer solution $x^2 - 3y = 5$

According to the solutions of the exercise, for that equation to have integer solutions then $$x^2\equiv5\pmod 3$$ must be true, otherwise it has non integer solutions. 
Why is this true? Where does the (mod 3) come from? Why not (mod of something else)?
 A: $y=(x^2-5)/3$
For $y$ to be an integer, the numerator should be divisible by 3.
Now,
Every perfect square leaves a reminder of 0 or 1 when divided by 3.
So, $x^2-5$ will leave reminder 1 or 2 but never zero.
Thus no integer solutions are possible.
A: We rearrange the equation to get $x^2 = 3y + 5$, which says that we're looking for an $x$ that, when squared, is three times some integer $y$ plus 5. And "is equal to three times some integer plus 5" is the same as "is congruent to 5, mod 3". Hence, $x$ is a solution to the equation if and only if $x^2 \equiv 5\ (\mbox{mod } 3)$.
A: Given $x^2-3y =5$, we need $x^2-5 = 3y$. Then constraining $x$ and $y$ to integers gives us that $x^2-5$ is divisible by $3$, and thus $x^2\equiv 5\equiv 2 \bmod 3$, which doesn't have integer solutions since $x\nmid 3 \implies x=3k\pm 1\implies x^2 = 9k^2 \pm 6k +1 \equiv 1 \bmod 3$
A: More accuracy, the issue equation has the consequence
$$x^2\equiv 2\pmod3.\quad(1)$$
On the other hand, unknown $x$ must belong to one of residue classes $\{0,1,2\}$ modulo $3$. So 
$$x^2\bmod3\in\{0,1\},$$
and that contradicts with $(1).$
