# Hypergeometry and the AGM over Finite Fields

Eleanor McSpirit  Department of Mathematics, University of Virginia,
Charlottesville, VA 22903<EMAIL_ADDRESS>and  Ken Ono  Department of
Mathematics, University of Virginia, Charlottesville, VA 22903
<EMAIL_ADDRESS>
###### Abstract.

One of the most celebrated applications of Gauss’ ${}_{2}F_{1}$ hypergeometric
functions is in connection with the rapid convergence of sequences and special
values that arise in the theory of arithmetic and geometric means. This theory
was the inspiration for a recent paper [8] in which a finite field analogue of
AGMR was defined and then studied using finite field hypergeometric functions.
Instead of convergent sequences, one gets directed graphs that combine to form
disjoint unions of graphs that individually resemble jellyfish. Echoing the
connection of hypergeometric functions to periods of elliptic curves, these
graphs organize elliptic curves over finite fields. Here we use such
“jellyfish swarms” to prove new identities for Gauss’ class numbers of
positive definite binary quadratic forms. Moreover, we prove that the sizes of
jellyfish are in part dictated by the order of the prime above 2 in certain
class groups.

###### 2020 Mathematics Subject Classification:

11G20, 14H52, 14K02, 33C90

E.M acknowledges the support of a UVa Dean’s Doctoral Fellowship.

K.O. thanks the Thomas Jefferson Fund and the NSF (DMS-2002265 and
DMS-2055118) for their support.

##  1\. Introduction and statement of results

Recall that the classical arithmetic-geometric mean iteration is defined for
positive real numbers $a$ and $b$ by the sequence of pairs

$\text{AGM}_{\mathbb{R}}(a,b):=\\{(a_{1},b_{1}),(a_{2},b_{2}),\dots\\},$

where $a_{1}:=a$, $b_{1}:=b$, and successive terms are given by

$a_{n}:=\frac{a_{n-1}+b_{n-1}}{2}\quad\text{ and }\quad
b_{n}:=\sqrt{a_{n-1}b_{n-1}}.$

It is well known that both $(a_{n})$ and $(b_{n})$ rapidly converge to the
same limit (p. 2, [1]). One of the most famous results on the AGMR is due to
Gauss, who showed using the theory of elliptic integrals that one can generate
extraordinary approximations for $\pi$ with relatively few iterations by
considering the related sequence

$p_{n}:=\frac{a_{n}^{2}}{1-\sum_{i=1}^{n}2^{i-2}(a_{i}^{2}-b_{i}^{2})}.$

In [8], Griffin, Saikia, Tsai, and the second author defined a finite-field
analogue of the $\text{AGM}_{\mathbb{R}}$ sequence over $\mathbb{F}_{q}$ when
$q=p^{r}\equiv 3\bmod{4}$. In this setting, $-1$ is not a square mod $q$,
mirroring the fact that $-1$ is not a square in $\mathbb{R}$. This allows us
to choose square roots such that the iterated geometric means are well-
defined. That is, there is always a unique choice of
$b_{n}=\sqrt{a_{n-1}b_{n-1}}$ such that $a_{n}b_{n}$ is a square mod $q$ when
one starts with $a,b\in\mathbb{F}_{q}^{\times}$, $a\neq\pm b$, and $ab$ a
square mod $q$.

For example, consider $q=7$ and $(a,b)=(4,2)$. Then

$\text{AGM}_{\mathbb{F}_{7}}(4,2)=\\{(4,2),\overline{(3,6),(1,2),(5,3),(4,1),(6,5),(2,4)},\dots\\}$

where the overlined pairs form a repeating orbit. The pairs $(6,3)$, $(2,1)$,
$(3,5)$, $(1,4)$, and $(5,6)$ also enter this orbit after one AGM iteration.
In [8], the authors first explored the properties of the connected components
of the directed graph representing the sequences of
$\text{AGM}_{\mathbb{F}_{q}}(a,b)$ over all admissible pairs $(a,b)$. They
showed that all components always consist of one cycle and one “tentacle” of
length one connected to each cycle vertex, for which they coin the name
jellyfish. For example, the following figure shows the unique connected
component of the AGM${}_{\mathbb{F}_{7}}$ graph
$\mathcal{J}_{\mathbb{F}_{7}}$.

(1,2)(6,3)(5,3)(2,1)(4,1)(3,5)(6,5)(1,4)(2,4)(5,6)(3,6)(4,2)

Figure 1: Example of the jellyfish comprising $\mathcal{J}_{\mathbb{F}_{7}}$.

In general, the graph $\mathcal{J}_{\mathbb{F}_{q}}$ consists of many such
jellyfish, which together comprise a swarm. In general, jellyfish swarms
contain jellyfish of varying sizes and multiplicities, as exemplified by the
following figure showing the swarm $\mathcal{J}_{\mathbb{F}_{19}}$.

Figure 2: Example of the jellyfish swarm $\mathcal{J}_{\mathbb{F}_{19}}$.

The theory underlying the classical $\text{AGM}_{\mathbb{R}}$ involves special
integrals and their relationship with Gauss’ hypergeometric functions. In
particular, for $a>b>0$ we let

(1.1)
$I_{\mathbb{R}}(a,b):=\frac{1}{2a}\int_{1}^{\infty}\frac{dx}{\sqrt{x(x-1)(x-(1-b^{2}/a^{2}))}}.$

A straightforward check shows that
$I_{\mathbb{R}}(a,b)=I_{\mathbb{R}}(\frac{a+b}{2},\sqrt{ab})$, and so the
sequence
$\text{AGM}_{\mathbb{R}}(a,b)=\\{(a_{1},b_{1}),(a_{2},b_{2}),\dots\\}$
satisfies

