# No solutions to diophantine equation

I am trying to deduce that $x^2-5y^2=0$ having shown that $x^2 \equiv 5y^2 (mod 7)$ has no integer solutions (not 0). How do I go about this?

Let $x\not =0$, that $y \not =0$.

Obviously, you can search for solutions in natural numbers. Let $(x_1;y_1)-$ minimal solution ($|x_1|+|y_1| -$minimal).

$x_1 \vdots 5$, ($x_1=5x_2$) that $x_1^2 \vdots 25$ $$25x_2^2-5y_1^2=0$$ $$5x_2^2-y_1^2=0$$ $y_1=5y_2$

So $(x_2;y_2)$ - solution, $x_2<x_1, y_2<y_1 -$ contradiction

By the way, this is very similar to the proof that $\sqrt{5}$ is not a rational number.

Here you have the equation $x^2 = 5 y^2$. This to be true, $x^2$ must be a multiple of the prime 5.

But since $x^2$ is a square, the exponent of 5 in the factorization of $x^2$ is even.

Similarly, the exponent of 5 in the factorization of $5y^2$ must be odd, and thus $x^2$ can't be equal to $5y^2$ (unless they are both 0).

You do not really need the result about the modulo 7.

• This is indeed what I am using it for. Showing that sqrt5 is irrational is okay, I'm just confused by the mod 7. – user313137 Feb 13 '16 at 11:59

There is perhaps an even simpler solution. Since $x^2$ - 5$y^2$ = ($x$ - $y$ sqr 5).($x$ + $y$ sqr 5) = $0$ iff one of the factor is null, the problem amounts to showing that sqr 5 is not rational.

$7|x\iff7|y$

Else $(xy,7)=1$ and $x^2\equiv5y^2\pmod7\iff(xy^{-1})^2\equiv5$

Now $a\equiv\pm1,\pm2,\pm3\pmod7\implies a^2\equiv1,4,9\equiv2$

None of these $\equiv5\pmod7$