# Complex Moments and the distribution of Values of $L(1,\chi_{D})$ over
Function Fields with Applications to Class Numbers

Allysa Lumley  Department of Mathematics and Statistics, York University, 4700
Keele Street, Toronto, ON, M3J1P3 Canada<EMAIL_ADDRESS>
###### Abstract.

In this paper we investigate the moments and the distribution of
$L(1,\chi_{D})$, where $\chi_{D}$ varies over quadratic characters associated
to square-free polynomials $D$ of degree $n$ over $\mathbb{F}_{q}$, as
$n\to\infty$. Our first result gives asymptotic formulas for the complex
moments of $L(1,\chi_{D})$ in a large uniform range. Previously, only the
first moment has been computed due to work of Andrade and Jung. Using our
asymptotic formulas together with the saddle-point method, we show that the
distribution function of $L(1,\chi_{D})$ is very close to that of a
corresponding probabilistic model. In particular, we uncover an interesting
feature in the distribution of large (and small) values of $L(1,\chi_{D})$,
that is not present in the number field setting. We also obtain
$\Omega$-results for the extreme values of $L(1,\chi_{D})$, which we
conjecture to be best possible. Specializing $n=2g+1$ and making use of one
case of Artin’s class number formula, we obtain similar results for the class
number $h_{D}$ associated to $\mathbb{F}_{q}(T)[\sqrt{D}]$. Similarly,
specializing to $n=2g+2$ we can appeal to the second case of Artin’s class
number formula and deduce analogous results for $h_{D}R_{D}$ where $R_{D}$ is
the regulator of $\mathbb{F}_{q}(T)[\sqrt{D}]$.

##  1\. Introduction

An interesting and important problem in number theory is to understand the
size of the class group, known as the class number, for a given field. The
case of quadratic extensions of $\mathbb{Q}$ has a rich history of
investigation which extends back to Gauß. Let $d$ be a fundamental
discriminant and $h_{d}$ represent the class number of the field
$\mathbb{Q}(\sqrt{d})$. Describing the extreme values of $h_{d}$ and the
distribution of these values has been widely investigated. The main line of
attack in this problem is to study the moments of $L(1,\chi_{d})$, with
$\chi_{d}$ taken as the Kronecker symbol $\left(\frac{d}{\cdot}\right)$. This
approach works because of Dirichlet’s class number formula. Some recent
notable papers discussing this problem are those of Granville and
Soundararajan [12] and Dahl and Lamzouri [7]. The approach in these articles
is to compare the complex moments of $L(1,\chi_{d})$ to that of a random model
and use the class number formula to apply this information to $h_{d}$.

Here we discuss the adaptation of these techniques to study the class number,
denoted as $h_{D}$, over function fields, $\mathbb{F}_{q}(T)$ with $q\equiv
1(\bmod\,4)$ and $D$ a monic square free polynomial in $\mathbb{F}_{q}[T]$. In
this context, $h_{D}=|\text{Pic}(\mathcal{O}_{D})|$, where
$\text{Pic}(\mathcal{O}_{D})$ is the Picard group of the ring of integers
$\mathcal{O}_{D}\subseteq\mathbb{F}_{q}(T)(\sqrt{D(T)})$. Since $D$ is a
square free polynomial we have that
$\text{Pic}(\mathcal{O}_{D})=\mathcal{C}l(\mathcal{O}_{D})$, the class group
of $\mathcal{O}_{D}$, which provides the justification for the name ‘class
number’.

In 1992, Hoffstein and Rosen [13] investigated this question and obtained an
average result by fixing the degree of the polynomial. The result is stated
as: let $M$ be odd and positive then

(1.1) $\frac{1}{q^{M}}\sum_{\begin{subarray}{c}D\text{ monic}\\\
\deg(D)=M\end{subarray}}h_{D}=\frac{\zeta_{\mathbb{F}_{q}[T]}(2)}{\zeta_{\mathbb{F}_{q}[T]}(3)}q^{(M-1)/2}-q^{-1},$

where

$\zeta_{\mathbb{F}_{q}[T]}(s)=\sum_{f\text{ monic}}\frac{1}{|f|^{s}}\text{ for
}\Re(s)>1,$

is the Riemann zeta function over $\mathbb{F}_{q}[T]$. Here the norm of
$f\in\mathbb{F}_{q}[T]\setminus\\{0\\}$ is $|f|=q^{\deg(f)}$. This result is
directly comparable to Gauß’s conjecture (proven by Siegel [21]) for class
numbers of imaginary quadratic number fields. Finally, letting $q\to\infty$
one obtains an asymptotic formula which can be compared to the 2012 work of
Andrade [2] described below.

There are two limits that can be considered when studying problems over
function fields. The first fixes the degree of the polynomial and lets the
number of elements in the base field go to infinity as was done by Hoffstein
and Rosen. The second fixes the number of elements in the base field and
allows the degree of the polynomials to go to infinity. The result of Andrade
[2] considers the second perspective. His article describes the mean value of
$h_{D}$ by averaging over $\mathcal{H}_{2g+1}$ the set of monic, square free
polynomials with degree $2g+1$. Proving that

(1.2)
$\frac{1}{|\mathcal{H}_{2g+1}|}\sum_{D\in\mathcal{H}_{2g+1}}h_{D}\sim\zeta_{\mathbb{F}_{q}[T]}(2)\prod_{P\text{
irreducible}}\left(1-\frac{1}{(|P|+1)|P|^{2}}\right)q^{g}\text{ as
}g\to\infty.$

We remark that (1.1) and (1.2) have the same order of magnitude in the main
term as can be seen by taking $M=2g+1$.

Now, for any monic $D\in\mathbb{F}_{q}[T]$ we have Dirichlet characters modulo
$D$ on $\mathbb{F}_{q}[T]$, defined in Section 2. The natural follow up to
this is to define a Dirichlet $L$-function associated to such a character:

$L(s,\chi)=\sum_{f\text{ monic}}\frac{\chi(f)}{|f|^{s}},\text{ for
}s\in\mathbb{C}.$

Artin [5] proved a class number formula valid over function fields which links
$h_{D}$ to $L(1,\chi_{D})$ where $\chi_{D}(\cdot)$ is the Kronecker symbol
$\left(\frac{D}{\cdot}\right)$:

(1.3) $L(1,\chi_{D})=\frac{\sqrt{q}}{\sqrt{|D|}}h_{D}=q^{-g}h_{D},\text{ for
}D\in\mathcal{H}_{2g+1}.$

To prove (1.2) Andrade makes use of an approximate functional equation for
$L(1,\chi_{D})$ to show

(1.4)
$\frac{1}{|\mathcal{H}_{2g+1}|}\sum_{D\in\mathcal{H}_{2g+1}}L(1,\chi_{D})\sim\zeta_{\mathbb{F}_{q}[T]}(2)\prod_{P\text{
irreducible}}\left(1-\frac{1}{(|P|+1)|P|^{2}}\right)\text{ as }g\to\infty,$

and then applies (1.3). The main drawback to using the approximate functional
equation is that is difficult to use it to calculate large moments of
$L(1,\chi_{D})$.

In this article, we shall investigate the distribution of $L(1,\chi_{D})$ for
$D\in\mathcal{H}_{n}$ as $n\to\infty$, where

(1.5) $\mathcal{H}_{n}=\\{D\in\mathbb{F}_{q}[T]:D\text{ is monic, square free,
}\deg(D)=n\\}.$

To do this we will need to compute large complex moments of the associated
$L(1,\chi_{D})$. We approach the computation of such moments via a random
model, a technique that has been used successfully in the study of quadratic
number fields.

For the remainder of the article the following notation will be fixed. Let
$\mathbb{A}=\mathbb{F}_{q}[T]$ taking $q\equiv 1(\bmod\,4)$ for simplicity.
Here $\log$ denotes base $q$ logarithm, $\ln$ is the natural logarithm and
$\log_{j}$ ( respectively $\ln_{j}$) represent the $j$-fold iterated
logarithm. Finally, let $P$ represent an irreducible (prime) polynomial. We
define the generalized divisor function $d_{z}(f)$ on its prime powers as

(1.6) $d_{z}(P^{a})=\frac{\Gamma(z+a)}{\Gamma(z)a!},$

and extend it to all monic polynomials multiplicatively. Then, we can express
the complex moments of $L(1,\chi_{D})$ as follows.

######  Theorem 1.1.

Let $n$ a positive integer, and $z\in\mathbb{C}$ be such that
$|z|\leq\frac{n}{260\log(n)\ln\log(n)}$.Then

$\frac{1}{|\mathcal{H}_{n}|}\sum_{D\in\mathcal{H}_{n}}L(1,\chi_{D})^{z}=\sum_{\begin{subarray}{c}f\text{
monic}\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{n^{11}}\right)\right).$

The strategy for proving this, and a following result about the distribution
of values, is to compare the distribution of $L(1,\chi_{D})$ to that of a
probabilistic random model: Let $\\{\mathbb{X}(P)\\}$ denote a sequence of
independent random variables indexed by the irreducible (prime) elements
$P\in\mathbb{A}$, and taking the values $0,\pm 1$ as follows

(1.7) $\mathbb{X}(P)=\begin{cases}0&\text{ with probability
}\frac{1}{|P|+1}\\\ \pm 1&\text{ with probability
}\frac{|P|}{2(|P|+1)}.\end{cases}$

Let $f=P_{1}^{e_{1}}P_{2}^{e_{2}}\cdots P_{s}^{e_{s}}$ be the prime power
factorization of $f$, then we extend the definition of $\mathbb{X}$
multiplicatively as follows

(1.8)
$\mathbb{X}(f)=\mathbb{X}(P_{1})^{e_{1}}\mathbb{X}(P_{2})^{e_{2}}\cdots\mathbb{X}(P_{s})^{e_{s}}.$

In this article we compare the distribution of $L(1,\chi_{D})$ with

(1.9) $L(1,\mathbb{X}):=\sum_{f\text{
monic}}\frac{\mathbb{X}(f)}{|f|}=\prod_{P\text{
irreducible}}\left(1-\frac{\mathbb{X}(P)}{|P|}\right)^{-1},$

which converges almost surely. Further properties of this model will be
discussed in Section 3.2.

For $\tau>0$, define

$\Phi_{\mathbb{X}}:=\mathbb{P}(L(1,\mathbb{X})>e^{\gamma}\tau)\text{ and
}\Psi_{\mathbb{X}}(\tau):=\mathbb{P}\left(L(1,\mathbb{X})<\frac{\zeta_{\mathbb{A}}(2)}{e^{\gamma}\tau}\right).$

We prove that the distribution of $L(1,\chi_{D})$ is well approximated by the
distribution of $L(1,\mathbb{X})$ uniformly in a large range.

######  Theorem 1.2.

Let $n$ be large. Uniformly in $1\leq\tau\leq\log n-2\log_{2}n-\log_{3}n$ we
have

$\frac{1}{|\mathcal{H}_{n}|}|\\{D\in\mathcal{H}_{n}:L(1,\chi_{D})>e^{\gamma}\tau\\}|=\Phi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}(\log
n)^{2}\log_{2}n}{n}\right)\right),$

and

$\frac{1}{|\mathcal{H}_{n}|}|\\{D\in\mathcal{H}_{n}:L(1,\chi_{D})<\frac{\zeta_{\mathbb{A}}(2)}{e^{\gamma}\tau}\\}|=\Psi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}(\log
n)^{2}\log_{2}n}{n}\right)\right).$

And below we describe the asymptotic behaviour of $\Phi_{\mathbb{X}}$ and
$\Psi_{\mathbb{X}}$.

######  Theorem 1.3.

For any large $\tau$ we have

(1.10)
$\Phi_{\mathbb{X}}(\tau)=\exp\left(-C_{1}(q^{\\{\log\kappa(\tau)\\}})\frac{q^{\tau-
C_{0}(q^{\\{\log\kappa(\tau)\\}})}}{\tau}\left(1+O\left(\frac{\log\tau}{\tau}\right)\right)\right),$

where $\kappa(\tau)$ is defined by (4.2), $C_{0}(t)=G_{2}(t)$,
$C_{1}(t)=G_{2}(t)-G_{1}(t)$ and $G_{i}(t)$ are defined in (4.7) and (4.9)
respectively. Furthermore we have

$-\frac{1}{\ln
q}+\ln(\cosh(c))/c-\tanh(c)<-C_{1}(q^{\\{\log\kappa(\tau)\\}})<\ln(\cosh(q))/q-\tanh(q),$

where $c=1.28377...$. The same results hold for $\psi_{\mathbb{X}}$.
Additionally, if we let $0<\lambda<e^{-\tau}$, then

(1.11)
$\Phi_{\mathbb{X}}(e^{-\lambda}\tau)=\Phi_{\mathbb{X}}(\tau)(1+O(\lambda
e^{\tau}))\text{ and
}\Psi_{\mathbb{X}}(e^{-\lambda}\tau)=\Psi_{\mathbb{X}}(\tau)(1+O(\lambda
e^{\tau})).$

Our Theorem 1.3 should be compared to those of [12] and [7], both of which
study the behaviour of $L(1,\chi_{d})$ over quadratic number fields. The
asymptotic behaviour of $\Phi_{\mathbb{X}}(\tau)$ is strikingly similar in
both of these papers. In [12] the authors are studying the distribution of
$L(1,\chi_{d})$ over all fundamental discriminants $d$, $|d|\leq x$, comparing
it to a corresponding probabilistic model $L(1,\mathbb{X})$. In [7] the
authors are studying the distribution of $L(1,\chi_{d})$ over fundamental
discriminants of the form $d=4m^{2}+1$, $m\geq 1$ and $d$ is square free. The
restriction in [7] is used in order to study the behaviour of class numbers
associated to such $d$, again comparing to a corresponding probabilistic
model. In both papers
$\Phi_{\mathbb{X}}(\tau)=\text{Prob}(L(1,\mathbb{X})>e^{\gamma}\tau)$. Each
obtains:

$\Phi_{\mathbb{X}}(\tau)=\exp\left(-C_{1}\frac{e^{\tau-
C_{0}}}{\tau}+O\left(\frac{e^{\tau}}{\tau^{2}}\right)\right),$

where

$C_{1}:=1\text{ and
}C_{0}:=\int_{0}^{1}\frac{\tanh(t)}{t}dt+\int_{1}^{\infty}\frac{\tanh(t)-1}{t}dt=0.8187\ldots$

Similar behaviour appears when studying the distribution of Euler-Kronecker
constants of quadratic fields, see [18, Theorem 1.2] for details. As can be
seen from the statement of Theorem 1.3 we observe some pathological behaviour
special to function fields. We no longer achieve two constants reflected above
as $C_{0}$ and $C_{1}$. In our case the value of both
$C_{0}(q^{\\{\log\kappa(\tau)\\}})$ and $C_{1}(q^{\\{\log\kappa(\tau)\\}})$
varies, although they remain bounded as the argument varies between $1$ and
$q$. Below is a graph of $C_{0}(t)$ for $1\leq t<q$ taking $q=5$, and $q=9$
the first moduli which satisfy the hypothesis $q\equiv 1(\bmod\,4)$.

Additionally, we also notice the coefficient $C_{1}$ which appears in all of
the theorems describing the behaviour of $\Phi_{\mathbb{X}}(\tau)$( cf. [12,
7, 18]). We find over function fields that the coefficient $C_{1}$ is no
longer fixed, but remains bounded between $-\ln(\cosh(q))/q+\tanh(q)$ and
$1/\ln(q)-\ln(\cosh(c))/c+\tanh(c)$. Below is a graph of the behaviour of
$C_{1}(t)$ for $1\leq t<q$ with $q=5$ and $q=9$.

Furthermore, we obtain the following unconditional bounds:

######  Proposition 1.4.

Let $F$ be a monic polynomial, and $\chi$ be a non-trivial character on
$\left(\mathbb{A}/F\mathbb{A}\right)^{\times}$. For any complex number $s$
with $\textup{Re}(s)=1$ we have

(1.12)
$\frac{\zeta_{\mathbb{A}}(2)}{2e^{\gamma}}(\log_{2}|F|+O(1))^{-1}\leq|L(s,\chi)|\leq
2e^{\gamma}\log_{2}|F|+O(1).$

It is important to note that in this setting Weil [22] proved the Riemann
Hypothesis (RH), hence these results are achieved unconditionally. We
conjecture here that the true size for the extreme values of $L(1,\chi_{D})$
is half as large in keeping with the expected results in the quadratic number
field case.

######  Conjecture 1.5.

Let $n$ be large.

$\max_{D\in\mathcal{H}_{n}}L(1,\chi_{D})=e^{\gamma}(\log n+\log_{2}n)+O(1),$

and

$\min_{D\in\mathcal{H}_{n}}L(1,\chi_{D})=\zeta_{\mathbb{A}}(2)e^{-\gamma}(\log
n+\log_{2}n+O(1))^{-1}.$

Finally, we also unconditionally obtain $\Omega$-results which are best
possible, unlike in the case of number fields where the corresponding bounds
for Dirichlet characters is only valid under the Generalized Riemann
Hypothesis (GRH).

######  Theorem 1.6.

Let $N$ be large. There are irreducible polynomials $Q_{1}$ and $Q_{2}$ of
degree $N$ such that

(1.13) $L(1,\chi_{Q_{1}})\geq
e^{\gamma}(\log_{2}|Q_{1}|+\log_{3}|Q_{1}|)+O(1),$

and

(1.14)
$L(1,\chi_{Q_{2}})\leq\zeta_{\mathbb{A}}(2)e^{-\gamma}(\log_{2}|Q_{1}|+\log_{3}|Q_{1}|+O(1))^{-1}.$

The result (1.13) can be compared with [1, Theorem 1] a recent work discussing
the size of $|L(1,\chi)|$ over a number field. The authors prove using a
variant of the resonator method that for $\epsilon>0$ and sufficiently large
$d$ there is a character $\chi(\bmod\,\,d)$ such that

$|L(1,\chi)|\geq e^{\gamma}(\ln_{2}d+\ln_{3}d-(1+\ln_{2}4)-\epsilon).$

This result provides an improvement over a paper of Granville and
Soundararajan [11], however, the paper does not give improvements for
quadratic characters $\chi_{d}$ where $d$ varies over fundamental
discriminants in the range $|d|\leq x$ cf. [12, 17].

The result (1.14) can be compared to [12, Theorem 5a] which under the
assumption of GRH proves for any $\epsilon>0$ and all large $x$ there are $\gg
x^{1/2}$ primes $d\leq x$ such that

$L(1,\chi_{d})\leq\frac{\zeta(2)}{e^{\gamma}}(\ln_{2}d+\ln_{3}d-\ln_{2}4-\epsilon)^{-1}.$

Unconditionally, for $\chi$ a Dirichlet character modulo $d$ we have the
weaker results
$|L(1,\chi)|\leq\frac{\zeta(2)}{e^{\gamma}}(\ln_{2}(d)-O(1))^{-1}$ from [11] .

###  1.1. Applications

From the theorems above and in light of (1.3) if we specialize $n$ as $n=2g+1$
and letting the genus $g\to\infty$ we can prove analogous results about the
class number $h_{D}$ over $\mathcal{H}_{2g+1}$. This specialization is the
equivalent of studying the imaginary quadratic extensions of $\mathbb{Q}$, as
described by Artin. Below we state a few of the resulting corollaries for
$h_{D}$ with $D\in\mathcal{H}_{2g+1}$.

######  Corollary 1.7.

Let $z\in\mathbb{C}$ be such that $|z|\leq\frac{g}{130\log(g)\ln\log(g)}$.
Then

$\frac{1}{|\mathcal{H}_{2g+1}|}\sum_{D\in\mathcal{H}_{2g+1}}h_{D}^{z}=q^{gz}\sum_{\begin{subarray}{c}f\text{
monic}\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{g^{11}}\right)\right).$

This result follows from applying Artin’s class number formula (1.3) to
Theorem 1.1 when $n=2g+1$. Additionally, from Theorems 1.2 and 1.3 we obtain
that the tail of the distribution of large (and small) values of $h_{D}$ over
$\mathcal{H}_{2g+1}$ is doubly exponentially decreasing:

######  Corollary 1.8.

Let $g$ be large and $1\leq\tau\leq\log g-2\log_{2}g-\log_{3}g$. The number of
discriminants $D\in\mathcal{H}_{2g+1}$ such that

$h_{D}>e^{\gamma}\tau q^{g}$

equals

$|\mathcal{H}_{2g+1}|\cdot\exp\left(-C_{1}(q^{\\{\log\kappa(\tau)\\}})\frac{q^{\tau-
C_{0}(q^{\\{\log\kappa(\tau)\\}})}}{\tau}\left(1+O\left(\frac{\log\tau}{\tau}\right)\right)\right),$

where $\kappa(\tau)$ is given by (4.2), $C_{1}(q^{\\{\log\kappa(\tau)\\}})$
and $C_{0}(q^{\\{\log\kappa(\tau)\\}})$ are positive constants depending on
$\tau$ defined in Theorem 1.3. Similar estimates hold for the number of
discriminants $D\in\mathcal{H}_{2g+1}$ such that

$h_{D}<\frac{\zeta_{\mathbb{A}}(2)}{e^{\gamma}\tau}q^{g}.$

Similarly Proposition 1.4 give analogous upper and lower bounds and Theorem
1.6 provides analogous Omega results for $h_{D}$ with
$D\in\mathcal{H}_{2g+1}$.

Specializing to $n=2g+2$, we can also make connections to the class number
$h_{D}$ for $D\in\mathcal{H}_{2g+2}$. This case is analogous to studying a
real quadratic extension of $\mathbb{Q}$ and so the class number formula
changes. Indeed for for $D\in\mathcal{H}_{2g+2}$ Artin proves:

(1.15) $L(1,\chi_{D})=\frac{q-1}{\sqrt{|D|}}h_{D}R_{D},$

where $R_{D}$ denotes the regulator of $\mathcal{O}_{D}$. In this case $R_{D}$
is defined to be $\log|\epsilon|_{P_{\infty}}$ where $\epsilon$ is a
fundamental unit of $\mathcal{O}_{D}$, $P_{\infty}$ is the prime at infinity
such that $\text{ord}_{P_{\infty}}(\epsilon)<0$ and

$\log|\epsilon|_{P_{\infty}}=-\deg(P_{\infty})\text{ord}_{P_{\infty}}(\epsilon).$

For more details on the regulator see [20, Chapter 14]. The case of the mean
value for $L(1,\chi_{D})$ taken over $\mathcal{H}_{2g+2}$ was investigated by
Jung [14, 15]. Taking $n=2g+2$ we deduce from (1.15) and Theorem 1.1:

######  Corollary 1.9.

Let $z\in\mathbb{C}$ be such that $|z|\leq\frac{g}{130\log(g)\ln\log(g)}$.
Then

$\frac{1}{|\mathcal{H}_{2g+2}|}\sum_{D\in\mathcal{H}_{2g+2}}(h_{D}R_{D})^{z}=\left(\frac{q^{g+1}}{q-1}\right)^{z}\sum_{\begin{subarray}{c}f\text{
monic}\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{g^{11}}\right)\right).$

Of course, similar results about the distribution of $h_{D}R_{D}$, upper and
lower bounds and omega results for $D\in\mathcal{H}_{2g+2}$ follow from
Theorems 1.2 and 1.3, Proposition 1.4 and Theorem 1.6 respectively.

Finally, we give the outline of the paper. Section 2 will establish some facts
about $\mathbb{A}$ and the properties $L$-functions have over this ring.
Section 3 will connect the complex moments of $L(1,\chi_{D})$ to the
expectation of the complex moments of the random model and provide the proof
of Theorem 1.7. Section 4 will be used to prove Theorem 1.3. Section 5 proves
Theorem 1.2 and Corollary 1.8. Section 6 proves the $\Omega$-results of
Theorem 1.6.

##  2\. Preliminaries

###  2.1. Background for Function Fields

The norm of $f\in\mathbb{A}\setminus\\{0\\}$ is $|f|=q^{\deg(f)}$ and $|0|=0$.
From [20, Chapter 2] the Riemann zeta function is given by

$\zeta_{\mathbb{A}}(s)=\prod_{\begin{subarray}{c}P\text{ monic}\\\ \text{
irreducible}\end{subarray}}\left(1-\frac{1}{|P|^{s}}\right)^{-1}=\sum_{f\text{
monic}}\frac{1}{|f|^{s}},\,\,\Re(s)>1.$

Since there are $q^{k}$ different monic polynomials of degree $k$, we can also
rewrite $\zeta_{\mathbb{A}}(s)$ by collecting all the terms with respect to
their degree:

$\zeta_{\mathbb{A}}(s)=\sum_{f\text{ monic}}\frac{1}{|f|^{s}}=\sum_{k\geq
0}\frac{1}{q^{k(s-1)}}=\frac{1}{1-q^{1-s}}.$

Which is valid for $s\in\mathbb{C}\setminus\\{1\\}$. Let

$\pi_{q}(n)=\\#\\{a\,\,|\,\,a\text{ monic},\deg(a)=n\text{ and }a\text{ is
irreducible}\\}.$

The prime number theorem for polynomials gives the following about
$\pi_{q}(n)$ (cf. [20, Theorem 2.2]):

(2.1) $\sum_{k|m}k\pi_{q}(k)=q^{m},$

and

(2.2) $\pi_{q}(n)=\frac{q^{n}}{n}+O\left(\frac{q^{n/2}}{n}\right).$

Let $F\in\mathbb{A}$ such that $\deg(F)>0$. From [20, Chapter 4], a Dirichlet
character modulo $F$, $\chi:\mathbb{A}:\to\mathbb{C}$, satisfies

  1. (1)

$\chi(a+bF)=\chi(a)$ for all $a,b\in\mathbb{A}$,

  2. (2)

$\chi(a)\chi(b)=\chi(ab)$ for all $a,b\in\mathbb{A}$,

  3. (3)

$\chi(a)\neq 0\Leftrightarrow(a,F)=1$.

Then a Dirichlet $L$-function over $\mathbb{A}$ is given by

$L(s,\chi)=\sum_{f\text{
monic}}\frac{\chi(f)}{|f|^{s}}=\prod_{\begin{subarray}{c}P\text{ monic}\\\
\text{
irreducible}\end{subarray}}\left(1-\frac{\chi(P)}{|P|^{s}}\right)^{-1}\text{
for }s\in\mathbb{C}.$

As with $\zeta_{\mathbb{A}}(s)$ we may collect terms with respect to the
degree of the polynomial and write $L(s,\chi)$ as follows:

$L(s,\chi)=\sum_{f\text{ monic}}\frac{\chi(f)}{|f|^{s}}=\sum_{k\geq
0}\frac{1}{q^{ks}}\sum_{\begin{subarray}{c}f\text{ monic}\\\
\deg(f)=k\end{subarray}}\chi(f).$

By [20, Proposition 4.3], if $\chi$ is a nontrivial Dirichlet character and
$k\geq\deg F$ then

(2.3) $\sum_{\begin{subarray}{c}f\text{ monic}\\\
\deg(f)=k\end{subarray}}\chi(f)=0.$

That is to say that $L(s,\chi)$ is actually a polynomial in $q^{-s}$, whose
degree is at most $\deg(F)-1$. Hence, we may also express it as a finite
product of linear terms : $(1-\alpha_{j}(\chi)q^{-s})$, for
$j=1,2,\ldots,n\leq\deg(F)-1$.