$I_{\mathbb{R}}(a_{1},b_{1})=I_{\mathbb{R}}(a_{2},b_{2})=\cdots=I_{\mathbb{R}}(a_{n},b_{n})=\dots$

Gauss discovered the following beautiful formula for $I_{\mathbb{R}}(a,b)$ in
terms of his classical ${}_{2}F_{1}$ hypergeometric function:

(1.2)
$I_{\mathbb{R}}(a,b)=\frac{\pi}{2a}\cdot{{}_{2}F_{1}}^{\text{class}}\left(\begin{matrix}\frac{1}{2}&\frac{1}{2}\\\
&1\end{matrix}\ \middle|\ 1-\frac{b^{2}}{a^{2}}\right).$

It turns out that these elliptic integrals and hypergeometric functions encode
data about elliptic curves; for $\lambda\neq 0,1$ we may define the Legendre
elliptic curve

$E_{\lambda}\colon\quad y^{2}=x(x-1)(x-\lambda).$

It turns out that the real period of $E_{\lambda}$ is computed by the integral

$\Omega(E_{\lambda})=\int_{1}^{\infty}\frac{dx}{\sqrt{x(x-1)(x-\lambda)}}.$

Gauss’ ${}_{2}F_{1}$ hypergeometric functions offer us a closed formula for
the real period of $E_{\lambda}$ when $0<\lambda<1$:

(1.3)
$\Omega(E_{\lambda})=\pi\cdot{{}_{2}F_{1}}^{\text{class}}\left(\begin{matrix}\frac{1}{2}&\frac{1}{2}\\\
&1\end{matrix}\ \middle|\ \lambda\right).$

Just as the classical $\text{AGM}_{\mathbb{R}}$ interacts with hypergeometric
functions and elliptic curves, so too does the finite field analogue described
above. In analogy with the elliptic integrals in (1.1), one can define

(1.4)
$I_{\mathbb{F}_{q}}(a,b):=\frac{1}{2a}\sum_{x\in\mathbb{F}_{q}}\phi_{q}(x)\phi_{q}(x-1)\phi_{q}(x-(1-b^{2}/a^{2})),$

where $\phi_{q}(-)$ denotes the quadratic character over $\mathbb{F}_{q}$.
Greene’s 1984 PhD thesis [7] offers us the appropriate analogue of Gauss’
hypergeometric functions with which to draw our connection; for multiplicative
characters $\\{\alpha_{i}\\}$, $\\{\beta_{j}\\}$ over
$\mathbb{F}_{q}^{\times}$, he defined

${{}_{n}F_{n-1}}\left(\begin{matrix}\alpha_{1}&\alpha_{2}&...&\alpha_{n}\\\
&\beta_{1}&...&\beta_{n-1}\end{matrix}\ \middle|\
x\right)_{q}:=\frac{q}{q-1}\sum_{\chi}{\alpha_{1}\chi\choose\chi}{\alpha_{2}\chi\choose\beta_{1}\chi}\cdots{\alpha_{n}\chi\choose\beta_{n-1}\chi}\chi(x),$

where ${\alpha\choose\beta}$ is the normalized Jacobi sum $J(\alpha,\beta)$,
defined by

${\alpha\choose\beta}:=\frac{\beta(-1)}{q}J(\alpha,\bar{\beta}):=\frac{\beta(-1)}{q}\sum_{x\in\mathbb{F}_{q}}\alpha(x)\bar{\beta}(1-x).$

By comparing their definitions, one finds that for $q=p^{r}\equiv 3\bmod{4}$

(1.5)
$I_{\mathbb{F}_{q}}(a,b)=\frac{q}{2a}\cdot{{}_{2}F_{1}}\left(\begin{matrix}\phi_{q}&\phi_{q}\\\
&\varepsilon_{q}\end{matrix}\ \middle|\ 1-\frac{b^{2}}{a^{2}}\right)_{q}.$

This expression is the finite field analogue of (1.2). Moreover, a recent
result of Evans and Greene (Theorem 2 of [5]) offers a quadratic
transformation law for the finite field ${{}_{2}F_{1}}$ which implies that the
sequence
$\text{AGM}_{\mathbb{F}_{q}}(a,b)=\\{(a_{1},b_{1}),(a_{2},b_{2}),\dots\\}$
satisfies

$I_{\mathbb{F}_{q}}(a_{1},b_{1})=I_{\mathbb{F}_{q}}(a_{2},b_{2})=\cdots=I_{\mathbb{F}_{q}}(a_{n},b_{n})=\dots$

We may again consider the relationship of these hypergeometric functions to
Legendre elliptic curves, this time analyzing the $\mathbb{F}_{q}$-points
$E_{\lambda}(\mathbb{F}_{q})$. In this case, instead of an elliptic integral
telling us the period of $E_{\lambda}$, when $\text{char}(\mathbb{F}_{q})\geq
5$ we have for $\lambda\in\mathbb{F}_{q}\backslash\\{0,1\\}$ that

$a_{\lambda}(q)=-\sum_{x\in\mathbb{F}_{q}}\phi_{q}((x)(x-1)(x-\lambda)),$

where $a_{\lambda}(q)$ is the trace of Frobenius of $E_{\lambda}$ (see Theorem
11.10 of [11]). Number theoretically, the trace of Frobenius is essentially a
formula for the number of points on an elliptic curve over $\mathbb{F}_{q}$
since

$a_{\lambda}(q)=q+1-\\#E_{\lambda}(\mathbb{F}_{q}).$

Cast in terms of Greene’s hypergeometric functions, we have in analogy with
(1.3)

(1.6)
$a_{\lambda}(q)=-q\cdot{{}_{2}F_{1}}\left(\begin{matrix}\phi_{q},&\phi_{q}\\\
&\varepsilon_{q}\end{matrix}\ \Big{|}\ \lambda\right)_{q}.$

