1 Background

Let \({{\mathcal {P}}}(N)\) denote the set of all integer partitions of N and write \(p(N) = \left| {{\mathcal {P}}}(N)\right| \) for the number of integer partitions of N. The study of the analytic approximation of partition statistics started with Hardy–Ramanujan asymptotic formula [49], further strengthened by Rademacher’s exact formula [72]. These formulas give for any positive integer R the asymptotic

$$\begin{aligned} p(N) = \frac{\exp \left( K \sqrt{N}\right) }{4\sqrt{3} \, N} \left( \sum _{r=0}^{R-1} p_r N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) , \end{aligned}$$

where \(K = \frac{2\pi }{\sqrt{6}}\) and

$$\begin{aligned}&p_r = (-2K)^{r} \sum _{s=0}^r \left( \frac{-K^{2} }{24}\right) ^s \,\, \frac{\left( s+\frac{3}{2}, r-s\right) }{s!},\\&(\nu ,m)=\frac{\Gamma \left( \nu +m+\frac{1}{2}\right) }{m!\, \Gamma \left( \nu -m+\frac{1}{2}\right) } = \frac{ (4\nu ^2-1)(4\nu ^2-3^2)\cdots (4\nu ^2-(2m-1)^2) }{m!\, 4^m} \end{aligned}$$

for \(\nu \in {{\mathbb {C}}},m\in {{\mathbb {Z}}}_{\ge 0}\). For instance, \(p_0=1\) and \(p_1 = -\frac{1}{K} + \frac{K}{48}\).

For future reference, set

$$\begin{aligned} \mathbf p _0&= 1, \\ \mathbf p _s&= \sum _{j\ge 1} (-1)^j \sum _{r_1 + \cdots r_j = s, r_i \ge 1} p_{r_1}\cdots p_{r_j}. \end{aligned}$$

It is natural to pose questions about asymptotics of the number of partitions with prescribed properties. An interesting one is:

What is the probability that the smallest part of an integer partition is odd?

The paper establishes a precise asymptotic answer to this question and a collection of similar ones.

Theorem 1.1

(probability that the smallest part of an unrestricted partition is odd) Let \(\mathrm{sm}(\lambda )\) be the smallest part of the partition \(\lambda \) and set

$$\begin{aligned} p_{\mathrm{lo}}(N)=\left| \{ \lambda \in {{\mathcal {P}}}(N): \mathrm{sm}(\lambda ) \equiv 1\,\, (\mathrm{mod}~ 2) \} \right| . \end{aligned}$$

For any positive integer R, one has

$$\begin{aligned} p_{\mathrm{lo}}(N) = \frac{\exp \left( K\sqrt{N}\right) }{4\,\,{3}^\frac{1}{2} N} \left( \sum _{r=0}^{R-1}A_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

as \(N\rightarrow \infty \), where

$$\begin{aligned} A_r = \frac{1}{2(-2K)^r} \sum _{s=0}^r \frac{\sigma _s\,\, (s+\frac{3}{2},r-s)}{ s!} \left( \frac{-K^2}{24} \right) ^s \end{aligned}$$

where \(\sigma _n\) is given by (1.2). So

$$\begin{aligned} \mathbf P _N \left( \mathrm{sm}(\lambda ) \equiv 1 \,(\mathrm{mod}\,\, {2}) \right) = \frac{p_{\mathrm{lo}}(N)}{p(N)} = 1 + \sum _{r=1}^{R-1} \sum _{s=0}^{r} A_s \mathbf p _{r-s} \ N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) , \end{aligned}$$

where \(\mathbf P _N\) is the uniform measure on \({{\mathcal {P}}}(N)\).

The numbers \(\sigma _n\) appearing in the above theorem are special values of a Hecke L-function. In particular, they arise from the asymptotic expansion of a quantum modular form. Moreover, we show that the asymptotic expansions of many of the most famous quantum modular forms are intimately related to the asymptotics of interesting partition functions. Precisely, two of Zagier’s original four examples [83] and an example of Bettin and Conrey [13] arise in the six main theorems of the present work.

Section 1.2 introduces the quantum modular forms which arise in the present work. In the same spirit as Theorem 1.1, Sect. 1.3 contains four theorems, answering the questions:

  1. (1)

    What is the expected value of the smallest part of an integer partition of N?

  2. (2)

    What is the expected value of the smallest part of an integer partition of N with distinct part sizes?

  3. (3)

    What is the expected value of the largest part of an integer partition of N?

  4. (4)

    What is the expected value of the largest part of an integer partition of N with distinct part sizes?

Section 1.4 contains identities for the generating functions of the relevant counting functions. These identities involve the quantum modular forms introduced in Sect. 1.2. Section 1.5 contains three general circle method propositions which are used to derive the asymptotic expansions used to answer these questions. These are generalizations of Wright’s classic circle method [81] and may be of independent interest.

1.1 A history of partition statistics

There is a long history of the study of partition statistics and questions like those considered in this paper. Perhaps the first systematic study of statistical questions on integer partitions goes back to Erdős and his coauthors, especially Lehner [34] and Turán [35,36,37,38,39,40,41]. Additional results on the limiting distribution of partition statistics were found by Fristedt [44] and Pittel [70, 71]. While those results, and the results of the present paper, deal with the uniform measure on partitions of n, there has also been substantial interest in random partitions with respect to the Plancherel measure. See the works of Vershik and Kerov [76, 77], as well as the work of Oukonkov [68] and the references therein. The work of Erdős, Lehner, Pittel, Turán, Vershik, Kerov, and Oukonkov is largely motivated by the connection between representations of the symmetric groups and integer partitions, see, for instance, the book of MacDonald [63].

There have been many recent works concerned with the rank and crank statistics of integer partitions. These statistics were found by Dyson [32] and Andrews and Garvan [9, 45, 46] and are motivated by Ramanujan’s congruences for the partition function p(N). Similar to the present work, these statistics have gained a lot of attention because of their connections to exotic modular objects, such as quasimodular forms and mock modular forms [23, 24, 67, 73]. Significant results about the distribution of these statistics appear notably in the works of Bringmann and Mahlburg and their coauthors [15, 21, 30, 31, 69].

There remain many more works dealing with statistics of integer partitions and other probabilistic questions about integer partitions. Notable in those are the works dealing with runs and gaps in parts making up a partition [17, 18, 20, 22, 48, 51, 57, 78, 79].

This paper demonstrates how quantum modular forms and their asymptotic expansions, which involve values of modular L-functions, arise in the resolution of natural integer partition probability problems.

1.2 Quantum modular forms

Zagier [83] introduced the notion of a quantum modular form based on examples from number theory, combinatorics, and quantum invariants of 3-manifolds. Let \(k \in \frac{1}{2} {{\mathbb {Z}}}, \Gamma \) be a finite index subgroup of \(\mathrm SL_2({{\mathbb {Z}}})\), and \(\chi :\Gamma \rightarrow {{\mathbb {C}}}^\times \) be a finite-order character. A quantum modular form of weight k for \(\Gamma \) is a function \(f:{{\mathbb {P}}}^1({{\mathbb {Q}}})\setminus S \rightarrow {{\mathbb {C}}}\), where S is a finite subset of \({{\mathbb {P}}}^1({{\mathbb {Q}}})\), such that, for every \(\gamma = \left( \begin{array}{cc}a &{} b \\ c &{} d \end{array}\right) \in \Gamma ,\) the period function

$$\begin{aligned} h_\gamma (x) := \chi (\gamma ) f(x) - (cx+d)^{-k} f\left( \frac{ax+b}{cx+d}\right) \end{aligned}$$

extends to a function which is \(C^\infty \) or real analytic at all but a finite set of points on \({{\mathbb {P}}}^1({{\mathbb {R}}})\). Furthermore, one usually finds an analytic function \(f_{{\mathbb {C}}}(z)\) on \({{\mathbb {C}}}\setminus {{\mathbb {R}}}\) whose limit as z approaches \(x\in {{\mathbb {Q}}}\setminus S\) coincides with f.

Many of the examples of quantum modular forms have representations as q-hypergeometric series. Two such series are

$$\begin{aligned} \sigma (q)&= 1+ \sum _{n=0}^\infty (-1)^n q^{n+1} (1-q) (1-q^2) \cdots (1-q^n) \\&= 1 +q - q^2 + 2q^3 - 2q^4 + q^5 + q^7 - 2q^8 + \cdots , \\ \sigma ^*(q)&= -2 \sum _{n=0}^\infty q^{n+1} (1-q^2)(1-q^4) \cdots (1-q^{2n}) \\&= -2q - 2q^2 - 2q^3 + 2q^7 + 2q^8 + 2q^{10} + \cdots . \end{aligned}$$

With \(q=\mathrm{e}^{2\pi i z}=\mathrm{e}^{-t}\), define

$$\begin{aligned}f(z)= {\left\{ \begin{array}{ll} \mathrm{e}^{\frac{2\pi iz}{24}} \sigma (\mathrm{e}^{2\pi iz}) = q^{\frac{1}{24}} \sigma (q) &{} z \in {{\mathbb {H}}}\cup {{\mathbb {Q}}}, \\ - \mathrm{e}^{\frac{2\pi iz}{24}} \sigma (\mathrm{e}^{-2\pi iz}) = -q^{\frac{1}{24}} \sigma ^*(q^{-1}) &{} z \in {{\mathbb {H}}}^- \cup {{\mathbb {Q}}}. \end{array}\right. } \end{aligned}$$

Using the results of Andrews et al. [7], Cohen [29], and Lewis and Zagier [60], Zagier [83] showed that

$$\begin{aligned} h(z):= (2z+ 1)\, f\left( \frac{z}{2z+1}\right) - \mathrm{e}^{\frac{2\pi i }{24} }f(z) \end{aligned}$$

is a function which is holomorphic on all of \({{\mathbb {C}}}\setminus {{\mathbb {R}}}_{\le 0}\). Moreover, the function \(t\mapsto f\left( \frac{it}{2\pi }\right) \) has an asymptotic expansion near every value \(t\in {{\mathbb {Q}}}\). For instance, near \(t=0\)

$$\begin{aligned} \mathrm{e}^{-\frac{t}{24}} \sigma (\mathrm{e}^{-t})&= - \mathrm{e}^{-\frac{t}{24}} \sigma ^*(\mathrm{e}^{t}) \sim \sum _{n=0}^\infty \frac{\sigma _n}{n!} \left( \frac{t}{24}\right) ^n \nonumber \\&= 2 - 50\left( \frac{t}{24}\right) + \frac{5855}{2} \left( \frac{t}{24}\right) ^2 \nonumber \\&\quad - \frac{1538066}{3!} \left( \frac{t}{24}\right) ^3 + \frac{718108610}{4!} \left( \frac{t}{24}\right) ^4 - \cdots , \end{aligned}$$

where the \(\sigma _n\) are integers given in terms of a Hecke L-function. To describe \(\sigma _n\), let T(n) be the number of inequivalent solutions to

$$\begin{aligned} u^2 - 6v^2 = n \end{aligned}$$
(1.1)

such that \(u+3v \equiv \pm 1\pmod {12}\) minus the number of such solutions with \(u+3v \equiv \pm 5 \pmod {12}\). Here two solutions (uv) and \((u',v')\) to (1.1) are equivalent if \((u'+v'\sqrt{6}) = \pm (5 + 2\sqrt{6})^r (u+v\sqrt{6})\) for some integer r; otherwise they are said to be inequivalent. Define the Dirichlet series

$$\begin{aligned} D(s) = \sum _{n=1}^\infty \frac{T(n)}{n^s} \quad (\text {Re}\left( s\right) > 1). \end{aligned}$$

Then D(s) is a Hecke L-function and hence has analytic continuation to the complex s-plane. Set

$$\begin{aligned} \sigma _n := (-1)^n D(-n). \end{aligned}$$
(1.2)

See [16] for more on the values \(D(-n)\) including their asymptotic properties.

Thus Theorem 1.1 shows the asymptotic expansion of this quantum modular form arises in the probability theory of partitions.

Our work requires two more quantum modular forms. Zagier [82, 83] showed that the Kontsevich’s “strange” function

$$\begin{aligned} F(q):= \sum _{n=0}^\infty (1-q)(1-q^2)\cdots (1-q^n) \end{aligned}$$

fits into the framework of a quantum modular form. This q-series is defined only at roots of unity q. Combining the results of [82] with the results of Bryson, Ono, Pitman, and the second author [26] it is possible to construct a function on \(\left( {{\mathbb {C}}}\setminus {{\mathbb {R}}}\right) \cup {{\mathbb {Q}}}\) analogous to f above. Zagier [82] proved

$$\begin{aligned} \mathrm{e}^{-\frac{t}{24}} F(\mathrm{e}^{-t}) \sim \sum _{n=0}^\infty \frac{T_n}{n!} \left( \frac{t}{24}\right) ^n = 1 + 23 \left( \frac{t}{24}\right) + \frac{1681}{2} \left( \frac{t}{24}\right) ^2 + \frac{257{,}543}{3!} \left( \frac{t}{24}\right) ^3+ \cdots \end{aligned}$$

The \(T_n\), called Glaisher’s numbers, are special values of the Dirichlet L-series \(L( \chi _{12}, s)\) where \(\chi _{12} = \left( \frac{12}{\cdot }\right) \) is a quadratic character of conductor 12. More precisely

$$\begin{aligned} T_n = \frac{6\sqrt{3}}{\pi ^2} (2n+1)! \left( \frac{12}{\pi ^2}\right) ^n L(\chi _{12}, 2n+2). \end{aligned}$$
(1.3)

Finally, the third quantum modular form that plays a role in our work is

$$\begin{aligned} S_0(z) = \sum _{n=1}^\infty \frac{q^n}{1-q^n} = \sum _{n=1}^\infty d(n) q^n,\quad \text {with } q = \mathrm{e}^{2\pi i z}. \end{aligned}$$

Bettin and Conrey [13] showed that

$$\begin{aligned} S_0(z) - \frac{4}{z} S_0\left( -\frac{1}{z}\right) = \frac{1}{4} \left( 1- \frac{1}{z}\right) - \frac{1}{4} \psi _0(z), \end{aligned}$$

where \(\psi _0\) is the period function of an Eisenstein series. Moreover, they established the asymptotic

$$\begin{aligned} S_0(it/2\pi ) \sim - \frac{\log (t) + \gamma }{t} + \frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2 t^{2n-1}}{(2n)! (2n)} \qquad (t\rightarrow 0), \end{aligned}$$

where \(\gamma =0.5772156\ldots \) is Euler’s constant [58], \(B_n\) is the nth Bernoulli number, and

$$\begin{aligned} B_{2n} = \frac{(-1)^{n+1} 2 (2n)!}{(2\pi )^{2n}} \zeta (2n), \end{aligned}$$

where \(\zeta (s)\) is the Riemann zeta function. See Sect. 4.2 for further discussion on \(S_0(z)\). In the remainder we abuse notation and write \(S_0(q) = S_0(z)\). For future reference we define the coefficients \(b_n \) by

$$\begin{aligned} \mathrm{e}^\frac{t}{24}\left( \frac{\gamma }{t}-\frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2t^{2n-1}}{(2n)!\,(2n)}\right) =: \frac{1}{t}\sum _{n=0}^\infty b_nt^n. \end{aligned}$$
(1.4)

For instance, \(b_0 = \gamma , b_1 = \frac{\gamma }{24} - \frac{1}{4}\), and \(b_2 = \frac{\gamma }{1152} - \frac{1}{288}\).

1.3 Asymptotic theorems

This section contains five theorems, each of which relates the asymptotic expansion of a particular partition probability function to the asymptotic expansion of a quantum modular form.

Let \({{\mathcal {D}}}(N)\) denote the set of all integer partitions of N into distinct parts; set \(q(N) = \left| {{\mathcal {D}}}(N)\right| \). It follows from [49] or [50] (see also Proposition 1.8) that for any \(R\ge 0\)