Let $\Lambda(f)=\deg P$ if $f=P^{k}$ and $0$ otherwise, the function field
analogue of the Von Mangoldt function, then from the proof of [20, Theorem
4.8] we see

(2.4) $\sum_{\begin{subarray}{c}f\text{ monic}\\\
\deg(f)=k\end{subarray}}\Lambda(f)\chi(f)=-\sum_{j=1}^{\deg
F-1}\alpha_{j}(\chi)^{k}.$

We mentioned in the introduction that A. Weil [22] proved the analogue of the
Riemann Hypothesis. In this setting this says that $|\alpha_{j}(\chi)|=1$ or
$|\alpha_{j}(\chi)|=\sqrt{q}$. From this we deduce

(2.5) $\sum_{\deg P=k}\chi(P)\ll\frac{q^{k/2}}{k}\deg F,$

and that the Euler product representation of $L(s,\chi)$

$L(s,\chi)=\prod_{P}\left(1-\frac{\chi(P)}{|P|^{s}}\right)^{-1},$

is actually valid for $\textup{Re}(s)>1/2$.
One final remark about the size of $\mathcal{H}_{n}$ defined in (1.5), if
$n>1$ then from [20, Proposition 2.3]:

$|\mathcal{H}_{n}|=q^{n-1}(q-1).$

Finally, let $D\in\mathcal{H}_{2g+1}$. Consider

$C_{D}:y^{2}=D(x).$

This defines a hyperelliptic curve over $\mathbb{F}_{q}$ with genus $g$. In
this instance $h_{D}$ is associated to the number of $\mathbb{F}_{q}$-rational
points on the Jacobian of $C_{D}$.

Let $u=q^{-s}$ then the zeta function associated to $C_{D}$ is defined by

$Z_{C_{D}}(s)=\frac{P_{C_{D}}(u)}{(1-u)(1-qu)}.$

Weil [22] proved $P_{C_{D}}(u)$ is a polynomial of degree $2g$. In fact, from
[20, Propositions 14.6 and 17.7] we have

$P_{C_{D}}(u)=L(s,\chi_{D})=\sum_{\text{sgn}(f)=1}\frac{\chi_{D}(f)}{|f|^{s}},$

where $\chi_{D}(f)$ is given by the Kronecker symbol:

$\chi_{D}(f)=\left(\frac{D}{f}\right)_{2}=\left(\frac{D}{f}\right).$

So from the point of view of $\eqref{Artinform}$ it’s natural that $h_{D}$
should be associated to this hyperelliptic curve. We note, if $q\equiv
1\pmod{4}$ from quadratic reciprocity (cf. [20, Theorem 3.5]) for any monic
polynomials $F,G$ we have

(2.6) $\left(\frac{F}{G}\right)=\left(\frac{G}{F}\right),$

which explains the assumption we make on $q$.

###  2.2. Estimates for sums over irreducible monic polynomials

Here and throughout we let $\Pi_{q}(n)$ be the number of monic irreducible
polynomials $P$ such that
$\deg P\leq n$.

######  Lemma 2.1.

Let $M$ be a large positive integer. Then we have

(2.7)
$\Pi_{q}(M)=\zeta_{\mathbb{A}}(2)\frac{q^{M}}{M}\left(1+O\left(\frac{\log
M}{M}\right)\right).$

###### Proof.

Note that

$\Pi_{q}(M)=\sum_{n=1}^{M}\pi_{q}(n)=\sum_{n=1}^{M}\left(\frac{q^{n}}{n}+O\left(\frac{q^{n/2}}{n}\right)\right),$

where the last equality comes from the Prime Number Theorem. The main term in
this sum is $q^{M}/M$, and we see that if $n\leq M-\log M,$ then $q^{n}/n\ll
q^{M}/M^{2}$. Hence we have that

$\Pi_{q}(M)=\sum_{M-\log M<n\leq
M}\frac{q^{n}}{n}+O\left(\frac{q^{M}}{M^{2}}\right).$

Then for $n\in(M-\log M,M]$ we have
$\frac{1}{n}=\frac{1}{M}\left(1+O\left(\frac{\log M}{M}\right)\right).$
Therefore,

$\Pi_{q}(M)=\frac{q^{M}}{M}\left(1+O\left(\frac{\log
M}{M}\right)\right)\sum_{l<\log
M}\frac{1}{q^{l}}=\zeta_{\mathbb{A}}(2)\frac{q^{M}}{M}\left(1+O\left(\frac{\log
M}{M}\right)\right).$

∎

######  Lemma 2.2.

Let $F$ be a monic polynomial, and $\chi$ be a non-trivial character on
$\left(\mathbb{A}/\mathbb{A}F\right)^{\times}$. For a positive integer $M$ and
any complex number $s$ with $\textup{Re}(s)=1$ we have

$\ln L(s,\chi)=-\sum_{\deg P\leq
M}\ln\left(1-\frac{\chi(P)}{|P|^{s}}\right)+O\left(\frac{q^{-M/2}}{M}\deg
F\right).$

###### Proof.

Split the sum as

$\displaystyle\ln L(s,\chi)$ $\displaystyle=-\sum_{\deg P\leq
M}\ln\left(1-\frac{\chi(P)}{|P|^{s}}\right)-\sum_{\deg
P>M}\ln\left(1-\frac{\chi(P)}{|P|^{s}}\right).$

The error term follows from (2.5) as below

$\displaystyle\sum_{k>M}\sum_{\deg P=k}\ln\left(1-\frac{\chi(P)}{|P|}\right)$
$\displaystyle=\sum_{k>M}\sum_{\deg
P=k}\frac{\chi(P)}{|P|^{s}}+O\left(\sum_{\deg P>M}\frac{1}{|P|^{2}}\right)$
$\displaystyle=\sum_{k>M}\frac{1}{q^{k}}\sum_{\deg P=k}\chi(P)+O(q^{-M})$
$\displaystyle\ll\deg F\sum_{k>M}\frac{1}{kq^{k/2}}$ $\displaystyle\ll\deg
F\frac{q^{-M/2}}{M}.$

∎

We now prove a refined form of a Mertens’ type estimate due to Rosen [19].

######  Lemma 2.3.

Let $M$ be large. Then, we have

$-\sum_{\deg P\leq M}\ln\left(1-\frac{1}{|P|}\right)=\ln
M+\gamma+\frac{1}{2M}+O\left(\frac{1}{M^{2}}\right).$

###### Proof.

We have

$-\sum_{\deg P\leq M}\ln\left(1-\frac{1}{|P|}\right)=\sum_{\deg P\leq
M}\sum_{\ell=1}^{\infty}\frac{1}{\ell|P|^{\ell}}=\sum_{k\leq
M}\sum_{\ell=1}^{\infty}\frac{\pi_{q}(k)}{\ell q^{\ell k}}=\sum_{k\ell\leq
M}\frac{\pi_{q}(k)}{\ell q^{\ell k}}+\sum_{\begin{subarray}{c}k\leq M\\\
k\ell>M\end{subarray}}\frac{\pi_{q}(k)}{\ell q^{\ell k}}.$

By making the change of variables $m=k\ell$ and using $\eqref{PNT1}$, we
deduce that the first sum on the right hand side of the last identity equals

$\sum_{k\ell\leq M}\frac{\pi_{q}(k)}{\ell q^{\ell k}}=\sum_{m\leq
M}\frac{1}{q^{m}m}\sum_{k|m}k\pi_{q}(k)=\sum_{m\leq M}\frac{1}{m}=\ln
M+\gamma+\frac{1}{2M}+O\left(\frac{1}{M^{2}}\right).$

The result follows upon noting that

$\sum_{\begin{subarray}{c}k\leq M\\\
k\ell>M\end{subarray}}\frac{\pi_{q}(k)}{\ell q^{\ell
k}}\ll\sum_{\begin{subarray}{c}k\leq M\\\
k\ell>M\end{subarray}}q^{k(1-\ell)}\ll\sum_{2\leq\ell\leq
M}\sum_{\frac{M}{\ell}<k\leq M}q^{k(1-\ell)}+q^{-M}\ll
q^{-M}\sum_{2\leq\ell\leq M}q^{\frac{M}{\ell}}\ll q^{-M/2}.$

∎

###  2.3. Proof of Proposition 1.4

###### Proof of Proposition 1.4.

For $\textup{Re}(s)=1$, we use Lemma 2.2 and together with the choice
$M=2\log\log|F|$ to get

$\ln L(s,\chi)=-\sum_{\deg P\leq
M}\ln\left(1-\frac{\chi(P)}{|P|^{s}}\right)+O\left(\frac{1}{M}\right).$

Using this estimate together with Lemma 2.3 we deduce that

$|L(s,\chi)|\leq\prod_{\deg P\leq
M}\left(1-\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{M}\right)\right)\leq
e^{\gamma}M+O(1),$

which completes the proof of the upper bound in (1.12). To see the lower
bound, note that from Lemma 2.2 we have

$|L(s,\chi)|\geq\prod_{\deg(P)\leq
M}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{M}\right)\right),$

and from Lemma 2.3

$\prod_{\deg(P)\leq M}\left(1+\frac{1}{|P|}\right)^{-1}=\prod_{\deg(P)\leq
M}\frac{\left(1-\frac{1}{|P|^{2}}\right)^{-1}}{\left(1-\frac{1}{|P|}\right)^{-1}}\geq\frac{\zeta_{\mathbb{A}}(2)}{e^{\gamma}M+O(1)}.$

∎

###  2.4. Sums over $\mathcal{H}_{n}$.

The orthogonality relation:

######  Lemma 2.4.

Let $f$ be a monic polynomial. If $f$ is a square in $\mathbb{A}$, then

$\sum_{D\in\mathcal{H}_{n}}\chi_{D}(f)=|\mathcal{H}_{n}|\cdot\prod_{P\mid
f}\left(1+\frac{1}{|P|}\right)^{-1}+O\left(\sqrt{|\mathcal{H}_{n}|}\right).$

Furthermore, if $f$ is not a square in $\mathbb{A}$, then

$\sum_{D\in\mathcal{H}_{n}}\chi_{D}(f)\ll\sqrt{|\mathcal{H}_{n}|}\cdot 2^{\deg
f}.$

###### Proof.

The first estimate follows from Proposition 5.2 of [4], while the second
follows from Lemma 6.4 of [4]. ∎

##  3\. Complex moments of $L(1,\chi)$

Let $D\in\mathcal{H}_{n}$, $z\in\mathbb{C}$ such that
$|z|\ll\log|D|/(\log_{2}|D|\ln\log_{2}|D|)$. Let
$\chi_{D}(f)=\left(\frac{D}{f}\right)$. We we recall that $d_{z}(f)$ is
defined as in (1.6). We will prove the following key lemma which will allow us
to connect our complex moments of the random model to the complex moments of
$L(1,\chi_{D})$.

######  Lemma 3.1.

Let $D\in\mathcal{H}_{n}$. Let $A>4$ be a constant $z\in\mathbb{C}$ such that
$|z|\leq\frac{\log|D|}{10A\log_{2}|D|\ln\log_{2}|D|}$ and $M=A\log_{2}|D|$.
Then

$L(1,\chi_{D})^{z}=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)d_{z}(f)}{|f|},$

where $B=A/2-2$.

Before giving the proof, we make some estimates:

######  Lemma 3.2.

Let $D\in\mathcal{H}_{n}$, $A>4$ be a fixed constant and $z\in\mathbb{C}$ such
that $|z|\leq\frac{\log|D|}{10A\log_{2}|D|\ln\log_{2}|D|}$ and
$M=A\log_{2}|D|$. Then for $c_{0}$ some positive constant we have

(3.1) $\sum_{\begin{subarray}{c}f\text{ monic}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)=\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)+O\left(|D|^{-\frac{1}{c_{0}\log_{2}|D|}}\right),$

and furthermore,

(3.2) $\sum_{\begin{subarray}{c}f\text{ monic}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}=\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\\\
+O\left(|D|^{-\frac{1}{c_{0}\log_{q}\log_{q}|D|}}\right).$

###### Proof.

First we prove (3.1). Let $z\in\mathbb{C}$ and let $k\in\mathbb{Z}$ such that
$|z|<k$. Let $0<\alpha\leq\frac{1}{2}$, then using Rankin’s trick we see

$\displaystyle\left|\sum_{\begin{subarray}{c}f\text{ monic}\\\
|f|>|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)\right|$
$\displaystyle\leq\sum_{\begin{subarray}{c}f\text{ monic}\\\ |f|>|D|^{1/3}\\\
P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{k}(f)}{|f|}\leq|D|^{-\alpha/3}\sum_{\begin{subarray}{c}f\text{
monic}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{k}(f)}{|f|^{1-\alpha}}$
$\displaystyle=|D|^{-\alpha/3}\exp\left(k\sum_{\deg P\leq
M}\frac{1}{|P|^{1-\alpha}}+O(k)\right).$

Choosing $\alpha=\frac{1}{M}$ we have that $|P|^{\alpha}=q^{\alpha\deg P}\leq
q=O(1)$, so that

$\displaystyle|D|^{-\alpha/3}\exp(k\sum_{\deg P\leq
M}\frac{1}{|P|^{1-\alpha}}+O(k))$
$\displaystyle\ll|D|^{-\frac{1}{3M}}\exp\left(O\left(k\sum_{\deg P\leq
M}\frac{1}{|P|}\right)\right)$ $\displaystyle\ll|D|^{-\frac{1}{3M}}\exp
O\left(k\log M\right),$

by Mertens’ theorem. Taking $k\ll\frac{\log|D|}{\log_{2}|D|\ln\log_{2}|D|}$,
and using $M=A\log_{2}|D|$ the expression inside of the big Oh becomes