The connection between the AGM${}_{\mathbb{F}_{q}}$ and elliptic curves over
$\mathbb{F}_{q}$ does not stop here, however. The preceding discussion has
linked points on the graph of AGM${}_{\mathbb{F}_{q}}$ to Legendre elliptic
curves over $\mathbb{F}_{q}$ and has shown that two curves represented in the
same connected component have the same trace of Frobenius, and hence the same
number of $\mathbb{F}_{q}$-points. The authors of [8] are able to prove
something stronger. They show that given a sequence
$\text{AGM}_{\mathbb{F}_{q}}(a,b)=\\{(a_{1},b_{1}),(a_{2},b_{2}),\dots\\}$, if
$\lambda_{n}:=b_{n}^{2}/a_{n}^{2}$, then

$E_{\lambda_{1}}(\mathbb{F}_{q})\cong
E_{\lambda_{2}}(\mathbb{F}_{q})\cong\cdots\cong
E_{\lambda_{n}}(\mathbb{F}_{q})\cong\cdots$

as abelian groups.

Not only can the vertices of the AGM${}_{\mathbb{F}_{q}}$ graphs be associated
to elliptic curves, but it turns out that each iteration of the arithmetic-
geometric mean, and hence each edge of the graph, corresponds to an isogeny of
degree 2 between these curves (see Theorem 3 (2) of [8]). Following this
observation, we can employ tools from the study of elliptic curves in order to
understand the structure of $\text{AGM}_{\mathbb{F}_{q}}$. Our approach will
rely on the theory of complex multiplication. In particular, we will study the
action of the class group of an imaginary quadratic order $\mathcal{O}$ on the
set of isomorphism classes of elliptic curves over $\mathbb{F}_{q}$ with
complex multiplication by $\mathcal{O}$.

Our setup in some ways mirrors the robust theory of “isogeny volcanoes,”
graphs which organize isomorphism classes of elliptic curves over finite
fields and their isogenies. The seminal work on such graphs is due to
Kohel111Kohel did not use this language to describe the graphs he studied. The
terminology came later, in a paper by Fouquet and Morain, which applied the
work of Kohel to the Schoof-Atkin-Elkies point-counting algorithm [6]., who
studied endomorphism rings of elliptic curves over finite fields by
understanding the structure of $\ell$-isogeny graphs
$\mathcal{G}_{\ell}(\mathbb{F}_{q})$, which are visually quite similar to our
jellyfish [9].

However, there are two main differences between our isogeny graphs and the
graphs $\mathcal{G}_{2}(\mathbb{F}_{q})$ studied by Kohel and others. First,
only particular 2-isogenies between the represented elliptic curves will
appear in our setting. Second, different vertices can correspond to elliptic
curves in the same $\mathbb{F}_{q}$-isomorphism class. What’s more, some
jellyfish may in fact be identical after passing to elliptic curves. These
multiplicities will require attention for all of our results.

In this note, we first show that $\text{AGM}_{\mathbb{F}_{q}}$ provides new
information in the context of Gauss’ theory of class numbers of imaginary
quadratic fields and class numbers of positive definite binary quadratic
forms. To make this connection, we count the $\mathbb{F}_{q}$-isomorphism
classes of elliptic curves that are represented in these graphs. To this end,
the authors of [8] made use of a correspondence between isomorphism classes of
elliptic curves with prescribed torsion and certain class numbers to count the
number of distinct $j$-invariants which appear.

Recall that the Hurwitz class number $H(D)$, introduced by Adolf Hurwitz, is a
modification of the class number of binary quadratic forms of discriminant
$D\leq 0$. If $f$ is a quadratic form, then a matrix

$\begin{bmatrix}\alpha&\beta\\\
\gamma&\delta\end{bmatrix}\in\text{SL}_{2}(\mathbb{Z})$

is an automorphism of $f$ if $f(\alpha x+\beta y,\gamma x+\delta y)=f(x,y)$.
Then $H(D)$ weights forms of discriminant $D$ by $2/g$, where $g$ is the order
of their automorphism group. We additionally declare $H(0)=-1/12$.

Following the approach of [8], we obtain new class number formulas that are
relatives of classical results like the Hurwitz-Kronecker class number formula

$\sum_{|t|\leq 2\sqrt{N}}H(4N-t^{2})=\sum_{d\mid N}\max\\{d,N/d\\},$

which expresses sums of Hurwitz class numbers in terms of divisor sums. The
above specializes to

$\sum_{|t|\leq 2\sqrt{p}}H(4p-t^{2})=2p$

when $p$ is prime. Generalizations of the above were proven by Eichler and
Zagier, the latter achieved through the construction of a weight 3/2 non-
holomorphic Eisenstein series whose coefficients are Hurwitz class numbers
[4], [19]. More recently, Mertens [10] analyzed the holomorphic projection of
the Rankin-Cohen bracket of the Harmonic Maass form $\mathcal{H}(\tau)$ with
certain theta functions in order to obtain weighted class number formulas and
their asymptotics as $q\to\infty$. In [12] Saad, Saikia, and the second author
extended Mertens’ approach in their work on the Sato-Tate distribution for a
certain family of $K3$ surfaces.

Additionally, many more such identities were recently proven using the trace
formula and the combinatorics of $j$-invariants of elliptic curves over finite
fields [2].

Our addition to this area is the following:

######  Theorem 1.1.

Let $q=p^{r}\equiv 3\bmod{4}$ where $p>3$. The following sums are taken over
$t$ such that $|t|\leq 2\sqrt{q}$.

  1. (1)

If $q\equiv 3\bmod{8}$, then we have