$$\begin{aligned} q(N) = \frac{\exp \left( K' \sqrt{N}\right) }{4 \ 3^\frac{1}{4} N^\frac{3}{4}} \left( \sum _{r=0}^{R-1} q_r N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) , \end{aligned}$$

where \(K' = \frac{\pi }{{3}^\frac{1}{2}}\) and

$$\begin{aligned} q_r = (-2K')^{-r} \sum _{s=0}^r \left( \frac{K'^2}{24}\right) ^s \frac{(s+1, r-s)}{s!}. \end{aligned}$$

In particular, \(q_0=1\) and \(q_1 = - \frac{3}{8K'} - \frac{K'}{48}\). For future reference, define

$$\begin{aligned} \mathbf q _0&= 1, \\ \mathbf q _s&= \sum _{j\ge 1} (-1)^j \sum _{r_1 + \cdots r_j = s, r_i \ge 1} q_{r_1}\cdots q_{r_j}. \end{aligned}$$

Theorem 1.2

(Expected value of the smallest part in a distinct part partition) If R is a positive integer, then

$$\begin{aligned} e_{\mathrm{sd}}(N):= & {} \sum _{\lambda \in {{\mathcal {D}}}(N)} \mathrm{sm}(\lambda ) = \frac{ \exp \left( K' \sqrt{N} \right) }{ 4 \ 3^{\frac{1}{4}} N^{\frac{3}{4}}} \left( \sum _{r=0}^{R-1}B_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

as \(N\rightarrow \infty \), where

$$\begin{aligned} B_r = (-2K')^{-r} \sum _{s=0}^r \left( \frac{{K^{r2}}}{24}\right) ^s \frac{\sigma _s \,\, (s+1, r-s)}{s!} \end{aligned}$$

Consequentially, the expected value of the smallest part of a partition with respect to the uniform measure on the distinct part partitions of N is

$$\begin{aligned} \mathbf E _{d,N}\left( \mathrm{sm}(\lambda ) \right) = 2+ \sum _{r=1}^{R-1} \sum _{s=0}^{r} B_s \mathbf q _{r-s} \ N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) . \end{aligned}$$

Remark

Fristedt [44, Section 9] proved that the probability that j is the smallest part of a random distinct part partition is \(2^{-j}\). Consequentially, the expected value is \(\sum _j j 2^{-j} = 2\). Note in our asymptotic that \(B_0 = 2\).

The following theorem is offered for contrast to the previous theorem. Let \(\ell (\lambda )\) be the number of parts in \(\lambda \).

Theorem 1.3

One has

$$\begin{aligned} \sum _{\lambda \in {{\mathcal {D}}}(N)} (-1)^{\ell (\lambda )+1} \mathrm{sm}(\lambda ) = \sum _{d\mid N } 1. \end{aligned}$$

Consequentially, as \(N\rightarrow \infty \)

$$\begin{aligned}&\mathbf E _{d,N} \left( \mathrm{sm}(\lambda ) : \ell (\lambda ) \equiv 1 \,(\mathrm{mod}\,\, {2}) \right) \\&= \mathbf E _{d,N} \left( \mathrm{sm}(\lambda ) : \ \ell (\lambda ) \equiv 0 \,(\mathrm{mod}\,\, {2}) \right) + o\left( N^{\frac{3}{4}+\epsilon } \exp \left( -K' \sqrt{N}\right) \right) . \end{aligned}$$

Remark

It is a classical fact that \(\sum _{d\mid N } 1 = o\left( N^{\epsilon }\right) \) for any \(\epsilon >0\) (see for instance [64, page 56]).

Theorem 1.4

(Expected value of the smallest part of an unrestricted partition) If R is a positive integer, then

$$\begin{aligned} e_{\mathrm{sm}}(N): =\sum _{\lambda \in {{\mathcal {P}}}(N)} \mathrm{sm}(\lambda ) = \frac{\exp \left( K\sqrt{N}\right) }{4 \,\, 3^\frac{1}{2} N} \left( \sum _{r=0}^{R-1}D_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

as \(N\rightarrow \infty \), where

$$\begin{aligned} D_r = (-2K')^{-r} \sum _{s=0}^r\left( \frac{-K^2}{24}\right) ^s \frac{T_s(s+1,r-s)}{s!} \end{aligned}$$

and \(T_s\) is given by (1.3).

Consequentially, the expected value of the largest part of an unrestricted partition of N, with respect to the uniform measure, is

$$\begin{aligned} \mathbf E _N\left( \mathrm{sm}(\lambda ) \right) = 1 + \sum _{r=1}^{R-1} \sum _{s=0}^{r} D_s \mathbf p _{r-s} \ N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) . \end{aligned}$$

Remark

Again, by [44] a random partition of N almost surely has a part of size 1 and so \(E_N(\mathrm{sm}(\lambda )) \sim 1\).

The above theorems concern the smallest part of a partition. We now turn our attention to the largest part of a partition.

Theorem 1.5

(Expected value of the largest part of an unrestricted partition) As \(N\rightarrow \infty \)

$$\begin{aligned} e_{\mathrm{lg}}(N) :=\sum _{\lambda \in {{\mathcal {P}}}(N)} \mathrm{lg}(\lambda ) = \frac{\exp (K\sqrt{N})}{4\pi \,\,{2}^\frac{1}{2}N^{\frac{1}{2}}} \left( \log N + 2\gamma - 2\log \frac{K}{2} + O(N^{-\frac{1}{2}}\log N) \right) , \end{aligned}$$

where \(\gamma =0.5772156\ldots \) is Euler’s constant.

Consequentially, the expected value with respect to the uniform measure on the unrestricted partitions of N is

$$\begin{aligned} \mathbf E _N\left( \mathrm{lg}(\lambda ) \right) = \frac{\sqrt{6N}}{\pi } \log \left( \frac{\sqrt{6N}}{\pi }\right) + \frac{\sqrt{6N}}{\pi } \gamma + O\left( \log (N)\right) . \end{aligned}$$

Remark

Erdős and Lehner showed in [34] that

$$\begin{aligned} \lim _{N\rightarrow \infty } \mathbf P _N \left( \frac{\pi }{\sqrt{6N}} \mathrm{lg}(\lambda ) - \log \left( \frac{\sqrt{6N}}{\pi }\right) < v \right) = \mathrm{e}^{-\mathrm{e}^{-v}}. \end{aligned}$$

From this it is straightforward to deduce

$$\begin{aligned} \mathbf E _N\left( \mathrm{lg}(\lambda ) \right) \sim \frac{\sqrt{6N}}{\pi } \log \left( \frac{\sqrt{6N}}{\pi }\right) + \frac{\sqrt{6N}}{\pi } \gamma . \end{aligned}$$

Curiously, in the above the \(\gamma \) occurs from the asymptotic expansion of the Riemann zeta function \(\zeta (s)\) near \(s=1\). It might be interesting to compare with the integral \(\int _{-\infty }^\infty v \mathrm{e}^{-\mathrm{e}^{-v}-v} \mathrm{d}v\) which occurs in the limiting distribution of Erdős and Lehner.

Remark

Theorem 1.5, as stated, was previously established by Kessler and Livingston [53] with a slightly worse error term and also by Grabner et al. [48]. The present method makes the structure of the full asymptotic expansion apparent and demonstrates the role of the quantum modular form \(S_0(z)\) in determining the expansion. The next theorem has the full asymptotic expansion for the case of partitions with distinct parts.

Theorem 1.6

(Expected value of the largest part of a distinct part partition) For any \(R\ge 0\) as \(N\rightarrow \infty \)

$$\begin{aligned} e_{\mathrm{ld}}(N):= & {} \sum _{\lambda \in {{\mathcal {D}}}(N)} \mathrm{lg}(\lambda )\\= & {} \frac{\exp (K'\sqrt{N})}{4\pi \,\,3^{-\frac{1}{4}}N^{\frac{1}{4}}} \left( \sum _{r=0}^{R-1}(F''_r+F'_r+F_r\log N)N^{-\frac{r}{2}}+O(N^{-\frac{R}{2}}\log N) \right) , \end{aligned}$$

where

$$\begin{aligned} F''_r&= 2(-2K')^{-r} \sum _{s=0}^r ({-K'^2})^s \,\, (s, r-s) \,\, b_s , \\ F'_r&= (-2K')^{-r} \sum _{s=0}^r \left( \frac{-K'^2}{24}\right) ^s \frac{(-2) \,\,\log (K'/2) \,\, (s, r-s)}{s!}\\&\quad - \sum _{s=0}^{r} \frac{(8\pi )^\frac{1}{2} \, \left( K'\right) ^{2s-r}\,\, a_{r-s-1}^*(s)}{96^{s} \, s!} , \\ F_r&= (-2K')^{-r} \sum _{s=0}^r \left( \frac{-K'^2}{24}\right) ^s \frac{(s,r-s)}{s!} , \end{aligned}$$

where \(b_s\) is defined in (1.4) in terms of Bernoulli numbers and \(a_s^*\) is defined in Proposition 1.9 in terms of values of the Gamma function.

1.4 Generating function identities

This section discusses the generating functions for the partition problems above. Euler [6] was the first to show the generating function identities

$$\begin{aligned} P(q) :=&\sum _{n=0}^\infty p(n) q^n = \prod _{n=1}^\infty \frac{1}{1-q^n} = \frac{1}{(q;q)_\infty } \\ Q(q) :=&\sum _{n=0}^\infty q(n) q^n = \prod _{n=1}^\infty (1+q^n) = (-q;q)_\infty \end{aligned}$$

where \((a;q)_n := \prod _{j=0}^{n-1} (1-aq^j)\) and \((a;q)_\infty = \prod _{j=0}^\infty (1-aq^j)\).

The following theorem gives results for the generating functions studied in our main theorems.

Theorem 1.7

In the notation of Theorems 1.11.2, 1.41.5, and 1.6

(1.5)
$$\begin{aligned}&= \ P(q) \cdot \frac{1}{2} \sigma (q) - \frac{1}{2}, \nonumber \\ \sum _{N=0}^\infty e_{\mathrm{sd}}(N) q^N = \sum _{ \lambda \in {{\mathcal {D}}}} \mathrm{sm}(\lambda ) q^{\left| \lambda \right| } =&\ -Q(q) \cdot \sigma ^*(q) -S_0(q), \end{aligned}$$
(1.6)
$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{sm}}(N) q^N = \sum _{\lambda \in {{\mathcal {P}}}} \mathrm{sm}(\lambda ) q^{\left| \lambda \right| } =&\ P(q) \cdot \sum _{n=0}^\infty \big ( (q;q)_n - (q;q)_\infty \big ), \end{aligned}$$
(1.7)
$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{lg}}(N) q^N = \sum _{\lambda \in {{\mathcal {P}}}} \mathrm{lg}(\lambda ) q^{\left| \lambda \right| }&= \ P(q) \cdot \sum _{n=1}^\infty \frac{q^n}{1-q^n}, \end{aligned}$$
(1.8)
$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{ld}}(N) q^N = \sum _{\lambda \in {{\mathcal {D}}}} \mathrm{lg}(\lambda ) q^{\left| \lambda \right| }&= \ Q(q) \cdot \left( S_0(q) - \frac{1}{2}\right) + \frac{1}{2} \sigma (q), \end{aligned}$$
(1.9)

where

$$\begin{aligned}&P(q) = \prod _{n=1}^\infty \frac{1}{(1-q^n)}, \quad Q(q) = \prod _{n=1}^\infty (1+q^n), \\&\sigma (q) = 1 + \sum _{n=0}^\infty (-1)^n q^{n+1} \prod _{j=1}^n (1-q^j), \quad \sigma ^*(q) = - 2 \sum _{n=0}^\infty q^{n+1} \prod _{j=1}^n (1-q^{2j}),\\&S_0(q) = \sum _{n=1}^\infty \frac{q^n}{1-q^n}. \end{aligned}$$

Remark

At all roots of unity, to infinite order,

$$\begin{aligned} \sum _{n=1}^\infty (-1)^n ( (q;q)_n - (q;q)_\infty ) = \sum _{n=1}^\infty (-1)^n (q;q)_n = \frac{1}{2} \sigma (q) \end{aligned}$$

and

$$\begin{aligned} \sum _{n=1}^\infty ( (q;q)_n - (q;q)_\infty ) = F(q). \end{aligned}$$

Thus, these forms behave as quantum modular forms near roots of unity. These identities are discussed in more detail in the proof of Theorem 1.1 and Sect. 4.4.

Remark

The identities of Theorem 1.7 are all of the shape

$$\begin{aligned} \text {Generating Function } = (P(q) \text { or } Q(q)) \times \text { Sieving Function} + \text {Error Function}. \end{aligned}$$

In the above cases, the sieving functions are quantum modular forms. For example in the first equality the “sieving function” is

$$\begin{aligned}&\sum _{n=1}^\infty (-1)^n ( (q;q)_n - (q;q)_\infty ) \\&\quad = q + q^3 - q^4 - q^8 + q^{10} - q^{13} + q^{14} + q^{15} - q^{17} + q^{18} - q^{19} + \cdots . \end{aligned}$$

Consequentially,

$$\begin{aligned} p_{\mathrm{lo}}(n) = p(n-1) + p(n-3) - p(n-4) - p(n-8) + p(n-10) + p(n-13) + \cdots . \end{aligned}$$

This is a typical behavior. See the book of Stanley [75] for discussion of sieving in enumerative combinatorics. See the papers of Andrews [4, 5], Bringmann and Mahlburg [22], Kim and Lovejoy [54], Kim and Jo [52], Kim et al. [55, 56], and Grabner et al. [48] for more examples of this phenomenon. Most commonly, the “sieving function” is a partial theta function, which is known to be a quantum modular form. See [43, 59] and [14] for details about the quantum modularity of partial theta functions. In some other cases, the sieving function may be a mock modular form, which may have exponential singularities at some roots of unity, see [4, 12, 74] for examples of this sort.

We have chosen the above examples because they have simple partition interpretations and because the quantum modular forms arising are among the most exotic.

Remark

Define for a natural number k the q-series \(M_k(q) = \sum _{n=1}^\infty \frac{n^k q^n}{(q;q)_n}\); here \((q;q)_n := \prod _{j=1}^{n} (1-q^j)\). Then the coefficient of \(q^n\) in \(M_k(q)\) is, up to normalizing by 1 / p(n), the kth-moment of the largest part of a partition of n, namely \(\sum _{\lambda } \mathrm{lg}(\lambda )^k\) where the sum runs over all partitions \(\lambda \) of n. Now define \(S_k(q) = \sum _{n=1}^\infty \frac{n^k q^n}{1-q^n}.\) One may show that \(S_k\) and \(M_k\) are related via the recursion

$$\begin{aligned} M_k(q) = \sum _{j=0}^{k-1} \left( {\begin{array}{c}k-1\\ j\end{array}}\right) \, S_{k-1-j}(q) \,\, M_j(q). \end{aligned}$$

If k is an odd integer, then \(S_k\) is (essentially) an Eisenstein series. If k is an even integer, then \(S_k\) is not an Eisenstein series, but it still has pseudo-modularity (see Bettin and Conrey [13]). Thus, the method of this paper can be applied to compute an asymptotic expansion for each of the moments of the largest parts of partitions.

1.5 Wright’s asymptotic expansion and analogues

In this subsection we state generalizations of Wright’s asymptotic expansion using the circle method. This section contains three propositions in a quite general form with the hope that it might be useful for other researchers. All of the propositions concern the asymptotics for the q-coefficients of functions of the form \(L(q) \, \xi (q)\) where \(\xi (q)\) has its “main” exponential singularity as \(q\rightarrow 1\) and L(q) has polynomial or logarithmic behavior as \(q\rightarrow 1\).

Throughout this section let q denote a complex variable with \(|q|<1\) and \(q\notin {{\mathbb {R}}}_{\le 0}\). Put \(q = \mathrm{e}^{-t}\), so \(t\in {{\mathbb {C}}}\) satisfies \(\mathrm{Re}\, t>0\) and \(|\mathrm{Im}\, t| < \pi \).

The setup is as follows. Let L(q) and \(\xi (q)\) be two functions analytic for \(|q|<1\) and \(q\notin {{\mathbb {R}}}_{\le 0}\) so that \(L(q)\xi (q)\) is analytic for \(|q|<1\) and \(q\notin {{\mathbb {R}}}_{\le 0}\). We are interested in the asymptotic expansion of

$$\begin{aligned} V(N) = \frac{1}{2\pi i } \int _{{\mathcal {C}}}\frac{L(q) \xi (q)}{q^{N+1}} \mathrm{d}q \quad (N\rightarrow \infty ), \end{aligned}$$
(1.10)

where \({{\mathcal {C}}}\) is a circle centered at the origin with radius smaller than one and where q describes \({{\mathcal {C}}}\) counter-clockwise. Integral (1.10) will arise from the combinatorial problems described in Sect. 1.

Let \(0<\delta <\frac{\pi }{2}\) and \(c>0\) be fixed constants. Set \(\eta = \frac{c}{\sqrt{N}}\). Let \({{\mathcal {C}}}\) be the circle on the q-plane which is centered at 0 and of radius \(\mathrm{e}^{-\eta }\). Let \({{\mathcal {C}}}_1\) be the arc of \({{\mathcal {C}}}\) such that \(q\in {{\mathcal {C}}}_1\) precisely when \(\left| \arg t\right| < \frac{\pi }{2} - \delta \); set \({{\mathcal {C}}}_2={{\mathcal {C}}}-{{\mathcal {C}}}_1\). We make available four running assumptions:

:

for every positive integer k, as \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \), either

$$\begin{aligned} L(\mathrm{e}^{-t}) = \frac{1}{t^B} \left( \sum _{s = 0}^{k-1} \alpha _s t^s + O_\delta ({t}^k)\right) , \end{aligned}$$
(1.11)

where \(\alpha _s\in {{\mathbb {C}}}\) and B is a real constant, in which case we say \(L(\mathrm{e}^{-t})\) has polynomial type near 1, or

$$\begin{aligned} L(\mathrm{e}^{-t}) = \frac{\log t}{t^B} \left( \sum _{s = 0}^{k-1} \alpha _s t^s + O_\delta ({t}^k) \right) , \end{aligned}$$
(1.12)

where \(\alpha _s\in {{\mathbb {C}}}\) and B is a real constant, in which case we say \(L(\mathrm{e}^{-t})\) has logarithmic type near 1;

:

as \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \)

$$\begin{aligned} \xi (\mathrm{e}^{-t}) = t^{\beta } \mathrm{e}^{c^2/t} \left( 1+ O_\delta \left( \mathrm{e}^{-\gamma /t}\right) \right) , \end{aligned}$$
(1.13)

where \(\beta \) and \(\gamma \) are real constants such that \(\beta \ge 0\) and \(\gamma >c^2\);

:

as \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\)

$$\begin{aligned} L(\mathrm{e}^{-t}) \ll _\delta t^{-C}, \end{aligned}$$
(1.14)

where \(C=C(\delta )\) is a positive real constant;

:

as \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\)

$$\begin{aligned} \left| \xi (\mathrm{e}^{-t}) \right| \ll _\delta \xi (|\mathrm{e}^{-t}|) \mathrm{e}^{ \frac{-\delta '}{t} }, \end{aligned}$$
(1.15)

where \(\delta '=\delta '(\delta )\) is a positive real constant.

Remark

The assumptions HYPO 1 and HYPO 2 put asymptotics on L and \(\xi \) on the “major arc” \({{\mathcal {C}}}_1\) near 1, whereas the assumptions HYPO 3 and HYPO 4 require that L and \(\xi \) are small on the “minor arc” \({{\mathcal {C}}}_2\) away from 1.

The following result is due to Wright [81, Section 6]:

Proposition 1.8

(Asymptotic expansion in the polynomial-type case) Suppose that the four running assumptions are satisfied. Suppose further that L(q) has polynomial type near 1. Then

$$\begin{aligned} V(N) = \mathrm{e}^{2c\sqrt{N}} N^{\frac{1}{4}(2B-2\beta -3)} \left( \sum _{r=0}^{R-1}p_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \quad (N\rightarrow \infty ), \end{aligned}$$

where

$$\begin{aligned} p_r=\sum _{s=0}^r \alpha _{s}w_{s,r-s}, \end{aligned}$$

with the \(\alpha _s\) given by HYPO 1 (1.11) and the \(w_{s,r}\) given by

$$\begin{aligned} w_{s,r}&= \frac{\left( -\frac{1}{4c}\right) ^r c^{s+\beta -B+\frac{1}{2}}}{2\pi ^{\frac{1}{2}}} \,\, (s+\beta -B+1,r) . \end{aligned}$$
(1.16)

The following is an analogue of Proposition 1.8, now for the case of logarithmic type:

Proposition 1.9

(Asymptotic expansion in the logarithmic type with integer-order case) Suppose that the four running assumptions are satisfied. Suppose further that L(q) has logarithmic type near 1 and that \(B-\beta =1\) where B is the constant in HYPO 1 (1.12) and \(\beta \) is the constant in HYPO 2 (1.13). Set

$$\begin{aligned} a_r^*(n)&= -\sum _{j=0}^{\min (n-1,r)}\frac{\Gamma (n+1)(-2)^{2j-r}}{\Gamma (n-j)\, (j+1)\,(2\pi )^{\frac{1}{2}}} \,\, (n-1-j,r-j)&\quad (r,n\in {{\mathbb {Z}}}_{\ge 0}), \\ l_{ s,r}&=\frac{\left( -\frac{1}{4c}\right) ^r c^{s-\frac{1}{2}}}{-4\pi ^{\frac{1}{2}}} \,\, (s,r)&(s,r\in {{\mathbb {Z}}}_{\ge 0}),\\ l'_{ s,r}&=\frac{\left( -\frac{1}{4c}\right) ^r c^{s-\frac{1}{2}}\log c}{2\pi ^{\frac{1}{2}}} \,\, (s,r) + \delta _{r\ge 1} \,\, \frac{c^{s-r-\frac{1}{2}}}{2^{r+\frac{1}{2}}} \,\, a_{r-1}^*(s)&(s,r\in {{\mathbb {Z}}}_{\ge 0}) . \end{aligned}$$

One has

$$\begin{aligned} V(N) = \mathrm{e}^{2c\sqrt{N}} N^{-\frac{1}{4}} \left( \sum _{r=0}^{R-1}N^{-\frac{r}{2}}\left( q'_r+q_r\log N\right) + O\left( N^{-\frac{R}{2}}\log N\right) \right) \quad (N\rightarrow \infty ), \end{aligned}$$

where

$$\begin{aligned} q_r=\sum _{s=0}^r \alpha _{s} \, l_{s,r-s} \quad \text {and} \,\,\, \quad q'_r=\sum _{s=0}^r \alpha _{s} \, l'_{s,r-s} \end{aligned}$$

with the \(\alpha _s\) given by HYPO 1 (1.12).

Remark

We will see later from our proof that one can extend Proposition 1.9 to the case \(B-\beta \in {{\mathbb {Z}}}\) (of course with more involved asymptotic formulas). Hence the nature of Proposition 1.9 is of logarithmic type with integer order.

The following is another analogue of Proposition 1.8, also for the case of logarithmic type:

Proposition 1.10

(Asymptotic expansion in the logarithmic type with half-integer-order case) Suppose that the four running assumptions are satisfied. Suppose further that L(q) has logarithmic type near 1 and that \(B-\beta =\frac{1}{2}\) where B is the constant in HYPO 1 (1.12) and \(\beta \) is the constant in HYPO 2 (1.13). Then

$$\begin{aligned} V(N)&= \mathrm{e}^{2c\sqrt{N}} N^{-\frac{1}{2}} \frac{-\alpha _0}{4\pi ^{\frac{1}{2}}} \left( \log N - 2 \log c + O (N^{-\frac{1}{2}}\log N) \right) \; (N\rightarrow \infty ). \end{aligned}$$

Remark

One can write down a full asymptotic expansion for V(N) in Proposition 1.10 and can extend to the case \(B-\beta \in \frac{1}{2}+{{\mathbb {Z}}}\) (of course with more involved asymptotic formulas). Hence the nature of Proposition 1.10 is of logarithmic type with half-integer order.

The main idea of the proofs of Propositions 1.81.9, and 1.10 is the circle method. The main technical ingredients are various asymptotic expansions of Bessel functions. The reader who is willing to trust Propositions 1.81.9, and 1.10 can skip Sect. 3.

2 Proof of generating function identities

This section contains the proof of the generating function identities of Theorem 1.7. The proof uses the following theorems of Andrews and Freistas.

Theorem 2.1

(Theorem 4.1 of [8]) Let g be a function defined by the series \(g(x) = \sum _{n=0}^\infty g_n x^n\). Then

$$\begin{aligned} \sum _{n=0}^\infty g_n \left( \frac{(t)_n}{(a)_n} - \frac{(t)_\infty }{(a)_\infty }\right) = \frac{(t)_\infty }{(a)_\infty } \sum _{n=1}^\infty \frac{(a/t)_n}{(q)_n} g(q^n) t^n. \end{aligned}$$

Theorem 2.2

(Theorem 4.4 of [8]) One has

$$\begin{aligned} \sum _{n=0}^\infty \left( \frac{(a)_n (b)_n}{(c)_n (q)_n} - \frac{(a)_\infty (b)_\infty }{(c)_\infty (q)_\infty }\right) = \frac{(a)_\infty (b)_\infty }{(c)_\infty (q)_\infty } \sum _{n=1}^\infty \left( \frac{(q/b)_n b^n}{(q)_n} + \frac{(c/a)_n a^n}{(b)_n}\right) \frac{1}{1-q^n}. \end{aligned}$$

Proof of Theorem 1.7

(1) Recall that \(p_{\mathrm{lo}}(N)\) is the number of partitions of N for which \(\mathrm{sm}(\lambda ) \equiv 1 \,\,(\mathrm{mod}\,\, {2})\). We begin by establishing

$$\begin{aligned} \sum _{N=1}^\infty p_{\mathrm{lo}}(N)q^N = \sum _{\lambda : sm(\lambda ) \equiv 1 (\text {mod }2)} q^{\left| \lambda \right| } = \sum _{n=1}^\infty \frac{q^n}{(q)_{n-1} (1-q^{2n})}. \end{aligned}$$
(2.1)

Indeed, the first equality is the definition of \(p_{\mathrm{lo}}(N)\). Let \(p_{\mathrm{lo}}'(N)\) denote the number of partitions of N in which the largest part, indexed by n say, occurs an odd number of times. Then the third member of (2.1) is precisely \(\sum _{N=1}^\infty p_{\mathrm{lo}}'(N)q^N\).

Recall that we can express a partition \(\lambda \) of N as a decreasing sequence \((\lambda _1,\ldots ,\lambda _r)\) with \(\sum _{i=1}^r\lambda _i=N\) by a Young diagram, which by definition is a rectangular array of N boxes, with r rows where the ith-row is of length \(\lambda _i\). The conjugate partition \(\lambda '\) of \(\lambda \) is the partition whose Young diagram is obtained by reflecting the Young diagram of \(\lambda \) about the diagonal so that rows become columns and columns become rows. For example, the conjugate partition of the partition (4, 3, 2, 2, 1) is the partition (5, 4, 2, 1).

Taking the conjugate partitions gives a bijection between the partitions of N in which the largest part occurs an odd number of times with the partitions of N with the smallest part being odd. In particular we have \(p_{\mathrm{lo}}(N)=p_{\mathrm{lo}}'(N)\); this shows the second equality of (2.1). The desired identity is an immediate consequence of the theorem of Andrews and Freistas, Theorem 2.1 (taking \(g_n=(-1)^n, a=0, t=q\)).

(2) Recall that \(e_{\mathrm{sd}}(N)\) is the sum of the smallest parts of the partitions of N with distinct parts. By definition it is clear that

$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{sd}}(N)q^N = \sum _{\lambda } \mathrm{sm}(\lambda )q^{\left| \lambda \right| } = \sum _{n=0}^\infty n q^{n} (-q^{n+1};q)_\infty . \end{aligned}$$

The desired identity follows from previous work of the authors and Li [62, Section 6.3].

(3) Recall that \(e_{\mathrm{sm}}(N)\) is the sum of the smallest parts of the partitions of N. We show that

$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{sm}}(N)q^N = \sum _{\lambda } \mathrm{sm}(\lambda )q^{\left| \lambda \right| } = \sum _{n=1}^\infty \frac{q^n}{(1-q^n) (q)_n}. \end{aligned}$$
(2.2)

The first equality is the definition of \(e_{\mathrm{sm}}(N)\). Let \(c_{\mathrm{lg}}(\lambda )\) denote the number of occurrences of the largest part of the partition \(\lambda \). Then the third member of (2.2) is equal to \( \sum _{N=1}^\infty \left( \sum _{\lambda \in {{\mathcal {P}}}(N)}c_{\mathrm{lg}}(\lambda ) \right) q^N. \) On the other hand, by looking at Young diagrams of partitions and the conjugate transformation described above, it is easy to see that \( e_{\mathrm{sm}}(N) = \sum _{\lambda \in {{\mathcal {P}}}(N)}c_{\mathrm{lg}}(\lambda ) . \) Thus we deduce the second equality of (2.2). In Theorem 2.2, we put \(a=b=q\) and \(c=0\) to deduce

$$\begin{aligned} \sum _{n=0}^\infty \left( (q)_n - (q)_\infty \right) = (q)_\infty \sum _{n=1}^\infty \frac{q^n}{(1-q^n)(q)_n}, \end{aligned}$$

which is precisely (1.7).

(4) Recall that \(e_{\mathrm{lg}}(N)\) is the sum of the largest parts of the partitions of N. By standard arguments

$$\begin{aligned} \sum _{N=0}^\infty e_{\mathrm{lg}}(N)q^N = \sum _{\lambda \in {{\mathcal {P}}}} \mathrm{lg}(\lambda )q^{\left| \lambda \right| } = \sum _{n=1}^\infty \frac{nq^n}{(q)_n}. \end{aligned}$$

In previous work [62, Section 6.3] the authors and Li established

$$\begin{aligned} \sum _{n=1}^\infty \frac{nq^n}{(q)_n} = \frac{1}{(q)_\infty } \sum _{n=1}^\infty \frac{q^n}{1-q^n}. \end{aligned}$$

Equation (1.8) follows.

(5) Recall that \(e_{\mathrm{ld}}(N)\) is the sum of the largest parts of the partitions of N with distinct parts. It is clear, by definition, that

$$\begin{aligned} \sum _{N=1}^\infty e_{\mathrm{ld}}(N)q^N = \sum _{\lambda \in {{\mathcal {D}}}} \mathrm{lg}(\lambda )q^{\left| \lambda \right| } = \sum _{n=1}^\infty nq^n (-q)_{n-1} . \end{aligned}$$

Equation (1.9) follows from an identity established in previous work of the authors and Li [62, Section 6.4]

$$\begin{aligned} \sum _{n=1}^\infty nq^n (-q)_{n-1} = (-q)_\infty \left( \sum _{n=1}^\infty \frac{q^n}{1-q^n} - \frac{1}{2}\right) +\frac{1}{2} \sigma (q). \end{aligned}$$

\(\square \)

3 Circle method

This section contains the proofs of Propositions 1.81.10 of Sect. 1.5.

3.1 Preliminaries: a recollection on Bessel functions

We recall some standard facts about Bessel functions. For references, see [80, Chapters 6 and 7], [66, Section 10], [25, 65].

The I-Bessel function is defined by the Schläfli’s integral

$$\begin{aligned} I_\nu (z) = \frac{\left( \frac{1}{2}z\right) ^\nu }{2\pi i}\int _{-\infty }^{(0+)}t^{-\nu -1} \, \exp \left( \frac{z^2}{4t}+t \right) \, \mathrm{d}t \quad (z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0};\nu \in {{\mathbb {C}}}) . \end{aligned}$$
(3.1)

In (3.1), the contour runs from \(-\infty \) below the negative real axis to 0 and circles around 0 counter-clockwise and comes back to \(-\infty \) above the negative real axis, and \(\arg z\) is taken to be \(-\pi \) below the negative real axis and \(\pi \) above the negative real axis (see [80, Section 6.22]). The K-Bessel function is defined by

$$\begin{aligned} K_\nu (z)&=\frac{\pi \left( I_{-\nu }(z)-I_{\nu }(z)\right) }{2\sin (\pi \nu )} \quad (z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0};\nu \in {{\mathbb {C}}}-{{\mathbb {Z}}}), \\ K_m(z)&=\lim _{\nu \rightarrow m,\nu \notin {{\mathbb {Z}}}} K_\nu (z) \quad (z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0}; m\in {{\mathbb {Z}}}). \end{aligned}$$

For any \(\nu \in {{\mathbb {C}}}\), the pair \(\{I_\nu (z),K_\nu (z)\}\) forms a basis of linearly independent solutions of the Bessel’s differential equation

$$\begin{aligned} y'' + \frac{y'}{z}-\left( 1+\frac{\nu ^2}{z^2}\right) y = 0. \end{aligned}$$

Theorem 3.1

([80, Section 7.23], [66, Section 10.40]) Suppose that \(\nu \in {{\mathbb {C}}}\) and that p is a positive integer which satisfies \(p\ge \mathrm{Re}\, \nu - \frac{1}{2}\). Then

$$\begin{aligned} I_\nu (z)&= \frac{\mathrm{e}^z}{(2\pi z)^{\frac{1}{2}}} \left\{ \sum _{m=0}^{p-1} \frac{(-1)^m\,(\nu ,m)}{(2z)^m}+ \frac{\mathrm{e}^{-z+\left( \nu +\frac{1}{2}\right) \pi i} }{(2\pi z)^{\frac{1}{2}}} \sum _{m=0}^{p-1} \frac{(\nu ,m)}{(2z)^m} + O_{\nu ,p}(z^{-p})\right\} \nonumber \\&\quad \times \left( -\frac{\pi }{2}<\arg \, z<\frac{\pi }{2}, |z|\rightarrow \infty \right) , \end{aligned}$$
(3.2)
$$\begin{aligned} K_\nu (z)&= \left( \frac{\pi }{2 z}\right) ^{\frac{1}{2}}\mathrm{e}^{-z} \left\{ \sum _{m=0}^{p-1} \frac{(\nu ,m)}{(2z)^m}+O_{\nu ,p}(z^{-p})\right\} \nonumber \\&\quad \times \left( -\frac{\pi }{2}<\arg \, z<\frac{\pi }{2}, |z|\rightarrow \infty \right) . \end{aligned}$$
(3.3)

For brevity, we rewrite (3.2) and (3.3) as follows:

Theorem 3.2

If \(0<\delta <\frac{1}{2}\pi \) and \(\nu \in {{\mathbb {C}}}\), then

$$\begin{aligned} I_{\pm \nu }(z)&= \frac{\mathrm{e}^z}{z^{\frac{1}{2}}} \left( \sum _{r=0}^{R-1} z^{-r} a_r(\nu ) + O(z^{-R}) \right)&\left( |\arg \, z|< \frac{\pi }{2}-\delta ,|z|\rightarrow \infty \right) , \quad \quad \end{aligned}$$
(3.4)
$$\begin{aligned} K_{\pm \nu }(z)&= \frac{\mathrm{e}^{-z}}{z^{\frac{1}{2}}} \left( \sum _{r=0}^{R-1} z^{-r} \frac{a_r(\nu )\pi }{(-1)^r} + O(z^{-R})\right)&\left( |\arg \, z|< \frac{\pi }{2}-\delta ,|z|\rightarrow \infty \right) ,\quad \quad \end{aligned}$$
(3.5)

where

$$\begin{aligned} a_r(\nu )= \frac{ (\nu ,r)}{(2\pi )^{\frac{1}{2}}(-2)^{r}} =\frac{ \left( -\frac{1}{2}\right) ^r}{(2\pi )^{\frac{1}{2}}} \,\, \frac{\Gamma (\nu +1/2+r)}{r!\,\Gamma (\nu +1/2-r)} \quad (r\in {{\mathbb {Z}}}_{\ge 0},\nu \in {{\mathbb {C}}}). \end{aligned}$$
(3.6)

Proof

Indeed, (3.5) follows from (3.3) and the fact that \((\nu ,r)\) is an even function of \(\nu \), whereas (3.4) follows from (3.2), the same fact on \((\nu ,r)\), and the assumption \(|\arg \, z|< \frac{\pi }{2}-\delta \) which forces the sum \(\frac{\mathrm{e}^{-z+\left( \nu +\frac{1}{2}\right) \pi i} }{(2\pi z)^{\frac{1}{2}}} \sum _{m=0}^{p-1} \frac{(\nu ,m)}{(2z)^m}\) in (3.2) to go to 0 as \(|z|\rightarrow \infty \). \(\square \)

The derivative with respect to order of the I-Bessel function is \(I_{\nu _0}^*(z):=\frac{\partial I_\nu (z)}{\partial \nu } |_{\nu =\nu _0}\). One is allowed to differentiate under the integral sign Schläfli’s integral (3.1). Then

$$\begin{aligned} I_\nu ^*(z)=I_\nu (z)\log \left( \frac{z}{2}\right) - \frac{\left( \frac{z}{2}\right) ^\nu }{2\pi i}\int _{-\infty }^{(0+)}t^{-\nu -1}\log t \,\, \exp \left( \frac{z^2}{4t}+t \right) \mathrm{d}t \,\,\,\,(z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0};\nu \in {{\mathbb {C}}}). \end{aligned}$$
(3.7)

When the order \(\nu \) is an integer, we have (see [25, 66, Section 10.38])

$$\begin{aligned} (-1)^nI_{\pm n}^*(z) = -K_n(z) \pm \frac{n!}{2\left( \frac{1}{2}z\right) ^n}\sum _{j=0}^{n-1} (-1)^j\frac{\left( \frac{1}{2}z\right) ^j I_j(z)}{j!(n-j)} \quad (z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0};n\in {{\mathbb {Z}}}_{\ge 0}) . \end{aligned}$$
(3.8)

As a consequence, we derive an asymptotic expansion of \(I_\nu ^*(z)\) for integer order \(\nu \):

Theorem 3.3

For every \(0<\delta <\frac{\pi }{2}\) one has

$$\begin{aligned} I_0^*(z)=-K_0(z) = \frac{\mathrm{e}^{-z}}{z^{\frac{1}{2}}}\left( \sum _{r=0}^{R-1} z^{-r} \frac{a_r(0)\pi }{(-1)^{r+1}} + O(z^{-R}) \right) \quad \left( |\arg \,z|< \frac{\pi }{2} - \delta , |z|\rightarrow \infty \right) . \end{aligned}$$
(3.9)

If \(n\in {{\mathbb {Z}}}_{>0}\), for every \(0<\delta <\frac{\pi }{2}\) one has

$$\begin{aligned} I_{\pm n}^*(z) = \pm \frac{\mathrm{e}^z}{z^{\frac{3}{2}}} \left( \sum _{r=0}^{R-1} z^{-r} a_r^*(n) + O(z^{-R}) \right) \quad \left( |\arg z|< \frac{\pi }{2}-\delta , |z|\rightarrow \infty \right) , \end{aligned}$$
(3.10)

where

$$\begin{aligned} a_r^*(n)&= -\sum _{j=0}^{\min (n-1,r)} \frac{n!\,(-2)^j}{(n-1-j)!\,(j+1)} \,\, a_{r-j}(n-1-j)&\quad (r,n\in {{\mathbb {Z}}}_{\ge 0}) \quad . \end{aligned}$$
(3.11)

Proof

Combining (3.8) with (3.4) and (3.5), we deduce both (3.9) and (3.10) immediately. \(\square \)

Let us define (this is a nonstandard notation)

$$\begin{aligned} D_\nu (z) := \frac{\left( \frac{1}{2}z\right) ^\nu }{2\pi i} \int _{-\infty }^{(0+)}t^{-\nu -1}\log t\,\,\exp \left( \frac{z^2}{4t}+t \right) \mathrm{d}t \quad (z\in {{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0};\nu \in {{\mathbb {C}}}), \end{aligned}$$
(3.12)

so that \(D_\nu (z) = I_\nu (z)\,\,\log \left( \frac{1}{2}z\right) - I_\nu ^*(z)\).

Theorem 3.4

If \(0<\delta <\frac{\pi }{2}\) and n is a positive integer, then

$$\begin{aligned} D_{0}(z)&= \frac{\mathrm{e}^z\log \left( \frac{1}{2}z\right) }{z^{\frac{1}{2}}} \left( \sum _{r=0}^{R-1} z^{-r} a_r(0) + O(z^{-R}) \right) \nonumber \\&\quad \times \left( |\arg \, z|< \frac{\pi }{2}-\delta ,|z|\rightarrow \infty \right) , \end{aligned}$$
(3.13)
$$\begin{aligned} D_{\pm n}(z)&= \frac{\mathrm{e}^{z}}{z^{\frac{1}{2}}} \left( \log \left( \frac{1}{2}z\right) \, \sum _{r=0}^{R-1} z^{-r} a_r(n) \mp \sum _{r=0}^{R-2} z^{-r-1} a_r^*(n) + O(z^{-R}\log z) \right) \nonumber \\&\quad \times \left( |\arg \, z|< \frac{\pi }{2}-\delta ,|z|\rightarrow \infty \right) , \end{aligned}$$
(3.14)

where \(a_r(0)\) is computed by (3.6) and \(a_r^*(n)\) is given by (3.11).

Proof

Plugging (3.4) and (3.9) into (3.7), we deduce (3.13). Plugging (3.4) and (3.10) into (3.7), we deduce (3.14). \(\square \)

There are analogues for half-integer order of (3.8) , Theorem 3.3, and Theorem 3.4. By the results in [25], we deduce the following asymptotic expansion of \(I_{\nu }^*(z)\) for half-integer order \(\nu \):

Theorem 3.5

  1. (1)

    If R is a positive integer, then

    $$\begin{aligned} I_{-\frac{1}{2}}^*(x)= \frac{\mathrm{e}^{x}}{x^{\frac{3}{2}}}\left( \sum _{r=0}^{R-1} x^{-r} \frac{r!}{2^{r+\frac{3}{2}}\pi ^{\frac{1}{2}}} + O(x^{-R}) \right) \quad \, \, \left( x\in {{\mathbb {R}}}_{>0} , x\rightarrow \infty \right) . \end{aligned}$$
    (3.15)
  2. (2)

    If n is a positive integer, then

    $$\begin{aligned} I_{-n-\frac{1}{2}}^*(x)= O\left( \frac{\mathrm{e}^{x}}{x^{\frac{1}{2}}}\right) \quad \, \, \left( x\in {{\mathbb {R}}}_{>0} , x\rightarrow \infty \right) . \end{aligned}$$
    (3.16)

3.2 Polynomial-type case

We are in a position to prove Proposition 1.8. In this subsection we make available all the hypotheses stated therein. Set

$$\begin{aligned} V_s(N) = \frac{1}{2\pi i } \int _{{{\mathcal {C}}}_1} \frac{t^{s-B}}{q^{N+1}} \cdot t^{\beta } \exp \left( \frac{c^2}{t}\right) \mathrm{d}q \end{aligned}$$
(3.17)

where q describes the arc \({{\mathcal {C}}}_1\) counter-clockwise.

The proof of Proposition 1.8 rests on the following two estimates:

Lemma 3.6

Let k be a positive integer. One has

$$\begin{aligned} V(N) = \sum _{s=0}^{k-1} \alpha _s V_s(N) + O\left( \mathrm{e}^{2 c\sqrt{N}} N^{\frac{1}{2}(B-\beta -k-1)} \right) \quad (N\rightarrow \infty ). \end{aligned}$$
(3.18)

Lemma 3.7

Let \(s\ge 0\) and \(R\ge 1\) be integers. One has

$$\begin{aligned} V_s(N) = \mathrm{e}^{2 c\sqrt{N}} N^{\frac{1}{4}(2B-2s - 2\beta - 3)} \left( \sum _{r = 0}^{R-1} w_{s, r} N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \quad (N\rightarrow \infty ), \end{aligned}$$
(3.19)

where \(w_{s,r}\) is given by (1.16).

Remark

An acute reader will observe that the rth-main term of \(V_s(N)\), i.e., the term in which \(w_{s,r}\) occurs, dominates the error term of V(N) when \(s+r < k\).

Lemmas 3.6 and 3.7 are established by Wright [81, Lemmas 2 and 3]. We sketch Wright’s proofs of these estimates below not only for the sake of completeness but also to recycle his approach in proving Propositions 1.9 and 1.10.

Proof of Lemma 3.6

As in [81], we have \(V-\sum _{s=0}^{k-1} \alpha _s V_s=E_1+E_2+E_3\), where

$$\begin{aligned} E_1&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_2}\frac{L\xi }{q^{N+1}}\mathrm{d}q, \\ E_2&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_1}\frac{L\left( \xi - t^\beta \exp \left( \frac{c^2}{t}\right) \right) }{q^{N+1}}\mathrm{d}q, \\ E_3&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_1}\frac{\left( L-\sum _{s=0}^{k-1} \alpha _s t^{s-B}\right) \cdot t^\beta \exp \left( \frac{c^2}{t}\right) }{q^{N+1}}\mathrm{d}q; \end{aligned}$$

here the contours are described counter-clockwise.

Recall that \(\eta =\frac{c}{\sqrt{N}}\) and that \(q=\mathrm{e}^{-t}\) is on the circle \(\left( {{\mathcal {C}}}:|q|=\mathrm{e}^{-\eta }\right) \). Therefore \(\mathrm{Re}\, t=\eta \). If q is on the arc \({{\mathcal {C}}}_1\), we further have \(\mathrm{Im}(t)\ll _\delta \eta \).

To prove Lemma 3.6, it suffices to show the following upper bounds:

$$\begin{aligned} E_1&\ll N^{C-\frac{\beta }{2}} \exp ((2c-\delta ')\sqrt{N}), \\ E_2&\ll N^{\frac{1}{2}(B-\beta -1)} \exp (c\sqrt{N}), \\ E_3&\ll N^{\frac{1}{2}(B-k-1-\beta )} \exp (2c\sqrt{N}). \end{aligned}$$

First, for \(E_3\) observe that \(L(\mathrm{e}^{-t})-\sum _{s=0}^{k-1} \alpha _s t^{s-B}\ll t^{k-B}\asymp \eta ^{k-B}\) by HYPO 1 and that \( \left| \exp \left( \frac{c^2}{t}+Nt \right) \right| \le \exp \left( 2c\sqrt{N} \right) . \) Since the length of \({{\mathcal {C}}}_1\) is \(\asymp \eta \), we have

$$\begin{aligned} E_3 \ll \eta ^{k+1+\beta -B} \exp (2c\sqrt{N}) \asymp N^{\frac{1}{2}(B-k-1-\beta )} \exp (2c\sqrt{N}). \end{aligned}$$

Second, for \(E_2\) we note that \(L(\mathrm{e}^{-t})\ll t^{-B}\asymp \eta ^{-B}\) by HYPO 1 and that \( \xi (\mathrm{e}^{-t}) - t^\beta \exp \left( \frac{c^2}{t}\right) \ll \eta ^\beta \exp \left( \frac{c^2-\gamma }{t} \right) \ll \eta ^\beta \) by HYPO 2, whence

$$\begin{aligned} E_2\ll \eta ^{\beta +1-B} \exp \left( Nt \right) \ll \eta ^{\beta +1-B} \exp \left( c\sqrt{N} \right) \asymp N^{\frac{1}{2}(B-\beta -1)} \exp (c\sqrt{N}). \end{aligned}$$

Finally, we use the assumptions on the “minor arc” \({{\mathcal {C}}}_2\) to establish the bound for \(E_1\). By HYPO 3, for \(q\in {{\mathcal {C}}}_2\) we have \(L(q)\ll N^C\). By HYPO 4, for \(q\in {{\mathcal {C}}}_2\) we have \(|\xi (q)| \ll \xi (|q|)\exp (-\delta '\sqrt{N})\). Since \(|q|\in {{\mathcal {C}}}_1\), we have

$$\begin{aligned} \frac{\xi (|q|)}{q^N} \ll \eta ^\beta \exp \left( \frac{c^2}{\eta }+N\eta \right) \asymp N^{-\frac{\beta }{2}}\exp \left( 2c\sqrt{N} \right) . \end{aligned}$$

Thus \( E_1\ll N^{C-\frac{\beta }{2}} \exp \left( (2c-\delta ')\sqrt{N} \right) . \)

On combining the three bounds for \(E_1,E_2,E_3\) we conclude that

$$\begin{aligned} V(N)-\sum _{s=0}^{k-1} \alpha _s V_s(N) \ll N^{\frac{1}{2}(B-k-1-\beta )}\exp (2c\sqrt{N}) \quad (N\rightarrow \infty ). \end{aligned}$$

\(\square \)

Proof of Lemma 3.7

As in [81], we let \({{\mathcal {D}}}_2\) denote the line on the t-plane such that \(q=\mathrm{e}^{-t}\in {{\mathcal {C}}}_1\): this means \(\mathrm{Re}\, t=\eta \) and \(\left| \mathrm{Im}\,t\right| \le A\eta \) where \(A=A(\delta )\) is a positive constant. Let \({{\mathcal {D}}}_1\) (resp. \({{\mathcal {D}}}_3\)) denote the line on which \(\mathrm{Re}\,t\le \eta \) and \(\mathrm{Im}\,t=-A\eta \) (resp. \(\mathrm{Im}\,t=A\eta \)). Write \({{\mathcal {D}}}={{\mathcal {D}}}_1+{{\mathcal {D}}}_2+{{\mathcal {D}}}_3\) for the contour with counter-clockwise orientation. By (3.17), we have

$$\begin{aligned} V_s(N) = \frac{1}{2\pi i}\int _{{{\mathcal {D}}}_2} t^{s+\beta -B}\exp \left( Nt+\frac{c^2}{t}\right) \,\mathrm{d}t. \end{aligned}$$

Set

$$\begin{aligned} W_s(N) = \frac{1}{2\pi i}\int _{{\mathcal {D}}}t^{s+\beta -B}\exp \left( Nt+\frac{c^2}{t}\right) \,\mathrm{d}t. \end{aligned}$$

We claim that \(W_s\) is a good approximation for \(V_s\), namely:

$$\begin{aligned} V_s(N)-W_s(N) \ll \exp \left( \frac{3}{2}c\sqrt{N} \right) . \end{aligned}$$
(3.20)

Indeed, if t lies on \({{\mathcal {D}}}_3\), then \( \mathrm{Re}\left( \frac{c^2}{t} \right) = c^2 \frac{\mathrm{Re}\,t}{|t|^2} \le \frac{c\sqrt{N}}{2} \) and, on putting \(t=(\eta -i\cdot A\eta )-u\),

$$\begin{aligned} \left| t^{s+\beta -B}\exp \left( Nt+\frac{c^2}{t} \right) \right| \ll \left( 1+u^{s+\beta -B}\right) \exp \left( \frac{3}{2}c\sqrt{N} - Nu \right) . \end{aligned}$$

The same bound holds when t lies on \({{\mathcal {D}}}_1\). Thus

$$\begin{aligned} V_s(N)-W_s(N)\ll & {} \exp \left( \frac{3c}{2}\sqrt{N} \right) \int _0^\infty (1+u^{s+\beta -B})\exp (-Nu) \mathrm{d}u\\\ll & {} \exp \left( \frac{3}{2}c\sqrt{N}\right) , \end{aligned}$$

so our claim (3.20) is proven.

On the other hand, by (3.1) we have

$$\begin{aligned} W_s(N)=\left( \frac{c^2}{N}\right) ^{\frac{1}{2}(s+\beta -B+1)} \, I_{B-\beta -s-1}(2c\sqrt{N}). \end{aligned}$$
(3.21)

By appealing to asymptotic expansion (3.4) of the I-Bessel function, we see that

$$\begin{aligned} W_s(N)=\mathrm{e}^{2c\sqrt{N}}N^{\frac{1}{4}(2B-2s-2\beta -3)} \left( \sum _{r=0}^{R-1}N^{-\frac{r}{2}} w_{s,r} +O\left( N^{-\frac{R}{2}}\right) \right) \quad (N\rightarrow \infty ), \end{aligned}$$
(3.22)

where

$$\begin{aligned} w_{s,r}&= \frac{c^{s+\beta -B+1}}{(2c)^{r+\frac{1}{2}}} a_r(s+\beta -B+1) \\&= \frac{\left( -\frac{1}{4c}\right) ^r c^{s+\beta -B+\frac{1}{2}}}{2\pi ^{\frac{1}{2}}} \,\, (s+\beta -B+1,r). \end{aligned}$$

Finally, on combining (3.20) and (3.22), we conclude the lemma. \(\square \)

Proof of Proposition 1.8

As in [81], on taking \(k=R+1\) in asymptotic (3.18) of Lemma 3.6 and taking \(s=R\) in asymptotic (3.19) of Lemma 3.7, we see that

$$\begin{aligned} V(N)-\sum _{s=0}^{R-1}\alpha _sV_s(N) \ll \mathrm{e}^{2c\sqrt{N}} N^{\frac{1}{4}(2B-2R-2\beta -3)} \quad (N\rightarrow \infty ). \end{aligned}$$
(3.23)

By Lemma 3.7, each \(V_s\) admits the asymptotic expansion

$$\begin{aligned} V_s(N)&= \mathrm{e}^{2 c\sqrt{N}} N^{\frac{1}{4}(2B-2s-2\beta -3)} \left( \sum _{r = 0}^{R-s-1} w_{s, r} N^{-\frac{r}{2}} + O\left( N^{-\frac{R-s}{2}}\right) \right) \nonumber \\&= \mathrm{e}^{2 c\sqrt{N}} N^{\frac{1}{4}(2B-2\beta -3)} \left( \sum _{r = s}^{R-1} w_{s, r-s} N^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \quad (N\rightarrow \infty ) . \end{aligned}$$
(3.24)

On plugging (3.24) into (3.23), we conclude Proposition 1.8. \(\square \)

3.3 Logarithmic-type case

We are in a position to prove Propositions 1.9 and 1.10. In this subsection we make available all the hypotheses stated therein, except for the condition \(B-\beta =1\) or \(B-\beta =\frac{1}{2}\). Set

$$\begin{aligned} V_s^*(N) = \frac{1}{2\pi i } \int _{{{\mathcal {C}}}_1} \frac{t^{s-B}\log t}{q^{N+1}} \,\, t^\beta \exp \left( \frac{c^2}{t}\right) \mathrm{d}q. \end{aligned}$$
(3.25)

The proof of Proposition 1.9 rests on the following two estimates:

Lemma 3.8

Let k be a positive integer. The condition on \(B-\beta \) can be omitted. One has

$$\begin{aligned} V(N) = \sum _{s=0}^{k-1}\alpha _sV_s^*(N) + O\left( {\mathrm{e}^{2c\sqrt{N}} N^{\frac{1}{2}(B-\beta -k-1)} \log N} \right) \quad (N\rightarrow \infty ). \end{aligned}$$
(3.26)

Lemma 3.9

Let \(s\ge 0\) and \(R\ge 1\) be integers. Suppose \(B-\beta =1\). One has

$$\begin{aligned} V_s^*(N) = \mathrm{e}^{2c\sqrt{N}} N^{-\frac{1}{4}(2s+1)} \left( \sum _{r=0}^{R-1}N^{-\frac{r}{2}}\left( l'_{s,r}+l_{s,r}\log N\right) + O(N^{-\frac{R}{2}}\log N) \right) \,\, (N\rightarrow \infty ), \end{aligned}$$
(3.27)

where \(l_{s,r},l'_{s,r}\) are given in Proposition 1.9.

We will establish Lemmas 3.8 and 3.9 similarly to Lemmas 3.6 and 3.7.

Proof of Lemma 3.8

Similar to Lemma 3.6, we have \(V-\sum _{s=0}^{k-1}V_s^*=E_1+E_2+E_3\), where

$$\begin{aligned} E_1&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_2}\frac{L\xi }{q^{N+1}}\mathrm{d}q, \\ E_2&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_1}\frac{L\left( \xi - t^\beta \exp \left( \frac{c^2}{t}\right) \right) }{q^{N+1}}\mathrm{d}q, \\ E_3&= \frac{1}{2\pi i}\int _{{{\mathcal {C}}}_1}\frac{\left( L-\frac{\log t}{t^B}(\sum _{s=0}^{k-1}\alpha _st^s)\right) \cdot t^\beta \exp \left( \frac{c^2}{t}\right) }{q^{N+1}}\mathrm{d}q; \end{aligned}$$

here the contours are described counter-clockwise.

Recall that \(\eta =\frac{c}{\sqrt{N}}\) and that \(q=\mathrm{e}^{-t}\) is on the circle \(\left( {{\mathcal {C}}}:|q|=\mathrm{e}^{-\eta }\right) \). Therefore \(\mathrm{Re}\, t=\eta \). If q is on the arc \({{\mathcal {C}}}_1\), we further have \(\mathrm{Im}(t)\ll _\delta \eta \).

To prove Lemma 3.8, it suffices to show the following upper bounds:

$$\begin{aligned} E_1&\ll \exp ( (2c-\delta ')\sqrt{N} ) N^{C}, \\ E_2&\ll \exp (c\sqrt{N}) \log N, \\ E_3&\ll \exp (2c\sqrt{N}) N^{\frac{1}{2}(B-k-1-\beta )} \log N. \end{aligned}$$

First, for \(E_3\) observe that \(L(\mathrm{e}^{-t})-\frac{\log t}{t^B}(\sum _{s=0}^{k-1} \alpha _s t^s)\ll t^{k-B}|\log t|\asymp \eta ^{k-B}\log N\) by HYPO 1 and that \( \left| \exp \left( \frac{c^2}{t}+Nt \right) \right| \le \exp \left( 2c\sqrt{N} \right) . \) Since the length of \({{\mathcal {C}}}_1\) is \(\asymp \eta \), we see that

$$\begin{aligned} E_3 \ll \eta ^{k+1+\beta -B} \exp (2c\sqrt{N}) \log N \asymp N^{\frac{1}{2}(B-k-1-\beta )} \exp (2c\sqrt{N}) \log N. \end{aligned}$$

Second, for \(E_2\) we note that \(L(\mathrm{e}^{-t})\ll \frac{\log \eta }{\eta ^B} \asymp \eta ^{-B}\log N\) by HYPO 1 and that \( \xi - t^\beta \exp \left( \frac{c^2}{t}\right) \ll t^\beta \exp \left( \frac{c^2-\gamma }{t} \right) \ll \eta ^\beta \) by HYPO 2. Therefore

$$\begin{aligned} E_2\ll \eta ^{\beta -B} \exp \left( Nt+\frac{c^2-\gamma }{t} \right) \log N \ll \eta ^{\beta -B} \exp \left( c\sqrt{N} \right) \log N. \end{aligned}$$

Finally, on using the assumptions on the growth of L and \(\xi \) on the “minor arc” \({{\mathcal {C}}}_2\), we establish the bound for \(E_1\). By HYPO 3, for \(q\in {{\mathcal {C}}}_2\) we have \(L(q)\ll N^C\). By HYPO 4, for \(q\in {{\mathcal {C}}}_2\) we have \(\xi (q) \ll \xi (|q|)\exp (-\delta '\sqrt{N})\). Since \(|q|\in {{\mathcal {C}}}_1\) we have

$$\begin{aligned} \left| \frac{\xi (|q|)}{q^N} \right| \ll \exp \left( \frac{c^2}{\eta }+N\eta \right) = \exp \left( 2c\sqrt{N} \right) . \end{aligned}$$

Thus \( E_1\ll N^{C} \exp \left( (2c-\delta ')\sqrt{N} \right) . \)

On combining the three bounds for \(E_1,E_2,E_3\) we arrive at

$$\begin{aligned} V-\sum _{s=0}^{k-1} \alpha _s V_s^* \ll N^{\frac{1}{2}(B-k-1-\beta )} \exp (2c\sqrt{N}) \log N. \end{aligned}$$

\(\square \)

Proof of Lemma 3.9

As in Lemma 3.7, let \({{\mathcal {D}}}_2\) denote the line on the t-plane on which \(\mathrm{Re}\,t=\eta \) and \(\left| \mathrm{Im}\,t\right| \le A\eta \). Let \({{\mathcal {D}}}_1\) (resp. \({{\mathcal {D}}}_3\)) denote the line on which \(\mathrm{Re}\,t\le \eta \) and \(\mathrm{Im}\,t=-A\eta \) (resp. \(\mathrm{Im}\,t=A\eta \)). Write \({{\mathcal {D}}}={{\mathcal {D}}}_1+{{\mathcal {D}}}_2+{{\mathcal {D}}}_3\) for the contour with counter-clockwise orientation. By (3.25) we have

$$\begin{aligned} V_s^*(N) = \frac{1}{2\pi i}\int _{{{\mathcal {D}}}_2} t^{s-1}\log t \cdot \exp \left( \frac{c^2}{t}+Nt\right) \mathrm{d}t. \end{aligned}$$

Set

$$\begin{aligned} W_s^*(N) = \frac{1}{2\pi i}\int _{{\mathcal {D}}}t^{s-1}\log t \cdot \exp \left( \frac{c^2}{t}+Nt\right) \mathrm{d}t. \end{aligned}$$

We claim that \(W_s^*\) is a good approximation for \(V_s^*\), namely:

$$\begin{aligned} V_s^*(N)-W_s^*(N)\ll \exp \left( \frac{3}{2}c\sqrt{N} \right) \cdot \log N. \end{aligned}$$
(3.28)

Indeed, if t lies on \({{\mathcal {D}}}_3\), then \( \mathrm{Re}\left( \frac{c^2}{t} \right) \le \frac{c^2}{2\eta } = \frac{c\sqrt{N}}{2} \) and, on putting \(t=(\eta -i\cdot A\eta )-u\),

$$\begin{aligned} \left| t^{s-1}\log t\cdot \exp \left( Nt+\frac{c^2}{t} \right) \right| \ll \left( 1+u^{s-1}\right) \log (Nu) \exp \left( \frac{3}{2}c\sqrt{N} - Nu \right) . \end{aligned}$$

The same bound holds when t lies on \({{\mathcal {D}}}_1\). Thus

$$\begin{aligned} V_s^*(N)-W_s^*(N)\ll & {} \exp \left( \frac{3}{2}c\sqrt{N} \right) \int _0^\infty (1+u^{s-1})\log (Nu) \exp (-Nu) \mathrm{d}u \nonumber \\\ll & {} \exp \left( \frac{3}{2}c\sqrt{N}\right) \cdot \log N, \end{aligned}$$

so our claim is proven.

On the other hand, by (3.1) and (3.12) we have

$$\begin{aligned} W_s^*(N)&= \left( \frac{c^2}{N}\right) ^{\frac{1}{2}s} \left( D_{-s}(2c\sqrt{N}) - I_{-s}(2c\sqrt{N})\log N \right) . \end{aligned}$$
(3.29)

It now follows from (3.29), (3.4), and Theorem 3.4 that

$$\begin{aligned} W_s^*(N) = \mathrm{e}^{ 2c\sqrt{N} } N^{-\frac{1}{4}(2s+1)} \left( \sum _{r=0}^{R-1}N^{-\frac{r}{2}}\left( l'_{s,r}+l_{s,r}\log N\right) + O(N^{-\frac{R}{2}}\log N) \right) \,(N\rightarrow \infty ). \end{aligned}$$
(3.30)

Here we combine (3.4), (3.13), and (3.29) to get the formulas for the coefficients \(l'_{s,r}\) and \(l_{s,r}\):

$$\begin{aligned} l_{ s,r}&=\frac{\left( -\frac{1}{4c}\right) ^r c^{s-\frac{1}{2}}}{-4\pi ^{\frac{1}{2}}} \,\, (s,r)&(s,r\in {{\mathbb {Z}}}_{\ge 0}),\\ l'_{ s,r}&=\frac{\left( -\frac{1}{4c}\right) ^r c^{s-\frac{1}{2}}\log c}{2\pi ^{\frac{1}{2}}} \,\, (s,r) + \frac{c^{s-r-\frac{1}{2}}}{2^{r+\frac{1}{2}}} \,\, a_{r-1}^*(s)&(s,r\in {{\mathbb {Z}}}_{\ge 0}). \end{aligned}$$

Finally, on combining (3.28) and (3.30) we conclude the lemma. \(\square \)

Proof of Proposition 1.9

As in the proof of Proposition 1.8, on taking \(k=R+1\) in Lemma 3.8 and taking \(s=R\) in Lemma 3.9 we deduce that

$$\begin{aligned} V(N)-\sum _{s=0}^{R-1}\alpha _sV_s^*(N) \ll \mathrm{e}^{2c\sqrt{N}} N^{-\frac{1}{4}(2R+1)}\log N \quad (N\rightarrow \infty ). \end{aligned}$$
(3.31)

Then we use Lemma 3.9 to plug in the asymptotic expansion of each \(V_s^*\), namely

$$\begin{aligned} V_s^*(N)&= \mathrm{e}^{2 c\sqrt{N}} N^{-\frac{1}{4}(2s + 1)} \left( \sum _{r = 0}^{R-s-1} N^{-\frac{r}{2}}(l'_{s, r}+l_{s,r}\log N ) + O(N^{-\frac{1}{2}(R-s)}\log N)\right) \nonumber \\&= \mathrm{e}^{2 c\sqrt{N}} N^{-\frac{1}{4}} \left( \sum _{r = s}^{R-1} N^{-\frac{r}{2}}(l'_{s, r-s}+l_{s, r-s}\log N ) + O(N^{-\frac{R}{2}}\log N)\right) . \end{aligned}$$
(3.32)

On plugging (3.32) into (3.31), we conclude Proposition 1.9. \(\square \)

Proof of Proposition 1.10

By appealing to Theorems 3.2 and 3.5, one deduces the following estimate:

Lemma 3.10

Let \(s\ge 1\) and \(R\ge 1\) be integers. If \(B-\beta =\frac{1}{2}\), then

$$\begin{aligned} V_0^*(N)&= \mathrm{e}^{2c\sqrt{N}} N^{-\frac{1}{2}}\cdot \frac{-1}{4\pi ^\frac{1}{2}} \left( \log N -2\log c + O(N^{-\frac{1}{2}}\log N) \right)&(N\rightarrow \infty ), \\ V_s^*(N)&= O \left( e^{2c\sqrt{N}} N^{-\frac{s}{2}-\frac{1}{2}}\log N \right)&(N\rightarrow \infty ). \end{aligned}$$

The proof of Proposition 1.10 then rests on Lemmas 3.8 and 3.10. By the same token as the proof of Proposition 1.9, one shows Proposition 1.10 in a straightforward manner. \(\square \)

4 Asymptotic expansion

In this section we compute various asymptotic expansions of holomorphic modular forms and quantum modular forms. These functions are the building blocks of the generating functions of Theorems 1.11.7.

4.1 The partition function and the Dedekind eta function

A pivoting character in the theory of combinatorial analysis of partition functions is the Dedekind’s eta function

$$\begin{aligned} \eta (z)=q^{\frac{1}{24}}(q)_\infty \quad (z\in {{\mathbb {H}}}; q=\mathrm{e}^{2\pi iz}). \end{aligned}$$
(4.1)

It is a half-integral weight modular form. Its relation to the partition function stems from the identity

$$\begin{aligned} \xi _\infty (q):=\frac{1}{(q)_\infty }= \sum _{N=1}^\infty p(N)q^N . \end{aligned}$$

The modularity of the Dedekind eta function is a key ingredient in the circle method which provides asymptotic expansion for the partition function p(N). According to Hardy–Ramanujan and Wright, among others (see [49, Section 1.4, p. 280] and [81, pp. 112–113]):

Theorem 4.1

Let \(0<\delta <\frac{\pi }{2}\) be a constant.

  1. (1)

    As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \)

    $$\begin{aligned} \xi _\infty (\mathrm{e}^{-t})&= \left( \frac{t}{2\pi }\right) ^{\frac{1}{2}} \mathrm{e}^{ \frac{\pi ^2}{6t} - \frac{t}{24}} \left( 1+O_\delta \left( \mathrm{e}^{-\frac{4\pi ^2}{t} }\right) \right) , \\ \frac{1}{\eta (\mathrm{e}^{-t})}&= \left( \frac{t}{2\pi }\right) ^{\frac{1}{2}}\mathrm{e}^{ \frac{\pi ^2}{6t} } \left( 1+O_\delta \left( \mathrm{e}^{ -\frac{4\pi ^2}{t} }\right) \right) . \end{aligned}$$
  2. (2)

    There exists a positive constant \(\delta '=\delta '(\delta )\) such that, as \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\),

    $$\begin{aligned} \xi _\infty (\mathrm{e}^{-t}) \ll _\delta \xi _\infty (|\mathrm{e}^{-t}|)\exp \left( \frac{-\delta '}{t} \right) , \\ \frac{1}{ \eta (\mathrm{e}^{-t}) } \ll _\delta \frac{1}{ \eta (|\mathrm{e}^{-t}|) }\exp \left( \frac{-\delta '}{t} \right) . \end{aligned}$$

4.2 The divisor function and a period function

In their recent work [13], Bettin and Conrey studied the divisor generating function

$$\begin{aligned} S_0(z)=\sum _{n=1}^\infty d(n)\mathrm{e}^{2\pi inz} \quad (z\in {{\mathbb {H}}}), \end{aligned}$$

where d(n) denotes the number of positive divisors of n and \({{\mathbb {H}}}\) denotes the Poincaré upper half-plane. Bettin and Conrey discovered that \(S_0(z)\) is associated with the period function \(\psi _0(z)\) given by

$$\begin{aligned} \psi _0(z)=\left( 1-\frac{1}{z}\right) -4\left( S_0(z)-\frac{1}{z}S_0\left( -\frac{1}{z}\right) \right) , \end{aligned}$$

and showed the following

Theorem 4.2

(Bettin–Conrey) [13, Theorem 1] The period function \(\psi _0(z)\), originally defined for \(z\in {{\mathbb {H}}}\), extends to an analytic function on \({{\mathbb {C}}}':={{\mathbb {C}}}-{{\mathbb {R}}}_{\le 0}\) via the representation

$$\begin{aligned} \psi _0(z)=\frac{-2(\log (2\pi z)-\gamma )}{\pi iz}-2ig_0(z) \end{aligned}$$
(4.2)

where \(\gamma =0.5772156\ldots \) is Euler’s constant and

$$\begin{aligned} g_0(z)= & {} 2\sum _{n=1}^{M} \frac{(-1)^{n+1}B_{2n}}{(2n)!}\zeta (1-2n)(2\pi z)^{2n-1} \nonumber \\&+ \frac{1}{\pi i}\int _{(-\frac{1}{2}-2M)}\zeta (s)^2\frac{\Gamma (s)}{\sin \frac{\pi s}{2}}(2\pi z)^{-s}\, \mathrm{d}s \end{aligned}$$
(4.3)

for any nonnegative integer M.

Our main goal in this paragraph is to show that the function \(L(\mathrm{e}^{-t}):=\psi _0\left( \frac{it}{2\pi }\right) \) is a linear combination of a function of polynomial type and a function of logarithmic type (see HYPO 1 in Sect. 1.5). We first start with the term \(g_0(z)=g_0\left( \frac{it}{2\pi }\right) \). It is clear from (4.3) that

$$\begin{aligned} g_0\left( \frac{it}{2\pi }\right) =-i\sum _{n=1}^{M} \frac{B_{2n}^2}{(2n)!n}t^{2n-1} + \frac{1}{\pi i}\int _{(-\frac{1}{2}-2M)}\zeta ^2(s)\frac{\Gamma (s)}{\sin \frac{\pi s}{2}}(it)^{-s}\, \mathrm{d}s \quad (\mathrm{Re}\,t>0). \end{aligned}$$

Set

$$\begin{aligned} A_M(t)=\frac{1}{\pi i}\int _{(-\frac{1}{2}-2M)}\zeta ^2(s)\frac{\Gamma (s)}{\sin \frac{\pi s}{2}}(it)^{-s}\, \mathrm{d}s \quad (\mathrm{Re}\,t>0). \end{aligned}$$

Lemma 4.3

Let M be a positive integer. As \(|t|\rightarrow 0\) in the right half-plane \(\mathrm{Re}\,t>0\), one has \(A_M(t)\ll _M t^{2M+\frac{1}{2}}\).

Proof

Using the functional equation of the Riemann zeta function \(\zeta (s)\) together with the identities \(\Gamma (s)\Gamma (s+\frac{1}{2})=\pi ^{\frac{1}{2}}2^{1-2s}\Gamma (2s)\) and \(\Gamma (s)\Gamma (1-s)=\frac{\pi }{\sin (\pi s)}\), we see that

$$\begin{aligned} \zeta ^2(s)\frac{\Gamma (s)}{\sin \frac{\pi s}{2}}(it)^{-s} = \frac{(2\pi )^{2s-1}}{\cos \frac{\pi s}{2}}\Gamma (1-s)\zeta ^2(1-s)(it)^{-s}. \end{aligned}$$

Therefore

$$\begin{aligned} A_M(t):=\frac{1}{\pi i}\int _{(\frac{1}{2}+2M)} \frac{(2\pi )^{-2s-1}}{\cos \frac{\pi s}{2}} \Gamma (1+s) \zeta ^2(1+s)(it)^{-s}\, \mathrm{d}s \quad (\mathrm{Re}\,t>0). \end{aligned}$$

Write \(s=\frac{1}{2}+2M+it_0\). We break the integral \(\int _{(\frac{1}{2}+2M)} \mathrm{d}s = i\int _{-\infty }^\infty dt_0\) into three parts: (a) \(|t_0|\ge 220M\), (b) \(1\le |t_0|< 220M\), and (c) \(|t_0|<1\) and hence write \(A=A_a+A_b+A_c\) accordingly.

On part (a), i.e., \(|t_0|\ge 220M\) and \(\sigma =\frac{1}{2}+2M\), we have the following estimates

$$\begin{aligned} (2\pi )^{-2s-1}&\sim (2\pi )^{-4M-2} \\ \frac{1}{\cos \frac{\pi s}{2}}&\asymp \mathrm{e}^{-\frac{1}{2}\pi t_0} \\ \Gamma (1+s)&\asymp t_0^{1+2M}\mathrm{e}^{-\frac{1}{2}\pi t_0} \quad \text { (by Stirling's formula) }\\ \zeta ^2(1+s)&\ll _M 1 \\ (it)^{-s}=\mathrm{e}^{\frac{1}{2}\pi is}t^s&\sim \mathrm{e}^{-\frac{1}{2}\pi t_0} t^{\frac{1}{2}+2M}; \end{aligned}$$

here all estimates except for the second line are apparent, whereas for the second line we note

$$\begin{aligned} 2\cos \frac{\pi s}{2}=\mathrm{e}^{\frac{1}{2}\pi is}+\mathrm{e}^{-\frac{1}{2}\pi is} =\mathrm{e}^{\frac{1}{2}\pi i\sigma }\mathrm{e}^{-\frac{1}{2}\pi t_0} + \mathrm{e}^{-\frac{1}{2}\pi i\sigma }\mathrm{e}^{\frac{1}{2}\pi t_0} \asymp \mathrm{e}^{\frac{1}{2}\pi t_0}. \end{aligned}$$

Hence \(A_a\ll _M t^{\frac{1}{2}+2M} \int _M^\infty t_0^{1+2M} \mathrm{e}^{-\frac{3}{2}\pi t_0} dt_0 \ll _M t^{\frac{1}{2}+2M}.\) Similar arguments show that \(A_b\ll _M t^{\frac{1}{2}+2M}\) and that \(A_c\ll _M t^{\frac{1}{2}+2M}\). This concludes the lemma. \(\square \)

Corollary 4.4

Let M be a positive integer. One has

$$\begin{aligned} g_0\left( \frac{it}{2\pi }\right)&= -i\sum _{n=1}^{M} \frac{B_{2n}^2}{(2n)!\,n}t^{2n-1} + O(t^{2M+\frac{1}{2}})&\quad (\mathrm{Re}\,t>0, |t|\rightarrow 0).\\ \psi _0\left( \frac{it}{2\pi }\right)&= \frac{4\log t}{t}+\frac{2\pi i-4\gamma }{t} -2\sum _{n=1}^{M} \frac{B_{2n}^2}{(2n)!\,n}t^{2n-1} + O(t^{2M+\frac{1}{2}})&\quad (\mathrm{Re}\,t>0, |t|\rightarrow 0). \end{aligned}$$

From the relation between the divisor generating function \(S_0(z)\) and the associated period function \(\psi _0(z)\), namely

$$\begin{aligned} S_0(z)=\frac{1}{4}\left( 1-\frac{1}{z}\right) -\frac{1}{4}\psi _0(z)+\frac{4}{z}S_0\left( -\frac{1}{z}\right) , \end{aligned}$$

we are now ready to see that the function \(S_0\left( \frac{it}{2\pi } \right) \) satisfies HYPO 1 and HYPO 3.

Corollary 4.5

  1. (1)

    Let M be a positive integer. As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \), one has

    $$\begin{aligned} S_0\left( \frac{it}{2\pi } \right) = -\frac{\log t}{t} + \frac{\gamma }{t} + \frac{1}{4} + \sum _{n = 1}^{M} \frac{B_{2n}^2}{(2n)!\,(2n)}t^{2n-1} + O({t}^{2M+\frac{1}{2}}) . \end{aligned}$$
    (4.4)
  2. (2)

    As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\), one has

    $$\begin{aligned} S_0\left( \frac{it}{2\pi } \right) \ll _\delta t^{-\frac{3}{2}}. \end{aligned}$$
    (4.5)

The corollary shows that the function \(S_0\left( \frac{it}{2\pi } \right) \) is a sum of a series of polynomial type and a series of logarithmic type in the sense of HYPO 1, and that \(S_0\left( \frac{it}{2\pi } \right) \) satisfies HYPO 3.

Proof

  1. (1)

    This is an immediate consequence of Corollary 4.4 and the observation that in the given bounded cone, the function \(S_0\left( -\frac{1}{z}\right) = S_0\left( \frac{2\pi i}{t}\right) \) decays exponentially with respect to \(\frac{1}{|t|}\).

  2. (2)

    We have

    $$\begin{aligned} S_0\left( -\frac{1}{z}\right)&= S_0\left( \frac{2\pi i}{t}\right) = \sum _{n=1}^\infty d(n)\mathrm{e}^{-\frac{4\pi ^2n}{t}} \\&\ll \sum _{n=1}^\infty n^\epsilon \mathrm{e}^{-\frac{4\pi ^2n\mathrm{Re}\,t}{|t|^2}} \le \sum _{n=1}^\infty \mathrm{e}^{\epsilon \log n-\frac{2\pi ^2n}{N^{1/2}}}. \end{aligned}$$

    We then break this latter sum as \(\sum _{n=1}^\infty = \sum _{ n< N^{2/3}} + \sum _{n\ge N^{2/3}}\) . For \(n< N^{2/3}\), we have \(\sum _{n<N^{2/3}} \mathrm{e}^{\epsilon \log n-\frac{2\pi ^2n}{N^{1/2}}} \le \sum _{n<N^{2/3}} \mathrm{e}^{\frac{2}{3}\epsilon \log n}\le N^{\frac{2}{3}+\frac{2\epsilon }{3}} \ll N^{\frac{3}{4}}\). For \(n\ge N^{2/3}\), we have \(\epsilon \log n<\frac{n}{N^{1/2}}\) and hence

    $$\begin{aligned} \sum _{n\ge N^{2/3}} \mathrm{e}^{\epsilon \log n-\frac{2\pi ^2n}{N^{1/2}}} \le \sum _{n\ge N^{2/3}} \mathrm{e}^{\frac{n}{N^{1/2}}(1-2\pi ^2)} \ \le \sum _{n\ge N^{2/3}} \mathrm{e}^{-\frac{n}{N^{1/2}}} \ll N^{1/2}. \end{aligned}$$

    This concludes the second statement of the corollary. \(\square \)

4.3 The Ramanujan–Andrews–Dyson–Hickerson–Cohen pair \((\sigma ,\sigma ^*)\)

The pair \((\sigma ,\sigma ^*)\) given by

$$\begin{aligned} \sigma (q) :=&1+\sum _{n=0}^\infty (-1)^nq^{n+1}(1-q)(1-q^2)\cdots (1-q^n) \quad (|q|<1) \\ \sigma ^*(q):=&-2\sum _{n=0}^\infty q^{n+1}(1-q^2)(1-q^4)\cdots (1-q^{2n}) \quad (|q|<1) \end{aligned}$$

is one of the very first examples in the theory of quantum modular form [83]. Set

$$\begin{aligned} R(z)&:= q\sigma (q^{24}) =: \sum _{n>0}T(n)q^n \quad (z\in {{\mathbb {H}}}; q=\mathrm{e}^{2\pi iz}, |q|<1)\end{aligned}$$
(4.6)
$$\begin{aligned} R^*(z)&:= q^{-1}\sigma ^*(q^{24}) =: \sum _{n>0}T(-n)q^n \quad (z\in {{\mathbb {H}}}; q=\mathrm{e}^{2\pi iz}, |q|<1). \end{aligned}$$
(4.7)

Put \(R_+ := R+R^* \) and \(R_- := R-R^*\).

In this paragraph, let \({\epsilon }\in \{+,-\}\) and let \(A>1\) be any (fixed) constant. Our goal is to work out an integral representation for \(R_{\epsilon }(z)\) which is analogous to (4.2) and which implies useful asymptotic expansions. Our starting observation is that \(R_{\epsilon }(z)\) is an inverse Mellin transform of a certain Hecke L-function. We will look at the period function of type \(\psi _{\epsilon }(z)=R_{\epsilon }(z)-\frac{1}{cz}R_{\epsilon }\left( -\frac{1}{cz} \right) \) where \(c>0\) is a normalizing constant.

Define

$$\begin{aligned} L_+(s)&= \sum _{n\ge 1}\frac{T(n)+T(-n)}{n^s} ; \quad \Lambda _+(s) = (1152)^{\frac{s}{2}}\pi ^{-s}\Gamma \left( \frac{s}{2} \right) ^2L_+(s) \end{aligned}$$
(4.8)
$$\begin{aligned} L_-(s)&= \sum _{n\ge 1}\frac{T(n)-T(-n)}{n^s} ; \quad \Lambda _-(s) = (1152)^{\frac{s+1}{2}}\pi ^{-(s+1)}\Gamma \left( \frac{s+1}{2} \right) ^2L_-(s). \end{aligned}$$
(4.9)

We collect the relevant results from [7, 16, 29] in the following theorem.

Theorem 4.6

[7, 16, 29]

  1. (1)

    \(T({\epsilon }n)=O(\log n)\) for \({\epsilon }\in \{+,-\}\) and \(n\in {{\mathbb {Z}}}_{>0}\);

  2. (2)

    \(L_{\epsilon }(s)\) converges absolutely for \(\mathrm{Re}\,s>1\);

  3. (3)

    \(\Lambda _{\epsilon }(s)\) extends to an entire function of order 1 and satisfies \(\Lambda _{\epsilon }(s)=\Lambda _{\epsilon }(1-s)\);

  4. (4)

    Outside the critical strip \(0<\mathrm{Re}\,s<1, L_+(s)\) has trivial zeros (of order 2) at \(s\in 2{{\mathbb {Z}}}_{\le 0}=\{0,-2,-4,-6,\ldots \}\). Outside the critical strip \(0<\mathrm{Re}\,s<1, L_-(s)\) has trivial zeros (of order 2) at \(s\in -1+2{{\mathbb {Z}}}_{\le 0}=\{-1,-3,-5,-7,\ldots \}\).

The following is an analogue of Theorem 4.2.

Theorem 4.7

For \(z\in {{\mathbb {H}}}\) one has

$$\begin{aligned} R_\mathrm{+}(z)&-\frac{1}{1152^{\frac{1}{2}}z}R_\mathrm{+}\left( -\frac{1}{1152z} \right) \nonumber \\&= \sum _{n=0}^Mr_{\mathrm{+},n} + \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) } \frac{i}{\sin \frac{\pi s}{2}} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{+}(s)\,\mathrm{d}s \end{aligned}$$
(4.10)
$$\begin{aligned} R_\mathrm{-}(z)&+\frac{1}{1152^{\frac{1}{2}}z}R_\mathrm{-}\left( -\frac{1}{1152z} \right) \nonumber \\&= \sum _{n=0}^Mr_{\mathrm{-},n} + \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) }\frac{1}{\cos \frac{\pi s}{2}} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{-}(s)\,\mathrm{d}s \end{aligned}$$
(4.11)

where the \(r_{{\epsilon },n}\) are given by \(r_{+,0}=0\) and

$$\begin{aligned} r_{\mathrm{+},n}&= \frac{(-1)^{n+1}i}{(2n-1)!}(2\pi z)^{2n-1}L_+(1-2n) \quad (n\in {{\mathbb {Z}}}_{>0}) \end{aligned}$$
(4.12)
$$\begin{aligned} r_{\mathrm{-},n}&=\frac{(-1)^{n}}{(2n)!}(2\pi z)^{2n}L_-(-2n) \quad (n\in {{\mathbb {Z}}}_{\ge 0}) . \end{aligned}$$
(4.13)

Proof

We have

$$\begin{aligned} R_{\epsilon }(z)&=\sum _{n>0}\left( T(n)+{\epsilon }T(-n)\right) \mathrm{e}^{2\pi inz} = \sum _{n>0}\frac{T(n)+{\epsilon }T(-n)}{2\pi i}\int _{(A)}(-2\pi inz)^{-s} \Gamma (s)\,\mathrm{d}s \nonumber \\&= \frac{1}{2\pi i}\int _{(A)}\mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_{\epsilon }(s)\,\mathrm{d}s . \end{aligned}$$
(4.14)

Now let \({\epsilon }=+\) and move the line of integration to the left, say to the line \(\left( -\frac{1}{2}-2M\right) \) for any positive integer M. The poles of the integrand in (4.14), namely \(\mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{+}(s)\), are simple poles at \(s\in -1+2{{\mathbb {Z}}}_{\le 0}\). For \(n\in {{\mathbb {Z}}}_{>0}\) we have

$$\begin{aligned} \mathrm{Res}_{s=1-2n} \left( \mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{+}(s) \right) = \frac{(-1)^{n+1}i}{(2n-1)!}(2\pi z)^{2n-1}L_+(1-2n) = r_{+,n} .\quad \end{aligned}$$

One can use the functional equation of \(L_+\) to rewrite this expression of \(r_{+,n}\). The same thing can be said for \({\epsilon }=-\). In this case, the poles of the integrand in (4.14), namely \(\mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{-}(s)\), are simple poles at \(s\in 2{{\mathbb {Z}}}_{\le 0}\). For \(n\in {{\mathbb {Z}}}_{\ge 0}\) we have

$$\begin{aligned} \mathrm{Res}_{s=-2n} \left( \mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_\mathrm{-}(s) \right) = \frac{(-1)^{n}}{(2n)!}(2\pi z)^{2n}L_-(-2n) = r_{-,n} . \end{aligned}$$

One can use the functional equation of \(L_-\) to rewrite this expression of \(r_{-,n}\). Since \(r_{+,0}=0\), we see that

$$\begin{aligned} R_{\epsilon }(z) = \sum _{n=0}^Mr_{{\epsilon },n} + \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) }\mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L_{\epsilon }(s)\,\mathrm{d}s . \end{aligned}$$
(4.15)

Hence

$$\begin{aligned} R (z) = R_\mathrm{+}(z) + R_\mathrm{-}(z) = \sum _{n=0}^M (r_{+,n} + r_{-,n}) + \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) }\mathrm{e}^{\frac{1}{2}i\pi s} (2\pi z)^{-s} \,\Gamma (s) \,L(s)\,\mathrm{d}s . \end{aligned}$$

Now let us look at \(\frac{1}{z}R_{\epsilon }\left( -\frac{1}{z} \right) \) for \({\epsilon }\in \{\mathrm{+},\mathrm{-}\}\). We have

$$\begin{aligned} \frac{1}{z}R_{\epsilon }\left( -\frac{1}{z} \right)&= \frac{1}{z}\frac{1}{2\pi i}\int _{(A)}\mathrm{e}^{\frac{1}{2}i\pi s}\left( \frac{-2\pi }{z}\right) ^{-s}\, \Gamma (s)\, L_{\epsilon }(s)\,\mathrm{d}s \\&= \frac{1}{2\pi i}\int _{(A)}\mathrm{e}^{-\frac{1}{2}i\pi s}(2\pi )^{-s}z^{s-1}\, \Gamma (s)\, L_{\epsilon }(s)\,\mathrm{d}s \\&= \frac{1}{2\pi i}\int _{(1-A)}\mathrm{e}^{-\frac{1}{2}i\pi (1-s)}(2\pi )^{-(1-s)}z^{-s}\, \Gamma (1-s)\, L_{\epsilon }(1-s)\,\mathrm{d}s. \end{aligned}$$

One applies the functional equation of \(\Lambda _{\epsilon }(s)\) (Theorem 4.6) to see that

$$\begin{aligned} \frac{1}{z}R_\mathrm{+}\left( -\frac{1}{z} \right)&= \frac{1}{2\pi i}\int _{(1-A)}(-i)\cot \frac{\pi s}{2}1152^{s-\frac{1}{2}}\,\, \mathrm{e}^{\frac{1}{2}i\pi s}(2\pi z)^{-s} \,\Gamma (s)\, L_\mathrm{+}(s)\,\mathrm{d}s\\ \frac{1}{z}R_\mathrm{-}\left( -\frac{1}{z} \right)&= \frac{1}{2\pi i}\int _{(1-A)}(-i)\tan \frac{\pi s}{2}1152^{s-\frac{1}{2}}\,\, \mathrm{e}^{\frac{1}{2}i\pi s}(2\pi z)^{-s} \,\Gamma (s)\, L_\mathrm{-}(s)\,\mathrm{d}s . \end{aligned}$$

Since the current integrands do not have poles when \(\mathrm{Re}\, s\le 0\), we are free to move the line of integration to the left and deduce that

$$\begin{aligned} \frac{1}{z} R_{\mathrm{+}}\left( -\frac{1}{z} \right)&= \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) }(-i)\cot \frac{\pi s}{2}1152^{s-\frac{1}{2}}\,\, \mathrm{e}^{\frac{1}{2}i\pi s}(2\pi z)^{-s} \,\Gamma (s)\, L_{\mathrm{+}}(s)\,\mathrm{d}s \nonumber \\\end{aligned}$$
(4.16)
$$\begin{aligned} \frac{1}{z}R_\mathrm{-}\left( -\frac{1}{z} \right)&= \frac{1}{2\pi i}\int _{\left( -\frac{1}{2}-2M \right) }(-i)\tan \frac{\pi s}{2}1152^{s-\frac{1}{2}}\,\, \mathrm{e}^{\frac{1}{2}i\pi s}(2\pi z)^{-s} \,\Gamma (s)\, L_\mathrm{-}(s)\,\mathrm{d}s .\nonumber \\ \end{aligned}$$
(4.17)

We now note two identities:

$$\begin{aligned} \mathrm{e}^{\frac{1}{2}i\pi s} + i \mathrm{e}^{\frac{1}{2}i\pi s} \cot \frac{\pi s}{2}&= \frac{i}{\sin \frac{\pi s}{2}} \end{aligned}$$
(4.18)
$$\begin{aligned} \mathrm{e}^{\frac{1}{2}i\pi s} - i \mathrm{e}^{\frac{1}{2}i\pi s} \tan \frac{\pi s}{2}&= \frac{1}{\cos \frac{\pi s}{2}} . \end{aligned}$$
(4.19)

We add (4.15) and (4.16) (with z replaced by 1152z) and use (4.18) to conclude (4.10). We add (4.15) and (4.17) (with z replaced by 1152z) and use (4.19) to conclude (4.11). \(\square \)

Proceeding in the same fashion as Corollaries 4.4 and 4.5, with the aid of Theorem 4.6 we arrive at:

Corollary 4.8

Let M be a positive integer. One has

$$\begin{aligned} R_\mathrm{+}\left( \frac{it}{2\pi }\right)&= \sum _{n=1}^{M} \frac{-L_\mathrm{+}(1-2n)}{(2n-1)!}t^{2n-1} + O(t^{2M+\frac{1}{2}}) - \frac{2\pi i}{1152^{\frac{1}{2}}t}R_\mathrm{+}\left( \frac{2\pi i}{1152t} \right)&\quad (\mathrm{Re}\,t>0, |t|\rightarrow 0)\\ R_\mathrm{-}\left( \frac{it}{2\pi }\right)&= \sum _{n=0}^{M} \frac{L_\mathrm{-}(-2n)}{(2n)!}t^{2n-1} + O(t^{2M+\frac{1}{2}}) + \frac{2\pi i}{1152^{\frac{1}{2}}t}R_\mathrm{-}\left( \frac{2\pi i}{1152t} \right)&\quad (\mathrm{Re}\,t>0, |t|\rightarrow 0). \end{aligned}$$

We are now ready to see that each of the functions \(q^{\frac{1}{24}}\sigma (q)=R\left( \frac{it}{48\pi } \right) \) and \(q^{-\frac{1}{24}}\sigma ^*(q)=R^*\left( \frac{it}{48\pi } \right) \) satisfies HYPO 1 and HYPO 3. Recall \(R=\frac{1}{2}(R_++R_-)\) and \(R^*=\frac{1}{2}(R_+-R_-)\).

Corollary 4.9

  1. (1)

    Let M be a positive integer. Let \(q=\mathrm{e}^{2\pi iz}=\mathrm{e}^{-t}\). As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \) and \(|\mathrm{Im}\,t|\le \pi \), one has

    $$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}\sigma (\mathrm{e}^{-t}) =&\, \frac{1}{2}L_-(0) + \sum _{n=1}^{M} \left( -\frac{L_\mathrm{+}(1-2n)}{(2n-1)!\,2}\left( \frac{t}{24}\right) ^{2n-1} + \frac{L_\mathrm{-}(-2n)}{(2n)!\,2}\left( \frac{t}{24}\right) ^{2n} \right) \\&+ O(t^{2M+\frac{1}{2}}) , \\ \mathrm{e}^{\frac{t}{24}}\sigma ^*(\mathrm{e}^{-t}) =&-\frac{1}{2}L_-(0) + \sum _{n=1}^{M} \left( -\frac{L_\mathrm{+}(1-2n)}{(2n-1)!\,2}\left( \frac{t}{24}\right) ^{2n-1} - \frac{L_\mathrm{-}(-2n)}{(2n)!\,2}\left( \frac{t}{24}\right) ^{2n} \right) \nonumber \\&+ O(t^{2M+\frac{1}{2}}). \end{aligned}$$
  2. (2)

    As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\) and \(|\mathrm{Im}\,t|\le \pi \), there is a positive real constant C (independent of t) for which

    $$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}\sigma (\mathrm{e}^{-t}) \ll _\delta t^{-C} \quad \text {and} \quad \mathrm{e}^{\frac{t}{24}}\sigma ^*(\mathrm{e}^{-t}) \ll _\delta t^{-C}. \end{aligned}$$

Let us simplify the notation of Corollary 4.9 by the following

Definition 4.10

Let the coefficients \(\sigma _n\) and \(\sigma ^*_n\) be given by

$$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}\sigma (\mathrm{e}^{-t})=:\sum _{n=0}^\infty \frac{\sigma _n}{n!} \left( \frac{t}{24}\right) ^n&\quad (\mathrm{Re}\,t>0)\\ \mathrm{e}^{\frac{t}{24}}\sigma ^*(\mathrm{e}^{-t})=:\sum _{n=0}^\infty \frac{\sigma ^*_n}{n!} \left( \frac{t}{24}\right) ^n&\quad (\mathrm{Re}\,t>0) . \end{aligned}$$

4.4 The Kontsevich–Zagier function F(q)

Kontsevich defined the series

$$\begin{aligned} F(q)=1+\sum _{n=1}^\infty (q)_n. \end{aligned}$$

This series does not converge in any open subset of \({{\mathbb {C}}}\), but it makes sense when q is a root of unity. Zagier [82] investigated this series in great details. An interesting aspect of his work is a “strange identity”

$$\begin{aligned} \sum _{n=0}^\infty (q)_n = 1+\sum _{n=1}^\infty (1-q)\cdots (1-q^n) = -\frac{1}{2}\sum _{n=1}^\infty n\left( \frac{12}{n}\right) q^{\frac{n^2-1}{24}}. \end{aligned}$$
(4.20)

To quote Zagier: “The meaning of the equality is that the function on the left agrees at roots of unity with the radial limit of the function on the right, and similarly for the derivatives of all orders. Equation (4.20), of which

$$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}\sum _{n=0}^\infty (1-\mathrm{e}^{-t})\cdots (1-\mathrm{e}^{-nt}) = \sum _{n=0}^\infty \frac{T_n}{n!}\left( \frac{t}{24}\right) ^n \end{aligned}$$

is a consequence, is related to the Dedekind \(\eta \)-function and the theory of periods of modular forms.”

To be precise, Zagier defined for \(|q|<1\) the following functions

$$\begin{aligned} F_1(q)&= \sum _{n=1}^\infty n(q)_{n-1}q^n = \lim _{N\rightarrow \infty } \sum _{n=1}^N n(q)_{n-1}q^n \\ F_2(q)&= \sum _{n=0}^\infty \left[ (q)_n-(q)_\infty \right] \\ \\ H(q)&= \sum _{n=1}^\infty n\left( \frac{12}{n}\right) q^{\frac{n^2-1}{24}} (|q|<1) \\&= 1-5q-7q^2+11q^5+13q^7 - \cdots \nonumber \\ E(q)&= \sum _{n=1}^\infty \frac{q^n}{1-q^n} = \sum _{n=1}^\infty d(n)q^{n} = q+2q^2+2q^3+3q^4 + \cdots \end{aligned}$$

Theorem 4.11

(Zagier [82])

  1. (1)

    One has \(F_1(q) = F_2(q) = -\frac{1}{2}H(q) + \left( \frac{1}{2}-E(q) \right) (q)_\infty \) as an identity in \({{\mathbb {Z}}}\left[ \frac{1}{2} \right] [[q]]\). Note however that \(F_1=F_2\in {{\mathbb {Z}}}[[q]]\).

  2. (2)

    As \(t\in {{\mathbb {R}}}_{+},t\rightarrow 0\) one has

    $$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}H\left( \mathrm{e}^{-t}\right) =\sum _{n=1}^\infty n\left( \frac{12}{n}\right) \mathrm{e}^{-\frac{n^2t}{24}} \sim \sum _{n=0}^\infty \gamma _nt^n \end{aligned}$$

    where \(\gamma _n=\frac{(-1)^n}{24^nn!}L\left( -2n-1,\left( \frac{12}{\cdot } \right) \right) \).

One can then use the same arguments as Sect. 4.3 to deduce the following:

Corollary 4.12

  1. (1)

    Let M be a positive integer. As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\left| \arg t\right| < \frac{\pi }{2} - \delta \) one has

    $$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}F_1(\mathrm{e}^{-t}) = \mathrm{e}^{-\frac{t}{24}}F_2(\mathrm{e}^{-t}) = -2 \sum _{n=1}^{M} \gamma _nt^n + O(t^{M+1}) \end{aligned}$$

    where \(\gamma _n=\frac{(-1)^n}{24^nn!}L\left( -2n-1,\left( \frac{12}{\cdot } \right) \right) \) and \(-2\gamma _n = \frac{T_n}{24^n \ n!}\).

  2. (2)

    As \(\left| t\right| \rightarrow 0\) in the bounded cone \(\frac{\pi }{2} - \delta \le \left| \arg t\right| < \frac{\pi }{2}\) there is a positive real constant C (independent of t) for which

    $$\begin{aligned} \mathrm{e}^{-\frac{t}{24}}F_1(\mathrm{e}^{-t}) = \mathrm{e}^{-\frac{t}{24}}F_2(\mathrm{e}^{-t}) \ll _\delta t^{-C} . \end{aligned}$$