$k\ln(A\log_{2}|D|)\ll\frac{\log|D|\ln(A\log_{2}|D|)}{\log_{2}|D|\ln\log_{2}|D|}.$

So we have

$\displaystyle|D|^{-\frac{1}{3M}}\exp O\left(k\log M\right)$
$\displaystyle\ll|D|^{-\frac{1}{c_{0}\log_{2}|D|}},$

for some $c_{0}>0$.

The proof of (3.2) follows from the previous argument since

$\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\leq 1.$

∎

###### Proof of Lemma 3.1.

From Lemma 2.2 we have

$\displaystyle L(1,\chi_{D})^{z}$ $\displaystyle=\exp(z\ln(L(1,\chi_{D}))$
$\displaystyle=\exp\left(-z\sum_{\deg P\leq
M}\ln\left(1-\frac{\chi_{D}(P)}{|P|}\right)\right)\exp\left(O\left(\frac{q^{-M/2}}{M}\deg
D|z|\right)\right).$

Here we use the fact that $M=A\log_{2}|D|$ implying that
$q^{-M/2}=(\log|D|)^{-A/2}$, $\deg D=\log|D|$,
$|z|\leq\frac{\log|D|}{10A\log_{2}|D|\ln\log_{2}|D|}$ to see that the
expression inside of the big Oh has the shape

$\frac{(\log|D|)^{2}}{(\log|D|)^{A/2}}\frac{1}{10A^{2}(\log_{2}|D|)^{2}\ln\log_{2}|D|}=O\left(\frac{1}{(\log|D|)^{B}}\right),$

by the assumption on $A$. Hence, we have

$\displaystyle L(1,\chi_{D})^{z}$ $\displaystyle=\prod_{\deg P\leq
M}\left(1-\frac{\chi_{D}(P)}{|P|}\right)^{-z}\left(1+O_{\sigma}\left(\frac{1}{(\log|D|)^{B}}\right)\right)$
$\displaystyle=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\prod_{\deg
P\leq
M}\left(\sum_{a=0}^{\infty}\frac{\chi_{D}(P^{a})}{|P|^{a}}d_{z}(P^{a})\right)$
$\displaystyle=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\sum_{\begin{subarray}{c}f\text{
monic}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f).$

Finally we apply (3.1) from Lemma 3.2, then the relative sizes of the O terms
completes the result for this case. ∎

Using this Lemma we have that

$\displaystyle\sum_{D\in\mathcal{H}_{n}}L(1,\chi_{D})^{z}$
$\displaystyle=\sum_{D\in\mathcal{H}_{n}}\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{\chi_{D}(f)}{|f|}d_{z}(f)$
$\displaystyle=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)}{|f|}\sum_{D\in\mathcal{H}_{2g+1}}\chi_{D}(f)$
$\displaystyle=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)(S_{1}+S_{2}),$

where

(3.3) $S_{1}:=\sum_{\begin{subarray}{c}f\text{ monic and a square}\\\
|f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)}{|f|}\sum_{D\in\mathcal{H}_{n}}\chi_{D}(f),$

and

(3.4) $S_{2}:=\sum_{\begin{subarray}{c}f\text{ monic and not a square}\\\
|f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)}{|f|}\sum_{D\in\mathcal{H}_{n}}\chi_{D}(f).$

With this separation we can use our orthogonality relation to evaluate $S_{1}$
and $S_{2}$.

###  3.1. Evaluating $S_{2}$: Contribution of the non-square terms.

######  Lemma 3.3.

Let $D\in\mathcal{H}_{n}$, $A>4$ be a constant, $z\in\mathbb{C}$ be such that
$|z|\leq\frac{\log|D|}{\log_{2}|D|\ln\log_{2}|D|}$ and $M=A\log_{2}|D|$. Then

$\left(1+\frac{1}{(\log|D|)^{B}}\right)S_{2}\ll|D|^{6/7},$

with $S_{2}$ defined as in (3.4).

###### Proof.

By Lemma 2.4 the inner sum of $S_{2}$ is $O(\sqrt{|\mathcal{H}_{n}|}2^{\deg
f})$, hence we have

$\displaystyle
S_{2}\ll\sqrt{|\mathcal{H}_{n}|}\sum_{\begin{subarray}{c}f\text{ monic and not
a square}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)2^{\deg f}}{|f|}.$

Now, we have that $|\mathcal{H}_{n}|=O(|D|)$ and $2^{\deg f}=|f|^{\ln 2/\ln
q}<|f|^{11/25}$, the last inequality following from the fact that $q\geq 5$
and $\ln 2/\ln 5=0.43067\ldots$. Thus

$\displaystyle S_{2}$
$\displaystyle\ll|D|^{1/2}\sum_{\begin{subarray}{c}f\text{ monic and not a
square}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)}{|f|^{14/25}},$
$\displaystyle\ll|D|^{5/6}\sum_{\begin{subarray}{c}f\text{ monic and not a
square}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f)}{|f|^{39/25}},$
$\displaystyle\ll|D|^{5/6}(\zeta_{\mathbb{A}}(39/25))^{k},$

for some $k\in\mathbb{Z}$ such that $|z|\asymp k$. We note that
$\zeta_{\mathbb{A}}(39/25)=c$ for some constant $c$ so that

$(\zeta_{\mathbb{A}}(39/25))^{k}\ll
c^{\frac{\log|D|}{\log_{2}|D|\ln\log_{2}|D|}}=|D|^{\frac{\log
c}{\log_{2}|D|\ln\log_{2}|D|}}\ll|D|^{1/42},$

for $n$ large enough. Hence we have the desired result.

∎

###  3.2. Evaluating $S_{1}$: Contribution of the square terms.

The last step is to understand the main term $S_{1}$. From Lemma 2.4 we have
that

$S_{1}=\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\left(\sum_{\begin{subarray}{c}f\text{
monic}\\\ |f|\leq|D|^{1/3}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\left(|\mathcal{H}_{n}|\cdot\prod_{P\mid
f}\left(1+\frac{1}{|P|}\right)^{-1}\right.\right.\\\
\left.\left.+O\left(\sqrt{|\mathcal{H}_{n}|}\right)\right)\right).$

Estimating this term is where the difficulties lie, thus enters the random
model $L(1,\mathbb{X})$: Let $\\{\mathbb{X}(P)\\}$ denote a sequence of
independent random variables indexed by $P\in\mathbb{A}$ an irreducible
(prime) element, which takes the values $0,\pm 1$ described as (1.7). The goal
of this section is to prove the following Lemma. Theorem 1.1 follows
immediately after combining Lemmas 3.4 and 3.5.

######  Lemma 3.4.

Let $D\in\mathcal{H}_{n}$. Let $z\in\mathbb{C}$ be such that
$|z|\leq\frac{\log|D|}{260\log_{2}|D|\ln\log_{2}|D|}$.Then

$\frac{1}{|\mathcal{H}_{n}|}\sum_{D\in\mathcal{H}_{n}}L(1,\chi_{D})^{z}=\mathbb{E}(L(1,\mathbb{X})^{z})\left(1+O\left(\frac{1}{(\log|D|)^{11}}\right)\right).$

The expectation of $\mathbb{X}$, $\mathbb{E}(\mathbb{X}(P))$, is zero and
$\mathbb{E}(\mathbb{X}(P)^{2})=\frac{|P|}{|P|+1}$. We extend the definition of
$\mathbb{X}$ to all monic polynomials $f\in\mathbb{A}$ as in (1.8). Then,
since $\mathbb{X}$ is independent on the primes, if
$f=P_{1}^{e_{1}}P_{2}^{e_{2}}\cdots P_{s}^{e_{s}}$ we have

$\mathbb{E}(\mathbb{X}(f))=\prod_{i=1}^{s}\mathbb{E}(\mathbb{X}(P_{i})^{e_{i}}).$

We note that $\mathbb{X}(P)^{e_{j}}=\mathbb{X}(P)$ if $e_{j}\equiv 1(\mod 2)$
and $\mathbb{X}(P)^{2}$ if $e_{j}\equiv 0(\mod 2)$. Combining this fact with
the independence of $\mathbb{X}$ we see that

$\mathbb{E}(\mathbb{X}(P)^{e_{j}})=\begin{cases}0&\text{ if }e_{j}\equiv
1\pmod{2}\\\ \frac{|P|}{|P|+1}&\text{ if }e_{j}\equiv 0\pmod{2}.\end{cases}$

Thus we have proved:

######  Lemma 3.5.

$\mathbb{E}(\mathbb{X}(f))=\begin{cases}0&\text{ if }f\text{ is not a
square}\\\ \prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}&\text{ if }f\text{ is
a square}.\end{cases}$

Then, for any $z\in\mathbb{C}$ since $d_{z}(f)$ and $|f|$ are scalars we see
that

$\mathbb{E}(L(1,\mathbb{X})^{z})=\sum_{f\text{
monic}}\frac{d_{z}(f)\mathbb{E}(\mathbb{X}(f))}{|f|}=\sum_{f\text{
monic}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1},$

where $L(1,\mathbb{X})$ is defined in (1.9). We recognize the shape of $S_{1}$
from this. On the other hand, from the random Euler product definition we have

$\mathbb{E}(L(1,\mathbb{X})^{z})=\prod_{P\text{ irreducible}}E_{P}(z),$

where

(3.5)
$E_{P}(z):=\mathbb{E}\left(\left(1-\frac{\mathbb{X}(P)}{|P|}\right)^{-z}\right)=\frac{1}{|P|+1}+\frac{|P|}{2(|P|+1)}\left(\left(1-\frac{1}{|P|}\right)^{-z}+\left(1+\frac{1}{|P|}\right)^{-z}\right).$

Now, we notice if $\deg P>M$ then we can use the following Taylor expansions

$\left(1-\frac{1}{|P|}\right)^{-z}=1+\frac{z}{|P|}+O\left(\frac{|z|}{|P|^{2}}\right),$

and

$\left(1+\frac{1}{|P|}\right)^{-z}=1-\frac{z}{|P|}+O\left(\frac{|z|}{|P|^{2}}\right).$

That is to say, for $P$ irreducible and $\deg P>M$ we have
$E_{P}(z)=1+O(|z|/|P|^{2})$, so that

$\prod_{\begin{subarray}{c}P\text{ irreducible}\\\ \deg
P>M\end{subarray}}E_{P}(z)\ll\exp\left(|z|\sum_{\deg
P>M}\frac{1}{|P|^{2}}\right)=1+O\left(\frac{1}{(\log|D|)^{B}}\right),$

this last equality follows from the relative sizes of $|z|$ and $M$, where we
again note that $M=A\log_{2}|D|$ and we choose $A$ large enough to provide the
desired error term above.

Finally, using (3.2) of Lemma 3.2 we see

(3.6) $\mathbb{E}(L(1,\mathbb{X})^{z})=\sum_{\begin{subarray}{c}f\text{
monic}\\\ P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right)\\\
=\sum_{\begin{subarray}{c}f\text{ monic}\\\ |f|<|D|^{1/3}\\\
P|f\Rightarrow\deg P\leq
M\end{subarray}}\frac{d_{z}(f^{2})}{|f|^{2}}\prod_{P|f}\left(1+\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{1}{(\log|D|)^{B}}\right)\right).$

The above discussion and taking the choice $A=26$ in Lemma 3.1 gives $B=11$
which proves Lemma 3.4. Using the fact that $|D|=q^{n}$ we obtain Theorem 1.1.
Corollary 1.7 also follows from this discussion by simply scaling everything
appropriately via (1.3) and the fact that expectation is linear. Finally,
Corollary 1.9 is obtained in the same way but instead we apply (1.15).

##  4\. The distribution of values of $L(1,\mathbb{X})$

Here we aim to prove results about $\Phi_{\mathbb{X}}(\tau)$ and
$\Psi_{\mathbb{X}}(\tau)$. The proofs of $\Psi_{\mathbb{X}}(\tau)$ require
only minor adjustments to those for $\Phi_{\mathbb{X}}(\tau)$. The discussion
in this section is modelled after [7, Section 4]. These authors use a saddle
point analysis to achieve their results, and we adapt that idea here. To this
end, we define some useful auxiliary functions. For $z\in\mathbb{C}$ define

(4.1) $\mathcal{L}(z):=\ln\mathbb{E}(L(1,\mathbb{X})^{z})=\sum_{P\text{
irreducible}}\ln(E_{P}(z)),$

where $E_{P}(z)$ is defined as in (3.5). Furthermore we consider the equation

(4.2)
$(\mathbb{E}(L(1,\mathbb{X})^{r})(e^{\gamma}\tau)^{-r})^{\prime}=0\Leftrightarrow\mathcal{L}^{\prime}(r)=\ln(\tau)+\gamma,$

where the derivative is taken with respect to the real variable $r$. It
follows from Proposition 4.2 that
$\lim_{r\to\infty}\mathcal{L}^{\prime}(r)=\infty$, one can easily check that
$E_{P}^{\prime\prime}(r)E_{P}(r)>(E^{\prime}_{P}(r))^{2}$ for all monic
irreducible polynomials $P$, and thus $\mathcal{L}^{\prime\prime}(r)>0$.
Therefore (4.2) has a unique solution: we define $\kappa=\kappa(\tau)$ as this
unique solution.

Finally, we define

(4.3) $f(t):=\begin{cases}\ln\cosh(t)&\text{ if }0\leq t<1\\\
\ln\cosh(t)-t&\text{ if }t\geq 1.\end{cases}$

###  4.1. Distribution of the Random Model.

######  Theorem 4.1.

Let $\tau$ be large and $\kappa$ denote the unique solution to (4.2). Then, we
have