$q=3+4\sum_{\begin{subarray}{c}(t,q)=1\\\ t\equiv
q+1(8)\end{subarray}}H\left(\frac{4q-t^{2}}{4}\right).$

  2. (2)

If $q\equiv 7\bmod{8}$, then we have

$q=3+4\cdot\Bigg{[}h(-q)+\sum_{\begin{subarray}{c}(t,q)=1\\\ t\equiv
q+1(8)\end{subarray}}H\left(\frac{4q-t^{2}}{4}\right)\Bigg{]}.$

######  Remark 1.2.

The expressions in the two cases of Theorem 1.1 have the same form for prime
$q$.

There are many questions one can immediately ask about
AGM${}_{\mathbb{F}_{q}}$ once the “jellyfish swarm” structure is known. For
example, how many jellyfish $\mathcal{J}_{i}$ appear in a swarm? How large do
we expect jellyfish to be?

Interestingly, these questions are not easily answered. To start, the number
of jellyfish varies greatly across prime powers $q$. For example, we give the
following table showing some values of $d(q)$, the number of jellyfish in
$\mathcal{J}_{\mathbb{F}_{q}}$:

$q$ | 7 | 11 | 19 | 23 | 31 | 43 | 47 | $\cdots$ | 191 | 199 | 211 | 223 | 227 | 239 | 251
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
$d(q)$ | 1 | 3 | 8 | 5 | 10 | 7 | 4 | $\cdots$ | 14 | 101 | 120 | 18 | 12 | 40 | 31

Figure 3: Selected values of $d(q)$ for prime $q$.

These questions are complicated by the fact that the sizes of jellyfish within
a single swarm can vary widely. For example, in the swarm
$\mathcal{J}_{\mathbb{F}_{11^{5}}}$, one has tiny jellyfish of size 10
alongside those of massive size 7500.

Despite this complicated behavior, the authors of [8] use the fact that the
trace of Frobenius is constant on a jellyfish to give a lower bound for $d(q)$
as a function of $q$, namely if $\varepsilon>0$ then for sufficiently large
$q$ we have

$d(q)\geq\left(\frac{1}{2}-\varepsilon\right)\sqrt{q}$

by counting the number of traces that must be obtained by curves in
$\mathcal{J}_{\mathbb{F}_{q}}$.

In addition to size considerations for $d(q)$, one can also ask about the
sizes of individual jellyfish. Here we show that these sizes are related to
the algebraic properties of the endomorphism rings $\text{End}(E)$ of elliptic
curves and their class groups (see Section 2 for background and definitions).
Using Theorem 1.1 and the theory of complex multiplication, we are able to
show the following:

######  Theorem 1.3.

Let $q=p^{r}\equiv 3\bmod{4}$ where $p>3$. Suppose $(a,b)$ satisfies the
conditions to appear in the AGM${}_{\mathbb{F}_{q}}$ graph on the jellyfish
$\mathcal{J}$, and let $\lambda:=b^{2}/a^{2}$. Let $\\#\mathcal{J}$ denote the
number of vertices in $\mathcal{J}$. If $\mathcal{O}:=\emph{End}(E_{\lambda})$
and $h_{2}(\mathcal{O})$ denotes the order of $[\mathfrak{p}_{2}]$ in
$cl(\mathcal{O})$, where $\mathfrak{p}_{2}$ is a prime above $(2)$ in
$\mathcal{O}$, then we have

$2\cdot h_{2}(\mathcal{O})\Bigm{|}\\#\mathcal{J}.$

Additionally, if $m(\mathcal{J})$ denotes the multiplicity with which a
jellyfish appears, then

$m(\mathcal{J})\cdot\\#\mathcal{J}=2(q-1)\cdot h_{2}(\mathcal{O}).$

######  Example 1.4.

We illustrate the theorem with $q=271$.

$\mathcal{J}$ | $t$ | $h(\mathcal{O})$ | $h_{2}(\mathcal{O})$ | $\\#\mathcal{J}$ | $m(\mathcal{J})$
---|---|---|---|---|---
$\mathcal{J}_{1}$ | $-32$ | 2 | 2 | $540$ | 2
$\mathcal{J}_{2}$ | $-24$ | 5 | 5 | $900$ | 3
$\mathcal{J}_{3}$ | $-16$ | 6 | 6 | $1620$ | 2
$\mathcal{J}_{4}$ | $-16$ | 3 | 3 | $810$ | 2
$\mathcal{J}_{5}$ | $-8$ | 12 | 6 | $1620$ | 2
$\mathcal{J}_{6}$ | $-8$ | 12 | 6 | $1620$ | 2
$\mathcal{J}_{7}$ | $0$ | 11 | 11 | $2970$ | 2
$\mathcal{J}_{8}$ | $8$ | 12 | 6 | $1620$ | 2
$\mathcal{J}_{9}$ | $8$ | 12 | 6 | $1620$ | 2
$\mathcal{J}_{10}$ | $16$ | 6 | 6 | $1620$ | 2
$\mathcal{J}_{11}$ | $16$ | 3 | 3 | $810$ | 2
$\mathcal{J}_{12}$ | $24$ | 5 | 5 | $2700$ | 1
$\mathcal{J}_{13}$ | $32$ | 2 | 2 | $108$ | 10

######  Remark 1.5.