5 Proofs of combinatorial probability theorems

In this section we prove the main theorems stated in Sect. 1.

Proof of Theorem 1.1

Recall that \(p_{\mathrm{lo}}(N)\) is the number of partitions of N for which \(\mathrm{sm}(\lambda ) \equiv 1\,\,(\mathrm{mod}\,\, {2})\). The first identity of Theorem 1.7 expresses the generating function \(\sum _{N\ge 0} p_{\mathrm{lo}}(N)q^N\) as the product of a modular form and a function with quantum modular behavior.

We show the additional q-identity

$$\begin{aligned} \sum _{n=0}^\infty (-1)^n (q)_n&= \frac{1}{2} \left( 1 + \sum _{n=0}^\infty (-1)^n q^{n+1} (q)_n\right) = \frac{1}{2} \sigma (q). \end{aligned}$$
(5.1)

Consider the basic hypergeometric q-series

$$\begin{aligned} F(a, b;t) = F(a, b; t:q):= \sum _{n=0}^\infty \frac{(aq;q)_n}{(bq;q)_n} t^n. \end{aligned}$$

When \(\left| t\right| = 1\), but \(t\ne 1\) and \(\left| q\right| <1\) the series converges via the recurrence

$$\begin{aligned} F(a, b;t) = \frac{1-b}{1-t} + \frac{b-atq}{1-t} F(a, b; tq), \end{aligned}$$
(5.2)