(4.4)
$\Phi_{\mathbb{X}}(\tau)=\frac{\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}}{\kappa\sqrt{2\pi\mathcal{L}^{\prime\prime}(\kappa)}}\left(1+O\left(\sqrt{\frac{\log\kappa}{\kappa}}\right)\right).$

Moreover, for any $0\leq\lambda\leq 1/\kappa$ we have

(4.5)
$\Phi_{\mathbb{X}}(e^{-\lambda}\tau)=\Phi_{\mathbb{X}}(\tau)(1+O(\lambda\kappa)).$

We prove Theorem 1.3 from this and the following proposition which gives some
estimates on the size of $\mathcal{L}$ and its first few derivatives.

######  Proposition 4.2.

Let $f$ be defined by (4.3). Let $c_{q}\geq q$ be a positive constant
depending on $q$ and let $k\in\mathbb{Z}$ be the unique positive integer such
that $q^{k}\leq r<q^{k+1}$ and let $t:=\frac{r}{q^{k}}$. With this notation in
mind for r any real number such that $r\geq c_{q}$ we have

(4.6) $\mathcal{L}(r)=r\left(\ln\log r+\gamma\right)+\frac{r}{\log
r}G_{1}(t)+O\left(\frac{r\log\log r}{(\log r)^{2}}\right),$

where

(4.7) $G_{1}(t):=\frac{1}{2}-\log
t+\sum_{l=-\infty}^{\infty}\frac{f(tq^{l})}{tq^{l}}.$

Furthermore, we have

(4.8) $\mathcal{L}^{\prime}(r)=\ln\log r+\gamma+\frac{1}{\log
r}G_{2}(t)+O\left(\frac{\log\log r}{(\log r)^{2}}\right),$

where

(4.9) $G_{2}(t):=\frac{1}{2}-\log
t+\sum_{l=-\infty}^{\infty}f^{\prime}(tq^{l}).$

Moreover, for all real numbers $y$ , $x$ such that $|y|\geq 3$ and for all $x$
such that $|y|\leq|x|$ we have

(4.10) $\mathcal{L}^{\prime\prime}(y)\asymp\frac{1}{|y|\ln|y|}\text{ and
}\mathcal{L}^{\prime\prime\prime}(y)\ll\frac{1}{|y|^{2}\ln|y|}.$

Combining these results gives Theorem 1.3:

###### Proof of Theorem 1.3.

By Theorem 4.1 and (4.8) we have

$\displaystyle\Phi_{\mathbb{X}}(\tau)$
$\displaystyle=\frac{\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}}{\kappa\sqrt{2\pi\mathcal{L}^{\prime\prime}(\kappa)}}\left(1+O\left(\sqrt{\frac{\log\kappa}{\kappa}}\right)\right)$
$\displaystyle=\exp\left(\mathcal{L}(\kappa)-\kappa(\ln\tau+\gamma)+O(\log\kappa)\right),$

where $\kappa$ is the unique solution which satisfies (4.2).
Also from (4.8) we have

(4.11)
$\ln\tau=\ln\log\kappa+\frac{G_{2}(q^{\\{\log\kappa\\}})}{\log\kappa}+O\left(\frac{\log\log\kappa}{(\log\kappa)^{2}}\right).$

Hence using (4.6) we obtain

$\Phi_{\mathbb{X}}(\tau)=\exp\left(\kappa\frac{G_{1}(q^{\\{\log\kappa\\}})-G_{2}(q^{\\{\log\kappa\\}})}{\log\kappa}+O\left(\frac{\kappa\log\log\kappa}{(\log\kappa)^{2}}\right)\right).$

We note that from (4.11) we have $\kappa\asymp q^{\tau}$ and thus

$\log\kappa=\tau-
G_{2}(q^{\\{\log\kappa\\}})+O\left(\frac{\log\tau}{\tau}\right),$

since for every $\tau$ there is a unique $\kappa$ which satisfies (4.2) and
$G_{2}(q^{\\{\log\kappa\\}})$ is bounded for any $\kappa$. This is enough to
obtain the shape of the result. It remains to prove that

$-\frac{1}{\ln q}+\frac{\ln\cosh c}{c}-\tanh
c<G_{1}(q^{\\{\log\kappa\\}})-G_{2}(q^{\\{\log\kappa\\}})<\frac{\ln(\cosh(q))}{q}-\tanh(q),$

where $c=1.28377...$ For ease of notation let $t=q^{\\{\log\kappa\\}}$, we
note that $1\leq t<q$ and

$G_{1}(t)-G_{2}(t)=\sum_{l=-\infty}^{\infty}\left(\frac{f(tq^{l})}{tq^{l}}-f^{\prime}(tq^{l})\right).$

We recall from the definition of $f$ that the shape is different depending on
the size of the input. So we split the sum:

$\displaystyle G_{1}(t)-G_{2}(t)$ $\displaystyle=\sum_{l<-\log
t}\left(\frac{\ln\cosh(tq^{l})}{tq^{l}}-\tanh(tq^{l})\right)+\sum_{l\geq-\log
t}\left(\frac{\ln\cosh(tq^{l})-tq^{l}}{tq^{l}}-(\tanh(tq^{l})-1)\right)$
$\displaystyle=\sum_{l=-\infty}^{\infty}\left(\frac{\ln\cosh(tq^{l})}{tq^{l}}-\tanh(tq^{l})\right).$

To prove the upper bound, it is enough to show that all the summands are
negative and so the sum will be less than the contribution from the $l=0$
term. We note that

$\frac{d}{dy}\left[\frac{\ln\cosh y}{y}-\tanh y\right]=\frac{\tanh
y}{y}-\frac{\ln\cosh y}{y^{2}}-\text{sech}^{2}y=0$

when $y=\pm 1.28377\ldots$ but the argument of our function is $tq^{l}>0$ for
all $l$ since $t,q>0$, so we need only consider $c=1.28377\ldots$. A simple
calculation shows that this is a minimum and that $\frac{\ln\cosh y}{y}-\tanh
y$ is strictly decreasing on the interval $(0,c)$ and strictly increasing on
the interval $(c,\infty)$. Taking the limit as $y\to 0$ and $y\to\infty$ we
see these are both $0$, hence all of the summands are negative since
$\frac{\ln\cosh c}{c}-\tanh c=-0.339834\ldots$. Therefore we have a suitable
upper bound by simply evaluating $\frac{\ln\cosh tq^{l}}{tq^{l}}-\tanh tq^{l}$
at $l=0$, which gives $\frac{\ln\cosh t}{t}-\tanh t$. As we discussed this
function reaches its maximum value when $t$ does, in this case $t<q$.
In order to consider the lower bound, we note that

$\int_{-\infty}^{\infty}\frac{\ln\cosh tq^{y}}{tq^{y}}-\tanh
tq^{y}dy=-\frac{1}{\ln q}\leq\sum_{l=-\infty}^{\infty}\left(\frac{\ln\cosh
tq^{l}}{tq^{l}}-\tanh tq^{l}\right)-\left(\frac{\ln\cosh t}{t}-\tanh
t\right),$

hence

$\sum_{l=-\infty}^{\infty}\frac{\ln\cosh tq^{l}}{tq^{l}}-\tanh
tq^{l}\geq-\frac{1}{\ln q}+\frac{\ln\cosh t}{t}-\tanh t.$

Finally, as we discussed this is minimized when $t=c$. ∎

####  4.1.1. Tools for proving Proposition 4.2

First we recall the following standard estimates on $f$ and $f^{\prime}$.

######  Lemma 4.3.

[18, Lemma 4.5] $f$ is bounded on $[0,\infty)$ and $f(t)=t^{2}/2+O(t^{4})$ if
$0\leq t<1$. Moreover, we have

$f^{\prime}(t)=\begin{cases}t+O(t^{2})&\text{ if }0<t<1\\\ O(e^{-2t})&\text{
if }t\geq 1.\end{cases}$

######  Lemma 4.4.

Let $r\geq c_{q}$ be a real number, where $c_{q}$ is a positive constant
depending on $q$. Then we have

(4.12) $\ln E_{P}(r)=\begin{cases}-r\ln(1-1/|P|)+O(1)&\text{ if }|P|\leq
r^{2/3},\\\
\ln\cosh\left(\frac{r}{|P|}\right)+O\left(\frac{r}{|P|^{2}}\right)&\text{ if
}|P|>r^{2/3},\end{cases}$

and

(4.13)
$\frac{E_{P}^{\prime}}{E_{P}}(r)=\begin{cases}-\ln\left(1-\frac{1}{|P|}\right)\left(1+O\left(e^{-r^{1/3}}\right)\right)&\text{
if }|P|\leq r^{2/3}\\\
\frac{1}{|P|}\tanh\left(\frac{r}{|P|}\right)+O\left(\frac{1}{|P|^{2}}+\frac{r}{|P|^{3}}\right)&\text{
if }|P|>r^{2/3}.\end{cases}$

###### Proof.

First we prove (4.12). Start by considering $|P|\leq r^{2/3}$. Since $|P|$ is
small we have

(4.14)
$E_{P}(r)=\frac{|P|}{2(|P|+1)}\left(1-\frac{1}{|P|}\right)^{-r}\left(1+\left(1+\frac{1}{|P|}\right)^{-r}+\frac{2}{|P|}\left(1-\frac{1}{|P|}\right)^{r}\right)\\\
=\frac{|P|}{2(|P|+1)}\left(1-\frac{1}{|P|}\right)^{-r}\left(1+O(\exp(-r^{1/3}))\right),$

taking logs gives the desired result.

Suppose now that $|P|>r^{2/3}$, we see that

$\left(1-\frac{1}{|P|}\right)^{-r}=e^{r/|P|}\left(1+O\left(\frac{r}{|P|^{2}}\right)\right)\text{
and
}\left(1+\frac{1}{|P|}\right)^{-r}=e^{-r/|P|}\left(1+O\left(\frac{r}{|P|^{2}}\right)\right),$

thus using the bounds $\cosh(t)-1\ll t\cosh(t)$ and $\sinh(t)\ll t\cosh(t)$,
which are valid for all $t\geq 0$ we see that

$\displaystyle E_{P}(r)$
$\displaystyle=\frac{|P|}{|P|+1}\cosh\left(\frac{r}{|P|}\right)\left(1+O\left(\frac{r}{|P|^{2}}\right)\right)+\frac{1}{|P|}$
(4.15)
$\displaystyle=\cosh\left(\frac{r}{|P|}\right)\left(1+O\left(\frac{r}{|P|^{2}}\right)\right).$

Taking logs completes the proof.
For (4.13), we first see from (3.5) that

$E^{\prime}_{P}(r)=\frac{-|P|}{2(|P|+1)}\left(\left(1-\frac{1}{|P|}\right)^{-r}\ln\left(1-\frac{1}{|P|}\right)+\left(1+\frac{1}{|P|}\right)^{-r}\ln\left(1+\frac{1}{|P|}\right)\right).$

If $|P|\leq r^{2/3}$ then (4.14) finishes the claim.
On the other hand for $|P|>r^{2/3}$ we have

$E^{\prime}_{P}(r)=\frac{|P|}{2(|P|+1)}\left(\frac{e^{r/|P|}}{|P|}-\frac{e^{-r/|P|}}{|P|}\right)\left(1+O\left(\frac{1}{|P|}+\frac{r}{|P^{2}|}\right)\right)\\\
=\frac{1}{|P|}\sinh\left(\frac{r}{|P|}\right)\left(1+O\left(\frac{1}{|P|^{2}}+\frac{r}{|P|^{3}}\right)\right)+O\left(\frac{1}{|P|^{2}}\cosh\left(\frac{r}{|P|}\right)\right).$

Combining this with (4.1.1) we have the desired result. ∎

###### Proof of Proposition 4.2..

For the entire proof, we recall that $k\in\mathbb{Z}$ is the unique positive
integer such that $q^{k}\leq r<q^{k+1}$ and let $t:=\frac{r}{q^{k}}$.

We first prove the result for $\mathcal{L}(r)$. By Lemma 4.4 and Lemma 4.3 we
have

$\displaystyle\mathcal{L}(r)$ $\displaystyle=-r\sum_{|P|\leq
r^{2/3}}\ln\left(1-\frac{1}{|P|}\right)+\sum_{|P|>r^{2/3}}\ln\cosh\left(\frac{r}{|P|}\right)+O(r^{2/3})$
(4.16) $\displaystyle=-r\sum_{\deg P\leq
k}\ln\left(1-\frac{1}{|P|}\right)+\sum_{|P|>r^{2/3}}f\left(\frac{r}{|P|}\right)+O(r^{2/3}).$

The first summand is taken care of by recognizing Mertens’ theorem, which we
will apply at the end. The more interesting part of the proof comes from the
second sum. First, from the prime number theorem we get

$\displaystyle\sum_{|P|>r^{2/3}}f\left(\frac{r}{|P|}\right)=\sum_{n>\frac{2}{3}\log
r}\frac{q^{n}}{n}f\left(\frac{r}{q^{n}}\right)+O\left(\sum_{n>\frac{2}{3}\log
r}\frac{q^{n/2}}{n}f\left(\frac{r}{q^{n}}\right)\right).$

The error term is

$\displaystyle\sum_{n>\frac{2}{3}\log
r}\frac{q^{n/2}}{n}f\left(\frac{r}{q^{n}}\right)$
$\displaystyle\ll\sum_{n\geq\log
r}q^{n/2}\frac{r^{2}}{q^{2n}}+\sum_{\frac{2}{3}\log r<n<\log r}q^{n/2}\text{
by Lemma \ref{fbounds}},$ $\displaystyle\ll\sqrt{r}.$

It remains to consider

$\sum_{n>\frac{2}{3}\log
r}\frac{q^{n}}{n}f\left(\frac{r}{q^{n}}\right)=\sum_{n>k+\log
k}+\sum_{n<k-\log k}+\sum_{k-\log k\leq n\leq k+\log
k}\left(\frac{q^{n}}{n}f\left(\frac{r}{q^{n}}\right)\right)\\\
=T_{1}+T_{2}+T_{3}.$

