Thursday, 27 August 2026

Exercise (8.1).10

Prove Lemma (8.2).


Let's remind ourselves of Lemma (8.2).

If prime $p \equiv 1 \pmod 4$ then there exist positive integers $x$ and $y$ such that $x^2 + y^2 = kp$ where $k < p$ and it is a positive integer.


We can write $x^2 + y^2 = kp$ as

$$ x^2 \equiv -y^2 \pmod p $$


Since $p \equiv 1 \pmod 4$, by Proposition (7.11) we have

$$ (\frac{-1}{p}) = 1$$

By definition of the Legendre symbol

$$ (\frac{y^2}{p}) = 1 $$

Using the multiplicity of the Legendre symbol

$$ (\frac{-y^2}{p}) = (\frac{-1}{p}) \times (\frac{y^2}{p}) = 1 \times 1 = 1 $$

But $(\frac{-y^2}{p})=1$ means that the following has integer solutions for $x$,

$$ x^2 \equiv - y^2 \pmod p  $$

That is, $x^2 + y^2 = kp$ has solutions. 

Because $(-x)^2 = x^2$ and $(-y)^2 = y^2$, we can additionally state that positive integer solutions exist.


We now need to show that $k < p$ still permits solutions.

If $x \pmod p$ is a solution, so is $-x \equiv p-x \pmod p$. This means that if solutions exist, they include solutions in the range $0 \le x < \frac{p}{2}$. 

This means

$$ 0 \le x^2 + y^2 < (\frac{p}{2})^2 +  (\frac{p}{2})^2  = \frac{p^2}{2} = \frac{p}{2} \times p $$

That is, solutions to $x^2 + y^2 =kp$ exist when $k < \frac{p}{2} < p$.