which appears as (2.4) in [42]. Applying (5.2) with \(t=-1,a=1,b=0\), we obtain (5.1).

Using the notation of Sects. 1.5 and  3, it follows from (1.5) that

$$\begin{aligned} p_{\mathrm{lo}}(N)=V(N):=\frac{1}{2\pi i}\int _{{\mathcal {C}}}\frac{L\xi }{q^{N+1}} \mathrm{d}q \end{aligned}$$

where \(L(q)= \frac{1}{(2\pi )^{\frac{1}{2}}}q^{\frac{1}{24}}\sum _{n=0}^\infty (-1)^n ((q)_n - (q)_\infty )\) and \(\xi (q)=\frac{(2\pi )^{\frac{1}{2}}}{\eta (q)}\). Corollary 4.9 shows that \(L(\mathrm{e}^{-t})\) verifies HYPO 1 and HYPO 3, whereas Theorem 4.1 shows that \(\xi (\mathrm{e}^{-t})\) verifies HYPO 2 and HYPO 4. In the notation of Sect. 1.5, we have

$$\begin{aligned} B&= 0, \quad \quad \alpha _s = \frac{1}{(2\pi )^{\frac{1}{2}}2}\cdot \frac{\sigma _s}{s!\,24^s}, \\ \beta&= \frac{1}{2}, \quad \quad c^2=\frac{\pi ^2}{6}, \quad \quad \gamma = 4\pi ^2. \end{aligned}$$