While $\displaystyle{2\cdot h_{2}(\mathcal{O})\mid\\#\mathcal{J}}$, these two
numbers are in general unequal, as illustrated in the previous example. The
quantity $\displaystyle{\\#\mathcal{J}/2\cdot h_{2}(\mathcal{O})}$ is a
divisor of $q-1$ whose appearance we will explain in Section 3. For now, it
suffices to remark that it is not determined by the traces or endomorphism
rings of the elliptic curves comprising $\mathcal{J}$.

This paper is organized as follows. Section 2 will recall necessary background
from the theory of complex multiplication that will allow us to study vertices
and edges in $\mathcal{J}_{\mathbb{F}_{q}}$ using class groups. In Section 3,
we give background from [8] on the taxonomy of jellyfish. In particular, we
characterize the number of vertices in a swarm, as well as the multiplicity of
each isomorphism class of elliptic curves appearing on a jellyfish. In Section
4, we prove Theorems 1.1 and 1.3.

##  2\. Complex Multiplication

We first recall the classical theory of complex multiplication of elliptic
curves over $\mathbb{C}$ (for example, see Chapter 2 of [15]): Let
$\mathcal{O}$ be an order in an imaginary quadratic field. If $\mathfrak{a}$
is an invertible $\mathcal{O}$-ideal, then the torus $\mathbb{C}/\mathfrak{a}$
corresponds to an elliptic curve $E(\mathbb{C})$ with complex multiplication
by $\mathcal{O}$. Equivalent ideals correspond to isomorphic elliptic curves,
and we have a bijection between the ideal class group $cl(\mathcal{O})$ and
the set

$\text{Ell}_{\mathcal{O}}(\mathbb{C}):=\\{j(E/\mathbb{C})\mid\text{End}(E)\cong\mathcal{O}\\}$

of $j$-invariants of elliptic curves over $\mathbb{C}$ with complex
multiplication by $\mathcal{O}$.

Further, another invertible $\mathcal{O}$-ideal $\mathfrak{b}$ uniquely
determines a separable isogeny of degree $N(\mathfrak{b})$ with kernel

$E[\mathfrak{b}]:=\\{P\in E\mid\alpha\cdot P=O\text{ for all
}\alpha\in\mathfrak{b}\\}$

such that the target curve also has multiplication by $\mathcal{O}$. One can
check that principal ideals act trivially, and that this defines a faithful
$cl(\mathcal{O})$-action on $\text{Ell}_{\mathcal{O}}(\mathbb{C})$.

While this correspondence is pleasing, we are concerned with the case where
$\mathbb{C}$ is replaced by the finite field $\mathbb{F}_{q}$. It turns out
that the story in this setting is largely the same.

Let $E$ be an ordinary elliptic curve over $\mathbb{F}_{q}$, and let $\pi_{E}$
denote the Frobenius endomorphism of $E$. One may compute the trace of
Frobenius to be $t=q+1-\\#E$. Using the characteristic equation for $\pi_{E}$,
one has derives the norm equation

$t^{2}-4q=v^{2}D_{K},$

where $v^{2}D_{K}$ is the discriminant of the imaginary quadratic order
$\mathbb{Z}[\pi_{E}]$ and $D_{K}$ is the discriminant of its field of
fractions $K$. Then if $\mathcal{O}:=\text{End}(E/\mathbb{F}_{q})$, we have

$\mathbb{Z}[\pi_{E}]\subseteq\mathcal{O}\subseteq\mathcal{O}_{K},$

and $\mathcal{O}$ has discriminant $u^{2}D_{K}$, where
$u=[\mathcal{O}_{K}:\mathcal{O}]$ divides
$v=[\mathcal{O}_{K}:\mathbb{Z}[\pi_{E}]]$.

Now, consider the set

$\text{Ell}_{t}(\mathbb{F}_{q}):=\\{j(E/\mathbb{F}_{q})\mid\text{tr}(\pi_{E})=t\\}$

of $\overline{\mathbb{F}}_{q}$-isomorphism classes of elliptic curves over
$\mathbb{F}_{q}$ with trace of Frobenius $t$. Tate’s Isogeny Theorem [17]
implies that $\text{Ell}_{t}(\mathbb{F}_{q})$ determines an isogeny class.
Further, as $K$ is determined by $t$ and $q$, this set can be written as the
disjoint union

$\text{Ell}_{t}(\mathbb{F}_{q})=\bigsqcup_{\mathbb{Z}[\pi_{E}]\subseteq\mathcal{O}\subseteq\mathcal{O}_{K}}\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q}),$

where $\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q})$ is defined in the same way as
$\text{Ell}_{\mathcal{O}}(\mathbb{C})$. As a consequence of the Deuring
Lifting Theorem, the norm equation implies that over $\mathbb{F}_{q}[x]$, the
Hilbert class polynomial $H_{u^{2}D_{K}}(x)$ of degree $h(\mathcal{O})$ splits
completely and the roots are precisely the set
$\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q})$. Then so long as
$\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q})$ is nonempty, the set has
cardinality $h(\mathcal{O})$.

Recall the definition of the Hurwitz class number for an imaginary quadratic
order $\mathcal{O}$:

(2.1)
$H(\mathcal{O}):=\sum_{\mathcal{O}\subseteq\mathcal{O}^{\prime}\subseteq\mathcal{O}_{K}}h(\mathcal{O}^{\prime})$

If $D$ is the discriminant of $\mathcal{O}$, we may define
$H(D):=H(\mathcal{O})$. This agrees with the definition given earlier. From
the results above we immediately have that the cardinality of
$\text{Ell}_{t}(\mathbb{F}_{q})$ is equal to $H(t^{2}-4q)$.

As in the characteristic 0 case, we again have a faithful action of
$cl(\mathcal{O})$ on $\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q})$. What’s more,
if $\varphi\colon E\to E^{\prime}$ is an isogeny of degree $\ell$ such that
$\mathcal{O}:=\text{End}(E)=\text{End}(E^{\prime})$, then $\varphi$ resulted
from the action of an invertible $\mathcal{O}$-ideal $\mathfrak{l}$ of norm
$\ell$. This action is what will ultimately allow us to compare edges in
$\mathcal{J}_{\mathbb{F}_{q}}$ with elements of class groups.

