# Number Theory : Solving $x^2$ $+$ $y^2$ $=$ $2^{10}$ - $1$

I was working my way through some basic number theory problems and was all thumbs while solving this problem :

List all the pairs of integer solutions $(x, y)$ of the Diophantine equation : $x^2$ $+$ $y^2$ $=$ $2^{10}$$-$$1$ and show that the list is exhaustive

How can I go about it ? A hint would be a good way to start

• Brute force? $x$ and $y$ must both be less than 32, so just draw up a table of $n^2$ and $1023-n^2$ for $8\le n<31$ and look for common values. (The lower bound 8 is $\left\lceil \sqrt{1023-31^2} \right\rceil$). – hmakholm left over Monica Feb 22 '15 at 17:42
• Hi , @HenningMakholm , as it is a Number theory question - may be there is a more sublime way to solve it ? – pranav Feb 22 '15 at 17:42
• @panav: Doing the brute force calculation on a computer takes about 2 minutes (all of it typing time) and concluded there are no solutions. That's valuable information even if your goal is to find a slicker argument -- now you know what you're looking for a slicker argument for. – hmakholm left over Monica Feb 22 '15 at 17:47
• Hi , @HenningMakholm , I was hoping to solve this using pen and paper : the computer is always there ;) – pranav Feb 22 '15 at 17:50

It has no solutions, since $x^2+y^2\equiv -1\equiv 3\pmod{4}$, but $x^2$ can only be $0$ or $1$ modulo $4$.
$2^{10}-1\equiv -1\pmod{4}$, since $4\mid 2^{10}-1-(-1)=2^{10}=4\cdot 2^{8}$.
• @pranav: they mean that $2^{10}-1\equiv3\pmod4$ – robjohn Feb 22 '15 at 17:49
• The answer is a bit hard to understand. What you probably mean is that $2^{10}-1\equiv3\pmod4$, but that is not clear in your answer. – robjohn Feb 22 '15 at 17:51
• @pranav: no... it is simpler than that. For $k\ge2$, $2^k\equiv0\pmod4$, so $2^{10}-1\equiv0-1\equiv3\pmod4$ – robjohn Feb 22 '15 at 17:52
• @pranav It is a very well-known fact that $x^2+y^2\equiv -1\equiv 3\pmod{4}$ is impossible. Modulo $3,4$ are the first things I mostly always look at when I solve Diophantine equations. – user26486 Feb 22 '15 at 17:57