Proposition 1.8 then yields

$$\begin{aligned} V(N) = \mathrm{e}^{2\pi \sqrt{\frac{N}{6}}} N^{-1} \left( \sum _{r=0}^{R-1}A_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

where \(A_r=\sum _{s=0}^r \alpha _{s}w_{s,r-s}\) and

$$\begin{aligned} w_{s,r}=\frac{\left( \frac{-1}{4}\right) ^r\left( \frac{\pi }{\sqrt{6}}\right) ^{s+1-r}}{2\pi ^{\frac{1}{2}}}\,\, (s+\frac{3}{2},r). \end{aligned}$$

This concludes Theorem 1.1. \(\square \)

Proof of Theorem 1.2

It follows from (1.6) that

$$\begin{aligned} e_{\mathrm{sd}}(N)=V(N):=\frac{1}{2\pi i}\int _{{\mathcal {C}}}\frac{-L\xi }{q^{N+1}} \mathrm{d}q - d(N) \end{aligned}$$

where \(L(q)= \frac{1}{(2\pi )^{\frac{1}{2}}}q^{\frac{1}{24}}F(q)\) and \(\xi (q)=\frac{(2\pi )^{\frac{1}{2}}}{\eta (q)}\). Corollary 4.9 shows that \(L(\mathrm{e}^{-t})\) verifies HYPO 1 and HYPO 3, whereas Theorem 4.1 shows that \(\xi (\mathrm{e}^{-t})\) verifies HYPO 2 and HYPO 4. In the notation of Sect. 1.5, we have

$$\begin{aligned} B&= 0, \quad \quad \alpha _s = \frac{-{\gamma _s}}{(2\pi )^{\frac{1}{2}}2} = \frac{T_s}{(2\pi )^\frac{1}{2}\,\,s!\,\,24^s}, \\ \beta&= \frac{1}{2}, \quad \quad c^2=\frac{\pi ^2}{12}, \quad \quad \gamma = 2\pi ^2. \end{aligned}$$

Proposition 1.8 then yields

$$\begin{aligned} V(N) = \mathrm{e}^{\pi \sqrt{\frac{N}{3}}} N^{-1} \left( \sum _{r=0}^{R-1}B_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

where \(B_r=\sum _{s=0}^r \alpha _{s}w_{s,r-s}\) and

$$\begin{aligned} w_{s,r-s}= \frac{1}{2 \sqrt{\pi }} \left( - 2K'\right) ^{s-r} \left( \frac{K'}{2}\right) ^{s+1/2} \,\, (s+1, r-s). \end{aligned}$$

This concludes Theorem 1.2. \(\square \)

Proof of Theorem 1.3

By definition we have

$$\begin{aligned} \sum _{\lambda } (-1)^{\ell (\lambda )+1} \mathrm{sm}(\lambda )q^{\left| \lambda \right| } = \sum _{n=0}^\infty n q^{n} (q^{n+1};q)_\infty . \end{aligned}$$
(5.3)

Theorem 1.3 is now an immediate consequence of (5.3) and an identity which was proved in [62, Section 6.3]:

$$\begin{aligned} \sum _{n=1}^\infty n q^{n} (q^{n+1};q)_\infty = \sum _{n=1}^\infty \frac{q^n}{1-q^n}. \end{aligned}$$

See also (1.8) and its proof in Sect. 2. \(\square \)

Proof of Theorem 1.4

Using the notation of Sect. 3, it follows from (1.7) that

$$\begin{aligned} e_{\mathrm{sm}}(N)=V(N):=\frac{1}{2\pi i}\int _{{\mathcal {C}}}\frac{L\xi }{q^{N+1}} \mathrm{d}q \end{aligned}$$

where \(L(q)= \frac{1}{(2\pi )^{\frac{1}{2}}}q^{\frac{1}{24}}F(q)\) and \(\xi (q)=\frac{(2\pi )^{\frac{1}{2}}}{n(q)}\). Corollary 4.12 shows that \(L(\mathrm{e}^{-t})\) verifies HYPO 1 and HYPO 3, whereas Theorem 4.1 shows that \(\xi (\mathrm{e}^{-t})\) verifies HYPO 2 and HYPO 4. In the notation of Sect. 1.5, we have

$$\begin{aligned} B&= 0, \quad \quad \alpha _s = \frac{-{\gamma _s}}{(2\pi )^{\frac{1}{2}}2}=\frac{T_s}{(2\pi )^{\frac{1}{2}}s!24^s}, \\ \beta&= \frac{1}{2}, \quad \quad c^2=\frac{\pi ^2}{6}, \quad \quad \gamma = 4\pi ^2. \end{aligned}$$

Proposition 1.8 then yields

$$\begin{aligned} V(N) = \mathrm{e}^{2\pi \sqrt{\frac{N}{6}}} N^{-1} \left( \sum _{r=0}^{R-1}D_rN^{-\frac{r}{2}} + O\left( N^{-\frac{R}{2}}\right) \right) \end{aligned}$$

where \(D_r=\sum _{s=0}^r \alpha _{s}w_{s,r-s}\) and

$$\begin{aligned} w_{s,r-s}= \frac{1}{2\sqrt{\pi }} ( -2K)^{s-r} \left( \frac{K}{2}\right) ^{s+1} \,\, \left( s+\frac{3}{2}, r-s\right) \end{aligned}$$

This concludes Theorem 1.4. \(\square \)

Proof of Theorem 1.5

Using the notation of Sect. 3, it follows from (1.8) that

$$\begin{aligned} e_{\mathrm{lg}}(N)=V(N):=\frac{1}{2\pi i}\int _{{\mathcal {C}}}\frac{L\xi }{q^{N+1}} \mathrm{d}q; \end{aligned}$$

where \(L(q)= \frac{1}{(2\pi )^{\frac{1}{2}}}q^{\frac{1}{24}} \sum _{n=1}^\infty \frac{q^n}{1-q^n}\) and \(\xi (q)=\frac{(2\pi )^{\frac{1}{2}}}{\eta (q)}\). Corollary 4.5 shows that \(L(\mathrm{e}^{-t})\) verifies HYPO 1 and HYPO 3, whereas Theorem 4.1 shows that \(\xi (\mathrm{e}^{-t})\) verifies HYPO 2 and HYPO 4. Moreover, we write

$$\begin{aligned} L(\mathrm{e}^{-t})=\frac{1}{(2\pi )^{\frac{1}{2}}}\mathrm{e}^{-\frac{t}{24}}\left( -\frac{\log t}{t}+\frac{\gamma }{t}+\frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2}{(2n)!(2n)}t^{2n-1} \right) \end{aligned}$$

and splits into two parts: (a) \(-\frac{\log t}{t}\), (b) \(\frac{\gamma }{t}-\frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2}{(2n)!(2n)}t^{2n-1}\). In the notation of Sect. 1.5, we now have a combination of the logarithmic-type case with half-integer order [part (a)] and of the polynomial-type case [part (b)]. Proposition 1.10 applies to part (a), whereas Proposition 1.8 applies to part (b). For example, the parameters in the logarithmic-type case are

$$\begin{aligned} B&= 1, \quad \quad \alpha _0 = \frac{-1}{(2\pi )^{\frac{1}{2}}}, \\ \beta&= \frac{1}{2}, \quad \quad c^2=\frac{\pi ^2}{6}, \quad \quad \gamma = 4\pi ^2. \end{aligned}$$

Applying Propositions 1.8 and 1.10, we conclude Theorem 1.5. \(\square \)

Proof of Theorem 1.6

Using the notation of Sect. 3, it follows from (1.8) that

$$\begin{aligned} e_{\mathrm{ld}}(N)=V(N):=\frac{1}{2\pi i}\int _{{\mathcal {C}}}\frac{L\xi }{q^{N+1}} \mathrm{d}q \end{aligned}$$

where \(L(q)= 2^{-\frac{1}{2}}q^{-\frac{1}{24}} \left( -\frac{1}{2}+\sum _{n=1}^\infty \frac{q^n}{1-q^n}\right) \) and \(\xi (q)=2^{\frac{1}{2}}q^{\frac{1}{24}}(-q)_\infty \). Corollary 4.5 shows that \(L(\mathrm{e}^{-t})\) verifies HYPO 1 and HYPO 3, whereas Theorem 4.1 shows that \(\xi (\mathrm{e}^{-t})\) verifies HYPO 2 and HYPO 4. Moreover, we write

