Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?


7 Answers 7

up vote 3 down vote accepted

$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$


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


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$).


This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .