0

I'm trying to show that we always have solutions to $x^2+y^2=-1$ mod $p$, where $p$ is a prime number.

If $p=2$, then $(1,0)$ is a solution.

If $p=1$ mod $4$, then $-1$ is a quadratic residue mod $p$, so we can let $u^2=-1$ mod $p$. Then $(u,0)$ is a solution.

If $p=3$ mod $4$, then I'm stuck and I'm not quite sure how to prove the existence of solutions.

Alessandro
  • 1,334

1 Answers1

1

Let $r$ be the minimum nonquadratic residue $\bmod p$. Then $r-1$ is a quadratic residue by construction and $-r$ is also one when $p$ is a $4n-1$ prime. Thus

$(r-1)+(-r)\equiv-1$

where both $x^2=r-1$ and $y^2=-r$ have solutions.

We can go further and actually construct solutions for $x$ and $y$ in terms of $r$. To wit, for any residue $s$ that is a quadratic residue $\bmod p=4n-1$ one square root of $s$ is given by $s^n$. For the quadratic character of $s$ combined with Fermat's Little Theorem leads to $s^{2n-1}\equiv1$ from which $s^{2n}\equiv s$. So

$[(r-1)^n]^2+[(-r)^n]^2\equiv-1.$

For instance, drop in $p=19$ for which $n=5$. As $19\not\equiv\pm1\bmod 8$, residue $2$ is nonquadratic, clearly the minimum such residue among nonnegative numbers, and so

$[1^5]^2+[(-2)^5]^2\equiv1^2+6^2\equiv-1\bmod 19.$

Oscar Lanzi
  • 39,403