1
$\begingroup$

Let p be a prime, and by experimenting with various p, how can we guess a necessary and sufficient condition for x^2 + y^2 = p to have rational solutions.

And how to prove the guess?

One thing I see is maybe using Sylvester's determinant, by how and why?

  • 0
    Mary, I've given you a suggestion to try. I almost deleted it as saying too much when I saw Qiaochu Yuan's comment - you need to try some things out with small primes. But clearing denominators and getting to a situation with integers means that for each number on the right hand side (these are not necessarily primes any more, having been multiplied by stuff which you need to identify) you have a finite search space for two integers on the left hand side. If you persist you could even end up discovering Fermat's approach ...2012-08-23

1 Answers 1

2

Let $p$ be a prime number. We claim that $x^2 + y^2 = p$ has a rational solution if and only if $p = 2$ or $p \equiv 1$ (mod 4).We assume we have the basic knowledge of the ideal theory of $\mathbb{Z}[\sqrt{-1}]$.

Let $K = \mathbb{Q}(\sqrt{-1})$. Suppose $x^2 + y^2 = p$ has a rational solution. Let $\gamma = x + \sqrt{-1}y \in K$. Then $N(\gamma) = p$. Let $A = \mathbb{Z}[\sqrt{-1}]$. It is well known that $A$ is a principal ideal domain. Suppose $\gamma = \alpha/\beta$, where $\alpha, \beta \in A$ and $\alpha$ and $\beta$ are relatively prime. Then $N(\gamma) = N(\alpha)/N(\beta)$. Hence $N(\alpha) = pN(\beta)$. Since $\alpha$ and $\beta$ are relatively prime, $N(\alpha)$ and $N(\beta)$ are relatively prime. Hence $N(\beta)$ is not divisible by $p$. Since $N(\alpha)$ is divisible by $p$, there exists a prime ideal $P$ dividing $\alpha$ and $p$. Then $N(P) = p$. Hence $P \neq pA$. Hence, by the theorem of the decomposition of a prime number in $K$, $p = 2$ or $p \equiv 1$ (mod 4).

Conversely suppose $p = 2$ or $p \equiv 1$ (mod 4). There exists a prime ideal $P$ such that $N(P) = p$. Hence $x^2 + y^2 = p$ has an integer solution. QED