##  3\. Taxonomy of Jellyfish

Here we give several necessary results on the structure of jellyfish swarms.
We first recall results from [8] about the vertices in a jellyfish swarm.

######  Theorem 3.1 (Theorems 1 (2) and 2 (1) of [8]).

The following are true.

  1. (1)

The jellyfish swarm $\mathcal{J}_{\mathbb{F}_{q}}$ has $(q-3)(q-1)/2$
vertices.

  2. (2)

Each $E_{\lambda}$ for $\lambda\in\mathbb{F}_{q}^{\times
2}\backslash\\{0,1\\}$ appears exactly $q-1$ times.

The proof of (1) counts the number of admissible pairs $(a,b)$, and the proof
of (2) relies on the fact that if $(a,b)$ corresponds to an elliptic curve
$E_{\lambda}$, then so does every pair $(ka,kb)$ for
$k\in\mathbb{F}_{q}^{\times}$.

The above imply that the number of distinct $\lambda$ that occur in
$\mathcal{J}_{\mathbb{F}_{q}}$ is $(q-3)/2$. However, we have alternative ways
of counting the $\lambda$ that appear using the tools developed in Section 3
of [8]. In particular, recall that the $j$-invariants parameterize
$\overline{\mathbb{F}}_{q}$-isomorphism classes of elliptic curves over
$\mathbb{F}_{q}$, and that a trace and $j$-invariant uniquely determine an
isomorphism class over $\mathbb{F}_{q}$. Further, if two elliptic curves have
the same $j$-invariant, then they are either isomorphic over $\mathbb{F}_{q}$
or they are nontrivial quadratic twists of one another, in which case their
traces differ by a sign. If we are able to count the possible traces and the
possible $j$-invariants corresponding to each trace, as well as the number of
distinct $\lambda$ corresponding to each $j$-invariant, we will be able to get
an alternative formula for the number of $\lambda$ which occur.

We first characterize the admissible traces of the elliptic curves
$E_{\lambda}$. By Lemma 2 of [8], one has that as an abelian group,
$\mathbb{Z}/2\mathbb{Z}\times\mathbb{Z}/4\mathbb{Z}\subseteq
E(\mathbb{F}_{q})$. Then $8\mid\\#E(\mathbb{F}_{q})$, and in particular
$t\equiv q+1\bmod 8$. We further know that every trace is represented so long
as the Hasse bound $|t|\leq 2\sqrt{q}$ is satisfied (see [3] or [13]).

Now we fix a trace $t$. Since $\text{Ell}_{t}(\mathbb{F}_{q})$ defines an
isogeny class, every elliptic curve on a jellyfish must have the same trace.
Then consider the set of jellyfish with trace $t$ and define
$M_{\mathbb{F}_{q}}(t)$ to be the number of distinct $j$-invariants across the
union of these jellyfish. The authors of [8] prove the following:

######  Theorem 3.2 (Theorem 6 of [8]).

Suppose $q\equiv 3\bmod{8}$ and $p>3$. If $|t|\leq 2\sqrt{q}$ such that
$(t,p)=1$ and $t\equiv q+1\bmod{8}$, then we have

$H\left(\frac{t^{2}-4q}{4}\right)=M_{\mathbb{F}_{q}}(t).$

The above is relies primarily on the correspondence between the number of
distinct $j$-invariants of elliptic curves with trace $t$ and the Hurwitz
class number $H(t^{2}-4q)$ discussed in Section 2 with the extra observation
that the removal of a factor of $2$ from the conductor $u$ is equivalent to
the requirement that $E[2]\subset E(\mathbb{F}_{q})$ [14], which must be
satisfied as all of our elliptic curves admit a Legendre normal form. Since
$q\equiv 3\bmod{4}$, one can also show that every elliptic curve over
$\mathbb{F}_{q}$ is of the form $E_{\lambda}$ for
$\lambda\in\mathbb{F}_{q}^{\times 2}\backslash\\{0,1\\}$ by 2-descent.

By the same arguments as that which prove Theorem 3.2, we get the following
for the ordinary traces when $q\equiv 7\bmod{8}$:

######  Theorem 3.3.

Suppose $q\equiv 7\bmod{8}$ and $p>3$. If $|t|\leq 2\sqrt{q}$ such that
$(t,p)=1$ and $t\equiv q+1\bmod{8}$, then we have

$H\left(\frac{t^{2}-4q}{4}\right)=M_{\mathbb{F}_{q}}(t)$

We now turn to the case where $E$ is supersingular (i.e. where $t=0$, as we
shall see). While we need to amend the correspondence to avoid orders whose
conductors are not coprime to $p$, we end up with a similar result:

######  Lemma 3.4.

Suppose $q\equiv 7\bmod{8}$ and $p>3$. Then we have
$h(-q)=M_{\mathbb{F}_{q}}(0)$.

###### Proof.

When $t=0$, the endomorphism ring of $E$ can be identified with an imaginary
quadratic order in $\mathbb{Q}(\pi_{E})$ with conductor prime to $p$ (Theorem
4.1, [18]) containing $\mathcal{O}(-q)$ (Proposition 3.7, [14]). Since $q$ is
a power of $p$, there is only one such order, $\mathcal{O}(-q)$ itself. ∎

Now, to justify our focus on these particular traces, we offer the following
classification of the traces of elliptic curves over $\mathbb{F}_{q}$:

######  Theorem 3.5 (Theorem 4.1 of [18]).

Let $q=p^{k}$ be a power of a prime $p$. Let $t\in\mathbb{Z}$ and let
$N=q+1-t$. The integer $N$ is the cardinality of $E(\mathbb{F}_{q})$ for some
elliptic curve $E/\mathbb{F}_{q}$ if and only if one of the following
conditions is satisfied:

  1. (1)