We first bound $T_{1}$ and $T_{2}$, again referring to Lemma 4.3

$\displaystyle T_{1}$ $\displaystyle\ll\frac{1}{k}\sum_{n>k+\log
k}\frac{q^{n}r^{2}}{q^{2n}}\ll\frac{r^{2}}{k}\sum_{n>k+\log k}\frac{1}{q^{n}}$
$\displaystyle\ll\frac{r^{2}}{k}\frac{1}{q^{k+\log k}}\ll\frac{r}{(\log
r)^{2}}\text{ by the choice of }k\text{ with respect to }r,$

and similarly

$\displaystyle T_{2}$ $\displaystyle\ll\sum_{n<k-\log
k}\frac{q^{n}}{n}\ll\frac{q^{k-\log k}}{k}\ll\frac{r}{(\log r)^{2}}.$

For $T_{3}$ we notice that for $n\in[k-\log k,k+\log k]$, we have
$\frac{1}{n}=\frac{1}{k}\left(1+O\left(\frac{\ln k}{k}\right)\right)$. Using
this, we factor out $\frac{q^{k}}{k}$ and do the variable change $l=k-n$ so
that

$T_{3}=\left(\frac{q^{k}}{k}+O\left(\frac{q^{k}\ln
k}{k^{2}}\right)\right)\sum_{|l|\leq\log k}\frac{f(tq^{l})}{q^{l}},$

where we recall $t:=\frac{r}{q^{k}}$. Next, we see that for $|l|>\log k$ the
sum is small:

$\sum_{|l|>\log k}\frac{f(tq^{l})}{q^{l}}\ll\sum_{l>\log
k}\frac{1}{q^{l}}+\sum_{l<-\log k}q^{l}\ll\frac{1}{q^{\ln k}}\ll\frac{1}{k}.$

Hence we have

$T_{3}=\frac{q^{k}}{k}\left(\sum_{l=-\infty}^{\infty}\frac{f(tq^{l})}{q^{l}}+O\left(\frac{\ln
k}{k}\right)\right).$

Returning this to an expression in terms of $r$ we see

$T_{3}=\frac{r}{\log
r}\left(\sum_{l=-\infty}^{\infty}\frac{f(tq^{l})}{tq^{l}}+O\left(\frac{\ln\ln
r}{\ln r}\right)\right).$

Finally, we complete the bound of $\mathcal{L}(r)$ by applying Mertens’
theorem to the first summand and convert everything in terms of $r$. Combining
the terms which have $\frac{r}{\log r}$ in common we achieve the claimed
result.

For $\mathcal{L}^{\prime}(r)$, we again appeal to Lemma 4.4 and Lemma 4.3
giving

$\displaystyle\mathcal{L}^{\prime}(r)$ $\displaystyle=-\sum_{|P|\leq
r^{2/3}}\ln\left(1-\frac{1}{|P|}\right)+\sum_{|P|>r^{2/3}}\frac{\tanh\left(\frac{r}{|P|}\right)}{|P|}+O(r^{-1/3})$
(4.17) $\displaystyle=-\sum_{\deg P\leq
k}\ln\left(1-\frac{1}{|P|}\right)+\sum_{|P|>r^{2/3}}\frac{f^{\prime}\left(\frac{r}{|P|}\right)}{|P|}+O(r^{-1/3}).$

Applying the prime number theorem to the second sum we obtain

$\sum_{|P|>r^{2/3}}\frac{f^{\prime}\left(\frac{r}{|P|}\right)}{|P|}=\sum_{n>2/3\log
r}\frac{f^{\prime}(r/q^{n})}{n}+O\left(\sum_{n>2/3\log
r}\frac{f^{\prime}(r/q^{n})}{q^{n/2}n}\right).$

The error term in this case is

$\displaystyle\sum_{n>2/3\log r}\frac{f^{\prime}(r/q^{n})}{q^{n/2}n}$
$\displaystyle\ll\sum_{n\geq\log r}\frac{r}{q^{3n/2}n}+\sum_{2/3\log r<n<\log
r}\frac{e^{-2r/q^{n}}}{q^{n/2}n}\text{ by Lemma \ref{fbounds}}$
$\displaystyle\ll\frac{1}{r^{1/3}\log r}.$

As before, we split the remaining sum into 3 pieces:

$\sum_{n>2/3\log r}\frac{f^{\prime}(r/q^{n})}{n}=\sum_{n>k+\log
k}+\sum_{n<k-\log k}+\sum_{k-\log k\leq n\leq k+\log
k}\left(f^{\prime}\left(\frac{r}{q^{n}}\right)\frac{1}{n}\right)\\\
=T^{\prime}_{1}+T_{2}^{\prime}+T_{3}^{\prime}.$

We first bound $T_{1}^{\prime}$ and $T_{2}^{\prime}$, referring to Lemma 4.3
gives

$\displaystyle T_{1}^{\prime}$ $\displaystyle\ll\sum_{n>k+\log
k}\frac{r}{q^{n}n}\ll\frac{r}{k}\sum_{n>k+\log k}\frac{1}{q^{n}}$
$\displaystyle\ll\frac{r}{k}\frac{1}{q^{k+\log k}}\ll\frac{1}{(\log
r)^{2}}\text{by the choice of $k$ with respect to $r$,}$

similarly

$T_{2}^{\prime}\ll\sum_{n<k-\log k}\frac{e^{-2r/q^{n}}}{n}\ll\frac{1}{(\log
r)^{2}}.$

For $T_{3}^{\prime}$ we notice that for $n\in[k-\log k,k+\log k]$, we have
$\frac{1}{n}=\frac{1}{k}\left(1+O\left(\frac{\ln k}{k}\right)\right)$. Using
this, we factor out $\frac{q^{k}}{k}$ and do the variable change $l=k-n$ and
recall $t:=\frac{r}{q^{k}}$, so that

$T_{3}^{\prime}\ll\left(\frac{1}{k}+O\left(\frac{\ln
k}{k^{2}}\right)\right)\sum_{|l|<\log k}f^{\prime}(tq^{l}).$

Next, we show this sum is small for $|l|>\log k$:

$\displaystyle\sum_{|l|>\log k}f^{\prime}(tq^{l})$
$\displaystyle\ll\sum_{l>\log k}e^{-2tq^{l}}+\sum_{l<-\log k}tq^{l}$
$\displaystyle\ll e^{-2\log r}+\frac{1}{q^{\log k}},\text{ the bound on the
second sum follows from }1\leq t\leq q$ $\displaystyle\ll\frac{1}{\log r}.$

Hence we have

$T_{3}^{\prime}\ll\frac{1}{k}\left(\sum_{l=-\infty}^{\infty}f^{\prime}(tq^{l})+O\left(\frac{\ln
k}{k}\right)\right).$

Finally, we complete the bound of $\mathcal{L}^{\prime}(r)$ by applying
Mertens’ theorem to the first summand and convert everything in terms of $r$.
Combining the terms which have $\frac{1}{\log r}$ in common we achieve the
claimed result.
∎

####  4.1.2. Proof of Theorem 4.1

One of the key ingredients in the proof of Theorem 4.1 is to show that
$|\mathbb{E}(L(1,\mathbb{X})^{r+it})|/\mathbb{E}(L(1,\mathbb{X})^{r})$ is
rapidly decreasing in $t$ when $|t|\geq\sqrt{r\ln r}$. For this we prove the
following lemmas.

######  Lemma 4.5.

Let $r$ is a large positive number and $c_{q}\geq q$ a positive constant
depending on $q$. If $|P|>\frac{r}{c_{q}}$, then for some positive constant
$b_{1}$ we have

$\frac{|E_{P}(r+it)|}{E_{P}(r)}\leq\exp\left(-b_{1}\left(1-\cos\left(t\ln\left(\frac{|P|+1}{|P|-1}\right)\right)\right)\right),$

where $c_{q}$ is a positive constant dependent on $q$.

###### Proof.

Let $x_{1}$, $x_{2}$ and $x_{3}$ be positive real numbers and $\theta_{2}$ and
$\theta_{3}$ be real numbers. We use the following inequality established in
the proof of [12, Lemma 3.2]:

$|x_{1}+x_{2}e^{i\theta_{2}}+x_{3}e^{i\theta_{3}}|\leq(x_{1}+x_{2}+x_{3})\exp\left(-\frac{x_{1}x_{3}(1-\cos\theta_{3})}{(x_{1}+x_{2}+x_{3})^{2}}\right).$

Choosing $x_{1}=\frac{|P|}{2(|P|+1)}(1+1/|P|)^{-r}$, $x_{2}=\frac{1}{|P|+1}$
and $x_{3}=\frac{|P|}{2(|P|+1)}(1-1/|P|)^{-r}$ with $\theta_{2}=t\ln(1+1/|P|)$
and $\theta_{3}=t\ln\left(\frac{|P|+1}{|P|-1}\right)$ provides the desired
result since $|P|>\frac{r}{c_{q}}$. ∎

######  Lemma 4.6.

Let $r$ be large and let $c_{q}\geq q>4$ be a positive constant dependent on
$q$. Then there exists a constant $b_{2}>0$ such that

$\frac{|\mathbb{E}(L(1,\mathbb{X})^{r+it})|}{\mathbb{E}(L(1,\mathbb{X})^{r})}\ll\begin{cases}\exp\left(-b_{2}\frac{t^{2}}{r\ln
r}\right)&\text{ if }|t|\leq\frac{r}{c_{q}}\\\
\exp\left(-b_{2}\frac{|t|}{\ln|t|}\right)&\text{ if
}|t|>\frac{r}{c_{q}}.\end{cases}$

###### Proof.

Let $z=r+it$. Since $|E_{P}(z)|\leq E_{P}(r)$ we obtain for any real numbers
$q\leq y_{1}<y_{2}$

(4.18)
$\frac{|\mathbb{E}(L(1,\mathbb{X})^{z})|}{\mathbb{E}(L(1,\mathbb{X})^{r})}\leq\prod_{y_{1}\leq|P|\leq
y_{2}}\frac{|E_{P}(z)|}{E_{P}(r)}.$

Note that $|t|\ln\left(\frac{|P|+1}{|P|-1}\right)\sim 2|t|/|P|$ so that when
$|t|\leq\frac{|P|}{c_{q}}$ we have

$1-\cos\left(|t|\ln\left(\frac{|P|+1}{|P|-1}\right)\right)\gg\frac{|t|^{2}}{|P|^{2}}.$

If $|t|\leq\frac{r}{c_{q}}$ then, we choose $y_{1}=r$ and $y_{2}=c_{q}r/2$.
Appealing to Lemma 4.5 we have

$\displaystyle\prod_{y_{1}\leq|P|\leq y_{2}}\frac{|E_{P}(z)|}{E_{P}(r)}$
$\displaystyle\ll\prod_{\ln r\leq
d\leq\ln(c_{q}r/2)+1}\exp\left(-b_{1}\frac{q^{d}}{2d}\frac{|t|^{2}}{q^{2d}}\right)$
$\displaystyle=\exp\left(-\frac{b_{1}|t|^{2}}{2}\sum_{\ln r\leq
d\leq\ln(c_{q}r/2)+1}\frac{1}{dq^{d}}\right)\ll\exp\left(-b_{2}\frac{|t|^{2}}{r\ln
r}\right).$

In the case of $|t|>\frac{r}{c_{q}}$ we use a similar argument but choose
$y_{1}=c_{q}|t|$ and $y_{2}=2c_{q}|t|$ to complete the result. ∎

Let $\varphi(y)=1$ if $y>1$ and equal to $0$ otherwise. Then we have the
following smooth analogue of Perron’s formula:

######  Lemma 4.7.

[7, Lemma 4.7] Let $\lambda>0$ be a real number and $N$ be a positive integer.
For any $c>0$ we have for $y>0$

(4.19) $0\leq\frac{1}{2\pi
i}\int_{c-i\infty}^{c+i\infty}y^{s}\left(\frac{e^{\lambda s}-1}{\lambda
s}\right)^{N}\frac{ds}{s}-\varphi(y)\leq\frac{1}{2\pi
i}\int_{c-i\infty}^{c+i\infty}y^{s}\left(\frac{e^{\lambda s}-1}{\lambda
s}\right)^{N}\frac{1-e^{-\lambda Ns}}{s}ds,$

and

(4.20) $0\leq\varphi(e^{\lambda}y)-\varphi(y)\leq\frac{1}{2\pi
i}\int_{c-i\infty}^{c+i\infty}y^{s}\left(\frac{e^{\lambda s}-1}{\lambda
s}\right)\frac{e^{\lambda s}-e^{-\lambda s}}{s}ds.$

###### Proof of Theorem 4.1.

We first prove (4.4). Let $0<\lambda<1/(2\kappa)$ be a real number which we
choose later. Using (4.19) from Lemma 4.7, taking $N=1$ we obtain

$\displaystyle 0$
$\displaystyle\leq\int_{\kappa-i\infty}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{e^{\lambda
s}-1}{\lambda s}\frac{ds}{s}-\Phi_{\mathbb{X}}(\tau)$ (4.21)
$\displaystyle\leq\int_{\kappa-i\infty}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s}\frac{(1-e^{-\lambda s})}{s}ds.$

Since $\lambda\kappa<1/2$ we have $|e^{\lambda s}-1|\leq 3$ and $|e^{-\lambda
s}-1|\leq 2$. Hence, using Lemma 4.6 along with the fact that
$|\mathbb{E}(L(1,\mathbb{X})^{s})|\leq\mathbb{E}(L(1,\mathbb{X})^{\kappa})$ we
obtain, for some constant $b_{3}>0$ that

