Generally speaking, I am interested in counting the number of $\mathbb{F}\_p$- isomorphism classes of elliptic curves containing a specific torsion subgroup, and I was wondering if there were any simple formulas for particular torsion subgroups. Any information on this topic is appreciated.


More specifically, I would like to count the number of $\mathbb{F\_p}$-isomorphism classes of elliptic curves whose torsion subgroup contains $\mathbb{Z}/N \times \mathbb{Z}/N$, where $N$ is a small fixed integer, for instance one for which the modular curve $X(N)$ has genus 0. 


I know that if you fix a prime $p$, and fix an isogeny class of such curves over $\mathbb{F}\_p$, then Schoof (in "Nonsingular plane cubic curves over finite fields") has formulas which express the number of isomorphism classes of these curves in the given isogeny class in terms of class numbers of certain quadratic extensions of the rationals. So, for example, summing these expressions over all possible isogeny classes is an answer to the question. However, I don't know of any easy way to compute this sum of class numbers, and it seems that such a sum could potentially be expressed more simply.


Also, Schoof's result holds for all $N$, and I thought it might be possible for smaller $N>1$'s that things simplified a bit.


Thanks for the help!



Counting isomorphism classes of elliptic curves with specific torsion
$\newcommand\F{\mathbf{F}}$
$\newcommand\Z{\mathbf{Z}}$
$\newcommand\SL{\mathrm{SL}}$


Because of the existence of the Weil paring, 
elliptic curves with such a subgroup only exist when
$p \equiv 1 \mod \ N$. 


Let $S\_N$ denote the set of elliptic curves over $\F\_p$ such
that $E[N]$ is defined over $\F\_p$.
It will be slightly easier to assume that $N \ge 3$. In this case,
$Y(N)$ is a fine moduli space, and an $\F\_p$-point on $Y(N)$
corresponds to 
a pair $(E,\alpha:E[N] \simeq \Z/N\Z \times \Z/N \Z)$ defined over
$\F\_p$. Given an elliptic curve $E \in S\_N$,
how many points does it contribute to $Y(N)$? For a curve $E$
whose automorphism group is $\Z/2\Z$, We see that out of
the $|\SL\_2(\Z/N\Z)|$ possible choices of $\alpha$
(technical remark, we have fixed a Weil pairing so that $Y(N)$ is
connected), $(E,\alpha) \simeq (E,\alpha')$ only if $\alpha' = \alpha$
or $\alpha' = [-1] \alpha$. Thus
$E$ contributes $|\SL\_2(\Z/N\Z)|/2$ points to $Y(N)(\F\_p)$.
 In general, $E$ may have slightly more
automorphisms, and we deduce that (for $N \ge 3$):
$$|Y(N)(\F\_p)| = |\SL\_2(\Z/N\Z)| \sum\_{E \in S\_N}
\frac{1}{|\mathrm{Aut}(E)|}.$$
Note that the quantity on the right is very close to 
$|\SL\_2(\Z/N\Z)| \cdot |S\_N|/2$, one only has to worry about the
elliptic curves with $j = 0$ or $j = 1728$, and this can be done by hand
if one wants to cross all the i's and dot all the t's. 


Suppose that $X(N)$ has $c\_N$ cusps and genus $g\_N$ (there are some
explicit slightly unpleasant formulas for these numbers, which can
be found (for example) in Shimura's book. All the cusps
are defined over $\F\_p$ (with $p \equiv 1 \mod N$) so by the
Riemann hypothesis for finite fields, 
$$|Y(N)(\F\_p) - (1+p) + c\_N| = |X(N)(\F\_p) - (1+p)| \le
2 g\_N \sqrt{p}.$$
If $g\_N = 0$ (which only happens if $N \le 5$), this leads to an 
exact formula for $|S\_N|$.
In general, at least for large $p$, we see that
$$|S\_N| \sim \frac{2p}{|\SL\_2(\Z/N \Z)|}.$$


To make this all completely explicit for $N = 3$ (for example),
one gets, presuming I have not made a horrible computational error which is quite possible:
$$S\_3 = \begin{cases} (p+11)/12, & p \equiv 1 \mod \ 12, \\\
(p+5)/12, & p \equiv 7 \mod \ 12. \end{cases}$$
 (note that $p \equiv 1 \mod 3$):


Of course, "exact formulas" will only exist for $N \le 5$.
Some related and slightly more difficult counting problems are also
nicely explained by Lenstra here (See 1.10):


<https://openaccess.leidenuniv.nl/bitstream/1887/3826/1/346_086.pdf>