$|t|\leq 2\sqrt{q}$ and $(t,p)=1$;

  2. (2)

$k$ is odd and $t=0$;

  3. (3)

$k$ is odd, $t=\pm\sqrt{pq}$, and $p=2$ or 3;

  4. (4)

$k$ is even, $t=0$, $p\not\equiv 1\bmod{4}$;

  5. (5)

$k$ is even, $t=\pm\sqrt{q}$, $p\not\equiv 1\bmod{3}$;

  6. (6)

$k$ is even, $t=\pm 2\sqrt{q}$.

Since $q\equiv 3\bmod{4}$ and $p>3$, the only options are (1) and (2), meaning
the above completely classify the cases where $M_{\mathbb{F}_{q}}(t)$ can be
nonzero. Now that we have determined the number of $j$-invariants appearing in
$\mathcal{J}_{\mathbb{F}_{q}}$ using class numbers, we return to the question
of how many $\lambda$ correspond to a particular $j$. We offer the following
answer:

######  Lemma 3.6.

Let $L_{\mathbb{F}_{q}}(t,j)$ denote the number of distinct $\lambda$ such
that $E_{\lambda}$ has trace $t$ and $j$-invariant $j$. Then for all pairs
$(t,j)$ such that $L_{\mathbb{F}_{q}}(t,j)\neq 0$, we have
$L_{\mathbb{F}_{q}}(t,j)=2$.

###### Proof.

First fix $t$ and $j$ and recall that there are exactly six $\lambda$ in
$\overline{\mathbb{F}}_{q}\backslash\\{0,1\\}$ corresponding to each
$j$-invariant not equal to 0 or 1728 (see [16] Section III.1). What’s more,
given one such $\lambda$ we can find expressions for the other five by
considering the orbit of $\lambda$ under the group generated by the
transformations $\lambda\mapsto 1/\lambda$ and $\lambda\mapsto 1-\lambda$ on
$\mathbb{P}^{1}$. We can write this set as

$[\lambda]:=\\{\lambda,1/\lambda,1-\lambda,1/(1-\lambda),\lambda/(\lambda-1),(\lambda-1)/\lambda\\}.$

Now suppose that $\lambda\in\mathbb{F}_{q}^{\times 2}\backslash\\{1\\}$ and
that $E_{\lambda}$ has trace $t$ and $j$-invariant $j$. We first note that all
other elements of $[\lambda]$ are also in
$\mathbb{F}_{q}^{\times}\backslash\\{1\\}$. One also has that
$E_{\lambda}^{(-1)}\cong E_{1-\lambda}$ and $E_{1/\lambda}^{(-1)}\cong
E_{(\lambda-1)/\lambda}$. Since $-1$ is not a square, both of these are
nontrivial twists, and so do not have the same trace as $E_{\lambda}$. Then
the only contributions to $L_{\mathbb{F}_{q}}(t,j)$ are $E_{\lambda}$ and
$E_{1/\lambda}$.

Now we deal with the two exceptional cases. First, suppose $E_{\lambda}$ has
trace $t$ and satisfies $j(E_{\lambda})=0$. Then $\lambda$ satisfies
$\lambda^{2}-\lambda+1=0$ by the equation

$j(E_{\lambda})=2^{8}\frac{(\lambda^{2}-\lambda+1)^{3}}{\lambda^{2}(\lambda-1)^{2}}.$

Moreover, the other solution to $x^{2}-x+1=0$ is $1/\lambda$, so there are
exactly two Legendre elliptic curves with trace $t$ and $j$-invariant 0.

Finally, when $j(E_{\lambda})=1728$, we have that $\lambda\in\\{-1,2,1/2\\}$.
We know that $-1$ is not a sqaure in our setting, so either both $2$ and $1/2$
are squares or neither are. Thus, $L_{\mathbb{F}_{q}}(t,j)=0$ or 2. ∎

##  4\. Proofs of Theorems 1.1 and 1.3

###### Proof of Theorem 1.1.

We will demonstrate the argument for the case when $q\equiv 3\bmod{8}$. The
case when $q\equiv 7\bmod{8}$ is the same except for the care needed to deal
with the supersingular elliptic curves, for which one applies Lemma 3.4. In
this case, the theorem is equivalent to proving that

$\frac{(q-1)(q-3)}{2}=\sum_{\begin{subarray}{c}|t|\leq 2\sqrt{q}\\\ t\equiv
q+1(8)\end{subarray}}2(q-1)\cdot H\left(\frac{4q-t^{2}}{4}\right)$

The left hand side is the number of vertices in
$\mathcal{J}_{\mathbb{F}_{q}}$, so it suffices to show the right hand side is
also a count of the vertices in this graph. The sum runs over all the
admissible traces of elliptic curves in $\mathcal{J}_{\mathbb{F}_{q}}$, so it
suffices to show that each summand is the count of the number of vertices of
trace $t$. Fixing $t$, each $j$ invariant defines a curve up to
$\mathbb{F}_{q}$-isomorphism. The number of such $j$ is counted by
$H\left(\frac{t^{2}-4q}{4}\right)$ by Theorem 3.2. Corresponding to each
isomorphism class, there are exactly 2 such $\lambda$ by Lemma 3.6. Finally,
by Theorem 3.1 (2), each $\lambda$ appears in the graph with multiplicity
$q-1$. ∎

###### Proof of Theorem 1.2.

By Theorem 3 (2) of [8], every edge corresponds to the unique isogeny with
kernel generated by $\langle(0,0)\rangle$. In particular, this isogeny has
degree 2.

