1 Introduction

Let d be a positive integer such that \(-d\) is congruent to 0 or 1 modulo 4, and \(\mathcal {Q}_d\) the set of positive definite binary quadratic forms \(Q(X,Y) = [a,b,c] := aX^2+bXY+cY^2\ (a,b,c \in \mathbb {Z})\) of discriminant \(-d\). The group \(\mathrm {SL}_2(\mathbb {Z})\) acts on \(\mathcal {Q}_d\) by \(Q \circ \left[ \begin{matrix}\alpha &{} \beta \\ \gamma &{} \delta \end{matrix}\right] = Q(\alpha X + \beta Y, \gamma X + \delta Y)\). For each \(Q \in \mathcal {Q}_d\), we define the corresponding CM point \(\alpha _Q\) as the unique root in the upper half-plane \(\mathfrak {H}\) of \(Q(X,1)=0\). We write \(\Gamma _Q\) for the stabilizer of Q in a group \(\Gamma \). Let \(j(\tau )\) (\(\tau \in \mathfrak {H}\)) be the elliptic modular function with Fourier expansion

$$\begin{aligned} j(\tau ) = \frac{1}{q} + 744 + 196884q + 21493760q^2 + 864299970q^3+ \cdots , \end{aligned}$$

where \(q := e^{2\pi i \tau }\). For a positive integer m, let \(\varphi _m(j)\) be the unique polynomial in j satisfying \(\varphi _m(j(\tau )) = q^{-m}+O(q)\). For each m, we define the modular trace function by

$$\begin{aligned} \mathbf t _m(d) := \sum _{Q \in \mathcal {Q}_d/\mathrm {SL}_2(\mathbb {Z})}\frac{1}{|\mathrm {PSL}_2 (\mathbb {Z})_Q|}\varphi _m(j(\alpha _Q)). \end{aligned}$$

Zagier [13, Theorem 1, 5] showed that the generating function

$$\begin{aligned} g_m(\tau ) := \sum _{\begin{array}{c} d>0 \\ -d \equiv 0, 1 (4) \end{array}} \mathbf t _m(d)q^d + 2\sigma _1(m) - \sum _{\kappa | m} \kappa q^{-\kappa ^2} \end{aligned}$$
(1.1)

is a weakly holomorphic modular form of weight 3 / 2 for the congruence subgroup \(\Gamma _0(4)\), where \(\sigma _1(n) := \sum _{d|n}d\). By virtue of this theorem, Kaneko [6] established an identity among modular forms of weight 2,

$$\begin{aligned} \frac{1}{2\pi i}\frac{d}{d\tau } j(\tau ) = \frac{1}{2}((g_2 \theta _0)|U_4)(\tau ), \end{aligned}$$

where \(\theta _0(\tau ) := \sum _{r \in \mathbb {Z}} q^{r^2}\), and \(U_t\) is the operator \(\sum a_n q^n \mapsto \sum a_{tn} q^n\) preserving modularity. In particular, the Fourier coefficients on both sides coincide. Let \(c_n\) be the nth Fourier coefficient of \(\varphi _1(j(\tau )) = j(\tau )-744\), then we have

$$\begin{aligned} 2n c_n = \sum _{r \in \mathbb {Z}} \mathbf t _2(4n-r^2) \end{aligned}$$
(1.2)

for any \(n \ge -1\) where \(\mathbf t _2(0)=6\), \(\mathbf t _2(-1)=-1\), \(\mathbf t _2(-4)=-2\), and \(\mathbf t _2(d)=0\) for all other negative d. Note that this sum is finite.

On the other hand, the Fourier coefficients of the j-function are related to the degrees of irreducible representations of the Monster group \(\mathbb {M}\), the largest of the sporadic simple groups. This is known as monstrous moonshine. The first few observations are

$$\begin{aligned} c_1= & {} 196884 = 1 + 196883,\\ c_2= & {} 21493760 = 1+ 196883 + 21296876,\\ c_3= & {} 864299970 = 2 \times 1 + 2 \times 196883 + 21296876 + 842609326, \end{aligned}$$

where the sequence \(\{1,\ 196883,\ 21296876,\ 842609326,\ \ldots \}\) consists of degrees of irreducible representations of the Monster group. Conway and Norton [4] formulated the monstrous moonshine conjecture as follows.

  • There exists a graded infinite-dimensional \(\mathbb {M}\)-module

    $$\begin{aligned} V^{\natural } = \bigoplus _{n=-1}^{\infty } V_n^{\natural } \end{aligned}$$

    which satisfies \(\mathrm {dim}V_n^{\natural } = c_n\) for \(n \ge -1\). It is called the monster module.

  • For each \(g \in \mathbb {M}\), we define the McKay–Thompson series

    $$\begin{aligned} T_g(\tau ) := \sum _{n=-1}^{\infty } \mathrm {Tr}(g|V_n^{\natural }) q^n. \end{aligned}$$

    Then there exists a genus 0 subgroup \(\Gamma _g \subset \mathrm {SL}_2(\mathbb {R})\) such that \(T_g(\tau )\) is a hauptmodul on \(\Gamma _g\). In other words, The fields \(A_0(\Gamma _g)\) of modular functions on \(\Gamma _g\) is generated by \(T_g\), that is, \(A_0(\Gamma _g)=\mathbb {C}(T_g)\).

In 1992, Borcherds [1] proved this conjecture.

Remark

  1. (i)

    For the identity element \(e \in \mathbb {M}\), we have \(T_e(\tau ) = j(\tau ) - 744\).

  2. (ii)

    For other McKay–Thompson series, similar connections are observed (see [10, Section 7.3: More Monstrous Moonshine]). For instance, the Fourier coefficients of

    $$\begin{aligned} T_{2A}(\tau ) := \frac{1}{q} + 4372q + 96256q^2 + 1240002q^3 + \cdots \end{aligned}$$

    can be expressed in terms of the degrees of irreducible representations of the Baby Monster group, that is, \(4372 = 1+ 4371\), \(96256 = 1 + 96255\), \(1240002 = 2 \times 1 + 4371 + 96255 + 1139374,\ \dots \), where the sequence \(\{1,\ 4371,\ 96255,\ 1139374,\ \ldots \}\) consists of degrees of irreducible representations of the Baby Monster group.

In this paper, we are concerned with the analogues of Kaneko’s formula (1.2) for the McKay–Thompson series of level N such that N is a square-free integer and the genus of the congruence subgroup \(\Gamma _0(N)\) is 0, that is, N = 2, 3, 5, 6, 7, 10, and 13 (Kaneko’s result is the case of \(N=1\)). For these N, let \(\Gamma _0^*(N)\) be the Fricke group, which is generated by \(\Gamma _0(N)\) and all Atkin-Lehner involutions \(W_e\) for e such that e|N and \((e, N/e)=1\). Here \(W_e\) is a matrix of the form \(\frac{1}{\sqrt{e}} \left[ \begin{matrix}xe &{} y \\ zN &{} we \end{matrix}\right] \) with \(\mathrm {det}W_e = 1\) and \(x, y, z, w\in \mathbb {Z}\). Let d be a positive integer such that \(-d\) is congruent to a square modulo 4N. We denote by \(\mathcal {Q}_{d, N} := \{[a,b,c] \in \mathcal {Q}_d\ |\ a \equiv 0 \pmod {N} \}\) on which \(\Gamma _0^*(N)\) acts. Moreover, we fix an integer \(h \pmod {2N}\) with \(h^2 \equiv -d \pmod {4N}\) and denote by \(\mathcal {Q}_{d,N,h} := \{ [a,b,c] \in \mathcal {Q}_{d,N}\ |\ b \equiv h \pmod {2N} \}\) on which \(\Gamma _0(N)\) acts. For genus zero groups \(\Gamma _0(N)\) and \(\Gamma _0^*(N)\), the corresponding hauptmoduln \(j_N(\tau )\) and \(j_N^*(\tau )\) can be described by means of the Dedekind \(\eta \)-function \(\eta (\tau ) := q^{1/24} \prod _{n=1}^{\infty } (1-q^n)\),