(4.22)
$\int_{\kappa-i\infty}^{\kappa-i\kappa^{3/5}}+\int_{\kappa+i\kappa^{3/5}}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{e^{\lambda
s}-1}{\lambda
s}\frac{ds}{s}\ll\frac{e^{-b_{3}\kappa^{1/6}}}{\lambda\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa},$

and similarly,

(4.23)
$\int_{\kappa-i\infty}^{\kappa-i\kappa^{3/5}}+\int_{\kappa+i\kappa^{3/5}}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s}\frac{(1-e^{-\lambda
s})}{s}ds\ll\frac{e^{-b_{3}\kappa^{1/6}}}{\lambda\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}.$

Let $s=\kappa+it$. If $|t|\leq\kappa^{3/5}$ then $|(e^{\lambda
s}-1)(1-e^{-\lambda s})|\ll\lambda^{2}|s|^{2}$, hence the remaining part of
the integral is bounded as follows

$\int_{\kappa-i\kappa^{3/5}}^{\kappa+i\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s}\frac{(1-e^{-\lambda
s})}{s}ds\ll\lambda\kappa^{3/5}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}.$

Combining this estimate with (4.1.2), (4.22) and (4.23) we obtain

$\displaystyle\Phi_{\mathbb{X}}(\tau)-\frac{1}{2\pi i}$
$\displaystyle\int_{\kappa-i\kappa^{3/5}}^{\kappa+i\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s^{2}}ds$ (4.24)
$\displaystyle\ll\left(\lambda\kappa^{3/5}+\frac{e^{-b_{3}\kappa^{1/6}}}{\lambda\kappa^{3/5}}\right)\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}.$

On the other hand we have from (4.10) when $|t|\leq\kappa^{3/5}$ then

$\mathcal{L}(\kappa+it)=\mathcal{L}(\kappa)+it\mathcal{L}^{\prime}(\kappa)-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)+O\left(\frac{|t|^{3}}{\kappa^{2}\ln\kappa}\right).$

We also note that

$\frac{e^{\lambda s}-1}{\lambda
s^{2}}=\frac{1}{s}(1+O(\kappa))=\frac{1}{\kappa}\left(1-i\frac{t}{\kappa}+O\left(\lambda\kappa+\frac{t^{2}}{\kappa^{2}}\right)\right).$

Hence, using the fact that
$\mathbb{E}(L(1,\mathbb{X})^{s})=\exp(\mathcal{L}(s))$ and
$\mathcal{L}^{\prime}(\kappa)=\ln\tau+\gamma$ we find

$\displaystyle\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s^{2}}$
$\displaystyle=\frac{1}{\kappa}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}\exp\left(-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)\right)\left(1-i\frac{t}{\kappa}+O\left(\lambda\kappa+\frac{t^{2}}{\kappa^{2}}+\frac{|t|^{3}}{\kappa^{2}\ln\kappa}\right)\right).$

Thus, since we have chosen $\kappa$ such that the integral involving
$it/\kappa$ vanishes we have

(4.25) $\frac{1}{2\pi
i}\int_{\kappa-i\kappa^{3/5}}^{\kappa+i\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s^{2}}ds\\\
=\frac{1}{\kappa}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}\frac{1}{2\pi}\int_{-\kappa^{3/5}}^{\kappa^{3/5}}\exp\left(-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)\right)\left(1+O\left(\lambda\kappa+\frac{t^{2}}{\kappa^{2}}+\frac{|t|^{3}}{\kappa^{2}\ln\kappa}\right)\right)dt.$

Further, from (4.10) we have $\mathcal{L}^{\prime\prime}(\kappa)\asymp
1/(\kappa\ln\kappa)$, so there exists a positive constant $b_{4}$ such that

$\frac{1}{2\pi}\int_{-\kappa^{3/5}}^{\kappa^{3/5}}\exp\left(-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)\right)dt=\frac{1}{\sqrt{2\pi\mathcal{L}^{\prime\prime}(\kappa)}}\left(1+O\left(e^{-b_{4}\kappa^{1/6}}\right)\right),$

and

$\frac{1}{2\pi}\int_{-\kappa^{3/5}}^{\kappa^{3/5}}|t|^{n}\exp\left(-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)\right)dt\leq\frac{1}{2\pi}\int_{-\infty}^{\infty}|t|^{n}\exp\left(-\frac{t^{2}}{2}\mathcal{L}^{\prime\prime}(\kappa)\right)dt\\\
\ll\frac{1}{(\mathcal{L}^{\prime\prime}(\kappa))^{(n+1)/2}}\ll\frac{(\kappa\ln\kappa)^{n/2}}{\sqrt{2\pi\mathcal{L}^{\prime\prime}(\kappa)}}.$

Inserting these estimates into (4.25) we get

(4.26) $\frac{1}{2\pi
i}\int_{\kappa-i\kappa^{3/5}}^{\kappa+i\kappa^{3/5}}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s^{2}}ds\\\
=\frac{\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}}{\kappa\sqrt{2\pi\mathcal{L}^{\prime\prime}(\kappa)}}\left(1+O\left(\lambda\kappa+\sqrt{\frac{\ln\kappa}{\kappa}}\right)\right).$

Finally, combining the estimates (4.1.2), (4.26) and choosing
$\lambda=\kappa^{-2}$ we obtain the desired result.
Next we prove (4.5). To do this let $0\leq\lambda\leq 1/\kappa$. Using (4.20)
from Lemma 4.7, we have

$\varphi(e^{-\lambda}\tau)-\varphi(\tau)\leq\frac{1}{2\pi
i}\int_{\kappa-i\infty}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\frac{(e^{\lambda
s}-1)}{\lambda s}\frac{e^{\lambda s}-e^{-\lambda s}}{s}ds.$

We write $s=\kappa+it$ and split this integral into two pieces:
$|t|\leq\lambda\sqrt{\kappa\ln\kappa}$ and
$|t|>\lambda\sqrt{\kappa\ln\kappa}$.
We note that both $|(e^{\lambda s}-1)/\lambda s|$ and $|(e^{\lambda
s}-e^{-\lambda s})/\lambda s|$ are less than $4$. Therefore, it follows that
the first part of the integral contributes
$\ll\lambda\sqrt{\kappa\ln\kappa}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\lambda}\tau)^{-\kappa}$.
Then, from Lemma 4.6 the second portion contributes

$\ll\lambda\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\lambda}\tau)^{-\kappa}\left(\int_{\sqrt{\kappa\ln\kappa}<|t|\leq\tfrac{\kappa}{c_{q}}}e^{-b_{2}t^{2}/(\kappa\ln\kappa)}+\int_{|t|\geq\tfrac{\kappa}{c_{q}}}e^{-b_{2}|t|/(\ln|t|)}\right)\\\
\ll\lambda\sqrt{\kappa\ln\kappa}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\lambda}\tau)^{-\kappa}.$

The final result follows from (4.4) and (4.10), specifically they prove:

(4.27)
$\Phi_{\mathbb{X}}(\tau)\asymp\frac{\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}}{\kappa\sqrt{\mathcal{L}^{\prime\prime}(\kappa)}}\asymp\sqrt{\frac{\ln\kappa}{\kappa}}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}.$

∎

##  5\. Proofs of Theorem 1.2 and Corollary 1.8

We begin with some notation: Let

$\mathbb{P}(L(1,\chi_{D})>e^{\gamma}\tau):=\frac{1}{|\mathcal{H}_{n}|}|\\{D\in\mathcal{H}_{n}:L(1,\chi_{D})>e^{\gamma}\tau\\}|$

and

$M(z):=\frac{1}{|\mathcal{H}_{n}|}\sum_{D\in\mathcal{H}_{n}}L(1,\chi_{D})^{z}.$

###### Proof of Theorem 1.2.

As in section 4.1 let $\kappa=\kappa(\tau)$ be the unique solution to (4.2).
Let $N$ be a positive integer and $0<\lambda<\min\\{1/(2\kappa),1/N\\}$ be a
real value which we choose later. Finally, let
$Y=b\log|D|/(\log_{2}|D|\log_{3}|D|)$ for some $b>0$ small enough.

If $\log|D|$ is large enough, then for our range of $\tau$ we have $\kappa\leq
Y$, which follows from (4.11). Additionally, this means Lemma 3.4 holds for
all $s=\kappa+it$ as long as $|t|\leq Y$ so we consider the following
integrals:

$J(\tau)=\frac{1}{2\pi
i}\int_{\kappa-i\infty}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\left(\frac{e^{\lambda
s}-1}{\lambda s}\right)^{N}\frac{ds}{s},$

and

$J_{M}(\tau)=\frac{1}{2\pi
i}\int_{\kappa-i\infty}^{\kappa+i\infty}M(s)(e^{\gamma}\tau)^{-s}\left(\frac{e^{\lambda
s}-1}{\lambda s}\right)^{N}\frac{ds}{s}.$

By Lemma 4.7 we see that

(5.1) $\Phi_{\mathbb{X}}(\tau)\leq J(\tau)\leq\Phi_{\mathbb{X}}(e^{-\lambda
N}\tau)$

and

(5.2) $\mathbb{P}(L(1,\chi_{D})>e^{\gamma}\tau)\leq
J_{M}(\tau)\leq\mathbb{P}(L(1,\chi_{D})>e^{\gamma-\lambda N}\tau).$

Using that $|e^{\lambda s}-1|\leq 3$ we have

$\int_{\kappa-i\infty}^{\kappa-
iY}\int_{\kappa+iY}^{\kappa+i\infty}\mathbb{E}(L(1,\mathbb{X})^{s})(e^{\gamma}\tau)^{-s}\left(\frac{e^{\lambda
s}-1}{\lambda s}\right)^{N}\frac{ds}{s}\ll\frac{1}{N}\left(\frac{3}{\lambda
Y}\right)^{N}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa},$

and similarly, together with Lemma 3.4 we obtain

$\displaystyle\int_{\kappa-i\infty}^{\kappa-
iY}\int_{\kappa+iY}^{\kappa+i\infty}M(s)(e^{\gamma}\tau)^{-s}\left(\frac{e^{\lambda
s}-1}{\lambda s}\right)^{N}\frac{ds}{s}$
$\displaystyle\ll\frac{1}{N}\left(\frac{3}{\lambda
Y}\right)^{N}M(\kappa)(e^{\gamma}\tau)^{-\kappa}$
$\displaystyle\ll\frac{1}{N}\left(\frac{3}{\lambda
Y}\right)^{N}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}.$

For the remaining parts of the integral we have that $|t|\leq Y$ so we apply
Lemma 3.4 which states that
$M(s)-\mathbb{E}(L(1,\mathbb{X}))^{s}\ll\mathbb{E}(L(1,\mathbb{X})^{\Re
s})/(\log|D|)^{11}$. Then use the inequality $|(e^{\lambda s}-1)/\lambda
s|\leq 4$ to obtain

$J_{M}(\tau)-J(\tau)\ll\frac{1}{N}\left(\frac{3}{\lambda
Y}\right)^{N}\mathbb{E}(L(1,\mathbb{X})^{\kappa})(e^{\gamma}\tau)^{-\kappa}+\frac{Y}{\kappa}4^{N}\frac{\mathbb{E}(L(1,\mathbb{X})^{\kappa})}{(e^{\gamma}\tau)^{\kappa}(\log|D|)^{11}}.$

Choosing $N=[\log_{2}|D|]$ and $\lambda=e^{10}/Y$ then (4.27) gives us that

(5.3) $J_{M}(\tau)-J(\tau)\ll\frac{\Phi_{\mathbb{X}}(\tau)}{(\log|D|)^{8}}.$

On the other hand, by Theorem 1.3 in combination with our choice for
$\lambda$, $N$ and $Y$ we have

$\Phi_{\mathbb{X}}(e^{\pm\lambda
N}\tau)=\Phi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}(\log_{2}|D|)^{2}\log_{3}|D|}{\log|D|}\right)\right).$

Hence, combining (5.1), (5.2) and (5.3)

$\displaystyle\mathbb{P}(L(1,\chi_{D})>e^{\gamma}\tau)$ $\displaystyle\leq
J_{M}(\tau)$ $\displaystyle\leq
J(\tau)+O\left(\frac{\Phi_{\mathbb{X}}(\tau)}{(\log|D|)^{8}}\right)$
$\displaystyle\leq\Phi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}\log_{2}|D|\log_{3}|D|}{\log|D|}\right)\right),$

and

$\displaystyle\mathbb{P}(L(1,\chi_{D})>e^{\gamma}\tau)$ $\displaystyle\geq
J_{M}(e^{\lambda N}\tau)$ $\displaystyle\geq J(e^{\lambda
N}\tau)+O\left(\frac{\Phi_{\mathbb{X}}(\tau)}{(\log|D|)^{8}}\right)$
$\displaystyle\geq\Phi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}(\log_{2}|D|)^{2}\log_{3}|D|}{\log|D|}\right)\right).$

The final step is done by recalling for $D\in\mathcal{H}_{n}$ we have
$|D|=q^{n}$. ∎

And now how to make use of Theorem 1.2 to prove the corollaries of Section
1.1.

###### Proof of Corollary 1.8.

We note by Artin’s class number formula given by (1.3) that $h_{D}\geq
e^{\gamma}\tau\frac{\sqrt{|D|}}{\sqrt{q}}$ if and only if for
$D\in\mathcal{H}_{2g+1}$ we have $L(1,\chi_{D})\geq e^{\gamma}\tau$.
Specializing to $n=2g+1$ we see Theorem 1.2 proved that the number of $D$ such
that $L(1,\chi_{D})>e^{\gamma}\tau$ is given by

$|\mathcal{H}_{2g+1}|\Phi_{\mathbb{X}}(\tau)\left(1+O\left(\frac{e^{\tau}(\log_{2}|D|)^{2}\log_{3}|D|}{\log|D|}\right)\right).$

