# How to prove there doesn't exist $a,b \in \Bbb Z$ with $|a^2-5b^2|=2$ [closed]

As it says in the headline, how does one prove that there doesn't exist $a, b$ $\in \Bbb Z$ with $|a^2-5b^2|=2$? Any hints?

-

## closed as off-topic by user26857, USER91500, Shailesh, Watson, Claude LeiboviciMay 27 at 10:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user26857, USER91500, Shailesh, Watson, Claude Leibovici
If this question can be reworded to fit the rules in the help center, please edit the question.

$5b^2\pm2\equiv \pm2\pmod 5$

$a$ can be of the form $5k,5k\pm1,5k\pm2$ where $k$ is any integer.

But $(5k)^2\equiv 0\pmod 5,(5k\pm1)^2\equiv 1\pmod 5, (5k\pm2)^2\equiv 4\equiv -1\pmod 5,$

So, $a^2\equiv 0,\pm1\pmod 5\not\equiv\pm2$

Observation: $2\equiv-3, -2\equiv 3$ are quadratic non-residues of $5$, unlike $1\equiv -4,-1\equiv 4$.

-
I was just about to write this :) +1 – Belgi Nov 19 '12 at 5:45

HINT: Suppose that $|a^2-5b^2|=2$; then either $a$ and $b$ are both odd, or they’re both even. (Why?) If they’re both even, $a^2-5b^2$ is a multiple of $4$. (Why?) If $a$ is odd, then $a^2$ is either a multiple of $5$ or one more than a multiple of $5$. (Why?)

-

For this to be true, you would need either:

$a^2 - 5b^2 = 2$ or $a^2 - 5b^2 = -2$.

Reducing modulo $5$, the first equation becomes $a^2 = 2$ mod $5$.

Similarly, the second equation becomes $a^2 = 3$ mod $5$.

But any square reduced modulo $5$ must be $0, 1,$ or $4$.

So neither equation can hold for integers $a$ and $b$.

-

Hint $\rm\ \ (a\!-\!b)(a\!+\!b) = 4b^2 \pm 2\:\Rightarrow\:2\mid a\pm b\:\Rightarrow\:4\mid 2\:\Rightarrow\Leftarrow$

-

Hint: For any $x$, we have $x^2\equiv 0\pmod{5}$ or $x^2\equiv 1\pmod{5}$.

-
Per chance you mean : for any odd $x$? because 2² satisfies not your conclusion... I mean : take $x=2$. – awllower Nov 19 '12 at 5:47

$n^2 \in \{0, 1\}$ ($\bmod$ $4$) for all integral $n$ and $x^2 - 5y^2 \equiv x^2 - y^2$ ($\bmod$ $4$). The difference of two squares can only be $-1 (\equiv 3), 0$ or $1$ ($\bmod$ $4$).

-

First show that $a$ and $b$ must be relatively prime to $2$, then show that $2$ and $-2$ are not quadratic residues modulo $5$. So one concludes that $\mid a^2-5b^2\mid=2$ has no solution in integers.

-