$$\begin{aligned} j_p(\tau )= & {} T_{pB}(\tau ) = \biggl ( \frac{\eta (\tau )}{\eta (p\tau )} \biggr )^{\frac{24}{p-1}} + \frac{24}{p-1}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (N = p = 2, 3, 5, 7, 13),\\ j_p^*(\tau )= & {} T_{pA}(\tau ) = \biggl ( \frac{\eta (\tau )}{\eta (p\tau )} \biggr )^{\frac{24}{p-1}} + \frac{24}{p-1} + p^{\frac{12}{p-1}}\biggl ( \frac{\eta (p\tau )}{\eta (\tau )} \biggr )^{\frac{24}{p-1}} \ \ (N = p = 2, 3, 5, 7, 13),\\ j_6(\tau )= & {} T_{6E}(\tau ) = \biggl (\frac{\eta (2\tau )\eta (3\tau )^3}{\eta (\tau )\eta (6\tau )^3} \biggr )^3-3,\\ j_6^*(\tau )= & {} T_{6A}(\tau ) = \biggl (\frac{\eta (\tau )\eta (3\tau )}{\eta (2\tau )\eta (6\tau )} \biggr )^6 + 6 +2^6\biggl ( \frac{\eta (2\tau )\eta (6\tau )}{\eta (\tau )\eta (3\tau )} \biggr )^6,\\ j_{10}(\tau )= & {} T_{10E}(\tau ) = \biggl (\frac{\eta (2\tau )\eta (5\tau )^5}{\eta (\tau )\eta (10\tau )^5} \biggr )-1,\\ j_{10}^*(\tau )= & {} T_{10A}(\tau ) = \biggl (\frac{\eta (\tau )\eta (5\tau )}{\eta (2\tau )\eta (10\tau )} \biggr )^4 + 4 +2^4\biggl ( \frac{\eta (2\tau )\eta (10\tau )}{\eta (\tau )\eta (5\tau )} \biggr )^4. \end{aligned}$$

For a weakly holomorphic modular function f on \(\Gamma _0(N)\), we define a modular trace function by

$$\begin{aligned} \mathbf t _f^{(h)}(d) := \sum _{Q \in \mathcal {Q}_{d,N,h}/\Gamma _0(N)} \frac{1}{|\overline{\Gamma _0(N)}_Q|}f(\alpha _Q), \end{aligned}$$

and for a weakly holomorphic modular function f on \(\Gamma _0^*(N)\), we define another trace function by

$$\begin{aligned} \mathbf t _f^*(d) := \sum _{Q \in \mathcal {Q}_{d,N}/\Gamma _0^*(N)} \frac{1}{|\overline{\Gamma _0^*(N)}_Q|}f(\alpha _Q), \end{aligned}$$

where \(\overline{\Gamma } := \Gamma /\{\pm I\}\). Note that \(\mathbf t _f^{(h)}(d)\) is independent of the choice of h for above N in the particular case of \(f \in A_0(\Gamma _0^*(N))\), then we can write \(\mathbf t _f(d) = \mathbf t _f^{(h)}(d)\) simply. Moreover in the special case of \(f = \varphi _m(j_N^*)\), it is the unique polynomial in \(j_N^*\) satisfying \(\varphi _m(j_N^*(\tau )) = q^{-m} + O(q)\), we put \(\mathbf t _m^{(N)}(d) := \mathbf t _f(d)\) and \(\mathbf t _m^{(N*)}(d) := \mathbf t _f^*(d)\). Ohta [12] and the author and Osanai [11] obtained the analogues of Kaneko’s formula (1.2) in the cases of \(N = p =\) 2, 3, and 5, first found experimentally, and then showed the coincidence of q-series by using the Riemann-Roch theorem. In the present paper, we use the theory of Jacobi forms to generalize (1.2). Let \(c_n^{(N)}\) and \(c_n^{(N*)}\) be the nth Fourier coefficients of \(j_N(\tau )\) and \(j_N^*(\tau )\), respectively.

Theorem 1.1

For any \(n \ge -1\), we have