$$\begin{aligned} L(\mathrm{e}^{-t})=2^{-\frac{1}{2}}\mathrm{e}^{\frac{t}{24}}\left( -\frac{\log t}{t}+\frac{\gamma }{t}-\frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2}{(2n)!(2n)}t^{2n-1} \right) \end{aligned}$$

and splits into two parts: (a) \(-\frac{\log t}{t}\), (b) \(\frac{\gamma }{t}-\frac{1}{4} + \sum _{n=1}^\infty \frac{B_{2n}^2}{(2n)!(2n)}t^{2n-1}\). In the notation of Sect. 1.5, we now have a combination of the logarithmic-type case with integer order [part (a)] and of the polynomial-type case [part (b)]. Proposition 1.9 applies to part (a), whereas Proposition 1.8 applies to part (b). For example, the parameters in the logarithmic-type case are

$$\begin{aligned} B&= 1, \quad \quad \beta = 0, \quad \quad c^2=\frac{\pi ^2}{12}, \quad \quad \gamma = 2\pi ^2. \end{aligned}$$

Applying Propositions 1.8 and 1.9, we conclude Theorem 1.6. \(\square \)

Acknowledgements

This work was a sequence of previous work [61, 62], which started from a project group led by Ken Ono in the Arizona Winter School 2013. Without the excellent working environment provided by the group leader and the Winter School organizers, this work would not have been realized. The authors are grateful to Jeffrey C. Lagarias for his support and encouragement. We would like to thank Yingkun Li for discussions about early aspects of this work. We would like to thank H. M. Bui for his literature help.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.