# Diophantine Equations : Solve $a^2 + b^2 = 4c + 3$

I was working my way through some number theory problems , when I came across the following question :

Find all solutions to the equation $a^2 + b^2 = 4c + 3$

My Solution (partial) :

• If $a$ is odd then it is of the form $4k+1$ or $4k+3$ , so remainder is 1
• If $a$ is even then remainder is $0$
• How does this help me ?

I am all thumbs , can someone help me out ? Maybe a hint ...

• @Pacman , am I correct now ? Apr 25, 2015 at 3:30
• I've edited it for you Apr 25, 2015 at 3:30
• @Pacman , I meant my answer below in the comments and thanks for editing :) Apr 25, 2015 at 3:31
• @All , why the downvote ? Apr 25, 2015 at 3:57
• Correction of your statements: "remainder modulo $4$ of $a^2$ is $1$;...remainder modulo $4$ of $a^2$ is $0$". What this then tells you is that $a^2+b^2$ can only give remainders $0+0, 0+1,1+0,1+1$ modulo $4$ and so can only give remainders $0,1,2$ modulo $4$. But it is given that $a^2+b^2$ is equal to $4c+3$, which is an integer giving a remainder $3$ modulo $4$. this is impossible by the fact that $a^2+b^2$ must be $0,1,2$ modulo $4$. Apr 25, 2015 at 3:59

Here I'm using the conventional modular arithmetic notation $a\equiv b\pmod {n}\Leftrightarrow n\mid a-b$, or i.e. $a,b$ leave the same remainders when divided by $n$.

If $a$ is odd, then $a=4k\pm 1$ and $a^2\equiv 16k^2\pm8k +1\equiv 1\pmod{4}$.

If $a$ is even, then $a=2k$ and $a^2\equiv 4k^2\equiv 0\pmod {4}$.

So $a^2\equiv \{0,1\}\pmod {4}$ (same for $b$) and so $a^2+b^2\equiv \{0,1,2\}\pmod {4}$

The above holds for any integers $a,b$. Now, coming back to the problem we see that it is given that $a^2+b^2\equiv 4c+3\equiv 3\pmod {4}$, which is impossible by the above properties of integers.

Hint

If $a$ is odd, what is the remainder if you divide $a^2$ by $4$? And if $a$ is even?

• Hi , @ajotatxe , if $a$ is odd then it is of the form $4k +1$ or $4k +3$ , so remainder is $1$ ; if $a$ is even then remainder is $0$ ; am I correct , how does this help me ? Apr 25, 2015 at 3:22
• The hint asked you what is the remainder if you divide $a^2$ (not $a$) by $4$. Apr 25, 2015 at 3:23
$a^2+b^2 =4c +3 \implies a^2 +b^2 \equiv 3 \pmod 4$.
For some integer $x$, we see that $x^2 \equiv 0 \pmod 4$ or $x^2 \equiv 1 \pmod 4$.
So, we see that $a^2+b^2 \not\equiv 3 \pmod 4$ for any $a, b \in \mathbb Z$.
Thus, there are no solutions in $\mathbb Z$.