3

Let a prime number $p$ divide $a^2+b^2$ with some $a,b \in \left\{ 1,2, \ldots , p-1 \right\}$ Prove that $p\equiv 1 \pmod{4}$. Is the converse true?

I know that $a^2+b^2\equiv 0 \pmod{p}$ and I don't know.

user26486
  • 11,331
  • Do you know the Legendre symbol? – wythagoras May 03 '15 at 15:10
  • Look in this website there is a lot of such questions – Elaqqad May 03 '15 at 15:10
  • 1
    Odd prime. Let $c$ be the modular inverse of $b$. Then $(ac)^2\equiv -(bc)^2\equiv -1\pmod{p}$. But you probably already know that the congruence $x^2\equiv -1\pmod{p}$ has no solution if $p\equiv 3\pmod{4}$. – André Nicolas May 03 '15 at 15:51
  • See http://math.stackexchange.com/questions/541665/fermats-2-square-like-results-from-minkowski-lattice-proofs for a discussion of this question and related ones. – tc1729 May 04 '15 at 01:20
  • @AndréNicolas I've noticed you always create new variables to denote e.g. inverse of $a$ instead of denoting it by $a^{-1}$. Why? – user26486 May 06 '15 at 08:59
  • 1
    @user31415: Maybe just often. Convenience of typing? Partly. Trying to minimize syntactic complexity? That too. Or, arguably, no good reason. – André Nicolas May 06 '15 at 14:47
  • typically the result is $p \equiv 1 \mod 4 \leftrightarrow p = a^2 + b^2$ but if you replace the right side with $p | a^2 + b^2 $ there could be some more examples. The solutions seem to indicate not. – cactus314 May 18 '15 at 21:30

3 Answers3

3

$1)$ $\ \,a^2\equiv -b^2\,\Leftrightarrow\, (a/b)^2\equiv -1\,\Rightarrow\, (a/b)^4\equiv 1\pmod{\!p}$, so $\text{ord}_p (a/b)=4$.

Fermat's little (FLT) $(a/b)^{p-1}\equiv 1\pmod{\!p}$ implies $4\mid p-1$ (proof below).

Theorem: $a^k\equiv 1\pmod{\!p}\,\Rightarrow\, \text{ord}_p a\mid k$.

Proof: If not, then $\,k=m\left(\text{ord}_pa\right)+r\,$ with $\,0<r<\text{ord}_p a$

But then $a^k\equiv (a^{\text{ord}_pa})^m(a^r)\equiv 1^ma^r\equiv a^r\equiv 1\pmod {\!p}$ - contradiction.

$2)\ $ By contradiction: if $\, p\equiv 3\pmod{\! 4}$,$\,$ then $\, a^2\equiv -b^2\,\Rightarrow\, (a/b)^2\equiv -1\,\stackrel{(p-1)/2}\Rightarrow$

$ (a/b)^{p-1}\equiv \color{#00F}{(-1)^{(p-1)/2}}\equiv \color{#00F}{-1}\, $ mod $p\,$ contradicts FLT.

user26486
  • 11,331
1

Suppose $a^2$ + $b^2$ = Mp with p ≡ 3 (mod4). We must have by the main theorem concerning a sum of two squares the exponent of p must be even. Therefore $a^2$ + $b^2$ = M$p^{2n}$. On the other hand the maximum possible for $a^2$ + $b^2$ is 2${(p-1)}^2$. Hence it is deduced that M = 1 and the equality is impossible by a well known result of Fermat.

Piquito
  • 29,594
1

Let $p|a^2+b^2$ then $a^2\equiv -b^2\pmod p$ hence by using Fermat's little theorem we have $$ 1\equiv a^{p-1}\equiv (a^2)^{(p-1/2)}\equiv (-b^2)^{(p-1/2)}\equiv (-1)^{(p-1/2)}b^{p-1}\equiv (-1)^{(p-1/2)}\pmod p $$ Which means that $p|1-(-1)^{(p-1/2)}$, so $p\equiv 1\pmod 4$.

k1.M
  • 5,428