Finally, we use Theorem 1.3 to conclude that the number of $D$ such that
$h_{D}\geq e^{\gamma}\tau\frac{\sqrt{|D|}}{\sqrt{q}}$ is given by

$\displaystyle|\mathcal{H}_{2g+1}|\exp\left(-C_{1}(q^{\\{\log\kappa\\}})\frac{q^{\tau-
C_{0}(q^{\\{\log\kappa\\}})}}{\tau}\left(1+O\left(\frac{\log\tau}{\tau}\right)\right)\right)\times\left(1+O\left(\frac{e^{\tau}(\log_{2}|D|)^{2}\log_{3}|D|}{\log|D|}\right)\right)$
$\displaystyle=|\mathcal{H}_{2g+1}|\exp\left(-C_{1}(q^{\\{\log\kappa\\}})\frac{q^{\tau-
C_{0}(q^{\\{\log\kappa\\}})}}{\tau}\left(1+O\left(\frac{\log\tau}{\tau}\right)\right)\right),$

where the final estimate follows from the range of $\tau$. The analogous
estimate for small values of $h_{D}$ follows along the same lines. ∎

##  6\. Optimal $\Omega$-results: Proof of Theorem 1.6

For each irreducible polynomial $P\in\mathbb{F}_{q}[x]$, let
$\delta_{P}\in\\{-1,1\\}.$ Define $\mathcal{S}_{N}(n,\\{\delta_{P}\\})$ to be
the set of all monic irreducibles $Q\in\mathbb{F}_{q}[x]$ such that $\deg Q=N$
and

$\left(\frac{P}{Q}\right)=\delta_{P},$

for all irreducibles $P$ with $\deg P\leq n$. We also let $\mathcal{P}(n)$
denote the product of all irreducible polynomials $P$ with $\deg P\leq n$.

######  Lemma 6.1.

Let $N$ be large, and $1\leq n\leq(\log_{q}(N))^{2}$ be a real number. Then,
we have

$|\mathcal{S}_{N}(n,\\{\delta_{P}\\})|=\frac{q^{N}}{2^{\Pi_{q}(n)}N}+O\left(q^{\frac{N}{2}+n}\right).$

###### Proof.

For each monic polynomial $f\in\mathbb{F}_{q}[x]$, define
$\delta_{f}=\prod_{P\mid f}\delta_{P}$. Let $Q$ be an irreducible polynomial
of degree $N$. Then, observe that

(6.1)
$\sum_{f\mid\mathcal{P}(n)}\delta_{f}\left(\frac{f}{Q}\right)=\prod_{\deg
P\leq
n}\left(1+\delta_{P}\left(\frac{P}{Q}\right)\right)=\begin{cases}2^{\Pi_{q}(n)}&\text{
if }Q\in\mathcal{S}_{N}(n,\\{\delta_{P}\\}),\\\ 0&\text{
otherwise}.\end{cases}$

Therefore, we deduce that

$|\mathcal{S}_{N}(n,\\{\delta_{P}\\})|=\frac{1}{2^{\Pi_{q}(n)}}\sum_{f\mid\mathcal{P}(n)}\delta_{f}\sum_{\begin{subarray}{c}Q\text{
irreducible }\\\ \deg Q=N\end{subarray}}\left(\frac{f}{Q}\right).$

Since all the divisors of $\mathcal{P}(n)$ are square-free, we obtain from
(2.5) that for all $f\neq 1$ such that $f\mid\mathcal{P}(n)$, we have

$\sum_{\begin{subarray}{c}Q\text{ irreducible }\\\ \deg
Q=N\end{subarray}}\left(\frac{f}{Q}\right)\ll\deg(f)q^{\frac{N}{2}}\ll
q^{\frac{N}{2}+n}.$

since

(6.2) $\deg f\leq\deg\mathcal{P}(n)=\sum_{j=1}^{n}j\pi_{q}(j)\asymp q^{n},$

by the prime number theorem. Finally, since the number of divisors of
$\mathcal{P}(n)$ is $2^{\Pi_{q}(n)}$ we deduce that

$|\mathcal{S}_{N}(n,\\{\delta_{P}\\})|=\frac{\pi_{q}(N)}{2^{\Pi_{q}(n)}}+O\left(q^{\frac{N}{2}+n}\right)$

which completes the proof. ∎

We shall deduce Theorem 1.6 from the following proposition

######  Proposition 6.2.

We have

(6.3)
$\sum_{Q\in\mathcal{S}_{N}(n,\\{\delta_{P}\\})}L(1,\chi_{Q})=\zeta_{\mathbb{A}}(2)\frac{\pi_{q}(N)}{2^{\Pi_{q}(n)}}\prod_{\deg
P\leq n}\left(1+\frac{\delta_{P}}{|P|}\right)+O\left(N^{2}q^{N/2+2n}\right).$

###### Proof.

First, it follows from (2.3) that for all $m\geq N$ we have

$L(1,\chi_{Q})=\sum_{\deg F\leq m}\frac{\chi_{Q}(F)}{|F|}.$

Let $A=2N\deg\mathcal{P}(n)\ll Nq^{n}$ by (6.2). Then, from (6.1) we obtain

(6.4)
$\displaystyle\sum_{Q\in\mathcal{S}_{N}(n,\\{\delta_{P}\\})}L(1,\chi_{Q})=\frac{1}{2^{\Pi_{q}(n)}}\sum_{f\mid\mathcal{P}(n)}\delta_{f}\sum_{\begin{subarray}{c}Q\text{
irreducible }\\\ \deg Q=N\end{subarray}}\left(\frac{f}{Q}\right)\sum_{\deg
F\leq A}\frac{\left(\frac{Q}{F}\right)}{|F|}$
$\displaystyle=\frac{1}{2^{\Pi_{q}(n)}}\sum_{f\mid\mathcal{P}(n)}\delta_{f}\sum_{\deg
F\leq A}\frac{1}{|F|}\sum_{\begin{subarray}{c}Q\text{ irreducible }\\\ \deg
Q=N\end{subarray}}\left(\frac{Ff}{Q}\right),$

by quadratic reciprocity (2.6). Since any divisor $f$ of $\mathcal{P}(n)$ is
square-free, it follows that $Ff$ is a square only when $F=fh^{2}$, for some
monic polynomial $h$. In this case, we have

$\sum_{\begin{subarray}{c}Q\text{ irreducible }\\\ \deg
Q=N\end{subarray}}\left(\frac{Ff}{Q}\right)=\pi_{q}(N)+O(\omega(F))=\pi_{q}(N)+O(A),$

where $\omega(F)$ is the number of irreducible divisors of $F$, and
$\omega(F)\leq\deg F\leq A$.

Furthermore, if $Ff$ is not a square, then by (2.5) we get

$\sum_{\begin{subarray}{c}Q\text{ irreducible }\\\ \deg
Q=N\end{subarray}}\left(\frac{Ff}{Q}\right)\ll\deg(Ff)q^{\frac{N}{2}}\ll
Aq^{N/2},$

by (6.2). Inserting these estimates in (6.4), we deduce

(6.5)
$\sum_{Q\in\mathcal{S}_{N}(n,\\{\delta_{P}\\})}L(1,\chi_{Q})=\frac{\pi_{q}(N)}{2^{\Pi_{q}(n)}}\sum_{f\mid\mathcal{P}(n)}\frac{\delta_{f}}{|f|}\sum_{\deg
h\leq(A-\deg f)/2}\frac{1}{|h|^{2}}+O\left(A^{2}q^{N/2}\right),$

since

$\sum_{\deg F\leq A}\frac{1}{|F|}=\sum_{k=1}^{A}\sum_{\deg
F=k}\frac{1}{q^{k}}=A.$

Finally, since $\deg f\leq\deg\mathcal{P}(n)\leq A/2$, then for all
$f\mid\mathcal{P}(n)$ we have the tail of the inner sum is very small:

$\sum_{\deg h>(A-\deg f)/2}\frac{1}{|h|^{2}}\leq\sum_{\deg
h>A/2}\frac{1}{|h|^{2}}\leq\sum_{k>A/2}\frac{1}{q^{2k}}\ll q^{-N}.$

Inserting this estimate in (6.5) completes the proof. ∎

We finish this section by proving Theorem 1.6.

###### Proof of Theorem 1.6.

We choose $n$ such that

(6.6) $\frac{N\log N}{10\zeta_{\mathbb{A}}(2)q}\leq q^{n}<\frac{N\log
N}{10\zeta_{\mathbb{A}}(2)}.$

We choose $\delta_{P}=1$ for all monic irreducibles $P$ with $\deg P\leq n$.
Then, it follows from Lemma 6.1 and Proposition 6.2 that

(6.7)
$\frac{1}{|\mathcal{S}_{N}(n,\\{\delta_{P}\\})|}\sum_{Q\in\mathcal{S}_{N}(n,\\{\delta_{P}\\})}L(1,\chi_{Q})=\zeta_{\mathbb{A}}(2)\prod_{\deg
P\leq n}\left(1+\frac{1}{|P|}\right)\big{(}1+O\left(q^{-N/6}\right)\big{)}.$

Furthermore, by Lemma 2.3 we have

$\zeta_{\mathbb{A}}(2)\prod_{\deg P\leq
n}\left(1+\frac{1}{|P|}\right)=\prod_{\deg P\leq
n}\left(1-\frac{1}{|P|}\right)^{-1}\left(1+O\left(\frac{q^{-n}}{n}\right)\right)=e^{\gamma}n+O(1).$

Combining this estimate with (6.6) and (6.7) yield the existence of a monic
irreducible $Q$ of degree $N$, such that

$L(1,\chi_{Q})\geq e^{\gamma}\log(N\log
N)+O(1)=e^{\gamma}\left(\log_{2}|Q|+\log_{3}|Q|\right)+O(1),$

as desired. Finally, one can deduce (1.14) along the same lines by taking
$\delta_{P}=-1$ for all monic irreducibles $P$ with $\deg P\leq n$. ∎

## References

  * [1] C. Aisteleitner, K. Mahatab, & A. Peyrot, _On the proportion of characters with large values of $L(1,\chi)$._ arxiv: 1803.00760.pdf.
  * [2] J. Andrade, _A note on the Mean Value of $L$-Functions over Function Fields._ Vol 08, No. 07 (2012), 1725–1740.
  * [3] J. Andrade and J. Keating, _Conjectures for the integral moments and ratios of L-functions over function fields_ J. Number Theory 142 (2014), 102–148.
  * [4] J. Andrade and J. Keating, _The mean value of $L(\frac{1}{2},\chi)$ in the hyperelliptic ensemble._ J. Number Theory 132 (2012), no. 12, 2793–2816.
  * [5] E. Artin, _Quadratische Körper in Geibiet der Höheren Kongruzzen I and II._ Math. Z. 19 (1924) 153-296.
  * [6] H. Bui and A. Florea, _Hybrid Euler-Hadamard product for quadratic Dirichlet $L$-functions in function fields._ https://arxiv.org/abs/1609.05363
  * [7] A. Dahl and Y. Lamzouri, _The distribution of class numbers in a special family of real quadratic fields._ To appear in Transactions of the American Mathematical Society
  * [8] A. Florea, _The fourth moment of quadratic Dirichlet $L$-functions over function fields._ Geom. Funct. Anal. (2017) 27: 541
  * [9] A. Florea, _The second and third moment of $L(1/2,\chi)$ in the hyperelliptic ensemble._ Forum Mathematicum, Volume 29, Issue 4. (2017) 873-892
  * [10] A. Florea, _Improving the error term in the mean value of $L(1/2,\chi)$ in the hyperelliptic ensemble._ International Mathematics Research Notices, Volume 2017, Issue 20, (2017) 6119–6148
  * [11] A. Granville & K. Soundararajan, _Extreme Values of $|\zeta(1+it)|$._ In The Riemann zeta function and related themes: papers in honour of professor K. Ramachandra, Ramanujan Math. Soc. Lect. Notes Ser. 2 (2006), 65–80.
  * [12] A. Granville & K. Soundararajan, _The distribution of values of $L(1,\chi_{d})$._ Geom. Funct. Anal. 13 (2003), no. 5, 992-1028.
  * [13] J. Hoffstein and M. Rosen, _Average Values of $L$-series in Function Fields._ J. Reine Angew. Math. 426 (1992), 117-150.
  * [14] H. Jung, _A note on the mean value of $L(1,\chi)$ in the hyperelliptic ensemble_ International Journal of Number Theory Vol. 10 (2014), no. 4, 859–874.
  * [15] H. Jung, _A remark on average of class numbers of function fields_ Korean J. Math. 21 (2013), No. 4, 365–374.
  * [16] Y. Lamzouri, S. Lester & M. Radziwill, _Discrepancy bounds for the distribution of the Riemann Zeta-function and applications._ To appear in J. Anal. Math.
  * [17] Y. Lamzouri, _Extreme values of class numbers or real quadratic fields._ International Mathematics Research Notices IMRN. (2015) no. 22, 11847-11860.
  * [18] Y. Lamzouri, _The distribution of Euler-Kronecker constants of quadratic fields._ J. Math. Anal. Appl. 432 (2015), no. 2, 632-653.
  * [19] M. Rosen, _A generalization of Mertens’ theorem._ J. Ramanujan Math. Soc. 14 (1999), no. 1, 1–19.
  * [20] M. Rosen, _Number theory in function fields._ Graduate Texts in Mathematics, 210. Springer-Verlag, New York, 2002. xii+358 pp.
  * [21] C. L. Siegel, _The average measure of quadratic forms with a given determinant and signature._ Ann. Math. 45 (1949), 667–685.
  * [22] A. Weil, _Sur les courbes Algébriques et les Variétés qui s’en Déduisent._ Hermann, Paris, 1984.