Annals of Combinatorics

, Volume 23, Issue 3–4, pp 1009–1026

# Richaud–Degert Real Quadratic Fields and Maass Waveforms

• Larry Rolen
• Karen Taylor
Article

## Abstract

In this paper, we place the work of Andrews et al. (Invent Math 91(3):391–407, 1988) and Cohen (Invent Math 91(3):409–422, 1988), relating arithmetic in $${{\mathbb {Q}}}(\sqrt{6})$$ to modularity of Ramanujan’s function $$\sigma (q)$$, in the context of the general family of Richaud–Degert real quadratic fields $${{\mathbb {Q}}}(\sqrt{2p})$$. Moreover, we give the resulting generalizations of the function $$\sigma$$ as indefinite theta functions and invoke Zwegers’ work, (Q J Math 63(3):753–770, 2012), to prove the modular properties of the completed functions.

## Keywords

Indefinite theta series Real quadratic fields Maass waveforms

## Mathematics Subject Classification

11R11 11F27 11F37

## 1 Introduction

In [3], Andrews, Dyson, and Hickerson (ADH) studied the Fourier coefficients of the function:
\begin{aligned} \sigma (q)=1+\sum _{n=1}^{\infty }\frac{q^{\frac{n(n+1)}{2}}}{(1+q)(1+q^2)\cdots (1+q^n)}. \end{aligned}
The function $$\sigma$$ originally appeared in the “lost” notebook of Ramanujan. (See [2] for a discussion of Ramanujan’s entries involving $$\sigma$$.) Using Bailey pairs, ADH proved the q-identity:
\begin{aligned} \sigma (q)=\sum _{\begin{array}{c} n\ge 0\\ \vert j \vert \le n \end{array}}(-1)^{n+j}q^{\frac{n(3n+1)}{2}-j^2}(1-q^{2n+1}). \end{aligned}
(1.1)
In particular, they used such identities to prove Andrews’ earlier speculation [1] that the coefficients of $$\sigma (q)$$ satisfy the unique property that the lim sup of their absolute values is infinity, but they also vanish infinitely often.
Specifically, from this identity, they deduced that the kth Fourier coefficient of $$\sigma$$ is determined by congruence conditions on solutions to the generalized Pell’s equation:
\begin{aligned} u^2-6v^2=24k+1. \end{aligned}
To describe these coefficients in a manner convenient for our purposes, we let $$D=2p$$, where p is a prime, $$m=8pk+\delta ^2_{l}$$, $$\delta _{l}=2l-1$$ with $$1\le l\le \frac{p-1}{2}$$, and
\begin{aligned} X_{D}(m)=\{(u,v)\in {{\mathbb {Z}}}\times {{\mathbb {Z}}}:u^2-Dv^2=m\}. \end{aligned}
As usual, we denote $$(u,v)\sim ( U,V)$$ if $$u+\sqrt{D}v$$ and $$U+\sqrt{D}V$$ are associates in $${{\mathbb {Z}}}[\sqrt{D}]$$. Let
\begin{aligned} T_{2p}(m)=\sum _{[(u,v)]\in \left( X_{2p}(m)/\sim \right) }\left( \frac{4p}{u+pv}\right) , \end{aligned}
where, as above, $$m\equiv \delta ^2_{l} \pmod {8p}$$. In the case studied by ADH, we write $$T(m)=T_{6}(m)$$. Their identity (1.1) shows that $$\sigma (q)$$ is the generating function of T(m) for $$m>0$$. The “companion” generating function, $$\sigma ^*(q)$$, of T(m), for $$m<0$$ is (see [3, Theorem 5]):
\begin{aligned} \sigma ^{*}(q)=\sum _{n=1}^{\infty } \frac{(-1)^{n}q^{n^2}}{(1-q)(1-q^3)\cdots (1-q^{2n+1})}. \end{aligned}
In the conclusion of their paper, ADH define a counting function $$V_{3}(m)$$ for $${{\mathbb {Q}}}(\sqrt{3})$$, which can be expressed as the character sum:
\begin{aligned} V_{3}(m)=\sum _{[(u,v)]\in \left( X_{3}(m)/\sim \right) }\left( \frac{24}{u+3v}\right) . \end{aligned}
There also is a counting function $$U_{2}(m)$$ for $${{\mathbb {Q}}}(\sqrt{2})$$. They state, without proof, that
\begin{aligned} T(m)=V_{3}(m)=U_{2}(m). \end{aligned}
(Hickerson gave an algebraic proof of these identities in a personal correspondence to Andrews [7]).
Cohen [5] further shed light on the observations of ADH by placing them in the context of Maass waveforms. To be more specific, he considered the completed function:
\begin{aligned} \phi (q)&=q^{\frac{1}{24}}\sigma (q)+q^{-\frac{1}{24}}\sigma ^{*}(q) =\sum _{m\equiv 1\pmod {24}}T(m)q^{\frac{\vert m\vert }{24}}. \end{aligned}
He employed the following dihedral lattice to derive connections between $$k_{1}={{\mathbb {Q}}}(\sqrt{6}),k_{2}={{\mathbb {Q}}}(\sqrt{2})$$, and $$k_{3}={{\mathbb {Q}}}(\sqrt{3})$$.
Here, $$\mathrm{Gal}(L/{{\mathbb {Q}}})\simeq D_{4}$$ and $$\mathrm{Gal}(L/k_{1})\simeq V_{4}$$. Since $$k_{1}$$ has class number one, $$\chi _{1}$$ is a ray class character on the ray class group $$CL((12))=I^{(12)}/P^{(12)}_{1}$$. The functional equation of the Hecke–Weber function, $$L(s,\chi _{1})$$, was then used, via the Mellin transform, to prove that
\begin{aligned} \phi _{0}(\tau )=y^{\frac{1}{2}}\sum _{\begin{array}{c} m\equiv 1 \pmod {24} \end{array}}T(m)e^{\frac{2\pi i m x}{24}}K_{0}\left( \frac{2\pi \vert m\vert y}{24}\right) \end{aligned}
is a Maass waveform. The Artin map, $$\mathrm{Art}^{(12)}$$, gives the isomorphism
\begin{aligned} \mathrm {Art}^{(12)}:CL((12))/\ker \mathrm {Art}^{(12)}/P^{(12)}_{1}\simeq \mathrm{Gal}(L/k_{1}). \end{aligned}
The conductor of $$\chi _{1}$$ is $${\mathfrak {m}}=(4(3+\sqrt{6}))$$; it is the smallest modulus (in this case ideal), $${\mathfrak {m}}$$, such that $${\mathfrak {m}}\vert (12)$$ and
\begin{aligned} \mathrm {Art}^{{\mathfrak {m}}}:\mathrm {CL}({\mathfrak {m}})\simeq \mathrm{Gal}(L/k_{1}). \end{aligned}
In this case, the Hecke–Weber L-function $$L(s,\chi _{1})$$ for the ray class character $$\chi _{1}$$ is, by the Artin map isomorphism, identical to the Artin L function $$L(s,{\tilde{\chi }}_{1})$$ for the one-dimensional representation $${\tilde{\chi }}_{1}=\chi _{1}\circ (\mathrm {Art}^{{\mathfrak {m}}})^{-1}$$ of $$\mathrm{Gal}(L/k_{1})$$. The representation $${\tilde{\chi }}_{1}$$ induces a two-dimensional representation, $$\rho$$, of $$\mathrm{Gal}(L/{{\mathbb {Q}}})$$. Artin’s induction theorem gives $$L(s,{\tilde{\chi }}_{1})=L(s,\rho )$$.

Cohen obtained the quadratic identities $$T(m)=V_{3}(m)=U_{2}(m)$$, for $$m\equiv 1\pmod {24}$$, by showing that the characters $$\chi _{2}$$ and $$\chi _{3}$$ which define $$U_{2}(m)$$ and $$V_{3}(m)$$, respectively, also induce the unique two-dimensional representation $$\rho$$ of $$\mathrm{Gal}(L/{{\mathbb {Q}}})$$.