$$\begin{aligned} 2nc_n^{(p)}= & {} \sum _{r \in \mathbb {Z}} \mathbf t _2^{(p*)}(4n-r^2) + \frac{24(3-p \sigma _1(2/p))}{p-1} \sigma _1^{(p)}(n) \ \ \ \ \ \ \ (p = 2, 3, 5, 7, 13),\\ 2nc_n^{(6)}= & {} \sum _{r \in \mathbb {Z}} \mathbf t _2^{(6*)}(4n-r^2) + 7\sigma _1^{(6)}(n) + 26\sigma _1^{(3)}(n/2) - 3\sigma _1^{(2)}(n/3),\\ 2nc_n^{(10)}= & {} \sum _{r \in \mathbb {Z}} \mathbf t _2^{(10*)}(4n-r^2) + 4\sigma _1^{(10)}(n) + 12\sigma _1^{(5)}(n/2),\\ 2nc_n^{(p*)}= & {} \sum _{r \in \mathbb {Z}} \Biggl \{ \mathbf t _2^{(p*)}(4n-r^2) - \mathbf t _2^{(p*)}(4pn-r^2)\Biggr \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (p = 2, 3, 5, 7, 13),\\ 2nc_n^{(p_1p_2*)}= & {} \sum _{r \in \mathbb {Z}} \Biggl \{ \mathbf t _2^{(p_1p_2*)}(4n-r^2) - \mathbf t _2^{(p_1p_2*)}(4p_1n-r^2)\\&\ \ \ \ \ \ \ \ \ \ -\mathbf t _2^{(p_1p_2*)}(4p_2n-r^2) + \mathbf t _2^{(p_1p_2*)}(4p_1p_2n-r^2)\Biggr \}\ \ (p_1p_2 = 6, 10), \end{aligned}$$

where \(\sigma _1^{(N)}(n) := \sum _{\begin{array}{c} d|n \\ d \not \equiv 0 (N) \end{array}} d\) for a positive integer n. If \(x \not \in \mathbb {Z}_{\ge 0}\), the value of \(\sigma _1^{(N)}(x)\) is 0, and we put \(\sigma _1^{(N)}(0) := (N-1)/24\). Furthermore, we define additional values as follows,

$$\begin{aligned} \mathbf t _2^{(N*)}(0) := \left\{ \begin{array}{ll}5\ \ \ \ \ N=2, \\ 3\ \ \ \ \ N=3,5,7,13, \\ 5/2\ \ N=6,10,\end{array}\right. \ \mathbf t _2^{(N*)}(-1) := -1,\ \mathbf t _2^{(N*)}(-4) := -2, \end{aligned}$$

and \(\mathbf t _2^{(N*)}(d):=0\) for other negative d.

Remark

By virtue of relations between \(\mathbf t _1^{(N*)}(d)\) and \(\mathbf t _2^{(N*)}(d)\), (see [6, 7], and [13]), these formulas can be interpreted as the sum of \(\mathbf t _1^{(N*)}(d)\).

The outline of this paper is as follows. In Sections 2 and 3, we give a review of the theory of Jacobi forms [5] and the work of Bruinier and Funke [2]. In Section 4 we prove Theorem 1.1.

2 The theory of Jacobi forms

In this section, we follow the expositions in [5]. Let k and m be integers. For a function \(\phi : \mathfrak {H} \times \mathbb {C} \rightarrow \mathbb {C}\), we define slash operators by

$$\begin{aligned} \biggl ( \phi |_{k,m} \left[ \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right] \biggr ) (\tau , z):= & {} (c\tau + d)^{-k} e^{-2\pi i m \frac{cz^2}{c\tau + d}} \phi \biggl (\frac{a\tau +b}{c\tau +d}, \frac{z}{c\tau +d} \biggr ),\ \ \ \left[ \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right] \in \mathrm {SL}_2(\mathbb {Z}),\\ (\phi |_m [\lambda \ \mu ])(\tau , z):= & {} e^{2\pi i m(\lambda ^2\tau + 2\lambda z)} \phi (\tau , z + \lambda \tau + \mu ),\ \ \ [\lambda \ \mu ] \in \mathbb {Z}^2. \end{aligned}$$

A weak Jacobi form of weight k and index m is a holomorphic function \(\phi : \mathfrak {H} \times \mathbb {C} \rightarrow \mathbb {C}\) satisfying

  • \(\phi |_{k,m} M = \phi \ \ (M \in \mathrm {SL}_2(\mathbb {Z}))\),

  • \(\phi |_m X = \phi \ \ (X \in \mathbb {Z}^2)\),

  • \(\phi \) has a Fourier expansion of the form

    $$\begin{aligned} \phi (\tau ,z) = \sum _{\begin{array}{c} n \ge 0\\ r\in \mathbb {Z} \end{array}} c(n,r) q^n \zeta ^r,\ \ (q := e^{2\pi i \tau }, \quad \ \zeta := e^{2\pi i z}), \end{aligned}$$

where the coefficients c(nr) depend only on the value of \(4mn-r^2\) and on the class of \(r \pmod {2m}\), that is, we can write as \(c(n,r) = c_r(4mn-r^2)\), and it holds \(c_{r'}(D) = c_r(D)\ \ (r' \equiv r\pmod {2m})\). This property gives us coefficients \(c_{\mu }(D)\) for all \(\mu \in \mathbb {Z}/2m\mathbb {Z}\) and all integers D satisfying \(D \equiv -\mu ^2 \pmod {4m}\), namely

$$\begin{aligned} c_{\mu }(D) := c\biggl ( \frac{D+r^2}{4m}, r\biggr ),\quad \ \ (r \in \mathbb {Z},\ r \equiv \mu \ (\mathrm {mod}\ 2m)). \end{aligned}$$

For \(D \not \equiv -\mu ^2 \pmod {4m}\), we define \(c_{\mu }(D) =0\), and set

$$\begin{aligned} h_{\mu }(\tau ) := \sum _{D \gg -\infty } c_{\mu }(D) q^{D/4m},\quad \ (\mu \in \mathbb {Z}/2m\mathbb {Z}). \end{aligned}$$

In addition, we put the theta functions

$$\begin{aligned} \vartheta _{m, \mu }(\tau , z) := \sum _{\begin{array}{c} r\in \mathbb {Z} \\ r \equiv \mu \ (\mathrm {mod}\ 2m) \end{array}} q^{r^2/4m}\zeta ^r,\quad \ (\mu \in \mathbb {Z}/2m\mathbb {Z}), \end{aligned}$$

then \(\phi \) has the following decomposition;

$$\begin{aligned} \phi (\tau ,z) = \sum _{\mu = 0}^{2m-1} h_{\mu }(\tau ) \vartheta _{m,\mu }(\tau ,z). \end{aligned}$$
(2.1)

According to [5, Section 5], \(h_{\mu }\) and \(\vartheta _{m,\mu }\) satisfy the following transformation laws;

$$\begin{aligned} h_{\mu }(\tau +1)= & {} e^{-2\pi i \frac{\mu ^2}{4m}} h_{\mu }(\tau ),\nonumber \\ h_{\mu }\bigl (-\frac{1}{\tau }\bigr )= & {} \frac{\tau ^k}{\sqrt{2m\tau /i}} \sum _{\nu =0}^{2m-1} e^{2\pi i \frac{\mu \nu }{2m}} h_{\nu }(\tau ),\nonumber \\ \vartheta _{m,\mu }(\tau +1,z)= & {} e^{2\pi i \frac{\mu ^2}{4m}}\vartheta _{m,\mu }(\tau ,z),\nonumber \\ \vartheta _{m,\mu }\bigl (-\frac{1}{\tau }, \frac{z}{\tau }\bigr )= & {} \sqrt{\tau /2m i}\ e^{2\pi i m z^2/\tau } \sum _{\nu =0}^{2m-1} e^{-2\pi i\frac{\mu \nu }{2m}} \vartheta _{m,\nu }(\tau ,z). \end{aligned}$$
(2.2)

Moreover we have

Theorem 2.1

[5, Theorem 5.1] The decomposition (2.1) gives an isomorphism between the space of weak Jacobi forms of weight k and index m and the space of vector valued modular forms \((h_{\mu })_{\mu \pmod {2m}}\) on \(\mathrm {SL}_2(\mathbb {Z})\) satisfying the above transformation laws and some cusp conditions.

Finally, we show an easy lemma for a proof of Theorem 1.1.

Lemma 2.2

Let \(\phi (\tau ,z)\) be a weak Jacobi form of even weight k and index m. Then the map

$$\begin{aligned} \phi (\tau ,z) \mapsto \tilde{\phi }(\tau ):=\tau ^{-k} \sum _{\ell = 0}^{m-1} \phi \Bigl (-\frac{1}{m\tau }, \frac{\ell }{m}\Bigr ) \end{aligned}$$

sends a weak Jacobi form to a weakly holomorphic modular form of weight k on \(\Gamma _0(m)\).

Proof

First, for any \(\left[ \begin{array}{ll}a &{} b \\ c &{} d \end{array}\right] \in \Gamma _0(m)\), we can easily see that

$$\begin{aligned} \left( \sum _{\ell =0}^{m-1}\phi \Bigl (\tau , \frac{\ell }{m}\Bigr )\right) \Bigg |_k\left[ \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right] = \left( \sum _{\ell =0}^{m-1}\phi \Big |_m \left[ \frac{c\ell }{m}\ \ 0\right] \right) \Bigl (\tau ,\frac{d\ell }{m}\Bigr ) = \sum _{\ell =0}^{m-1}\phi \Bigl (\tau , \frac{\ell }{m}\Bigr ). \end{aligned}$$

Next we check for any \(\left[ \begin{matrix}a &{} b \\ c &{} d \end{matrix}\right] \in \Gamma _0(m)\),

$$\begin{aligned} \Biggl (\tau ^{-k} \sum _{\ell = 0}^{m-1} \phi \Bigl (-\frac{1}{m\tau }, \frac{\ell }{m}\Bigr )\Biggr ) \Bigg |_k \left[ \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right]= & {} m^{k/2}\Biggl (\sum _{\ell = 0}^{m-1} \phi \Bigl (\tau , \frac{\ell }{m}\Bigr )\Biggr ) \Bigg |_k \left[ \begin{array}{cc}0 &{} -1/m \\ 1 &{} 0 \end{array}\right] \left[ \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right] \\= & {} m^{k/2}\Biggl (\sum _{\ell = 0}^{m-1} \phi \Bigl (\tau , \frac{\ell }{m}\Bigr )\Biggr ) \Bigg |_k\left[ \begin{array}{cc}-d &{} c/m \\ mb &{} -a \end{array}\right] \left[ \begin{array}{cc}0 &{} 1/m \\ -1 &{} 0 \end{array}\right] \\= & {} \tau ^{-k} \sum _{\ell = 0}^{m-1} \phi \Bigl (-\frac{1}{m\tau }, \frac{\ell }{m}\Bigr ). \end{aligned}$$

\(\square \)

3 Bruinier and Funke’s work

In this section, we give a review of Bruinier and Funke’s work [2] and Kim’s result [9].

3.1 Preliminaries

Let N be a square-free positive integer and V a rational vector space of dimension 3 given by

$$\begin{aligned} V(\mathbb {Q}) := \Biggl \{ X = \left[ \begin{array}{cc}x_1 &{} x_2 \\ x_3 &{} -x_1 \end{array}\right] \in M_2(\mathbb {Q}) \Biggr \} \end{aligned}$$

with a non-degenerate symmetric bilinear form \((X, Y) := -N\cdot \mathrm {tr}(XY)\). We write \(q(X) := N \cdot \mathrm {det}(X)\) for the associated quadratic form. We fix an orientation for V once and for all. The action of \(G(\mathbb {Q}) := Spin(V) \simeq SL_2(\mathbb {Q})\) on V is given as a conjugation, namely

$$\begin{aligned} g.X := gXg^{-1} \end{aligned}$$

for \(X \in V\) and \(g \in G(\mathbb {Q})\). Let D be the orthogonal symmetric space defined by

$$\begin{aligned} D := \{ \mathrm {span}(X) \subset V(\mathbb {R})\ |\ q(X)>0 \}. \end{aligned}$$

For each line \(z = \mathrm {span}\left( \left[ \begin{matrix}x_1 &{} x_2 \\ -1 &{} -x_1 \end{matrix}\right] \right) \in D\), we can define an element in \(\mathfrak {H}\) by \(\tau = -x_1 + i\sqrt{x_2-x_1^2}\). In particular, this is a bijective map and preserves \(G(\mathbb {Q})\)-action, that is, this map sends \(g.z := \mathrm {span}\left( g. \left[ \begin{matrix}x_1 &{} x_2 \\ -1 &{} -x_1 \end{matrix}\right] \right) \) to \(g\tau \) for any \(g \in G(\mathbb {Q})\). The image of \(\tau \) under the inverse map is given by \(\mathrm {span}(X(\tau ))\) where

$$\begin{aligned} X(\tau ) = \left[ \begin{array}{cc}-(\tau +\overline{\tau })/2 &{} \tau \overline{\tau } \\ -1 &{} (\tau +\overline{\tau })/2 \end{array}\right] . \end{aligned}$$

Let \(L \subset V(\mathbb {Q})\) be an even lattice of full rank and \(L^\#\) the dual lattice of L defined by \(L^\# := \{X \in V(\mathbb {Q})\ |\ (X, Y) \in \mathbb {Z},\ ^{\forall }Y \in L\}.\) Let \(\Gamma \) be a congruence subgroup of \(\mathrm {Spin}(L)\) which preserves L and acts trivially on the discriminant group \(L^\#/L\). The set \(\mathrm {Iso}(V)\) of all isotropic lines in \(V(\mathbb {Q})\) corresponds to \(P^1(\mathbb {Q}) = \mathbb {Q} \cup \{\infty \}\) via the bijection

$$\begin{aligned} \psi : P^1(\mathbb {Q}) \ni (\alpha : \beta ) \mapsto \mathrm {span}\Biggl (\left[ \begin{array}{cc}-\alpha \beta &{} \alpha ^2 \\ -\beta ^2 &{} \alpha \beta \end{array}\right] \Biggr ) \in \mathrm {Iso}(V). \end{aligned}$$

In particular, we put the isotropic line \(\ell _{\infty } := \psi (\infty ) = \mathrm {span} ([{\begin{matrix}0 &{} 1 \\ 0 &{} 0 \end{matrix}}])\). We orient all lines \(\ell \in \mathrm {Iso}(V)\) by requiring that \(\sigma _{\ell }.[{\begin{matrix}0 &{} 1 \\ 0 &{} 0 \end{matrix}}]\) to be a positively oriented basis vector of \(\ell \), where we pick \(\sigma _{\ell } \in \mathrm {SL}_2(\mathbb {Z})\) such that \(\sigma _{\ell }. \ell _{\infty } = \ell \). For each \(\ell \in \mathrm {Iso}(V)\), we define three positive rational numbers \(\alpha _{\ell }\) , \(\beta _{\ell }\), and \(\varepsilon _{\ell }\). First, we pick \(\alpha _{\ell } \in \mathbb {Q}_{>0}\) as the width of the cusp \(\ell \), that is,

$$\begin{aligned} \sigma _{\ell }^{-1}\Gamma _{\ell }\sigma _{\ell } = \Biggl \{ \pm \left[ \begin{array}{cc}1 &{} k \alpha _{\ell } \\ 0 &{} 1 \end{array}\right] \ \Bigg |\ k \in \mathbb {Z} \Biggr \}, \end{aligned}$$

where \(\Gamma _{\ell }\) is the stabilizer of the line \(\ell \) in \(\Gamma \). Next, we pick a positively oriented vector \(Y \in V(\mathbb {Q})\) such that \(\ell = \mathrm {span}(Y)\) and Y is primitive in L. Then we define \(\beta _{\ell } \in \mathbb {Q}_{>0}\) by \(\sigma _{\ell }^{-1}.Y =\left[ {\begin{matrix}0 &{} \beta _{\ell } \\ 0 &{} 0 \end{matrix}}\right] .\) Finally, we put \(\varepsilon _{\ell } = \alpha _{\ell }/\beta _{\ell }\). Note that the quantities \(\alpha _{\ell }\) , \(\beta _{\ell }\), and \(\varepsilon _{\ell }\) depend only on the \(\Gamma \)-class of \(\ell \).

Let \(M:= \Gamma \backslash D\) be the modular curve. For \(X \in V(\mathbb {Q})\) with \(q(X)>0\), we define the Heegner point in M by \(D_X := \mathrm {span}(X) \in D\), which corresponds to an imaginary quadratic irrational in \(\mathfrak {H}\). For \(m \in \mathbb {Q}_{>0}\) and \(h \in L^\#\), \(\Gamma \) acts on \(L_{h,m} := \{ X \in L+h\ |\ q(X) = m\}\) with finitely many orbits. For a weakly holomorphic modular function f on \(\Gamma \), we define the modular trace function by

$$\begin{aligned} \mathbf t _f (h,m) := \sum _{X \in \Gamma \backslash L_{h,m}} \frac{1}{|\overline{\Gamma }_X|} f(D_X). \end{aligned}$$

Next, we consider a vector \(X \in V(\mathbb {Q})\) with \(q(X)<0\). For such a vector \(X \in V(\mathbb {Q})\), we define a geodesic \(c_X\) in D by

$$\begin{aligned} c_X := \{z \in D\ |\ z \perp X \}, \end{aligned}$$

and we put \(c(X) := \Gamma _X \backslash c_X\) in M. If \(q(X) \in -N\cdot (\mathbb {Q}^{\times })^2\), then X is orthogonal to the two isotropic lines \(\ell _X = \mathrm {span}(Y)\) and \(\tilde{\ell }_X = \mathrm {span}(\tilde{Y})\) such that Y and \(\tilde{Y}\) are positively oriented and the triple \((X, Y, \tilde{Y})\) is a positively oriented basis for V. We say \(\ell _X\) is the line associated to X, and write \(X \sim \ell _X\). We now define the modular trace function for negative index. For \(X \in V(\mathbb {Q})\) of negative norm \(q(X) \in -N\cdot (\mathbb {Q}^{\times })^2\), we pick \(m \in \mathbb {Q}_{>0}\) and \(r \in \mathbb {Q}\) such that \(\sigma _{\ell _X}^{-1}. X = \left[ {\begin{matrix}m &{} r \\ 0 &{} -m \end{matrix}}\right] \). In particular, the geodesic \(c_X\) is given in \(D \simeq \mathfrak {H}\) by

$$\begin{aligned} c_X = \sigma _{\ell _X} \{\tau \in \mathfrak {H}\ |\ \mathrm {Re}(\tau ) = -r/2m\}, \end{aligned}$$

and we write \(\mathrm {Re}(c(X)) := -r/2m\). For \(k \in \mathbb {Q}_{>0}\) and a cusp \(\ell \), we put \(L_{h,-Nk^2,\ell } := \{ X \in L_{h,-Nk^2}\ |\ X \sim \ell \}\) on which \(\Gamma _{\ell } \) acts. By [2, Section 4, (4.7)], we have

$$\begin{aligned} \nu _{\ell }(h, -Nk^2) := \#\Gamma _{\ell } \backslash L_{h, -Nk^2, \ell } = \left\{ \begin{array}{ll}2k \varepsilon _{\ell }\ \ { if}L_{h,-Nk^2,\ell } \ne \emptyset , \\ 0\ \ \ \ \ { otherwise}.\end{array}\right. \end{aligned}$$

A weakly holomorphic modular function f on \(\Gamma \) has a Fourier expansion at the cusp \(\ell \) of the form

$$\begin{aligned} f(\sigma _{\ell }\tau ) = \sum _{n \in \frac{1}{\alpha _{\ell }} \mathbb {Z}} a_{\ell }(n)q^n. \end{aligned}$$
(3.1)

By [2, Proposition 4.7], we can define the modular trace function for negative index by

$$\begin{aligned} \mathbf t _f (h, -Nk^2) :=- & {} \sum _{\ell \in \Gamma \backslash \mathrm {Iso}(V)} \nu _{\ell }(h, -Nk^2) \sum _{n \in \frac{2k}{\beta _{\ell }}\mathbb {Z}_{<0}} a_{\ell }(n) e^{2\pi i r n}\\- & {} \sum _{\ell \in \Gamma \backslash \mathrm {Iso}(V)} \nu _{\ell }(-h, -Nk^2) \sum _{n \in \frac{2k}{\beta _{\ell }}\mathbb {Z}_{<0}} a_{\ell }(n) e^{2\pi i r' n}, \end{aligned}$$

where \(r = \mathrm {Re}(c(X))\) for any \(X \in L_{h,-Nk^2,\ell }\) and \(r' = \mathrm {Re}(c(X))\) for any \(X \in L_{-h,-Nk^2,\ell }\). If \(m \in \mathbb {Q}_{<0}\) is not of the form \(m = -Nk^2\) with \(k\in \mathbb {Q}_{>0}\), we put \(\mathbf t _f(h,m) = 0\). In particular, \(\mathbf t _f(h,m) = 0\) for \(m \ll 0\).

Finally, the modular trace function for zero index is defined by

$$\begin{aligned} \mathbf t _f(h,0) := -\frac{\delta _{h,0}}{2\pi } \int _{M}^{reg} f(\tau ) \frac{dxdy}{y^2}\ \ (\tau = x+iy), \end{aligned}$$

where \(\delta _{h,0}\) is the Kronecker delta. By [2, Remark 4.9], we have

$$\begin{aligned} \mathbf t _f(h,0) = 4\delta _{h,0} \sum _{\ell \in \Gamma \backslash \mathrm {Iso}(V)} \alpha _{\ell } \sum _{n \in \mathbb {Z}_{\ge 0}}a_{\ell }(-n)\sigma _1(n). \end{aligned}$$
(3.2)

3.2 Modularity of the modular trace function

Theorem 3.1

[2, Theorem 4.5] Let f be a weakly holomorphic modular function on \(\Gamma \) with Fourier expansion as in (3.1), and assume that the constant coefficients of f at all cusps of M vanish. Then the generating function

$$\begin{aligned} I_h(\tau , f) := \sum _{m \ge 0}{} \mathbf t _f(h,m) q^m + \sum _{k>0}{} \mathbf t _f(h,-Nk^2) q^{-Nk^2} \end{aligned}$$

satisfies the following transformation laws,

$$\begin{aligned} I_h(\tau +1, f)= & {} e^{2\pi i \frac{(h,h)}{2}}I_h(\tau ,f),\\ I_h(-\frac{1}{\tau },f)= & {} \sqrt{\tau }^3\frac{\sqrt{i}}{\sqrt{|L^\#/L|}} \sum _{h' \in L^\#/L}e^{-2\pi i (h,h')}I_{h'}(\tau ,f). \end{aligned}$$

We consider some special cases. Let p be a prime number, and put

$$\begin{aligned} L = \Biggl \{ X = \left[ \begin{array}{cc}b &{} c/p \\ a &{} -b \end{array}\right] \ \Bigg |\ a,b,c \in \mathbb {Z} \Biggr \} \end{aligned}$$

with \(q(X) = p\cdot \mathrm {det}(X)\). Then the action of the congruence subgroup \(\Gamma _0(p)\) preserves this lattice L. Kim [9] applied Theorems 2.1 and 3.1 to this case, and obtained the following theorem.

Theorem 3.2

[9, Theorem 1.1] Let \(f(\tau ) = \sum _na(n)q^n\) be a weakly holomorphic modular function on \(\Gamma _0^*(p)\) with \(a(0) = 0\). We put

$$\begin{aligned} \mathbf t _f(0) = 2\sum _{n=1}^{\infty } a(-n)(\sigma _1(n) + p\sigma _1(n/p)), \end{aligned}$$

and for negative d,

$$\begin{aligned} \mathbf t _f(d) = \left\{ \begin{array}{ll}-2^{\mu _p(\kappa )}\kappa \sum _{\kappa | m} a(-m) \ \ { if}d = -\kappa ^2{ forsomepositiveinteger}\kappa , \\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { otherwise},\end{array}\right. \end{aligned}$$

where \(\mu _m(n)\) is the number of prime factors of \(\mathrm {gcd}(m,n)\). If \(\mathrm {gcd}(m,n)=1\), we put \(\mu _m(n) := 0\). Then

$$\begin{aligned} \sum _{\begin{array}{c} n\ge 0 \\ r \in \mathbb {Z} \end{array}} \mathbf t _f(4pn-r^2)q^n\zeta ^r \end{aligned}$$

is a weak Jacobi form of weight 2 and index p.

In the same way, we consider the case of the level \(p_1p_2\), where \(p_1\) and \(p_2\) are distinct prime numbers. We put

$$\begin{aligned} L = \Biggl \{ X = \left[ \begin{array}{cc}b &{} c/p_1p_2 \\ a &{} -b \end{array}\right] \ \Bigg |\ a,b,c \in \mathbb {Z} \Biggr \} \end{aligned}$$

with \(q(X) = p_1p_2\cdot \mathrm {det}(X)\). The congruence subgroup \(\Gamma _0(p_1p_2)\) preserves L, and acts trivially on the discriminant group \(L^\#/L\), which is expressed as

$$\begin{aligned} L^\# / L = \Biggl \{L + \left[ \begin{array}{cc}h/2p_1p_2 &{} 0 \\ 0 &{} -h/2p_1p_2 \end{array}\right] \ \Bigg |\ h = 0, 1, 2, \ldots , 2p_1p_2-1 \Biggr \} \cong \mathbb {Z}/{2p_1p_2 \mathbb {Z}}. \end{aligned}$$

There are four \(\Gamma _0(p_1p_2)\)-inequivalent cusps \(\infty \), 0, \(1/p_1\), and \(1/p_2\). They correspond to

$$\begin{aligned} \ell _{\infty } := \mathrm {span}\Biggl (\left[ \begin{array}{cc}0 &{} 1 \\ 0&{} 0 \end{array}\right] \Biggr ),\ \ell _0 := \mathrm {span}\Biggl (\left[ \begin{array}{cc}0 &{} 0 \\ -1&{} 0 \end{array}\right] \Biggr ),\ \ell _{1/p_1} := \mathrm {span}\Biggl (\left[ \begin{array}{cc}-p_1 &{} 1 \\ -p_1^2&{} p_1 \end{array}\right] \Biggr ), \end{aligned}$$

and

$$\begin{aligned} \ell _{1/p_2} := \mathrm {span}\Biggl (\left[ \begin{array}{cc}-p_2 &{} 1 \\ -p_2^2&{} p_2 \end{array}\right] \Biggr ) \end{aligned}$$

via the bijective map \(\psi \). For these isotropic lines, we can compute the quantities \(\alpha _{\ell }\), \(\beta _{\ell }\), and \(\varepsilon _{\ell }\) as follows.

$$\begin{aligned}&\alpha _{\ell _{\infty }} = 1,\ \ \beta _{\ell _{\infty }} = \frac{1}{p_1p_2},\ \ \varepsilon _{\ell _{\infty }}=p_1p_2,\nonumber \\&\alpha _{\ell _{0}} = p_1p_2,\ \ \beta _{\ell _{0}} = 1, \ \ \varepsilon _{\ell _{0}}=p_1p_2,\nonumber \\&\alpha _{\ell _{1/p_1}} = p_2,\ \ \beta _{\ell _{1/p_1}} = \frac{1}{p_1},\ \ \varepsilon _{\ell _{1/p_1}}=p_1p_2,\nonumber \\&\alpha _{\ell _{1/p_2}} = p_1,\ \ \beta _{\ell _{1/p_2}} = \frac{1}{p_2},\ \ \varepsilon _{\ell _{1/p_2}}=p_1p_2. \end{aligned}$$
(3.3)

A weakly holomorphic modular function \(f(\tau ) = \sum _na(n)q^n\) on \(\Gamma _0^*(p_1p_2)\) has a Fourier expansion of the form (3.1) at each cusp \(\ell \). By direct calculation, we have

$$\begin{aligned} a_{\ell _{\infty }}(n)= & {} a(n),\nonumber \\ a_{\ell _{0}}(n/p_1p_2)= & {} a(n),\nonumber \\ a_{\ell _{1/p_1}}(n/p_2)= & {} e^{-2\pi i n \frac{b}{p_2}} a(n),\ \ bp_1 \equiv -1 \pmod {p_2},\nonumber \\ a_{\ell _{1/p_2}}(n/p_1)= & {} e^{-2\pi i n \frac{b'}{p_1}} a(n),\ \ b'p_2 \equiv -1 \pmod {p_1}. \end{aligned}$$
(3.4)

We assume the constant term \(a(0) = 0\), then we have the constant terms at all cusps vanish by (3.4). Applying Theorem 3.1 to the above case, the function \(I_h(\tau , f)\) satisfies

$$\begin{aligned} I_h(\tau +1,f)= & {} e^{-2\pi i \frac{h^2}{4p_1p_2}}I_h(\tau , f),\\ I_h(-\frac{1}{\tau }, f)= & {} \frac{\tau ^2}{\sqrt{2p_1p_2\tau /i}}\sum _{h' = 0}^{2p_1p_2-1}e^{2\pi i \frac{hh'}{2p_1p_2}}I_{h'}(\tau ,f). \end{aligned}$$

By Theorem 2.1, we can obtain a weak Jacobi form of weight 2 and index \(p_1p_2\). For further details, we compute the modular trace functions.

Lemma 3.3

For a positive integer d, we have

$$\begin{aligned} \mathbf t _f(h, d/4p_1p_2) = 2\mathbf t _f(d). \end{aligned}$$

Proof

For each vector

$$\begin{aligned} X = \left[ \begin{array}{cc}b+h/2p_1p_2 &{} c/p_1p_2 \\ -a &{} -b-h/2p_1p_2 \end{array}\right] \in L + h \end{aligned}$$

with positive norm \(d/4p_1p_2\), we put

$$\begin{aligned} Q = \left[ \begin{array}{cc}ap_1p_2 &{} bp_1p_2+h/2 \\ bp_1p_2+h/2 &{} c \end{array}\right] = p_1p_2 \left[ \begin{array}{cc}0 &{} -1\\ 1 &{} 0 \end{array}\right] X. \end{aligned}$$

Then we can see that the discriminant of the corresponding binary quadratic form is \(-d = (2bp_1p_2+h)^2-4acp_1p_2 = -4p_1p_2 q(X)\). Note that if a is positive (resp. negative), Q is positive (resp. negative) definite. Thus we have

$$\begin{aligned} \mathbf t _f(h, d/4p_1p_2)= & {} \sum _{X \in \Gamma _0(p_1p_2) \backslash L_{h,d/4p_1p_2}} \frac{1}{|\overline{\Gamma _0(p_1p_2)}_X|}f(D_X)\\= & {} 2\sum _{Q \in \mathcal {Q}_{d,p_1p_2,h}/\Gamma _0(p_1p_2)} \frac{1}{|\overline{\Gamma _0(p_1p_2)}_Q|}f(\alpha _Q) = 2\mathbf t _f(d). \end{aligned}$$

\(\square \)

Next we compute the modular trace functions for zero or negative index. By (3.2), (3.3), and (3.4), we have

$$\begin{aligned} \mathbf t _f(h,0) = 4\delta _{h,0}\sum _{n=0}^{\infty }a(-n)\Bigl \{\sigma _1(n) + p_1p_2\sigma _1(n/p_1p_2) + p_1\sigma _1(n/p_1) + p_2\sigma _1(n/p_2)\Bigr \}. \end{aligned}$$

Thus we define

$$\begin{aligned} \mathbf t _f(0) := 2\sum _{n=0}^{\infty }a(-n)\Bigl \{\sigma _1(n) + p_1p_2\sigma _1(n/p_1p_2) + p_1\sigma _1(n/p_1) + p_2\sigma _1(n/p_2)\Bigr \}. \end{aligned}$$

For a negative integer d, we define

$$\begin{aligned} \mathbf t _f(d) = \left\{ \begin{array}{ll}-2^{\mu _{p_1p_2}(\kappa )}\kappa \sum _{\kappa | m} a(-m) \ \ { if}d = -\kappa ^2{ forsomepositiveinteger}\kappa , \\ 0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ { otherwise},\end{array}\right. \end{aligned}$$

in the same way of Lemma 3.3 and Lemma 3.4 in [9]. Therefore, by Theorem 2.1 and 3.1, we obtain the following theorem.

Theorem 3.4

Let \(f(\tau ) = \sum _na(n)q^n\) be a weakly holomorphic modular function on \(\Gamma _0^*(p_1p_2)\) with \(a(0) = 0\). We put

$$\begin{aligned} \mathbf t _f(0) = 2\sum _{n=1}^{\infty }a(-n)\Bigl \{\sigma _1(n) + p_1p_2\sigma _1(n/p_1p_2) + p_1\sigma _1(n/p_1) + p_2\sigma _1(n/p_2)\Bigr \}, \end{aligned}$$

and for negative d

$$\begin{aligned} \mathbf t _f(d) = \left\{ \begin{array}{ll} -2^{\mu _{p_1p_2}(\kappa )}\kappa \sum _{\kappa | m} a(-m) &{} if~d = -\kappa ^2~for~some~positive~integer~\kappa , \\ 0 &{} otherwise, \end{array}\right. \end{aligned}$$

where \(\mu _m(n)\) is the number of prime factors of \(\mathrm {gcd}(m,n)\). If \(\mathrm {gcd}(m,n)=1\), we put \(\mu _m(n) := 0\). Then

$$\begin{aligned} \sum _{\begin{array}{c} n\ge 0\\ r\in \mathbb {Z} \end{array}} \mathbf t _f(4p_1p_2n-r^2)q^n\zeta ^r \end{aligned}$$

is a weak Jacobi form of weight 2 and index \(p_1p_2\).

4 Proof of Theorem 1.1

Throughout this section we assume N = 2, 3, 5, 6, 7, 10, or 13. We apply Theorems 3.2 and 3.4 to the special modular function \(f=\varphi _2(j^*_N)\). Then we obtain

Corollary 4.1

The generating function

$$\begin{aligned} g_2^{(N)}(\tau ,z) := \sum _{\begin{array}{c} n \ge 0\\ r\in \mathbb {Z} \end{array}}{} \mathbf t _2^{(N)}(4Nn-r^2)q^n\zeta ^r \end{aligned}$$

is a weak Jacobi form of weight 2 and index N, where

$$\begin{aligned} \mathbf t _2^{(N)}(0)= & {} \left\{ \begin{array}{ll} 6 &{} (N, 2)=1, \\ 10 &{} (N, 2)=2,\end{array}\right. \\ \mathbf t _2^{(N)}(-1)= & {} -1,\\ \mathbf t _2^{(N)}(-4)= & {} \left\{ \begin{array}{ll} -2 &{} (N, 2)=1, \\ -4 &{} (N, 2)=2, \end{array}\right. \end{aligned}$$

and \(\mathbf t _2^{(N)}(d) = 0\) for other negative d.

Note that we can obtain recursion formulas for the modular traces by applying Choi and Kim’s method [3] to this corollary.

Lemma 4.2

[8] For a positive integer d, we have

$$\begin{aligned} \mathbf t _2^{(N*)}(d) = 2^{-\mu _{N}(d)}{} \mathbf t _2^{(N)}(d), \end{aligned}$$

where \(\mu _N(d)\) is the number of prime factors of \(\mathrm {gcd}(N,d)\).

Remark

This lemma works for a general weakly holomorphic modular function f on \(\Gamma _0^*(N)\).

Proof

We consider only the case of prime level \(N=p\). We put the Atkin-Lehner involution \(W_p = \frac{1}{\sqrt{p}}\left[ {\begin{matrix}0 &{} -1 \\ p &{} 0 \end{matrix}}\right] \), and let d be a positive integer. We take \(h \pmod {2p}\) such that \(h^2 \equiv -d \pmod {4p}\), then h is divisible by p if and only if p divides d. For each \(Q=[a,b,c] \in \mathcal {Q}_{d,p,h}\), the quadratic form \(Q \circ W_p = [cp,-b,a/p]\) is also in \(\mathcal {Q}_{d,p,h}\) if and only if p divides h, that is, p divides d. If d is not divisible by p, then the map \(\mathcal {Q}_{d,p,h}/\Gamma _0(p) \ni [a,b,c] \mapsto [a,b,c] \in \mathcal {Q}_{d,p}/\Gamma _0^*(p)\) is bijective, thus we have \(\mathbf t _f(d) = \mathbf t ^*_f(d)\) for a modular function f on \(\Gamma _0^*(p)\). If p|d and \([a,b,c] \ne [cp,-b,a/p]\) in \(\mathcal {Q}_{d,p,h}/\Gamma _0(p)\), then the map \(\mathcal {Q}_{d,p,h}/\Gamma _0(p) \ni [a,b,c], [cp,-b,a/p] \mapsto [a,b,c] \in \mathcal {Q}_{d,p}/\Gamma _0^*(p)\) is 2-1 correspondence. If p|d and \(Q = [a,b,c] = [cp,-b,a/p]\) in \(\mathcal {Q}_{d,p,h}/\Gamma _0(p)\), then it holds \(|\overline{\Gamma _0^*(p)}_Q| = 2|\overline{\Gamma _0(p)}_Q|\). Therefore in both cases, we have \(\mathbf t _f(d) = 2\mathbf t ^*_f(d)\). In the same way, we can show the case of level \(N=p_1p_2\). \(\square \)

We define the modular trace function \(\mathbf t _2^{(N*)}(d)\) for non-positive index d satisfying the relation in Lemma 4.2. By Corollary 4.1 and Lemma 2.2, we obtain a weakly holomorphic modular form of weight 2 on \(\Gamma _0(N)\).

Proposition 4.3

The generating function

$$\begin{aligned} G_2^{(N*)}(\tau ) := \sum _{n=-1}^{\infty } \Biggl ( \sum _{r\in \mathbb {Z}}{} \mathbf t _2^{(N*)}(4n-r^2) \Biggr )q^n \end{aligned}$$

is a weakly holomorphic modular form of weight 2 on \(\Gamma _0(N)\).

Proof

Applying Lemma 2.2 to the generating function \(g_2^{(N)}(\tau ,z)\), we obtain a weakly holomorphic modular form of weight 2 on \(\Gamma _0(N)\)

$$\begin{aligned} \tilde{g}_2^{(N)}(\tau ) = \frac{1}{\tau ^2}\sum _{\ell =0}^{N-1}g_2^{(N)}\Bigl (-\frac{1}{N\tau }, \frac{\ell }{N}\Bigr ). \end{aligned}$$

Since the weak Jacobi form \(g_2^{(N)}(\tau , z)\) has a theta decomposition (2.1)

$$\begin{aligned} g_2^{(N)}(\tau ,z) = \sum _{\mu =0}^{2N-1} h_{\mu }(\tau ) \vartheta _{N,\mu }(\tau ,z), \end{aligned}$$

where \(h_{\mu }(\tau )\) is a partial generating function

$$\begin{aligned} h_{\mu }(\tau ) := \sum _{d \equiv -\mu ^2\ (\mathrm {mod}\ 4N)}{} \mathbf t _2^{(N)}(d)q^{d/4N}, \end{aligned}$$

the function \(\tilde{g}_2^{(N)}(\tau )\) can be expressed as follows,

$$\begin{aligned} \tilde{g}_2^{(N)}(\tau ) = \frac{1}{\tau ^2}\sum _{\ell =0}^{N-1}\sum _{\mu =0}^{2N-1}h_{\mu } \Bigl (-\frac{1}{N\tau }\Bigr )\vartheta _{N,\mu }\Bigl (-\frac{1}{N\tau }, \frac{\ell }{N}\Bigr ). \end{aligned}$$

Note that we can easily see that

$$\begin{aligned} \vartheta _{N,\mu }\Bigl (-\frac{1}{N\tau },\frac{\ell }{N}\Bigr ) = e^{2\pi i\frac{\ell }{N}\mu } \vartheta _{N,\mu }\Bigl (-\frac{1}{N\tau },0\Bigr ). \end{aligned}$$

By the modularity (2.2) of the functions \(h_{\mu }(\tau )\) and \(\vartheta _{N,\mu }(\tau ,z)\), we have directly

$$\begin{aligned} \tilde{g}_2^{(N)}(\tau ) = \frac{N}{2} \sum _{\mu =0}^{2N-1} \sum _{\ell =0}^{N-1}e^{2\pi i\frac{\ell }{N}\mu } \sum _{\nu =0}^{2N-1}e^{2\pi i\frac{\mu \nu }{2N}}h_{\nu }(N\tau )\sum _{n=0}^{2N-1}e^{-2\pi i\frac{\mu n}{2N}} \vartheta _{N,n}(N\tau ,0). \end{aligned}$$

Since the sum \(\sum _{\ell =0}^{N-1}e^{2\pi i\frac{\ell }{N}\mu }\) is equal to N or 0 according as \(N|\mu \), we have

$$\begin{aligned} \tilde{g}_2^{(N)}(\tau )= & {} \frac{N}{2} \Biggl \{ N \sum _{\nu =0}^{2N-1}h_{\nu }(N\tau )\sum _{n=0}^{2N-1}\vartheta _{N,n}(N\tau ,0)\\&\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ + N \sum _{\nu =0}^{2N-1}e^{\pi i\nu }h_{\nu }(N\tau )\sum _{n=0}^{2N-1}e^{-\pi in}\vartheta _{N,n}(N\tau ,0)\Biggr \}\\= & {} \frac{N^2}{2}\Biggl \{\sum _{\nu =0}^{2N-1}\sum _{n=0}^{2N-1}h_{\nu }(N\tau ) \vartheta _{N,n}(N\tau ,0)+ \sum _{\nu =0}^{2N-1}\sum _{n=0}^{2N-1}(-1)^{\nu +n}h_{\nu }(N\tau ) \vartheta _{N,n}(N\tau ,0)\Biggr \}\\= & {} N^2\Biggl \{ \sum _{\nu : even}h_{\nu }(N\tau ) \cdot \sum _{n: even}\vartheta _{N,n}(N\tau ,0) +\sum _{\nu : odd}h_{\nu }(N\tau ) \cdot \sum _{n: odd}\vartheta _{N,n}(N\tau ,0) \Biggr \}\\=: & {} N^2 \bigl \{ g_2^{(N,0)}(\tau )\theta _0^{(0)}(\tau ) + g_2^{(N,3)}(\tau )\theta _0^{(1)}(\tau ) \bigr \}. \end{aligned}$$

By Lemma 4.2, we have

$$\begin{aligned} g_2^{(N,0)}(\tau ):= & {} \sum _{\nu : even}h_{\nu }(N\tau ) = 2^{\mu _N(N)}\sum _{d \equiv 0\ (\mathrm {mod}\ 4)}{} \mathbf t _2^{(N*)}(d)q^{d/4},\\ g_2^{(N,3)}(\tau ):= & {} \sum _{\nu : odd}h_{\nu }(N\tau ) = 2^{\mu _N(N)}\sum _{d \equiv 3\ (\mathrm {mod}\ 4)}{} \mathbf t _2^{(N*)}(d)q^{d/4},\\ \theta _0^{(0)}(\tau ):= & {} \sum _{n: even}\vartheta _{N,n}(N\tau ,0) = \sum _{r: even}q^{r^2/4},\\ \theta _0^{(1)}(\tau ):= & {} \sum _{n: odd}\vartheta _{N,n}(N\tau ,0) = \sum _{r: odd}q^{r^2/4}. \end{aligned}$$

Then we see that

$$\begin{aligned} g_2^{(N,0)}(\tau )\theta _0^{(0)}(\tau ) + g_2^{(N,3)}(\tau )\theta _0^{(1)}(\tau ) = 2^{\mu _N(N)}\sum _{n=-1}^{\infty } \Biggl ( \sum _{r\in \mathbb {Z}}{} \mathbf t _2^{(N*)}(4n-r^2) \Biggr )q^n. \end{aligned}$$
(4.1)

Thus we conclude that

$$\begin{aligned} G_2^{(N*)}(\tau ) = N^{-2} 2^{-\mu _N(N)} \tilde{g}_2^{(N)}(\tau ) \end{aligned}$$

is a weakly holomorphic modular form of weight 2 on \(\Gamma _0(N)\). \(\square \)

Proposition 4.4

The function \(G_2^{(N*)}(\tau )\) has a pole only at the cusp \(\tau = i \infty \).

Proof

By Proposition 4.3, it is sufficient to show that \(G_2^{(N*)}(\tau )\) does not have any pole at all cusps except for \(i\infty \). We can show this by using (4.1) and modularity (2.2). For example, we consider the case of any N and the cusp \(\tau = 0\). By the definition of \(g_2^{(N,0)}(\tau )\) and (2.2), we have

In a similar way, we obtain

$$\begin{aligned} g_2^{(N,3)}\Bigl (-\frac{1}{\tau }\Bigr )= & {} \sqrt{\frac{i}{2}}\frac{\tau ^{3/2}}{N} \Biggl ( h_0\Bigl (\frac{\tau }{N}\Bigr ) - h_N\Bigl (\frac{\tau }{N}\Bigr ) \Biggr ),\\ \theta _0^{(0)}\Bigl (-\frac{1}{\tau }\Bigr )= & {} \sqrt{\frac{\tau }{2i}}\Biggl ( \vartheta _{N,0}\Bigl (\frac{\tau }{N},0\Bigr ) + \vartheta _{N,N}\Bigl (\frac{\tau }{N},0\Bigr )\Biggr ),\\ \theta _0^{(1)}\Bigl (-\frac{1}{\tau }\Bigr )= & {} \sqrt{\frac{\tau }{2i}}\Biggl ( \vartheta _{N,0}\Bigl (\frac{\tau }{N},0\Bigr ) - \vartheta _{N,N}\Bigl (\frac{\tau }{N},0\Bigr )\Biggr ). \end{aligned}$$

Therefore we have

$$\begin{aligned} \tau ^{-2}G_2^{(N*)}\Bigl (-\frac{1}{\tau }\Bigr )= & {} 2^{-\mu _N(N)}\tau ^{-2}\Biggl (g_2^{(N,0)} \Bigl (-\frac{1}{\tau }\Bigr )\theta _0^{(0)}\Bigl (-\frac{1}{\tau }\Bigr ) + g_2^{(N,3)}\Bigl (-\frac{1}{\tau }\Bigr )\theta _0^{(1)} \Bigl (-\frac{1}{\tau }\Bigr )\Biggr )\\= & {} 2^{-\mu _N(N)}\frac{1}{N}\Biggl ( h_0\Bigl (\frac{\tau }{N}\Bigr )\vartheta _{N,0} \Bigl (\frac{\tau }{N},0\Bigr ) + h_N\Bigl (\frac{\tau }{N}\Bigr )\vartheta _{N,N} \Bigl (\frac{\tau }{N},0\Bigr ) \Biggr ). \end{aligned}$$

Note that the value of the modular trace function \(\mathbf t _2^{(N)}(d)\) for negative index is zero except for \(d = -1\), \(-4\), and the partial generating functions \(h_0(\tau /N)\) and \(h_N(\tau /N)\) are given as

$$\begin{aligned} h_0\Bigl (\frac{\tau }{N}\Bigr )= & {} \sum _{d \equiv 0\ (\mathrm {mod}\ 4N)}{} \mathbf t _2^{(N)}(d)q^{d/4N^2},\\ h_N\Bigl (\frac{\tau }{N}\Bigr )= & {} \sum _{d \equiv -N^2\ (\mathrm {mod}\ 4N)}{} \mathbf t _2^{(N)}(d)q^{d/4N^2}. \end{aligned}$$

Thus if \(N \ne 2\), these functions have no pole at \(q = 0\), that is, \(G_2^{(N*)}(\tau )\) has no pole at \(\tau = 0\). If \(N=2\), the pole of \(h_2(\tau /2)\) at \(q=0\) is canceled out by the zero of \(\vartheta _{2,2}(\tau /2,0)\). In the cases of \(N=6, 10\) the cusp \(\tau = 1/p\) with p|N can be checked similarly by direct calculation of \((p\tau +1)^{-2}G_2^{(N*)}\bigl ( \frac{\tau }{p\tau +1} \bigr )\). \(\square \)

For our N, the hauptmodul \(j_N(\tau )\) on \(\Gamma _0(N)\) also has a pole only at the cusp \(\tau = i \infty \). The differential operator \((2\pi i)^{-1}\frac{d}{d\tau }\) sends a weakly holomorphic modular function to a weakly holomorphic modular form of weight 2 on the same group, then \(j'_N(\tau ) := (2\pi i)^{-1}\frac{d}{d\tau }j_N(\tau )\) is a weakly holomorphic modular form of weight 2 on \(\Gamma _0(N)\). Canceling the pole, we obtain a holomorphic modular form

$$\begin{aligned} 2j'_N(\tau ) - G_2^{(N*)}(\tau ) \in M_2(\Gamma _0(N)), \end{aligned}$$

where \(M_2(\Gamma )\) is the space of holomorphic modular forms of weight 2 on \(\Gamma \). It is known that

$$\begin{aligned} M_2(\Gamma _0(p))= & {} \langle E_2^{(p)}(\tau ) \rangle _{\mathbb {C}}\ \ \ \ \ \ \ (p = 2, 3, 5, 7, 13),\\ M_2(\Gamma _0(p_1p_2))= & {} \langle E_2^{(p_1p_2)}(\tau ),E_2^{(p_2)}(p_1\tau ),E_2^{(p_1)}(p_2\tau ) \rangle _{\mathbb {C}}\ \ \ (p_1p_2 = 6, 10), \end{aligned}$$

where

$$\begin{aligned} E_2^{(N)}(\tau ):= & {} NE_2(N\tau )-E_2(\tau ) = (N-1)+24\sum _{n=1}^{\infty }\sigma _1^{(N)}(n)q^n,\\ \sigma _1^{(N)}(n):= & {} \sum _{\begin{array}{c} d|n \\ d \not \equiv 0 (N) \end{array}} d. \end{aligned}$$

For each level N, we have

$$\begin{aligned} 2j'_N(\tau )-G_2^{(N*)}(\tau ) = -\sum _{r\in \mathbb {Z}}{} \mathbf t _2^{(N*)}(-r^2) + \sum _{n=1}^{\infty }\Biggl \{ 2nc_n^{(N)}-\sum _{r\in \mathbb {Z}}{} \mathbf t _2^{(N*)}(4n-r^2)\Biggr \}q^n. \end{aligned}$$

By Corollary 4.1 and Lemma 4.2, the constant term is given by

$$\begin{aligned} -\sum _{r\in \mathbb {Z}}{} \mathbf t _2^{(N*)}(-r^2) = -\mathbf t _2^{(N*)}(0)-2\mathbf t _2^{(N*)}(-1)-2\mathbf t _2^{(N*)}(-4) = \left\{ \begin{array}{ll}1\ \ \ \ \ N=2,\\ 3\ \ \ \ \ N=3,5,7,13,\\ 7/2\ \ N=6,10.\end{array}\right. \end{aligned}$$

Therefore if \(N=p\), we obtain that

$$\begin{aligned} 2j'_p(\tau )-G_2^{(p*)}(\tau ) = \frac{(3-p\sigma _1(2/p))}{p-1}E_2^{(p)}(\tau ). \end{aligned}$$

In the cases of \(N=6, 10\), we need more terms. The first few values of modular trace functions are given by

$$\begin{aligned} \mathbf t _2^{(6*)}(8)= & {} \frac{1}{|\overline{\Gamma _0^*(6)}_{[6,-4,1]}|} \varphi _2(j_6^*(\alpha _{[6,-4,1]})) = \frac{1}{2}\Biggl ( j_6^*\Bigl (\frac{2 + \sqrt{-2}}{6}\Bigr )^2-158\Biggr )\\= & {} \frac{1}{2}((-10)^2-158) = -29,\\ \mathbf t _2^{(10*)}(4)= & {} \frac{1}{|\overline{\Gamma _0^*(10)}_{[10,-6,1]}|} \varphi _2(j_{10}^*(\alpha _{[10,-6,1]})) = \frac{1}{4}\Biggl ( j_{10}^*\Bigl (\frac{3 + \sqrt{-1}}{10}\Bigr )^2-44\Biggr )\\= & {} \frac{1}{4}((-4)^2-44) = -7, \end{aligned}$$

and except for the above values \(\mathbf t _2^{(N*)}(d) = 0\) for \(1 \le d \le 8\) (when \(N=6, 10\)). Then we can compute the first few coefficients of \(2j'_N(\tau )-G_2^{(N*)}(\tau )\), we have

$$\begin{aligned} 2j'_6(\tau )-G_2^{(6*)}(\tau )= & {} \frac{7}{2}+7q+47q^2+O(q^3)\\= & {} \frac{7}{24}E_2^{(6)}(\tau )+\frac{13}{12}E_2^{(3)}(2\tau ) -\frac{1}{8}E_2^{(2)}(3\tau ),\\ 2j'_{10}(\tau )-G_2^{(10*)}(\tau )= & {} \frac{7}{2}+4q+24q^2+O(q^3)\\= & {} \frac{1}{6}E_2^{(10)}(\tau )+\frac{1}{2}E_2^{(5)}(2\tau ). \end{aligned}$$

Therefore we obtain the first part of Theorem 1.1. By using the following relations

$$\begin{aligned} j_p^*= & {} j_p - pj_p|U_p\ \ \ \ p = 2,3,5,7,13,\\ j_{p_1p_2}^*= & {} j_{p_1p_2}-p_1j_{p_1p_2}|U_{p_1}-p_2j_{p_1p_2}|U_{p_2} +p_1p_2j_{p_1p_2}|U_{p_1p_2}\ \ \ \ p_1p_2=6,10, \end{aligned}$$

we obtain the second part of Theorem 1.1. This concludes the proof of Theorem 1.1.