By Corollary 4 (1) of [8], all curves on a jellyfish are isomorphic as groups,
and so their endomorphism rings are all the same; call it $\mathcal{O}$. This
implies that this isogeny is the image of the class of an ideal
$\mathfrak{p}_{2}$ of norm 2 in $\mathcal{O}$ with
$E[\mathfrak{p}_{2}]=\langle(0,0)\rangle$. Since $E_{\lambda}$ and
$E_{1/\lambda}$ are isomorphic over $\mathbb{F}_{q}$, the edge emanating from
vertices corresponding to both of these curves must have the same target
curve. In particular, every tentacle vertex has a corresponding vertex in the
cycle with the same $j$-invariant. Thus, it suffices to consider the action of
$[\mathfrak{p}_{2}]$ on the cycles of the jellyfish with endomorphism ring
$\mathcal{O}$. Since this action is faithful and all $j$-invariants in
$\text{Ell}_{\mathcal{O}}(\mathbb{F}_{q})$ are represented on some cycle,
every cycle must have length divisible by the order of $[\mathfrak{p}_{2}]$ in
$cl(\mathcal{O})$. Reconsidering the tentacles merely doubles the number of
total nodes, hence the multiple of 2 in the statement of the theorem.

To see that $m(\mathcal{J})\cdot\\#\mathcal{J}=2(q-1)\cdot
h_{2}(\mathcal{O})$, note that the action of $[\mathfrak{p}_{2}]$ partitions
the set of vertices with $j$-invariants into
$[cl(\mathcal{O}):\langle[\mathfrak{p}_{2}]\rangle]$ subsets of size
$2(q-1)\cdot h_{2}(\mathcal{O})$ by Theorem 1.1. Now if $n$ is the order of
$[\mathfrak{p}_{2}]$ in $cl(\mathcal{O})$, then $[\mathfrak{p}_{2}^{n}]\cdot
E_{\lambda}=E_{\lambda}$, and so if $\lambda=b^{2}/a^{2}$, the $n$th pair in
the sequence of $\text{AGM}_{\mathbb{F}_{q}}(a,b)$ is $(ka,kb)$ for some $k$
in $\mathbb{F}_{q}^{\times}$. Then if $\text{ord}(k)$ denotes the
multiplicative order of $k$ in $\mathbb{F}_{q}$, each jellyfish must have size
$2\cdot h_{2}(\mathcal{O})\cdot\text{ord}(k)$ and multiplicity
$(q-1)/\text{ord}(k)$ by partitioning by the orbits of the action of $\langle
k\rangle$.

∎

## References

  * [1] J. M. Borwein and P. B. Borwein, _Pi and the AGM: A Study in the Analytic Number Theory and Computational Complexity_ , Wiley-Interscience, 1987.
  * [2] B. Brown, N. J. Calkin, T. B. Flowers, K. James, E. Smith, and A. Stout, _Elliptic curves, modular forms, and sums of Hurwitz class numbers_ , Journal of Number Theory 128 (2008), no. 6, 1847–1863.
  * [3] M. Deuring, _Die Typen der Multiplikatorenringe elliptischer Funktionenkörper_ , Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, vol. 14, Springer, 1941, pp. 197–272.
  * [4] M. Eichler, _On the class number of imaginary quadratic fields and the sums of divisors of natural numbers_ , J. Ind. Math. Soc 15 (1955), 153–180.
  * [5] R. Evans and J. Greene, _A quadratic hypergeometric ${}_{2}F_{1}$ transformation over finite fields_, Proceedings of the American Mathematical Society 145 (2017), no. 3, 1071–1076.
  * [6] M. Fouquet and F. Morain, _Isogeny volcanoes and the SEA algorithm_ , International Algorithmic Number Theory Symposium, Springer, 2002, pp. 276–291.
  * [7] J. Greene, _Hypergeometric functions over finite fields_ , Transactions of the American Mathematical Society 301 (1987), no. 1, 77–101.
  * [8] M. J. Griffin, K. Ono, N. Saikia, and W-L. Tsai, _AGM and jellyfish swarms of elliptic curves_ , The American Mathematical Monthly. DOI: 10.1080/00029890.2022.2160157 (2023).
  * [9] D. R. Kohel, _Endomorphism rings of elliptic curves over finite fields_ , University of California, Berkeley, 1996.
  * [10] M. H. Mertens, _Mock modular forms and class number relations_ , Research in the Mathematical Sciences 1 (2014), 1–16.
  * [11] K. Ono, _The Web of Modularity: Arithmetic of the Coefficients of Modular Forms and $q$-series_, no. 102, American Mathematical Soc., 2004\.
  * [12] K. Ono, H. Saad, and N. Saikia, _Distribution of values of Gaussian hypergeometric functions_ , Pure and Applied Mathematics Quarterly, accepted for publication. arXiv:2108.09560 (2021).
  * [13] H-G. Rück, _A note on elliptic curves over finite fields_ , Mathematics of Computation 49 (1987), no. 179, 301–304.
  * [14] R. Schoof, _Nonsingular plane cubic curves over finite fields_ , Journal of Combinatorial Theory, Series A 46 (1987), no. 2, 183–211.
  * [15] J. H. Silverman, _Advanced topics in the arithmetic of elliptic curves_ , vol. 151, Springer Science & Business Media, 1994.
  * [16] by same author, _The arithmetic of elliptic curves_ , vol. 106, Springer, 2009.
  * [17] J. Tate, _Endomorphisms of abelian varieties over finite fields_ , Inventiones mathematicae 2 (1966), no. 2, 134–144.
  * [18] W. C. Waterhouse, _Abelian varieties over finite fields_ , Annales scientifiques de l’École normale supérieure, vol. 2, 1969, pp. 521–560.
  * [19] D. Zagier, _Nombres de classes et formes modulaires de poids 3/2_ , Séminaire de Théorie des Nombres de Bordeaux 4 (1974), 1–2.