%%% ===============================================
%%% @TeX-file{
%%% title = "Primes of the Form $x^2 +
%%% 17y^2$",
%%% version = "2.0",
%%% author = "Ben Galin",
%%% date = "2006/07/01",
%%% filename = "primes17.tex",
%%% copyright = "Copyright 2006 Ben Galin.
%%% This work is licensed under the
%%% Creative Commons Attribution 2.5
%%% License. To view a copy of this
%%% license, visit
%%% http://creativecommons.org/
%%% licenses/by/2.5/
%%% or send a letter to
%%% Creative Commons,
%%% 543 Howard Street, 5th Floor,
%%% San Francisco,
%%% California, 94105, USA."
%%% }
%%% ===============================================
\documentclass[11pt]{article}
\usepackage[margin=1.5in]{geometry} % Page layout
\usepackage{amsmath} % Math notation and enviroments
\usepackage{amssymb} % Math symbols
\usepackage{amsthm} % Math theorems and lemmas
\usepackage{setspace} % Line spacing
\usepackage{url} % URL in copyright notes
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newcommand{\inte}{\mathbb{Z}}
\newcommand{\quot}{\mathbb{Q}}
\DeclareMathOperator{\Gal}{Gal}
\newcommand{\pri}{\mathfrak{p}}
\renewcommand{\labelenumi}{\emph{(\alph{enumi})}}
\title{Primes of the Form $x^2 + 17y^2$}
\author{Ben Galin\thanks{Graded version. This work is licensed under the Creative Commons Attribution 2.5 License. To view a copy of this license, visit \protect\url{http://creativecommons.org/licenses/by/2.5}. Source code with limited rights can be found at \protect\url{http://www.bens.ws/professional.php}.}}
\bibliographystyle{amsplain}
\begin{document}
\onehalfspacing
\maketitle
Following conjectures first given by Fermat, prominent mathematicians such as Euler, Lagrange, Legendre, and Gauss studied primes of the form $x^2 + ny^2$, where $n$ is a fixed positive integer and $x$ and $y$ are any two integers. In this paper we examine the special case of primes of the form $x^2 + 17y^2$. As we shall see, finding necessary and sufficient conditions for primes represented by this form cannot be achieved by elementary genus theory and the theory of quadratic forms. Thus, we will turn to the fascinating theory of Hilbert class fields, where a solution to our question arises as a special case of results on when prime ideals split completely in an Hilbert class field.
We begin with a quick survey of results from the theory of quadratic forms. It is known that quadratic forms can be grouped into equivalence classes, where forms in a given class represent the same numbers. Recall that a primitive positive definite quadratic form $ax^2 + bxy + cy^2$ is said to be \textit{reduced} if it satisfies the following conditions: (i) $|b| \leq a \leq c$, and (ii) if $|b| = a$ or $a = c$ then $b \geq 0$. The usefulness of this definition becomes clear when combined with the following result (see in \cite[p. 29]{cox}):
\begin{theorem}
Let $D < 0$ be fixed. Then the number $h(D)$ of classes of primitive positive definite forms of discriminant $D$ is equal to the number of reduced forms of discriminant $D$.
\end{theorem}
Finding reduced forms of a given discriminant $D$ is a simple finite algorithm. One starts by looking for values of $a$ satisfying $a \leq \sqrt{\frac{-D}{3}}$, then continues by checking values of $b$ of the same parity as $D$ and satisfying conditions (i) and (ii) above. Lastly, the value of $c$ is determined by the values of $a$, $b$, and $D$.
Note that $x^2 + 17y^2$ is a quadratic form of discriminant $D = -68$. Running through the algorithm presented above, we find that the reduced forms of discriminant $D = -68$ are
\begin{align}\label{eq:reduced-p}
& x^2 + 17y^2 \:, & & 2x^2 + 2xy + 9y^2 \:, \\
& 3x^2 + 2xy + 6y^2 \:, \text{ and} & & 3x^2 - 2xy + 6y^2 \:, \label{eq:reduced-np}
\end{align}
so that $h(-68) = 4$. We would like to find simple congruence conditions for numbers that are represented by each of the four forms in~\eqref{eq:reduced-p} and~\eqref{eq:reduced-np}, and we hope that the congruence condition satisfied by $x^2 + 17y^2$ (the \textit{principal form}) is not also satisfied by any of the other three forms.
Unfortunately, this is not the case. To see why, recall that \textit{genera} are collections of quadratic forms that represent the same numbers modulo $D$. If a genus consists of more than one class, then a simple congruence condition cannot separate between the classes of the genus. In addition, we have the following theorem (see \cite[pp. 54, 59]{cox}):
\begin{theorem}
Let $n$ be a positive integer. Then every genus of forms of discriminant $-4n$ consists of a single class if and only if whenever $ax^2 + bxy + cy^2$ is a reduced form of discriminant $-4n$, then either $b=0$, $a=b$, or $a=c$. In addition, all genera consist of the same number of classes.
\end{theorem}
In our case, we see that the two reduced forms in~\eqref{eq:reduced-np} do not satisfy $b=0$, $a=b$, or $a=c$. Thus we can conclude that no genus consists of only one class, and in particular, the principal form $x^2 + 17y^2$ is not the only reduced form in its genus. In fact, it can be shown that the other form in~\eqref{eq:reduced-p}, $2x^2+2xy+9y^2$, is in the same genus, called the \textit{principal genus}, as the principal form: both forms are of order less than 2 in the class group, and the principal genus consists of all elements of order 1 or 2.
Our next approach, which will yield a solution, utilizes the theory of Hilbert class fields. We have the following main theorem (in \cite[p. 98]{cox}):
\begin{theorem}\label{theo:main}
Let $n > 0$ be an integer satisfying the following condition:
\begin{equation}\label{eq:hilbert-hypo}
n \text{ squarefree, } n \not\equiv 3 \pmod{4} \:.
\end{equation}
Then there is a monic irreducible polynomial $f_n(x) \in \inte[x]$ of degree $h(-4n)$ such that if an odd prime divides neither $n$ nor the discriminant of $f_n(x)$, then
\begin{equation*}
p = x^2 + ny^2 \Longleftrightarrow \left\{
\begin{aligned}
&\Bigl(\frac{-n}{p}\Bigr) = 1 \text{ and } f_n(x) \equiv 0 \pmod{p} \\
&\text{has an integer solution.}
\end{aligned}
\right.
\end{equation*}
Furthermore, $f_n(x)$ may be taken to be the minimal polynomial of a real algebraic integer $\alpha$ for which $L = K(\alpha)$ is the \emph{Hilbert class field} of $K = \quot(\sqrt{-n})$.
\end{theorem}
Note that this is indeed a stronger classification than the one presented by the two previous theorems. It is the requirement that $f_n(x) \equiv 0 \pmod{p}$ has an integer solution which allows to separate between classes in the same genus.
For our case, we see that $n=17$ satisfies the conditions in~\eqref{eq:hilbert-hypo}. Hence the theorem applies. Using quadratic reciprocity, the supplementary laws, and the homomorphism of the Lagendre symbol, it is easy to determine when $\bigl(\frac{-17}{p}\bigr) = 1$. That is, we want
\begin{equation*}
1 = \Bigl(\frac{-17}{p}\Bigr) = \Bigl(\frac{-1}{p}\Bigr)\Bigl(\frac{17}{p}\Bigr) = \Bigl(\frac{-1}{p}\Bigr)\Bigl(\frac{p}{17}\Bigr) \:.
\end{equation*}
But this is the case if and only if (i) $p \equiv 1 \pmod{4}$ and $p \equiv 1,2,4,8,9,13,15,16 \pmod{17}$, or (ii) $p \equiv 3 \pmod{4}$ and $p \equiv 3,5,6,7,10,11,12,14 \pmod{17}$. Put together, we must have $p \equiv 1,3,7,9,11,13,21,23,25,27,31,33,39,49,53,63 \pmod{68}$.
However, finding the polynomial $f_{17}(x)$ is not as trivial. Knowledge of the minimal polynomial is equivalent to knowledge of the Hilbert class field of $K = \quot(\sqrt{-17})$. That is, we need to find the primitive element $\alpha$ of the Hilbert class field $L$ of $K$. In general, one can find this generator from properties of complex multiplication, but this is out of the scope of this paper. Instead, we will find the polynomial $f_{17}(x)$ as a consequence of proving the following proposition.
\begin{proposition}\label{prop:hilbert}
The Hilbert class field of $K = \quot(\sqrt{-17})$ is $L = K(\alpha)$, where $\alpha = \sqrt{\frac{1+\sqrt{17}}{2}}$.
\end{proposition}
\begin{proof}
By definition, a Hilbert class field $L^*$ of a field $K^*$ is a finite Galois extension such that (i) $L^*$ is an unramified Abelian extension of $K^*$, and (ii) any unramified Abelian extension of $K^*$ lies in $L^*$. Thus, if we show that the extension $L/K$ is an unramified Abelian extension of degree $h(-68) = 4$, then we would have proved that $L$ is indeed the Hilbert class field of $K$.
\begin{figure}[htbp]
\begin{center}
\begin{picture}(200,115)
\put(100,0){$\quot$}
\put(90,30){$K\cap F$}
\put(20,65){$K = \quot(\sqrt{-17})$}
\put(130,65){$F = \quot(\alpha,i)$}
\put(100,115){$L$}
\put(105,15){\line(0,1){10}}
\put(115,15){\line(1,1){40}}
\put(95,15){\line(-1,1){40}}
\put(115,45){\line(2,1){20}}
\put(95,45){\line(-2,1){20}}
\put(65,80){\line(1,1){30}}
\put(145,80){\line(-1,1){30}}
\end{picture}\caption{A Field Extension Diagram\label{fig:field}}
\end{center}
\end{figure}
Consider the diagram of fields in Figure~\ref{fig:field}. First, the extension $L/K$ is Galois. To see why, note that $\alpha$ is a root of the monic polynomial $p(x) = x^4 - x^2 - 4$. The other three roots are $-\alpha$, $\beta = \sqrt{\frac{1-\sqrt{17}}{2}}$, and $-\beta$. In particular, this shows that $p(x)$ is irreducible over $\quot$: it is not a product of a cubic and a monic in $\quot[x]$, as it has no rational roots; and it is not a product of two quadratics in $\quot[x]$, as the quadratic formula reveals for $p(x^2)$. Since $\alpha\beta = 2i$, and $\pm i$ are the two roots of $x^2 + 1$, we have that $F = \quot(\alpha,i)$ is a splitting field extension of $\quot$ and is separable. That is, $F/\quot$ is Galois. From $i = \frac{2\alpha^2-1}{\sqrt{-17}} \in L$, we have $L = K(\alpha) = K(\alpha,i)$ so that $L/K$ is Galois, and $\Gal(L/K) \cong \Gal(F/F\cap K)$ (see \cite[p. 571]{dummit}).
Next, we show that $L/K$ is of degree 4. Since $\alpha$ is a real number, we know that $i \notin \quot(\alpha)$ In addition, $[\quot(i):\quot] = 2$ and $[\quot(\alpha):\quot] = 4$, as these field extensions are obtained by adjoining roots of a quadratic and a quartic, respectively. Thus, $[F:\quot] = 8$. Note that $2\alpha^2-1 = \sqrt{17}$ so the quadratic extension $\quot(\sqrt{17})$ is a subfield of $F$. But then $\sqrt{-17} = i\sqrt{17} \in F$. That is, $K\cap F = K$. We conclude that $[L : K] = [F : F\cap K] = [F : K] = 4$, as needed. A modified diagram of fields is presented in Figure~\ref{fig:field-mod}.
\begin{figure}[htbp]
\begin{center}
\begin{picture}(200,110)
\put(100,0){$\quot$}
\put(70,50){$K = \quot(\sqrt{-17})$}
\put(60,100){$L = K(\alpha) = \quot(\alpha,i)$}
\put(105,15){\line(0,1){28}}
\put(105,65){\line(0,1){28}}
\end{picture}\caption{A Modified Field Extension Diagram\label{fig:field-mod}}
\end{center}
\end{figure}
We now show that $L/K$ is Abelian. An automorphism $\sigma \in \Gal(L/K)$ is transitive on the roots of $p(x)$ and of $x^2 + 1$, but fixes $\sqrt{-17}$. We see that $\alpha$ can be mapped to any of the four roots, but since we have the relation $\alpha\beta = 2i$, we must have $\sigma(\alpha)\sigma(\beta) = \sigma(\alpha\beta) = \sigma(2i) = 2\sigma(i)$. In addition, $\sigma(-\alpha) = -\sigma(\alpha)$ and $\sqrt{-17} = \sigma(\sqrt{-17}) = \sigma(i)\sigma(\sqrt{17}) = \sigma(i)\sigma(2\alpha^2-1) = 2\sigma(i)\sigma(\alpha)^2+1$. It follows that the automorphism $\sigma$ is completely determined by its action on a single root $\alpha$, and since the degree of the extension is 4, each such map is indeed an automorphism (see \cite[p. 542]{dummit} for more details). If we define $\sigma \in \Gal(L/K)$ by $\sqrt{17} \mapsto -\sqrt{17}$ and $i \mapsto -i$, then $\sigma$ is a generator of $\Gal(L/K)$. It follows that the Galois group is cyclic and isomorphic to $\inte/4\inte$, an Abelian group.
It remains to show that $L/K$ is unramified. Since $K$ is an imaginary quadratic extension, any embedding of $K$ must be into the complex field, so all infinite primes are unramified. Let $K_1 = K(\sqrt{17})$. Then we can write $K \subseteq K_1 \subseteq L$, each a degree-two extension. It suffices to show that each extension is unramified. We use the following lemma (in \cite[p. 114]{cox}):
\begin{lemma}\label{lem:ramify}
Let $L = K(\sqrt{u})$ be a quadratic extension with $u \in \mathcal{O}_K$, and let $\pri$ be prime in $\mathcal{O}_K$.
\begin{enumerate}
\item If $2u \notin \pri$, then $\pri$ is unramified in $L$.
\item If $2 \in \pri$, $u \notin \pri$, and $u = b^2 - 4c$ for some $b,c \in \mathcal{O}_K$, then $\pri$ is unramified in $L$.
\end{enumerate}
\end{lemma}
We shall not prove Lemma~\ref{lem:ramify}, but the result should appear plausible if one sees that $x^2 - u$ and $x^2 - bx + \frac{b^2-u}{4}$ are separable modulo $\pri$, where $\frac{-b+\sqrt{u}}{2}$ is a root of the second quadratic and a primitive element of the simple extension $L$.
Let $\pri$ be a prime in $\mathcal{O}_K$. We have $K_1 = K(\sqrt{17}) = K(i) = K(\sqrt{-1})$ and $17 + (-1) = 16 = 2^4$. Thus, if $2 \notin \pri$, either $17 \notin \pri$ or $-1 \notin \pri$, so $\pri$ is unramified in $L$ by part (a) of Lemma~\ref{lem:ramify}. Otherwise, $2 \in \pri$. But $17 = 2^4 + 1$ and 1 is a unit, so $17 \notin \pri$. In addition, $17 = 5^2 - 4\cdot 2$, so by part (b) of Lemma~\ref{lem:ramify}, $\pri$ is unramified in $L$. Thus, we have established that $K_1/K$ is an unramified extension.
Now consider $\pri$ a prime in $\mathcal{O}_{K_1}$. Let $\mu = \frac{1+\sqrt{17}}{2}$ and $\mu' = \frac{1-\sqrt{17}}{2}$. Then $\sqrt{\mu\mu'} = 2i \in K_1$. Hence, $L = K_1(\sqrt{\mu}) = K_1(\sqrt{\mu'})$, so we may assume that $u$ in the theorem can be $\mu$ or $\mu'$. Note that $\mu + \mu' = 1$, so for any proper ideal in $\mathcal{O}_{K_1}$ (in particular, a prime ideal $\pri$), it cannot be the case that both $\mu$ and $\mu'$ belong to the ideal. If $2 \notin \pri$, then either $2\mu$ or $2\mu'$ is not in $\pri$, so $\pri$ is unramified in $L$ by part (a) of the Lemma. Otherwise, $2 \in \pri$. Note that $\mu^2 - 4 = \frac{18+2\sqrt{17}}{4} - \frac{16}{4} = \mu$. Similarly, $\mu' = (\mu')^2 - 4$. By part (b) of the Lemma, $\pri$ is unramified in $L$. It follows that $L/K_1$ and $L/K$ are unramified extensions.
Thus, $\alpha = \sqrt{\frac{1+\sqrt{17}}{2}}$ is a primitive element of the simple extension $L/K$, where $L$ is the Hilbert class field of $K = \quot(\sqrt{-17})$, to conclude the proof of Proposition~\ref{prop:hilbert}.
\end{proof}
This essentially establishes necessary and sufficient conditions for primes of the form $x^2 + 17y^2$. According to Theorem~\ref{theo:main}, we know that $x^4 - x^2 - 4$, the minimal polynomial of $\alpha$, can be taken to be $f_{17}(x)$. Its discriminant is $-2^6 17^2$, so Theorem~\ref{theo:main} does not apply to the primes 2 (which is clearly not represented by $x^2 + 17y^2$) and 17 (which clearly is). We summarize the results in the following and final theorem:
\begin{theorem}
Let $p \neq 17$ is an odd prime, then
\begin{equation*}
p = x^2 + 17y^2 \Longleftrightarrow \left\{
\begin{aligned}
&\Bigl(\frac{-17}{p}\Bigr) = 1 \text{ and } x^4 - x^2 \equiv 4 \pmod{p} \\
&\text{has an integer solution.}
\end{aligned}
\right.
\end{equation*}
\end{theorem}
\bibliography{bib-primes17}
\end{document}