Later, Zwegers [10] placed Cohen’s construction into a more general context, generalizing the theory of mock modular forms to what he calls “mock Maass theta functions”. The starting point for Zwegers is the fact that the generating functions $$\sigma (q)$$ and $$\sigma ^{*}(q)$$ can also be expressed as the following indefinite theta functions:
\begin{aligned} q^{\frac{1}{24}}\sigma (q)&=\left( \sum _{\begin{array}{c} n+j\ge 0\\ n-j\ge 0 \end{array}}+\sum _{\begin{array}{c} n+j< 0\\ n-j<0 \end{array}}\right) (-1)^{n+j}q^{\frac{3}{2}(n+\frac{1}{6})^2-j^2},\\ q^{-\frac{1}{24}}\sigma ^*(q)&=\left( \sum _{\begin{array}{c} 2j+3n\ge 0\\ 2j-3n> 0 \end{array}}+\sum _{\begin{array}{c} 2j+3n< 0\\ 2j-3n\le 0 \end{array}}\right) (-1)^{n+j}q^{-\frac{3}{2}(n+\frac{1}{6})^2+j^2}. \end{aligned}
Given the special nature of these functions and the interest which they have generated in the literature, it is natural to consider whether the functions of Andrews, Dyson, Hickerson, and Cohen fit into a broader framework. One such generalization was explored by Bringmann, Lovejoy, and the first author in [4]. This was developed in the context of Bailey pairs and indefinite theta functions, with an eye towards quantum modular properties. However, these examples did not explore the connection to real quadratic characters; indeed, the authors of that paper were unable to identify explicit Hecke characters, in general. Here, we search for a framework in the context of Cohen’s original Hecke character observation. Specifically, in this paper, we consider the generating functions $$\sigma _{p,l}$$, $$\sigma ^{*}_{p,l}$$ for $$T_{2p}(m)$$ with $$m\equiv \delta ^2_{l}$$, $$m>0$$, and $$m<0$$. Using Zwegers’ formalism for the modularity properties of indefinite theta functions of this shape, we find the following general picture which naturally extends the original example of $$\sigma$$ and $$\sigma ^*$$.

### Theorem 1.1

Let
\begin{aligned} \phi _{0,l}(\tau ;p)=y^{\frac{1}{2}}\sum _{m\equiv \delta ^2_{l}\pmod {8p}}T_{2p}(m)e^{\frac{2\pi i m x}{8p}}K_{0}\left( \frac{2\pi \vert m\vert y}{8p}\right) . \end{aligned}
For primes p of the form $$p=2M^2+1$$, where M is odd, the function $$\phi _{0,l}(\tau ;p)$$ is a Maass waveform, with multiplier, on a congruence subgroup of $$\mathrm{SL}(2,{{\mathbb {Z}}})$$.

### Remark 1.2

The primes p of the form $$p=2M^2+1$$ have the property that the quadratic field $$Q(\sqrt{2p})$$ are of Richaud–Degert type and their fundamental units, $$\epsilon _{2p}$$, are given explicitly by $$\epsilon _{2p}=2p-1+2M\sqrt{2p}$$ (see [6, p. 50]).

### Example 1.3

We list the first four primes of the form $$2M^2+1$$ with M odd, along with the corresponding primes p and class numbers h of $$Q(\sqrt{2p})$$:

M

p

h

1

3

1

3

19

1

9

163

3

21

883

5

The paper is organized as follows. In Sect. 2 we develop the multiplicative properties of the function $$\chi _{19,1}$$ which is used to define a (finite) Hecke character and to define $$T_{2p}(m)$$ as a character sum. In Sect. 3, we give an example for $$p=19$$ where, since $${{\mathbb {Q}}}(\sqrt{38})$$ has class number 1 and, thus, Cohen’s argument applies. In Sect. 4, we prove our main theorem using Zwegers’ machinery. In the final section, we gather questions for future study.

## 2 Arithmetic in $${{\mathbb {Z}}}[\sqrt{2p}]$$ and Indefinite Theta Functions

In this section, we introduce the multiplicative function and character sums that generalize the case $$p=3$$ which occurs in ADH. We then determine their generating functions as indefinite theta functions.

### 2.1 Character Sums

Let $$R_{2p}=\{u+v\sqrt{2p}:(u^2-2pv^2,2p)=1\}$$. We define $$\chi _{p;1}$$, on $$R_{2p}$$, as follows:
\begin{aligned} \chi _{p;1}(\alpha )= {\left\{ \begin{array}{ll}\left( \frac{4p}{u+pv}\right) , &{} \text { if { v} is even,} \\ \left( \frac{4p}{(p-1)u+pv}\right) , &{} \text { if { v} is odd.} \end{array}\right. } \end{aligned}
Let $$\alpha =u+v\sqrt{2p}$$ and $$N(\alpha )=\alpha \alpha ^{\prime }$$, and then, $$(N(\alpha ),2p)=1$$ implies $$u\equiv 2l-1\pmod {2p}$$, with $$1\le l\le p$$ and $$l\ne \frac{p+1}{2}$$. Since $$u^2 \equiv (2p-u)^2 \pmod {8p}$$, it is enough to consider $$u \equiv \pm (2l-1)\pmod {8p}$$, for $$1\le l\le M^2$$. Thus, $$N(\alpha )\equiv (2l-1)^2\pmod {8p}$$ or $$N(\alpha )\equiv (2l-1)^2+6p \pmod {8p}$$.

The function $$\chi _{p;1}$$ enjoys the following properties.

### Proposition 2.1

The following are true.
1. 1.

The function $$\chi _{p;1}$$ is multiplicative on $$R_{2p}$$.

2. 2.
We have the identity:
\begin{aligned} \chi _{p;1}(\alpha ^{\prime })={\left\{ \begin{array}{ll}\chi _{p;1}(\alpha ), &{} \text { if } N(\alpha )=(2l-1)^2\pmod {8p}, 1\le l\le M^2,\\ -\chi _{p;1}(\alpha ), &{}\text { if } N(\alpha )=(2l-1)^2+6p \pmod {8p}, 1\le l\le M^2. \end{array}\right. } \end{aligned}

### Proof

Let $$\alpha =u+v\sqrt{2p}$$ and $$\beta =U+V\sqrt{2p}$$. Then
\begin{aligned} \alpha \beta =uU+2pVv+(uV+Uv)\sqrt{2p}=(\alpha \beta )_{1}+(\alpha \beta )_{2}\sqrt{2p}. \end{aligned}
Since $$\alpha$$ and $$\beta$$ are in $$R_{2p}$$, u and U are both odd. There are three cases to consider depending on the parities of v and V.
Case (i): If v and V are even, then
\begin{aligned} \chi _{p;1}(\alpha )\chi _{p;1}(\beta )=\chi _{p;1}(\alpha \beta ), \end{aligned}
since $$(\alpha \beta )_{1}+p(\alpha \beta )_{2}\equiv (u+pv)(U+pV)\pmod {4p}$$.
Case (ii): When v and V are odd, we compute
\begin{aligned}&(\alpha \beta )_{1}+p(\alpha \beta )_{2}-((p-1)u+pv)((p-1)U+pV)\\&\quad =(p-2)p(u+v)(U+V)=0\pmod {4p}. \end{aligned}
Case (iii): Finally, if v even and V is odd, then we have
\begin{aligned}&(p-1)(\alpha \beta )_{1}+p(\alpha \beta )_{2}-(u+pv)((p-1)U+pV)\\&\quad =p(p-2)v(V-U)=0\pmod {4p}. \end{aligned}
$$\square$$

### 2.2 Indefinite Theta Functions

To determine convenient formulas for the generating function of $$T_{2p}(m)$$, we make repeated use of the following lemma, given in [3].

### Lemma 2.2

Let $$(u_{0},v_{0})$$ be the fundamental solution to $$U^2-DV^2=1$$. Each equivalence class of solutions to $$U^2-DV^2=m$$ has a representative (uv) satisfying:

Case (i) $$m>0$$, then $$u>0$$ and
\begin{aligned} -\frac{v_{0}}{u_{0}+1}u<v\le \frac{v_{0}}{u_{0}+1}u; \end{aligned}
Case (ii) $$m<0$$, then $$v>0$$ and
\begin{aligned} -\frac{Dv_{0}}{u_{0}+1}v<u\le \frac{Dv_{0}}{u_{0}+1}v. \end{aligned}
In our case, we have $$D=2p$$ and, since $$\epsilon _{2p}=2p-1+2M\sqrt{2p}$$ satisfies $$\mathrm {N}_{k_{1}/{{\mathbb {Q}}}}(\epsilon _{2p})=1$$, $$u_{0}=2p-1$$ and $$v_{0}=2M$$. We also need
\begin{aligned} \frac{v_{0}}{u_{0}+1}=\frac{ M}{p}. \end{aligned}
Set $$\delta _{l}=2l-1$$. Then, $$u^2-2pv^2=8pk+\delta _{l}^2$$ implies that
\begin{aligned} u\equiv \pm \delta _{l} \pmod {2p}, \text { and } v \text { is even.} \end{aligned}
Set $$u=2pn+\delta$$, $$\delta \in \{\delta _{l},2p-\delta _{l}\}$$, $$n\ge 0$$ and $$v=2j$$. Then
\begin{aligned} u+pv=2p(n+j)+\delta \equiv \pm \delta _{l} \pmod {4p} \end{aligned}
implies that $$n+j$$ is even and $$\delta =\delta _{l}$$ and, by the lemma:
\begin{aligned} -\frac{M}{p}(2pn+\delta _{l})<2j\le \frac{M}{p}(2pn+\delta _{l}). \end{aligned}
Thus
\begin{aligned} Mn+j>-\frac{\delta _{l}M}{2p}\quad \text { and }\quad Mn-j\ge -\frac{\delta _{l}M}{2p}. \end{aligned}
Indeed, $$n+j\equiv 1\pmod 2$$, $$\delta =2p-\delta _{l}$$, and
\begin{aligned} -\frac{M}{p}(2p(n+1)-\delta _{l})<2j\le \frac{M}{p}(2p(n+1)-\delta _{l}) \end{aligned}
implies
\begin{aligned} M(n+1)+j>\frac{\delta _{l}M}{2p}\quad \text { and }\quad M(n+1)-j\ge \frac{\delta _{l}M}{2p}. \end{aligned}
Similarly, for
\begin{aligned} u+pv=2p(n+j)+\delta \equiv \pm (2p-\delta _{l}) \pmod {4p}, \end{aligned}
we have $$n+j\equiv 0\pmod 2$$, $$\delta =2p-\delta _{l}$$, and
\begin{aligned} M(n+1)+j>\frac{\delta _{l}M}{2p} \quad \text { and }\quad M(n+1)-j\ge \frac{\delta _{l}M}{2p}, \end{aligned}
or $$n+j\equiv 1\pmod 2$$, $$\delta =\delta _{l}$$, and
\begin{aligned} Mn+j>-\frac{\delta _{l}M}{2p} \quad \text { and }\quad Mn-j\ge -\frac{\delta _{l}M}{2p}. \end{aligned}
Recall that we have assumed that M is odd. Thus, $$p\equiv 3 \pmod {4}$$ and the parity of $$n\pm j$$ is equal to the parity of $$Mn+j$$. Therefore, for $$m=8pk+\delta _{l}^2, k\ge 0$$, we have:
\begin{aligned} T_{2p}(m)&=\sum _{\begin{array}{c} Mn+j> -\frac{\delta _{l}M}{2p}\\ Mn-j\ge -\frac{\delta _{l}M}{2p}\\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}-\sum _{\begin{array}{c} M(n+1)+j>\frac{\delta _{l}M}{2p}\\ M(n+1)-j\ge \frac{\delta _{l}M}{2p}\\ (2pn+2p-\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}\\&=\sum _{\begin{array}{c} Mn+j> -\frac{\delta _{l}M}{2p}\\ Mn-j\ge -\frac{\delta _{l}M}{2p}\\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}+\sum _{\begin{array}{c} Mn+j>\frac{\delta _{l}M}{2p}\\ Mn-j\ge \frac{\delta _{l}M}{2p}\\ (2pn-\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}\\&=\sum _{\begin{array}{c} Mn+j> -\frac{\delta _{l}M}{2p}\\ Mn-j\ge -\frac{\delta _{l}M}{2p}\\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}+\sum _{\begin{array}{c} Mn+j\le -\frac{\delta _{l}M}{2p}\\ Mn-j<- \frac{\delta _{l}M}{2p}\\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}. \end{aligned}
In the second term of the last line, we have made the substitution $$n\mapsto -n$$.
For $$m<0$$, the lemma gives $$-2 M v<u\le 2M v$$. Now, if $$n+j$$ is even and $$\delta =\delta _{l}$$, then we find
\begin{aligned} 2Mj+pn>-\frac{\delta _{l}}{2} \quad \text { and }\quad 2Mj-pn \ge \frac{\delta _{l}}{2}; \end{aligned}
whereas if $$n+j$$ odd and $$\delta =2p-\delta _{l}$$, then
\begin{aligned} 2Mj+p(n+1)>\frac{\delta _{l}}{2} \quad \text { and }\quad 2Mj-p(n+1) \ge - \frac{\delta _{l}}{2}. \end{aligned}
Thus, we have
\begin{aligned} T_{2p}(m)&=\sum _{\begin{array}{c} 2Mj +pn>-\frac{\delta _{l}}{2}\\ 2Mj -pn\ge \frac{\delta _{l}}{2} \\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^{2} \end{array}}(-1)^{Mn+j}-\sum _{\begin{array}{c} 2Mj +p(n+1)>\frac{\delta _{l}}{2}\\ 2Mj -p(n+1)\ge -\frac{ \delta _{l}}{2}\\ \\ (2p(n+1)-\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^{2} \end{array}}(-1)^{Mn+j}\\&=\sum _{\begin{array}{c} 2Mj +pn>-\frac{\delta _{l}}{2}\\ 2Mj -pn\ge \frac{\delta _{l}}{2} \\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^{2} \end{array}}(-1)^{Mn+j}+\sum _{\begin{array}{c} 2Mj +pn>\frac{\delta _{l}}{2}\\ 2Mj -pn\ge -\frac{ \delta _{l}}{2}\\ (2pn-\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^{2} \end{array}}(-1)^{Mn+j}. \end{aligned}
Now, in the second term, make the changes of variables $$n\mapsto -n$$ and $$j\mapsto -j$$, to arrive at
\begin{aligned} T_{2p}(m)&=\sum _{\begin{array}{c} 2Mj +pn>-\frac{\delta _{l}}{2}\\ 2Mj -pn\ge \frac{\delta _{l}}{2} \\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}+\sum _{\begin{array}{c} 2Mj +pn<-\frac{\delta _{l}}{2}\\ 2Mj -pn\le \frac{ \delta _{l}}{2}\\ (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2 \end{array}}(-1)^{Mn+j}. \end{aligned}
For $$m= 8pk+\delta _{l}^2$$, the generating functions, $$\sigma _{2p,l}$$ for $$m>0$$ and $$\sigma ^{*}_{2p,l}$$ for $$m<0$$, for $$T_{2p}(m)$$, are
\begin{aligned} q^{\frac{\delta ^2_{l}}{8p}}\sigma _{2p,l}(q)&=\left( \sum _{\begin{array}{c} Mn+j> - \frac{\delta _{l}M}{2p}\\ Mn-j\ge -\frac{\delta _{l}M}{2p} \end{array}}+\sum _{\begin{array}{c} Mn+j\le - \frac{\delta _{l}M}{2p}\\ Mn-j<- \frac{\delta _{l}M}{2p} \end{array}}\right) (-1)^{Mn+j} q^{\frac{p}{2}(n+\frac{\delta _{l}}{2p})^2-j^2}, \\ q^{-\frac{\delta ^2_{l}}{8p}}\sigma ^*_{2p,l}(q)&=\left( \sum _{\begin{array}{c} 2Mj +pn>-\frac{\delta _{l}}{2}\\ 2Mj -pn\ge \frac{\delta _{l}}{2} \end{array}}+\sum _{\begin{array}{c} 2Mj +pn<-\frac{\delta _{l}}{2}\\ 2Mj -pn\le \frac{ \delta _{l}}{2} \end{array}}\right) (-1)^{Mn+j} q^{-\frac{p}{2}(n+\frac{\delta _{l}}{2p})^2+j^2}. \end{aligned}
Finally, for each l, we define
\begin{aligned} \phi _{l}(q;p)&=q^{\frac{\delta ^2_{l}}{8p}}\sigma _{2p,l}(q) +q^{-\frac{\delta ^2_{l}}{8p}}\sigma ^*_{2p,l}(q)=\sum _{m\equiv \delta ^2_{l}\pmod {8p}}T_{2p}(m)q^{\frac{\vert m\vert }{8p}}. \end{aligned}

## 3 Example: $$p=19$$

In the case of $$p=19$$, the class number of $${{\mathbb {Q}}}(\sqrt{38})$$ is 1. In this case, the proof of modularity applies exactly as in Cohen’s argument. Specifically, we identify $$\chi _{19,1}$$ with a character on $$I^{(76)}$$; it gives a ray class character on $$CL({\mathfrak {m}})$$ with conductor $${\mathfrak {m}}=(4(19+3\sqrt{38}))$$. However, the ray class field is a degree 36 extension, L, of $$k_{1}$$. To complete the Artin theory argument for the quadratic identities, we need to identify L and show that the one-dimensional representations $$\chi _{19,1}\circ (\text {Art}^{{\mathfrak {m}}})^{-1}$$, $$\chi _{19,2}\circ (\text {Art}^{{\mathfrak {m}}})^{-1}$$, $$\chi _{19,3}\circ (\text {Art}^{{\mathfrak {m}}})^{-1}$$ all induce the same representation of $$\mathrm{Gal}(L/{{\mathbb {Q}}})$$.

We then have the theta series:
\begin{aligned} \phi (q)=\sum _{{\mathfrak {a}}\subset {{\mathbb {Z}}}[\sqrt{38}]}\chi _{19,1} ({\mathfrak {a}})q^{\frac{N{\mathfrak {a}}}{152}}, \end{aligned}
and the Hecke L-series:
\begin{aligned} L(s,\chi _{19,1})=\sum _{{\mathfrak {a}}\subset {{\mathbb {Z}}}[\sqrt{38}]} \frac{\chi _{19,1}({\mathfrak {a}})}{N({\mathfrak {a}})^s}. \end{aligned}
The completed L-function $$\Lambda _{19}(s)=(2^7\cdot 19^2)^{\frac{s}{2}}\pi ^{-s}\Gamma (\frac{s}{2})^2L(s,\chi _{19,1})$$ satisfies the functional equation:
\begin{aligned} \Lambda _{19}(1-s)=\Lambda _{19}(s). \end{aligned}
Following Cohen, set
\begin{aligned} \phi _{0}(\tau ;19)=y^{\frac{1}{2}}\sum _{\begin{array}{c} n\equiv \delta ^2_{l}\\ 1\le l\le 9 \end{array}} T_{38}(n)e^{\frac{2\pi i n x}{152}}K_{0}\left( \frac{2\pi \vert n\vert y}{152}\right) . \end{aligned}
This construction yields the following result.

### Proposition 3.1

$$\phi _{0}(\tau ;19)$$ is a Maass waveform on $${\Gamma }(2)$$ with eigenvalue $$\lambda =\frac{1}{4}$$.

### Proof

By construction, $$\phi _{0}(\tau ;19)$$ satisfies:
\begin{aligned} \left( \Delta -\frac{1}{4}\right) \phi _{0}(\tau ;19)=0. \end{aligned}
Thus, it is determined by the values $$\phi _{0}(\tau ;19)\vert _{x=0}$$ and $$\frac{\partial \phi _{0}(\tau ;19)}{\partial x}\vert _{x=0}$$. Equivalently, by the Maass Converse Theorem [8], it is determined by the functional equations of the two Dirichlet series:
\begin{aligned} \sum _{\begin{array}{c} n\equiv \delta ^2_{l}\\ 1\le l\le 9 \end{array}} \frac{T_{38}(n)}{\vert n\vert ^s} \quad \text {and}\quad \sum _{\begin{array}{c} n\equiv \delta ^2_{l}\\ 1\le l\le 9 \end{array}} \frac{\mathrm{sgn}{(n)}T_{38}(n)}{\vert n\vert ^s}. \end{aligned}
Consider the completed functions:
\begin{aligned} \Lambda _{19}(s)&=2^{\frac{s}{2}}\left( \frac{152}{\pi }\right) ^{s}{\Gamma }\left( \frac{s}{2}\right) ^{2}L(s,\chi _{19,1}),\\ {{\tilde{\Lambda }}}_{19}(s)&=2^{\frac{s+1}{2}}\left( \frac{152}{\pi }\right) ^{s+1}{\Gamma }\left( \frac{s+1}{2}\right) ^{2}\sum _{\begin{array}{c} n\equiv \delta ^2_{l}\\ 1\le l\le 9 \end{array}} \frac{\mathrm{sgn}{(n)}T_{38}(n)}{\vert n\vert ^s}, \end{aligned}
where $$\frac{N({\mathfrak {m}})}{2}=152$$. Their functional equations are $$\Lambda _{19}(1-s)=\Lambda _{19}(s)$$ and $${{\tilde{\Lambda }}}_{19}(1-s)=-{{\tilde{\Lambda }}}_{19}(s)$$, [9]. We start with (see [8]):
\begin{aligned} K_{0}(y)=\frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }{\Gamma }\left( \frac{s}{2}\right) ^{2}2^{s}y^{-s}\mathrm{d}s, \end{aligned}
where $$y>0$$ and $$\sigma =\mathrm {Re}(s)>0$$. It follows that
\begin{aligned} y^{\frac{1}{2}}K_{0}\left( \frac{2\pi \vert n\vert }{152}y\right) = \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }\frac{\left( \frac{152}{\pi }\right) ^{s+\frac{1}{2}}{\Gamma }\left( \frac{s+\frac{1}{2}}{2}\right) ^{2}y^{-s}\mathrm{d}s}{\vert n\vert ^{s+\frac{1}{2}}}, \end{aligned}
for $$y>0,\sigma >\frac{1}{2}.$$ Thus:
\begin{aligned} \phi _{0}(iy;19)&=\frac{2^{-\frac{9}{4}}}{2\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }y^{-s}2^{-\frac{s}{2}}\Lambda _{19}\left( s+\frac{1}{2},\chi _{19,1}\right) \mathrm{d}s. \end{aligned}
Moving the line of integration to the vertical line $$-\sigma +it$$ and letting $$t\mapsto -t$$, it gives:
\begin{aligned} \phi _{0}(iy;19)&=\frac{2^{-\frac{9}{4}}}{2\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }y^{s}2^{\frac{s}{2}}\Lambda _{19}\left( -s+\frac{1}{2},\chi _{19,1}\right) \mathrm{d}s\\&=\frac{2^{-\frac{9}{4}}}{2\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }\left( \frac{1}{2y}\right) ^{-s}2^{-\frac{s}{2}}\Lambda _{19}\left( s+\frac{1}{2},\chi _{19,1}\right) \mathrm{d}s\\&=\phi _{0}\left( \frac{-1}{2iy};19\right) . \end{aligned}
Set $$\phi _{1}(\tau )=\phi _{0}(\frac{-1}{2\tau };19)$$ and note that
\begin{aligned} \frac{\partial \phi _{1}}{\partial x}\bigg \vert _{x=0}=-\frac{1}{2y^2}\frac{\partial \phi _{0}}{\partial x}\left( \frac{-1}{2\tau };19\right) \bigg \vert _{x=0}. \end{aligned}
To evaluate $$\frac{\partial \phi _{0} }{\partial x}(iy;19)$$, we consider, for $$y>0,\sigma >\frac{1}{2}$$:
\begin{aligned}&ny^{\frac{1}{2}}K_{0}\left( \frac{2\pi \vert n\vert }{152}y\right) = \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }\frac{\left( \frac{152}{\pi }\right) ^{s+\frac{1}{2}}{\Gamma }\left( \frac{s+\frac{1}{2}}{2}\right) ^{2}\mathrm{sgn}{(n)}y^{-s}\mathrm{d}s}{\vert n\vert ^{s-\frac{1}{2}}}. \end{aligned}
Hence
\begin{aligned} \frac{\partial \phi _{0} }{\partial x}(iy;19) =\left( \frac{2\pi i}{152}\right) \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }2^{-(\frac{s+\frac{1}{2}}{2})}{{\tilde{\Lambda }}}_{19}\left( s-\frac{1}{2}\right) y^{-s}\mathrm{d}s.\end{aligned}
Finally, shift the line of integration to the vertical line $$2-\sigma +it$$ and let $$t\mapsto -t$$, to obtain
\begin{aligned} \frac{\partial \phi _{0} }{\partial x}(iy;19)&=\left( \frac{2\pi i}{152}\right) \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }2^{-(\frac{2-s+\frac{1}{2}}{2})} {{\tilde{\Lambda }}}_{19}\left( \frac{3}{2}-s\right) y^{s-2}\mathrm{d}s\\&=\frac{1}{2y^2}\left( \frac{2\pi i}{152}\right) \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }2^{-(\frac{s+\frac{1}{2}}{2})}{{\tilde{\Lambda }}}_{19}\left( \frac{3}{2}-s\right) \left( \frac{1}{2y}\right) ^{-s}\mathrm{d}s\\&=-\frac{1}{2y^2}\left( \frac{2\pi i}{152}\right) \frac{1}{8\pi i}\int _{\sigma -i\infty }^{\sigma +i\infty }2^{-(\frac{s+\frac{1}{2}}{2})}{{\tilde{\Lambda }}}_{19}\left( s-\frac{1}{2}\right) \left( \frac{1}{2y}\right) ^{-s}\mathrm{d}s\\&=-\frac{1}{2y^2}\frac{\partial \phi _{0} }{\partial x}\left( \frac{-1}{2yi};19\right) \\&=\frac{\partial \phi _{1} }{\partial x}\Big \vert _{x=0}. \end{aligned}
$$\square$$

## 4 Modularity of Indefinite Theta Series a la Zwegers

For each $$\delta _{l}$$, our generalized $$\sigma$$ functions fit into Zwegers’ formalism. In this section, we briefly summarize Zwegers’ results. Let $$Q(\nu _{1},\nu _{2})=\frac{1}{2}\nu ^{t}A\nu$$ be an indefinite binary quadratic form and $$B(\nu ,\mu )=\nu ^{t}A\mu$$ the associated bilinear form. We shall also denote the components of $$\nu$$ by $$\left( {\begin{matrix}\nu _1\\ \nu _2\end{matrix}}\right)$$. It is assumed that the binary quadratic form $$Q=[a,b,c]$$ has $$a,c\in \frac{1}{2} {{\mathbb {Z}}}$$ and $$b\in {{\mathbb {Z}}}$$. The hyperbola $$\{\left( {\begin{matrix}\nu _{1}\\ \nu _{2}\end{matrix}}\right) :Q(\nu )=-1\}$$ is the disjoint union $$C^{+}_{Q}\cup C^{-}_{Q}$$, where $$C^{+}_{Q}=\{\left( {\begin{matrix}\nu _{1}\\ \nu _{2}\end{matrix}}\right) :Q(\nu )=-1 \text { and } \nu _{2}>0\}$$. It then turns out that there is a change of basis matrix P, such that the following three properties hold.
1. 1.

We have $$Q(x,y)=(Q_{0}\circ P)(x,y)$$ for $$Q_{0}(\nu _{1},\nu _{2})=\nu _{1}\nu _{2}$$.

2. 2.

The vector $$P^{-1}\left( \begin{matrix}1\\ -1\end{matrix}\right)$$ lies in the component $$C^{+}_{Q}$$.

3. 3.

All of $$C^{+}_{Q}$$ is parameterized by $$c:{{\mathbb {R}}}\longrightarrow C^{+}_{Q}$$ given by $$c(t)=P^{-1}\left( {\begin{matrix}e^{t}\\ -e^{-t}\end{matrix}}\right)$$.

### Remark 4.1

In Zwegers’ normalization, $$2Q=[2a,2b,2c]$$ is a primitive indefinite binary quadratic form with matrix $$A=\left( \begin{matrix}2a&{}b\\ b&{}2c\end{matrix}\right)$$. We assume $$a>0$$. We have
\begin{aligned} Q(x,y)=a(x-\eta y)(x-\eta ^{\prime }y), \end{aligned}
with $$\eta =\frac{-b+\sqrt{D}}{2a}$$, $$\eta ^{\prime }$$ its conjugate, and $$D=b^2-4ac\in {{\mathbb {Z}}}^{+}$$. If
\begin{aligned} c_{0}=\sqrt{\frac{a}{D}}\left( \begin{matrix}-\frac{b}{a}\\ 2\end{matrix}\right) , \end{aligned}
then $$Q(c_{0})=-1$$, and $$B(\nu ,c_{0})<0$$ if and only if $$\nu _{0}>0$$. We have
\begin{aligned} P=\sqrt{a}\left( \begin{matrix}1&{}\quad -\eta ^{\prime }\\ 1&{}\quad -\eta \end{matrix}\right) \end{aligned}
is the change of basis matrix, such that
\begin{aligned} c_{0}=P^{-1}\left( \begin{matrix}1\\ -1\end{matrix}\right) . \end{aligned}
The parameterization of $$C^{+}_{Q}$$ is then given by:
\begin{aligned} c(t)=\left( \begin{array}{l}\frac{-b\cosh (t)+\sqrt{D}\sinh (t)}{2a}\\ \cosh (t)\end{array}\right) . \end{aligned}
We will restrict the automorphisms of 2Q to $$\mathrm{SL}(2,{{\mathbb {Z}}})$$, and thus, we define
\begin{aligned} \text {Aut}^{+}(2Q)&=\{{\gamma }\in \mathrm{SL}(2,{{\mathbb {Z}}}):{\gamma }^{t}A{\gamma }=A\}\\&=\{{\gamma }\in \mathrm{SL}(2,{{\mathbb {Z}}}):{\gamma }\eta =\eta , {\gamma }\eta ^{\prime }=\eta ^{\prime }\}=\langle {\gamma }_{\eta }\rangle , \end{aligned}
where
\begin{aligned} {\gamma }_{\eta }=\left( \begin{matrix}u_{0}-bv_{0}&{}\quad -2cv_{0}\\ 2av_{0}&{}\quad u_{0} +bv_{0}\end{matrix}\right) . \end{aligned}
Here, $$(u_{0},v_{0})$$ is a fundamental solution to Pell’s equation $$u^2-Dv^2=1$$, and D is the discriminant of Q.
Zwegers defined the following family of lattice sums [10], which are constructed to be eigenfunctions of the hyperbolic Laplacian:
\begin{aligned} \Delta = -y^2\left( \frac{\partial ^2}{\partial x^2}+\frac{\partial ^2}{\partial y^2}\right) , \end{aligned}
but are only legitimate Maass waveforms in special cases.

### Definition 4.2

For $$c_1,c_2\in C^{+}_{Q}$$ and $$a,b\in {{\mathbb {R}}}^2$$, we consider the indefinite theta function of Zwegers:
\begin{aligned}&\Phi ^{c_{1},c_{2}}_{a,b}(\tau )=\mathrm{sgn}{(t_{2}-t_{1})}y^{\frac{1}{2}} \frac{1}{2}\\&\quad \times \left( \sum _{\nu =a+{{\mathbb {Z}}}^2}(1-\mathrm{sgn}{B(\nu ,c_{1})B(\nu ,c_{2})})e^{2\pi i Q(\nu )x}e^{2\pi i B(\nu ,b)}K_{0}(2\pi Q(\nu )y)\right. \\&\quad \left. +\sum _{\nu =a+{{\mathbb {Z}}}^2}(1-\mathrm{sgn}{B(\nu ,c^{\perp }_{1})B(\nu ,c^{\perp }_{2})})e^{2\pi i Q(\nu )x}e^{2\pi i B(\nu ,b)}K_{0}(2\pi Q(\nu )y)\right) . \end{aligned}
Here, $$t_{j}$$, for $$j=1,2$$, is defined by $$c_{j}=c(t_{j})$$ and $$c^{\perp }_{j}$$ is defined by $$c^{\perp }_{j}= c^{\perp }(t_{j})$$, with
\begin{aligned} c^{\perp }(t)=P^{-1}\left( \begin{matrix}e^{t}\\ e^{-t}\end{matrix}\right) . \end{aligned}
Note that the inclusion of the exponential and K-Bessel functions implies that $$\Phi ^{c_{1},c_{2}}_{a,b}(\tau )$$ satisfies
\begin{aligned} \Delta \Phi ^{c_{1},c_{2}}_{a,b}(\tau )=\frac{1}{4}\Phi ^{c_{1},c_{2}}_{a,b}(\tau ), \end{aligned}
so that it turns the q-series indefinite theta functions into functions which have a hope of (and sometimes are) Maass waveforms. In Zwegers’ language, we can express the functions from our new family as follows.

### Proposition 4.3

For $$A=\left( \begin{array}{lrll}p&{}0\\ 0&{}-2\end{array}\right) ,c_1 = \frac{1}{\sqrt{p}}\left( \begin{matrix}-2M\\ p\end{matrix}\right) , c_{2}=\frac{1}{\sqrt{p}}\left( \begin{matrix}2M\\ p\end{matrix}\right) ,a_{l}=\left( \begin{array}{c}\frac{\delta _{l}}{2p}\\ 0\end{array}\right)$$ and $$b=\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right)$$, we have
\begin{aligned} \Phi ^{c_{1},c_{2}}_{a_{l},b}(\tau )=\zeta ^M_{4p,l}\phi _{l,0}(\tau ), \end{aligned}
where $$\zeta _{4p,l}=e^{\frac{2\pi i \delta _{l}}{4p}}$$.

### Proof

From
\begin{aligned} (2pn+\delta _{l})^{2}-2p(2j)^2=8pk+\delta _{l}^2, \end{aligned}
we have the following setup:
\begin{aligned} Q(\nu _{1},\nu _{2})=\frac{p}{2}\nu ^2_{1}-\nu ^2_{2},\; A=\left( \begin{array}{cc}p&{}0\\ 0&{}-2\end{array}\right) ,\; B(\mu ,\nu )=p\mu _{1}\nu _{1}-2\mu _{2}\nu _{2},\; a_{l}=\left( \begin{array}{c}\frac{\delta _{l}}{2p}\\ 0\end{array}\right) . \end{aligned}
To find $$b=\left( \begin{matrix}b_{1}\\ b_{2}\end{matrix}\right)$$, we want
\begin{aligned} e^{2\pi iB(\nu ,b)}=\lambda (-1)^{Mn+j}, \end{aligned}
when $$\nu =\left( \begin{matrix}n+\frac{\delta _{l}}{2p}\\ j\end{matrix}\right)$$. Thus, we have the condition:
\begin{aligned} 2B\left( \left( \begin{matrix}n+\frac{\delta _{l}}{2p}\\ j\end{matrix}\right) ,\left( \begin{matrix}b_{1}\\ b_{2}\end{matrix}\right) \right) =(Mn\pm j) +C. \end{aligned}
This gives $$b=\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right)$$ and
\begin{aligned} \exp \left( {2\pi i B\left( \left( \begin{array}{c}n+\frac{1}{2p}\\ j\end{array}\right) ,\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) \right) }\right) =\zeta ^{M}_{4p,l}(-1)^{Mn+j}. \end{aligned}
Next, we take $$c\in C^{+}_{Q}$$ of the form $$c=\alpha b$$. Since
\begin{aligned} \alpha ^2\left( \frac{p}{2}\left( \frac{M}{2p}\right) ^2 -\left( \frac{1}{4}\right) ^2\right) =-1, \end{aligned}
this gives $$\alpha =4\sqrt{p}$$, and we set
\begin{aligned} c_{1}=\frac{1}{\sqrt{p}}\left( \begin{matrix}-2M\\ p\end{matrix}\right) , \quad \text { and }\quad c_{2}=\frac{1}{\sqrt{p}}\left( \begin{matrix}2M\\ p\end{matrix}\right) . \end{aligned}
Since
\begin{aligned} Q(x,y)=\frac{p}{2}x^2-y^2=\frac{p}{2}\left( x-\sqrt{\frac{2}{p}}y\right) \left( x+\sqrt{\frac{2}{p}}y\right) , \end{aligned}
by the remark at the start of this section, the change of basis matrix is:
\begin{aligned} P=\sqrt{\frac{p}{2}}\left( \begin{matrix}1&{}\sqrt{\frac{2}{p}}\\ 1&{}-\sqrt{\frac{2}{p}}\end{matrix}\right) . \end{aligned}
The generator of $$\text {Aut}^{+}(2Q)$$ is then given by:
\begin{aligned} {\gamma }_{\sqrt{\frac{2}{p}}}=\left( \begin{matrix}2p-1&{}\quad 4M\\ 2Mp&{}\quad 2p-1\end{matrix}\right) , \end{aligned}
since $$N(\epsilon _{2p})=1$$ and the fundamental solution to
\begin{aligned} x^2-2py^2=1 \end{aligned}
is $$(2p-1,2M)$$. Note that $$c_{1}$$ is the unique point in $$C^{+}_{Q}$$ satisfying
\begin{aligned} {\gamma }_{\sqrt{\frac{2}{p}}}\cdot \left( \begin{matrix}a\\ b\end{matrix}\right) =\left( \begin{matrix}-a\\ b\end{matrix}\right) . \end{aligned}
Employing the parameterization
\begin{aligned} c(t)=\left( \begin{array}{c}\sqrt{\frac{2}{p}}\sinh (t)\\ \cosh (t)\end{array}\right) , \end{aligned}
we find
\begin{aligned} t_{1}=\log (\sqrt{p}-\sqrt{2}\cdot M)\quad \text {and}\quad t_{2}=\log (\sqrt{p}+\sqrt{2}\cdot M). \end{aligned}
It follows that
\begin{aligned} {c_{1}}^{\perp }=P^{-1}\left( \begin{array}{c}\sqrt{p}-\sqrt{2}\cdot M\\ \sqrt{p}+\sqrt{2}\cdot M\end{array}\right) =\left( \begin{array}{c}\sqrt{2}\\ -\sqrt{2}\cdot M\end{array}\right) \quad \text {and} \quad {c_{2}}^{\perp }=\left( \begin{array}{c}\sqrt{2}\\ \sqrt{2}\cdot M\end{array}\right) . \end{aligned}
Next, we determine the required cone conditions to obtain
\begin{aligned} \mathrm{sgn}(B(\nu ,c_{1}))&=-\mathrm{sgn}\left( Mn+j+\frac{\delta _{l}M}{2p}\right) ,\\ \mathrm{sgn}(B(\nu ,c_{2}))&=\mathrm{sgn}\left( Mn-j+\frac{\delta _{l}M}{2p}\right) ,\\ \mathrm{sgn}(B(\nu ,{c_{1}}^{\perp }))&=\mathrm{sgn}\left( pn-2Mj+\frac{\delta _{l}}{2}\right) ,\\ \mathrm{sgn}(B(\nu ,{c_{2}}^{\perp }))&=\mathrm{sgn}\left( pn+2Mj+\frac{\delta _{l}}{2}\right) , \end{aligned}
and
\begin{aligned} 1-\mathrm{sgn}(B(\nu ,c_{1})B(\nu ,c_{2}))&={\left\{ \begin{array}{ll} 2, &{}\text { if } Mn+j>-\frac{\delta _{l}M}{2p} \text { and } Mn-j> -\frac{\delta _{l}M}{2p}, \\ 2, &{} \text { if } Mn+j< -\frac{\delta _{l}M}{2p} \text { and } Mn-j<-\frac{\delta _{l}M}{2p}, \\ 0,&{} \text { otherwise}, \end{array}\right. }\\ 1-\mathrm{sgn}(B(\nu ,{c_{1}}^{\perp })B(\nu ,{c_{2}}^{\perp }))&={\left\{ \begin{array}{ll} 2, &{}\text { if } 2Mj+pn<-\frac{\delta _{l}}{2}\text { and }2Mj-pn<\frac{\delta _{l}}{2}, \\ 2,&{} \text { if } 2Mj+pn>-\frac{\delta _{l}}{2} \text { and } 2Mj-pn>\frac{\delta _{l}}{2}, \\ 0,&{} \text { otherwise}. \end{array}\right. } \end{aligned}
Plugging our data into Definition 4.2, we have
\begin{aligned} \Phi ^{c_{1},c_{2}}_{a_{l},b}(\tau )&= \zeta ^M_{4p,l}y^{\frac{1}{2}} \sum _{n\ge 0}\left\{ \sum _{\begin{array}{c} Mn+j> -\frac{\delta _{l}M}{2p}\\ Mn-j> -\frac{\delta _{l}M}{2p}\\ Q\left( {\begin{matrix}n+\frac{\delta _{l}}{2p}\\ j\end{matrix}}\right) =k+\frac{\delta ^2_{l}}{8p} \end{array}} +\sum _{\begin{array}{c} Mn+j< -\frac{\delta _{l}M}{2p}\\ Mn-j<-\frac{\delta _{l}M}{2p}\\ Q\left( {\begin{matrix}n+\frac{\delta _{l}}{2p}\\ j\end{matrix}}\right) =k+\frac{\delta ^2_{l}}{8p} \end{array}}\right\} \\&\quad \times (-1)^{Mn+j}e^{2\pi i \left( k+\frac{\delta ^2_{l}}{8p}\right) x}K_{0} \left( 2\pi \left( k+\frac{\delta ^2_{l}}{8p}\right) y\right) \\&\quad +\zeta ^M_{4p,l}y^{\frac{1}{2}} \sum _{n< 0}\left\{ \sum _{\begin{array}{c} 2Mj+pn> -\frac{\delta _{l}}{2}\\ 2Mj-pn> \frac{\delta _{l}}{2}\\ Q\left( {\begin{matrix}n +\frac{\delta _{l}}{2p}\\ j\end{matrix}}\right) =k+\frac{\delta ^2_{l}}{8p} \end{array}}+\sum _{\begin{array}{c} 2Mj+pn< -\frac{\delta _{l}}{2} \\ 2Mj-pn< \frac{\delta _{l}}{2}\\ Q\left( {\begin{matrix}n+\frac{\delta _{l}}{2p}\\ j\end{matrix}}\right) =k+\frac{\delta ^2_{l}}{8p} \end{array}}\right\} \\&\quad \times (-1)^{Mn+j}e^{2\pi i \left( k+\frac{\delta ^2_{l}}{8p}\right) x}K_{0}\left( 2\pi \left| k+\frac{\delta ^2_{l}}{8p}\right| y\right) , \end{aligned}
as claimed. $$\square$$
Zwegers further constructed the “completed” function:
\begin{aligned} {\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau ) = y^{\frac{1}{2}}\sum _{\nu \in a+{{\mathbb {Z}}}^{2}}q^{Q(\nu )}e^{2\pi i B(\nu ,b)} \int _{t_{1}}^{t_{2}}e^{-\pi yB(\nu ,c(t))^{2}}\mathrm{d}t, \end{aligned}
which naturally contains $$\Phi ^{c_1,c_2}_{a,b}(\tau )$$ as a piece and transforms as a modular form, but may no longer be an eigenfunction of the hyperbolic Laplacian. However, its image under $$\Delta -1/4$$ is a “simpler” function, and so, in analogy with the theory of mock modular forms and harmonic Maass forms, Zwegers called $$\Phi ^{c_1,c_2}_{a,b}$$ a mock Maass theta function. In particular, he proved that $${\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau )$$ has the following properties which will be useful for us here:
1. 1.
We have the following relationships under transformations of the parameters of $${\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau ):$$
1. 1.1.

$${\widehat{\Phi }}^{c_{1},c_{2}}_{a+\lambda ,b+\mu }(\tau )=e^{2\pi i B(a,\mu )}{\widehat{\Phi }}^{c}_{a,b}(\tau ),\quad \lambda \in {{\mathbb {Z}}}\times {{\mathbb {Z}}},\quad \mu \in \frac{1}{p}{{\mathbb {Z}}}\times \frac{1}{2}{{\mathbb {Z}}},$$

2. 1.2.

$${\widehat{\Phi }}^{c_{1},c_{2}}_{-a,-b}(\tau )={\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau )$$,

3. 1.3.

$${\widehat{\Phi }}^{c_{1},c_{2}}_{\left( {\begin{matrix}-a_{1}\\ a_{2} \end{matrix}}\right) , \left( {\begin{matrix}-b_{1}\\ b_{2}\end{matrix}}\right) }(\tau ) ={\widehat{\Phi }}^{c_{1},c_{2}}_{\left( {\begin{matrix}a_{1}\\ a_{2}\end{matrix}}\right) , \left( {\begin{matrix}b_{1}\\ b_{2}\end{matrix}}\right) }(\tau )$$.

2. 2.
The modularity transformations of $${\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau )$$ are given as follows. Under translation, we have
\begin{aligned} {\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau +1)&=e^{-2\pi i Q(a)-\pi i B(AA^{*},a)}{\widehat{\Phi }}^{c_{1},c_{2}}_{a,a+b+\frac{1}{2}AA^{*}}(\tau ), \end{aligned}
where $$A^{*}$$ denotes the vector of diagonal entries of A. Under inversion, we have
\begin{aligned} {\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}\left( -\frac{1}{\tau }\right)&=e^{2\pi i B(a,\mu )}\frac{e^{2\pi i B(a,b)}}{\sqrt{-\det {A}}}\sum _{\mu \in A^{-1}{{\mathbb {Z}}}^2\pmod {{{\mathbb {Z}}}^2}}{\widehat{\Phi }}_{-b+\mu ,a}(\tau ). \end{aligned}

3. 3.
We have that $${\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau )$$ is related to $$\Phi ^{c_{1},c_{2}}_{a,b}(\tau )$$ by
\begin{aligned} {\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}(\tau )= \Phi ^{c_{1},c_{2}}_{a,b}(\tau )+\phi ^{c_{1}}_{a,b}(\tau )-\phi ^{c_{2}}_{a,b}(\tau ), \end{aligned}
where
\begin{aligned} \phi ^{c_{0}}_{a,b}(\tau )=y^{\frac{1}{2}}\sum _{\nu \in a+{{\mathbb {Z}}}^{2}}\alpha _{t_{0}}(\nu y^{\frac{1}{2}})q^{Q(\nu )}e^{2\pi i B(\nu ,b)}, \end{aligned}
and where
\begin{aligned} \alpha _{t_{0}}(\nu )={\left\{ \begin{array}{ll} \int _{t_{0}}^{\infty }e^{-\pi yB(\nu ,c(t))^{2}}\mathrm{d}t,&{} \text {if } B(\nu ,{c_{0}})B(\nu ,{c_{0}}^{\perp })>0,\\ - \int _{-\infty }^{t_{0}}e^{-\pi yB(\nu ,c(t))^{2}}\mathrm{d}t,&{} \text {if } B(\nu ,{c_{0}})B(\nu ,{c_{0}}^{\perp })<0,\\ 0, &{} \text {if } B(\nu ,{c_{0}})B(\nu ,{c_{0}}^{\perp })=0. \end{array}\right. } \end{aligned}
Moreover, the functions $$\phi ^{c_{1}}_{a,b}$$ satisfy the parameter identities 1.1–1.3 and the functional equation
\begin{aligned} \phi ^{\gamma c}_{\gamma a,\gamma b}(\tau )=\phi ^{c}_{a,b}(\tau ) \quad \text { for any }{\gamma }\in \text {Aut}^{+}(2Q). \end{aligned}

4. 4.
Instead of being in the kernel of $$\Delta -1/4$$ as a typical Maass waveform would be, in general:
\begin{aligned} (\Delta -1/4)({\widehat{\Phi }}^{c_{1},c_{2}}_{a,b}) \end{aligned}
has an explicit representation in terms of “simpler” functions.

Property 3 is especially convenient for showing that special examples of $$\Phi ^{c_1,c_2}_{a,b}$$ are actually Maass waveforms, which happens precisely when $$\phi _{a,b}^{c_1}=\phi _{a,b}^{c_2}$$, and hence, $${\widehat{\Phi }}_{a,b}^{c_1,c_2}=\Phi _{a,b}^{c_1,c_2}$$. In this situation, the function inherits both the eigenfunction under the Laplacian property of $$\Phi _{a,b}^{c_1,c_2}$$ as well as the full modularity transformation properties of $${{\widehat{\Phi }}}_{a,b}^{c_1,c_2}$$. We conclude this section by noting that in our case, the modular transformations of the completed functions take the form:
\begin{aligned} \begin{aligned} {\widehat{\Phi }}_{a,b}(\tau +1)&=e^{-2\pi i Q(a)-\pi i (pa_{1}-2a_{2})} {\widehat{\Phi }}_{a,a+b+\left( \begin{array}{l}\frac{1}{2}\\ \frac{1}{2}\end{array}\right) }(\tau ),\\ {\widehat{\Phi }}_{a,b}\left( -\frac{1}{\tau }\right)&=\frac{e^{2\pi i B(a,b)}}{\sqrt{2p}}\sum _{\begin{array}{c} m_{1} \pmod {p}\\ m_{2}\pmod {2} \end{array}}{\widehat{\Phi }}_{-b+\left( \begin{array}{l}\frac{m_{1}}{p}\\ \frac{m_{2}}{2}\end{array}\right) ,a}(\tau ). \end{aligned} \end{aligned}
(4.1)

### 4.1 Proof of Theorem 1

By Proposition 4.3:
\begin{aligned} \zeta ^M_{4p,l}\phi _{0,l}(\tau ;p)=\Phi ^{c_{1},c_{2}}_{\left( \begin{array}{c} \frac{\delta _{l}}{2p}\\ 0\end{array}\right) , \left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau ). \end{aligned}
Zwegers’ machinery gives that $$\Phi ^{c_{1},c_{2}}_{\left( \begin{array}{c}\frac{\delta _{c}}{2p}\\ 0\end{array}\right) , \left( \begin{array}{l}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau )$$ is a component of a vector-valued Maass waveform on $$\mathrm{SL}(2,{{\mathbb {Z}}})$$ whenever
\begin{aligned} \phi ^{c_{1}}_{\left( \begin{array}{c} \frac{\delta _{l}}{2p}\\ 0\end{array}\right) , \left( \begin{array}{l}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau ) =\phi ^{c_{2}}_{\left( \begin{array}{c} \frac{\delta _{l}}{2p}\\ 0\end{array}\right) , \left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau ). \end{aligned}
Since $${\gamma }_{\sqrt{\frac{2}{p}}}c_{1}=c_{2}$$, we have
\begin{aligned} \phi ^{c_{1}}_{\left( \begin{array}{c}\frac{\delta _{l}}{2p}\\ 0\end{array}\right) ,\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau )&=\phi ^{{\gamma }_{\sqrt{\frac{2}{p}}} c_{1}}_{{\gamma }_{\sqrt{\frac{2}{p}}} \left( \begin{array}{c}\frac{\delta _{l}}{2p}\\ 0\end{array}\right) ,{\gamma }_{\sqrt{\frac{2}{p}}} \left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau )\\&=\phi ^{c_{2}}_{\left( \begin{array}{c}\frac{-\delta _{l}}{2p}\\ 0\end{array}\right) +\left( \begin{array}{c}\delta _{l}\\ M\delta _{l}\end{array}\right) ,\left( \begin{array}{c}-\frac{M}{2p}\\ \ -\frac{1}{4}\end{array}\right) +\left( \begin{array}{c}2M\\ M^2+\frac{p}{2}\end{array}\right) }(\tau )\\&=e^{-2\pi i \delta _{l}M}\phi ^{c_{2}}_{\left( \begin{array}{c}-\frac{\delta _{l}}{2p}\\ 0\end{array}\right) ,\left( \begin{array}{c}-\frac{M}{2p}\\ frac{1}{4}\end{array}\right) }(\tau )=\phi ^{c_{2}}_{\left( \begin{array}{c}\frac{\delta _{l}}{2p}\\ 0\end{array}\right) ,\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }(\tau ). \end{aligned}
Thus, $$\phi _{0,l}(\tau ;p)$$ is a Maass waveform, with multiplier, on a congruence subgroup of $$\mathrm{SL}(2,{{\mathbb {Z}}}).$$

### 4.2 Vector-Valued Transformations

For $$1\le \nu \le \frac{p+M}{2}-1$$, let
\begin{aligned} {\widehat{\Phi }}=\left( \begin{array}{c} {\widehat{\Phi }}_{\left( \begin{array}{c}-\frac{M}{2p}+\frac{\nu }{p}\\ 0\end{array}\right) ,\left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\end{array}\right) }\\ {\widehat{\Phi }}_{\left( \begin{array}{c}-\frac{M}{2p} +\frac{\nu }{p}\\ \frac{1}{4}\end{array}\right) , \left( \begin{array}{c}\frac{M}{2p}\\ 0\end{array}\right) }\\ {\widehat{\Phi }}_{\left( \begin{array}{c}-\frac{M}{2p}+\frac{\nu }{p}\\ \frac{1}{4}\end{array}\right) , \left( \begin{array}{c}\frac{M}{2p}\\ \frac{1}{4}\\ \end{array}\right) } \end{array} \right) . \end{aligned}
Employing the modular transformations (4.1) and the parametric identities 1.1–1.3, we can determine matrices $$A,B,C,A_{1},B_{1},C_{1}$$, each of size $$(\frac{p+M}{2}-1) \times (\frac{p+M}{2}-1)$$, such that
\begin{aligned} {\widehat{\Phi }}\left( \frac{-1}{\tau }\right) = \left( \begin{array}{c@{\quad }c@{\quad }c} 0 &{} A &{} 0\\ B &{} 0&{} 0\\ 0 &{} 0 &{} C \end{array} \right) {\widehat{\Phi }}(\tau ) \end{aligned}
and
\begin{aligned} {\widehat{\Phi }}(\tau +1)= \left( \begin{array}{c@{\quad }c@{\quad }c} A_{1} &{} 0 &{} 0\\ 0 &{} 0&{} B_{1}\\ 0 &{} C_{1}&{} 0 \end{array} \right) {\widehat{\Phi }}(\tau ). \end{aligned}

## 5 Questions

We conclude with several questions.
1. 1.

The construction of a Maass waveform attached to a real quadratic field using Zwegers’ formalism depends only on knowing the fundamental unit explicitly and the lemma from ADH. It would be interesting to construct the forms attached to other families of real quadratic fields where the fundamental unit is known.

2. 2.

Are there an infinite number of primes of the form $$p=qM^2+1$$?

3. 3.

Can Cohen’s argument be extended when the class number of $${{\mathbb {Q}}}(\sqrt{2p})$$ is greater than one?

4. 4.

Can the generating functions for $$V_{3}(m)$$ and $$U_{2}(m)$$ be used to prove the identities $$T(m)=V_{3}(m)=U_{2}(m)$$ using Bailey pairs?

## References

1. 1.
Andrews, G.E.: Unsolved problems: questions and conjectures in partition theory. Amer. Math. Monthly 93(9), 708–711 (1986)
2. 2.
Andrews, G.E.: Ramanujan’s “lost” notebook. V. Euler’s partition identity. Adv. Math. 61(2), 156–164 (1986)Google Scholar
3. 3.
Andrews, G.E., Dyson, F.J., Hickerson, D.: Partitions and indefinite quadratic forms. Invent. Math. 91(3) 391–407 (1988)
4. 4.
Bringmann, K., Lovejoy, J., Rolen, L.: On some special families of $$q$$-hypergeometric Maass forms. Int. Math. Res. Not. IMRN (18), 5537–5561 (2018)
5. 5.
Cohen, H.: $$q$$-identities for Maass waveforms. Invent. Math. 91(3), 409–422 (1988)
6. 6.
Hasse, H.: Über mehrklassige, aber eingeschlechtige reell-quadratische Zahlkörper. Elem. Math. 20, 49–59 (1965)
7. 7.
Hickerson, D.: Personal Correspondence to G. Andrews.Google Scholar
8. 8.
Maass, H.: Über eine neue Art von nichtanalytischen automorphen Funktionen und die Bestimmung Dirichletscher Reihen durch Funktionalgleichungen. Math. Ann. 121, 141–183 (1949)
9. 9.
Watkins, M.: Computing with Hecke Grössencharacters. In: Actes de la Conférence “Théorie des Nombres et Applications”, pp. 119–135. Publ. Math. Besançon Algèbre Théorie Nr., 2011, Presses Univ. Franche-Comté, Besançon (2011)Google Scholar
10. 10.
Zwegers, S.: Mock Maass theta functions. Q. J. Math. 63(3), 753–770 (2012)