Youness Lamzouri
email: lamzouri@mathstat.yorku.ca

ON THE DISTRIBUTION OF THE MAXIMUM OF CUBIC EXPONENTIAL SUMS

In this paper, we investigate the distribution of the maximum of partial sums of certain cubic exponential sums, commonly known as "Birch sums". Our main theorem gives upper and lower bounds (of nearly the same order of magnitude) for the distribution of large values of this maximum, that hold in a wide uniform range. This improves a recent result of Kowalski and Sawin. The proofs use a blend of probabilistic methods, harmonic analysis techniques, and deep tools from algebraic geometry. The results can also be generalized to other types of -adic trace functions. In particular, the lower bound of our result also holds for partial sums of Kloosterman sums. As an application, we show that there exist x ∈ [1, p] and a ∈ F × p such that

√ p log log p. The uniformity of our results

suggests that this bound is optimal, up to the value of the constant.

Introduction

Let p ≥ 3 be a prime number, and E be the elliptic curve over F p given by the Weierstrass equation y 2 = x 3 + bx + c. If we put a p = p + 1 -|E(F p )|, then we have (1.1) a p = n≤p χ p (n 3 + bn + c),

where χ p is the Legendre symbol modulo p. Furthermore, we have the Hasse bound |a p | ≤ 2 √ p. In [START_REF] Birch | How the number of points of an elliptic curve over a fixed prime field varies[END_REF], Birch proved the "vertical" Sato-Tate law for the a p 's, which states that as E varies over all elliptic curves over F p , the quantity a p / √ p becomes equidistributed in [-2, 2] with respect to the Sato-Tate measure

µ ST = 1 π 1 - x 2 4 dx,
as p → ∞. In analogy with the multiplicative character sum (1.1), Birch [START_REF] Birch | How the number of points of an elliptic curve over a fixed prime field varies[END_REF] also conjectured that a similar result should hold for the normalized cubic exponential sum, defined for a ∈ F p by where here and throughout we let e(z) := exp(2πiz), and e p (z) := e(z/p) is the standard additive character modulo p. The sums Bi p (a) are commonly known as Birch sums. In this case, Weil's bound for exponential sums gives (1.3) |Bi p (a)| ≤ 2, for all a ∈ F p .

Birch's conjecture asserts that as a varies in F × p , Bi p (a) becomes equidistributed in [-2, 2] with respect to the Sato-Tate measure. This conjecture was subsequently proved by Livné in [START_REF] Livné | The average distribution of cubic exponential sums[END_REF].

Recently, Kowalski and Sawin [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF] investigated the distribution of the polygonal paths formed by linearly interpolating the partial sums Among their results, Kowalski and Sawin proved that as a varies in F × p and p → ∞, the quantity M p (a) converges in law to the random variable where {X(h)} h∈Z is a sequence of independent random variables with Sato-Tate distributions on [-2, 2]. The proof uses deep results of Deligne, Katz, Laumon and others concerning the ramification and monodromy groups of certain sheaves associated to Birch sums. The origin of the probabilistic model (1.5) comes from the following identity, which is an immediate consequence of the discrete Plancherel formula Furthermore, one has the elementary estimate (see page 13 of [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF])

(1.7) 1 √ p γ p (h; x) = e p (xh) -1 2πih + O 1 p ,
which holds uniformly for 1 ≤ |h| < p/2. This shows that M is a good model for M p (a) if we assume that the Birch sums Bi p (a-h) behave "independently" for different shifts h and are all Sato-Tate distributed on [-2, 2]. This assumption indeed holds (see Lemma 2.1 below), if the number of shifts is log p. For a positive real number V , we define

Φ p (V ) := 1 p -1 {a ∈ F × p : M p (a) > V } .
Kowalski and Sawin [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF] proved that the limiting distribution of Φ p (V ) is double exponentially decreasing. More precisely, they showed that there exists a constant c > 0 such that

(1.8) c -1 exp (-exp (cV ))) ≤ P(M > V ) = lim p→∞ Φ p (V ) ≤ c exp -exp c -1 V ) .
When V is fixed and p is sufficiently large, (1.8) implies that Φ p (V ) satisfies the same bounds (with a different constant c), and hence is double exponentially decreasing in V . In this paper, we establish upper and lower bounds (of nearly the same order of magnitude) for Φ p (V ) in a large uniform range of V in terms of p. As an application, we exhibit large values of M p (a), as a varies in F × p , that we believe are best possible. Our main result is the following theorem which substantially improves the estimate (1.8).

Theorem 1.1. Let p be a large prime. For all real numbers 1 ≤ V ≤ (2/π) log log p -2 log log log p we have

exp -A 0 exp π 2 V 1 + O √ V e -πV /4 ≤ Φ p (V ) ≤ exp -C exp π 2 -δ V
for some positive constant C, where δ = 4π -π 2 2π + 8 = 0.18880..., and

A 0 = exp -γ -1 - 1 2 ∞ 0 f (u) u 2 du = 0.6846...,
where γ is the Euler-Mascheroni constant, and f : [0, ∞) → R is defined by

(1.9) f (t) := log E(e tX ) if 0 ≤ t < 1, log E(e tX ) -2t if t ≥ 1.
where X is a random variable with Sato-Tate distribution µ ST .

Remark 1.2. The upper bound of Theorem 1.1 is valid in the extended range 1 ≤ V ≤ (log log p)/(π/2 -δ) -2 log log log p. It would be interesting to obtain a more precise estimate for Φ p (V ). The analogy with character sums (see the discussion on page 4) lead us to believe that the true order of magnitude of Φ p (V ) is perhaps closer to the lower bound of Theorem 1.1. It is also curious to note that the constant

1 2 ∞ 0 f (u)
u 2 du appears in an asymptotic estimate of Liu-Royer-Wu [START_REF] Liu | On a conjecture of Montgomery-Vaughan on extreme values of automorphic L-functions at 1[END_REF], for the distribution function of large (or small) values of L-functions attached to holomorphic cusp forms at s = 1.

Kowalski and Sawin also investigated the polygonal paths formed by the linear interpolation of partial sums of Kloosterman sums and obtained a similar result to (1.8) in this case. The lower bound of Theorem 1.1 holds verbatim for the maximum of partial sums of Kloosterman sums, but the proof of the upper bound does not carry over to this case. Indeed, one of the main ingredients in this proof are strong bounds for short sums of cubic exponential sums, which are not currently known for Kloosterman sums. More precisely, in order to carry out the proof of the upper bound of Theorem 1.1 to this setting one needs the following bound

(1.10) n∈I e p (an + bn) |I| 1-ε ,
for any interval I ⊂ [1, p] of length p 1/2+ε/2 for some ε > 0, where x is the multiplicative inverse of x modulo p. In contrast, Kowalski and Sawin only needed an average form of (1.10) (over (a, b) ∈ F × p × F × p , see the proof of Theorem 1.5 in [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF]), to obtain the analogue of (1.8) for the maximum of partial sums of Kloosterman sums.

Our result should be compared with the recent work of Bober, Goldmakher, Granville and Koukoulopoulos [START_REF] Bober | The frequency and the structure of large character sums[END_REF] concerning the distribution of the maximum of character sums. The proof of the upper bound of Theorem 1.1 follows the same strategy as [START_REF] Bober | The frequency and the structure of large character sums[END_REF] but uses several different ingredients, while the proof of the lower bound is completely different. This is mainly due to the lack of multiplicativity in our case which plays a central role for character sums. In particular, the analogue of the lower bound of Theorem 1.1 in [START_REF] Bober | The frequency and the structure of large character sums[END_REF] follows readily by relating character sums to values of Dirichlet L-functions and using the work of Granville-Soundararajan [START_REF] Granville | Extreme values of ζ(1 + it). The Riemann zeta function and related themes: papers in honor of[END_REF] on the distribution of L(1, χ). Another crucial difference in our case is the fact that the Birch sums Bi p (a -h) and Bi p (a + h) behave independently, while this is clearly not the case for the values χ(-h) and χ(h) where χ is a Dirichlet character. This makes the analysis of the exponential sum |h|≤H e(αh)-1 h

Bi p (a -h) more complicated in our case, which explains why our Theorem 1.1 is less precise than Theorem 1.1 of [START_REF] Bober | The frequency and the structure of large character sums[END_REF]. However, our probabilistic model is easier to work with, due to the fact that the X(h) are independent (in the case of character sums, the X(h) are multiplicative random variables such that the X(p)'s are independent for different primes p). This is exploited in the proof of the lower bound of Theorem 1.1 through relating the Laplace transform of the sum Im 1 √ p n≤p/2 e p (n 3 + an) to that of its corresponding random model, and using the saddle-point method to obtain precise estimates for the distribution of its large values (see Section 7 below).

The Birch sums (1.2) are examples of -adic trace functions over finite fields. These trace functions have been extensively studied in a series of recent works by Fouvry, Kowalski, and Michel [START_REF] Fouvry | Algebraic trace functions over the primes[END_REF], [START_REF] Fouvry | Trace functions over finite fields and their applications[END_REF], [START_REF] Fouvry | A study in sums of products[END_REF], Fouvry, Kowalski, Michel, Raju, Rivat, and Soundararajan [START_REF] Fouvry | On short sums of trace functions[END_REF], Kowalski and Sawin [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF], [START_REF] Kowalski | On the support of the Kloosterman paths[END_REF], and Perret-Gentil [START_REF] Perret-Gentil | Gaussian distribution of short sums of trace functions over finite fields[END_REF], [START_REF] Perret-Gentil | Distribution questions for trace functions with values in cyclotomic integers and their reductions[END_REF]. Our results can be generalized to other types of trace functions that are attached to certain coherent families of -adic sheaves (in the sense given by Perret-Gentil [START_REF] Perret-Gentil | Gaussian distribution of short sums of trace functions over finite fields[END_REF]), if their short sums satisfy a bound similar to (1.10). The precise definition of a coherent family is technical (see [START_REF] Perret-Gentil | Gaussian distribution of short sums of trace functions over finite fields[END_REF]), but roughly speaking, these are geometrically irreducible sheaves of Q -modules over F p for which the "conductor" is bounded independently of p, the arithmetic and geometric monodromy groups are equal and of fixed classical type, and the sheaves formed by additive shifts are "independent". As an example, Theorem 1.1 can be generalized for the partial sums of the exponential sum uniformly for a ∈ F × p . The double exponential decay of the distribution Φ p (V ) and the uniformity of Theorem 1.1 lead us to formulate the following stronger conjecture, which is optimal up to the value of the constant by Corollary 1.3. Conjecture 1.5. There exists a positive constant C 0 , such that for all primes p ≥ 3 and all 1 < x ≤ p we have n≤x e p (n 3 + an) ≤ C 0 √ p log log p.

(1.
Montgomery and Vaughan [START_REF] Montgomery | Exponential sums with multiplicative coefficients[END_REF] proved the analogue of this conjecture for character sums assuming the generalized Riemann hypothesis (GRH) for Dirichlet L functions. It would be interesting to prove Conjecture 1.5 conditionally on some unproven but widely believed hypotheses such as the GRH.

The paper is organized as follows: In Section 2 we investigate the moments of sums of Birch sums using ingredients from algebraic geometry. In Section 3 we estimate the moments and the Laplace transform of sums of independent random variables that are Sato-Tate distributed. In Section 4 we give an outline and present the main ingredients of the proof of the upper bound of Theorem 1.1. In Section 5 we use harmonic analysis techniques to obtain a non-trivial bound for a "random" exponential sum. The proof of the upper bound of Theorem 1.1 will then be completed in Section 6. Finally, in Section 7 we prove the lower bound of Theorem 1.1.

Acknowledgments. I would like to thank Corentin Perret-Gentil for useful comments and suggestions concerning the generalization of Theorem 1.1 to other trace functions. I thank Dante Bonolis for informing me about his current work on the size and moments of incomplete Kloosterman and Birch sums. I also thank Alexey Kuznetsov for helpful discussions.

Moments of sums of Birch sums and ingredients from algebraic geometry

In this section we shall investigate the 2k-th moment of sums of Birch sums

(2.1) y≤|h|<z c(h)Bi p (a -h),
where 1 ≤ y < z < p/2 are real numbers and {c(h)} h∈Z is a sequence of complex numbers. For k fixed, these moments were computed by Kowalski and Sawin [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF] using deep tools from algebraic geometry, namely Deligne's equidistribution theorem, the Goursat-Kolchin-Ribet criterion of Katz, as well as Katz's computations for the monodromy groups of a certain sheaf attached to the exponential sums Bi p (a) (see [START_REF] Katz | On the monodromy attached to certain families of exponential sums[END_REF]). However, in our case we need asymptotic formulas for these moments that hold uniformly in the region k ≤ (log p) 1-o(1) . To this end, we shall use a uniform version of Lemma 2.5 of [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF], which we extract from the recent work of Perret-Gentil [START_REF] Perret-Gentil | Gaussian distribution of short sums of trace functions over finite fields[END_REF] on -adic trace functions over finite fields. Lemma 2.1. Let p > 7 be prime. For all positive integers 1 ≤ k ≤ (log p)/2, and all h 1 , . . . , h k ∈ F p we have

1 p -1 a∈F × p Bi p (a -h 1 ) • • • Bi p (a -h k ) = E X(h 1 ) • • • X(h k ) + O 2 k k √ p ,
where {X(h)} h∈Z is a sequence of independent random variables with Sato-Tate distributions on [-2, 2], and the implied constant is absolute.

Proof. First, we write

a∈F × p Bi p (a -h 1 ) • • • Bi p (a -h k ) = a∈F × p Bi p (a -j 1 ) b 1 • • • Bi p (a -j m ) bm ,
where j 1 , . . . , j m are distinct, and

b 1 + • • • + b m = k.
Let S be the rank 2 lisse Q -sheaf on A 1 Fp parameterizing the Birch sums Bi p (a) (see Katz [START_REF] Katz | On the monodromy attached to certain families of exponential sums[END_REF] for a reference on these sheaves and their monodromy groups). Katz (see Th. 19 and Cor. 20 of [START_REF] Katz | On the monodromy attached to certain families of exponential sums[END_REF]) showed that the geometric and arithmetic monodromy groups of the sheaf S are both equal to SL 2 (C) for p > 7. Furthermore, it follows from the discussion in the beginning of page 15 of [START_REF] Kowalski | Kloosterman paths and the shape of exponential sums[END_REF] that for τ = 0, there is no geometric isomorphism

[+τ ] * S S ⊗ L,
where L is a rank 1 Q -sheaf on A 1 Fp . Thus, we can apply Proposition 4.2 of [START_REF] Perret-Gentil | Gaussian distribution of short sums of trace functions over finite fields[END_REF] which gives

(2.2) 1 p -1 a∈F × p Bi p (a -j 1 ) b 1 • • • Bi p (a -j m ) bm = m i=1 mult 1 (Std ⊗b i ) + O 2 k k √ p ,
where mult 1 (Std ⊗b ) is the multiplicity of the trivial representation of SU 2 in the b-th tensor power of its standard 2-dimensional representation. Finally, it follows from the representation theory of SU 2 that

mult 1 (Std ⊗b ) = E(Y b ),
for any random-variable Y with Sato-Tate distribution µ ST . Thus, we deduce from (2.2)

that 1 p -1 a∈F × p Bi p (a -j 1 ) b 1 • • • Bi p (a -j m ) bm = E X(j 1 ) b 1 • • • X(j m ) bm + O 2 k k √ p ,
where X(j 1 ), . . . , X(j m ) are independent random variables with Sato-Tate distributions on [-2, 2]. This completes the proof.

Using this result we prove the following proposition, which shows that the moments of sums of Birch sums are very close to those of their corresponding probabilistic model. The moments of this random model will then be investigated in the next section. Proposition 2.2. Let p be a large prime and {c(h)} h∈Z be a sequence of complex numbers. Let 0 ≤ y < z ≤ p/2 be real numbers and k, ≤ (log p)/4 be positive integers. Then, we have

1 p -1 a∈F × p   y≤|h|<z c(h)Bi p (a -h)   k   y≤|h|<z c(h)Bi p (a -h)   = E      y≤|h|<z c(h)X(h)   k   y≤|h|<z c(h)X(h)      + O   p -1/2 4 y≤|h|<z |c(h)| k+   ,
where {X(h)} h∈Z is a sequence of independent random variables with Sato-Tate distributions on [-2, 2].

Proof. It follows from Lemma 2.1 that 1 p -1 a∈F × p   y≤|h|<z c(h)Bi p (a -h)   k   y≤|h|<z c(h)Bi p (a -h)   = y≤|h 1 |,...,|h k |<z y≤|r 1 |,...,|r |<z c(h 1 ) • • • c(h k )c(r 1 ) • • • c(r ) 1 p -1 a∈F × p k u=1 Bi p (a -h u ) v=1 Bi p (a -r v ) = y≤|h 1 |,...,|h k |<z y≤|r 1 |,...,|r |<z c(h 1 ) • • • c(h k )c(r 1 ) • • • c(r ) E k u=1 X(h u ) v=1 X(r v ) + E k, (y, z),
where the error term satisfies

E k, (y, z) 2 k+ (k + ) √ p y≤|h|<z |c(h)| k+ p -1/2 4 y≤|h|<z |c(h)| k+ .
The result follows upon noting that (2.3)

y≤|h 1 |,...,|h k |<z y≤|r 1 |,...,|r |<z c(h 1 ) • • • c(h k )c(r 1 ) • • • c(r ) E k u=1 X(h u ) v=1 X(r v ) = E      y≤|h|<z c(h)X(h)   k   y≤|h|<z c(h)X(h)      .

Estimates for the moments and the Laplace transform of the probabilistic random model

Let {X(h)} h∈Z be a sequence of independent random variables with Sato-Tate distributions on [-2, 2]. We start this section by first proving uniform bounds for the moments of the sum of random variables y≤|h|<z c(h)X(h), where c(h) are complex numbers that satisfy c(h) 1/|h| for |h| ≥ 1. These bounds will be used in the proofs of the lower and upper bounds of Theorem 1.1.

Lemma 3.1. Let {c(h)} h∈Z be a sequence of complex numbers such that |c(h)| ≤ c 0 /|h| for |h| ≥ 1, where c 0 is a positive constant. Let 1 ≤ y < z be real numbers. Then, for all positive integers k we have

(3.1) E    y≤|h|<z c(h)X(h) k    ≤ 8c 2 0 k y k/2 . Moreover, if k > y then (3.2) E    y≤|h|<z c(h)X(h) k    ≤ (15c 0 log k) k .
Proof. We first prove (3.1) when k = 2m is even. By (2.3) we have

(3.3) E   y≤|h|<z c(h)X(h) 2m   ≤ c 2m 0 y≤|h 1 |,...,|h 2m |<z |E (X(h 1 ) • • • X(h 2m ))| |h 1 • • • h 2m | .
Recall that if X is a random variable with Sato-Tate distribution µ ST and is a positive integer then

E(X ) = 1 n+1 2n n if = 2n is even, 0 if is odd.
Hence, we obtain (3.4)

y≤|h 1 |,...,|h 2m |<z |E (X(h 1 ) • • • X(h 2m ))| |h 1 • • • h 2m | = 2m =1 j 1 <•••<j y≤|j 1 |,...,|j |<z n 1 ,...,n ≥1 n 1 +•••+n =2m 2m n 1 , . . . , n |E(X(j 1 ) n 1 )| • • • |E(X(j ) n )| |j n 1 1 • • • j n | ≤ 2m =1 j 1 <•••<j y≤|j 1 |,...,|j |<z r 1 ,...,r ≥1 r 1 +•••+r =m 2m 2r 1 , . . . , 2r 2r 1 r 1 • • • 2r r j 2r 1 1 • • • j 2r ≤ (2m)! m!   y≤|j|<z 1 j 2   m , since 2m 2r 1 , . . . , 2r 2r 1 r 1 • • • 2r r ≤ (2m)! m! m r 1 , . . . , r .
Thus, combining the estimates (3.3) and (3.4), together with the elementary inequalities (2m)!/m! ≤ (2m) m and y≤|j|<z 1/j 2 ≤ 4/y we obtain

(3.5) E   y≤|h|<z c(h)X(h) 2m   ≤ 8c 2 0 m y m .
We now establish (3.1) when k is odd. By the Cauchy-Schwarz inequality and (3.5) we have

E    y≤|h|<z c(h)X(h) k    ≤ E    y≤|h|<z c(h)X(h) 2k-2    1/2 E   y≤|h|<z c(h)X(h) 2   1/2 ≤ 8c 2 0 k y k/2
, as desired. We now prove (3.2). By (3.1) and Minkowski's inequality we have

E    y≤|h|<z c(h)X(h) k    1/k ≤ E    y≤|h|<k c(h)X(h) k    1/k + E    k≤|h|<z c(h)X(h) k    1/k ≤ 2c 0 y≤|h|<k 1 |h| + √ 8c 0 . ≤ 15c 0 log k.
This completes the proof.

Next, we shall compute the Laplace transform of the probabilistic random model corresponding to the imaginary part of the partial Birch sum (1.4) when x = p/2. This will be a key ingredient in the proof of the lower bound of Theorem 1.1. By (1.6) we have

(3.6) 1 √ p Im 0≤n≤p/2 e p (n 3 + an) = |h|<p/2 γ p (h)Bi p (a -h),
where

γ p (h) := 1 √ p Im(γ p (h; p/2)).
We prove Proposition 3.2. Let p be a large prime and 2 ≤ s ≤ (log p) 2 be a real number. Then we have

E   exp   s • |h|<p/2 γ p (h)X(h)     = exp 2 π s log s + B 0 s + O(log s) ,
where

B 0 = 2 π γ + log 2 -log π + 1 2 ∞ 0 f (u) u 2 du .
First, note that γ p (0) = 0, and for |h| ≥ 1 we have

γ p (h) = 1 p Im 0≤m≤p/2
e p (mh) = Im e p (h(p + 1)/2) -1 p (e p (h) -1) .

Therefore, for 1 ≤ |h| < p/2 we obtain

(3.7) |γ p (h)| ≤ 1 p| sin(πh/p)| ≤ 1 2|h|
, since sin(πα) ≥ 2α for 0 ≤ α ≤ 1/2. Furthermore, by (1.7) we have in this case

(3.8) γ p (h) = Im e πih -1 2πih + O 1 p = O( 1 p ) if h is even, 1 πh + O( 1 p ) if h is odd.
To prove Proposition 3.2 we need the following elementary lemma, which follows from Lemma 3.3 of [START_REF] Liu | On a conjecture of Montgomery-Vaughan on extreme values of automorphic L-functions at 1[END_REF]. Lemma 3.3 (Lemma 3.3 of [START_REF] Liu | On a conjecture of Montgomery-Vaughan on extreme values of automorphic L-functions at 1[END_REF]). Let f : [0, ∞) → R be the function defined in (1.9). Then we have the following estimates

f (t) t 2 if 0 ≤ t < 1, log(2t) if t ≥ 1, and
f (t) t if 0 < t < 1, t -1 if t > 1.
Proof of Proposition 3.2. By the independence of the X(h) we have

log E   exp   s • |h|<p/2 γ p (h)X(h)     = |h|<p/2 log E exp (s • γ p (h)X(h)) .
Using the estimate (3.8) and Lemma 3.3 we obtain

|h|<p/2 h even log E exp (s • γ p (h)X(h)) |h|<p/2 h even s 2 p 2
(log p) 4 p .

We now restrict ourselves to the case h = 2k + 1 is odd. First, it follows from (3.7) and Lemma 3.3 that

|k|>s 2 log E exp (s • γ p (2k + 1)X(2k + 1)) |k|>s 2 s 2 k 2 1.
Moreover, when |k| ≤ s 2 we use (3.8) and Lemma 3.3 to get log E exp (s

• γ p (2k + 1)X(2k + 1)) = log E exp s (2k + 1)π X(2k + 1) + O s p .
Combining these estimates, and using Lemma 3.3 we obtain (3.9)

log E   exp   s • |h|<p/2 γ p (h)X(h)     = 4s π 2k+1≤s/π 1 2k + 1 +2 0≤k<s 2 f s (2k + 1)π +O(1)
since X(h) and -X(h) have the same distribution. Next, we observe that

2k+1≤s/π 1 2k + 1 = 1 2 1≤k≤s/2π 1 k +log 2+O 1 s = log s 2 + 1 2 (γ + log 2 -log π)+O 1 s .
Furthermore, by partial summation and Lemma 3.3 we get

0≤k<s 2 f s (2k + 1)π = s 2 0 f s (2u + 1)π du + O(log s).
Finally, making the change of variables v = s/((2u + 1)π), the integral on the right hand side of this estimate becomes

s 2π s/π s/((2s 2 +1)π) f (v) v 2 dv = s 2π ∞ 0 f (v) v 2 dv + O(log s),
by Lemma 3.3. Inserting these estimates in (3.9) completes the proof. for some large constant B. This constant will not be optimal, due to the use of Hölder's and Minkowski's inequalities in several places of the argument. This bound will then imply the bound exp(-C exp(V /(B + ε))) for the distribution function Φ p (V ), which is much weaker than what we obtain in Theorem 1.1. Bi p (a-h)| only when the set S satisfies |S| ≤ p 1/2-ε for some ε > 0. However, our original problem of bounding the moments of (4.3) involves the set S = {x/p : 1 ≤ x ≤ p} which has size p. One can easily reduce this to a set of size p 1/2+ε using the standard Pólya-Vinogradov type inequality (1.12). This was indeed sufficient to treat the distribution of the maximum of character sums in the work of Bober-Goldmakher-Granville-Koukoulopoulos [START_REF] Bober | The frequency and the structure of large character sums[END_REF], but is not enough in our case. The main difference comes from the quality of the orthogonality relations, which are exact in the case of character sums, but contain an error term of size p -1/2 for Birch sums (and other -adic trace functions), coming from the application of Deligne's equidistribution theorem in Lemma 2.1. To overcome this difficulty, we need strong bounds for short exponential sums (similar to (1.10)). For cubic exponential sums, such bounds follow from Weyl's differencing method. Indeed, Lemma 20.3 of [START_REF] Iwaniec | Analytic number theory[END_REF] gives For each a ∈ F × p let j(a) be that integer in [1, p] for which

M p (a) = 1 √ p 0≤n≤j(a)
e p (n 3 + an) .

Then j(a) ∈ I for some 0 ≤ ≤ L -1, and hence we have

M p (a) ≤ 1 π + 4 π 2 log k + 1 2π max α∈S y≤|h|<p/2 e (αh) -1 h Bi p (a -h) + C 0 ,
for some positive constant C 0 . Note that 1/(1/π +4/π 2 )) = π/2-δ. The result trivially holds when V is small, so we might assume that V is sufficiently large and choose

k = [C 1 exp((π/2 -δ)V )],
where

C 1 = exp(-( π 2 -δ)(C 0 + 1 2π )). Then, it follows from Theorem 4.2 that Φ p (V ) ≤ 1 p -1    a ∈ F × p : max α∈S y≤|h|<p/2 e (αh) -1 h Bi p (a -h) ≥ 1    ≤ 1 p -1 a∈F × p max α∈S y≤|h|<p/2 e (αh) -1 h Bi p (a -h) 2k e -2k + (4 log p) 10k p 3/8 exp -C 1 exp π 2 -δ V ,
which completes the proof.

A non-trivial upper bound for G(H): proof of Theorem 4.1

Recall that

G(H) = max α∈[0,1) max (y -H ,...y -1 ,y 1 ,...,y H )∈[-2,2] 2H 1≤|h|≤H e(αh) -1 h y h .
One can easily derive the following "trivial" bounds (5.1)

4 log H + O(1) ≤ G(H) ≤ 8 log H + O(1),
where the lower bound is obtained by taking α = 1/2, and the upper bound follows from the fact that |(e(αh) -1)y h | ≤ 4. It is an interesting problem to obtain an asymptotic formula for G(H) as H → ∞. The purpose of this section is to prove Theorem 4.1, which gives a non-trivial upper bound for G(H). We start with the following lemma.

Lemma 5.1. Let H be a positive integer. Then, we have

G(H) ≤ 4 max α∈[0,1) 1≤h≤H g(2παh) h .
where g is the 2π-periodic non-negative continuous function defined on [0, 2π] by

g(t) :=      sin(t) if 0 ≤ t ≤ π/2, 1 -cos(t) if π/2 < t < 3π/2, -sin(t) if 3π/2 ≤ t ≤ 2π. Proof. Let α ∈ [0,
|f β (x, y)| 2 = (cos(β) -1) 2 (x -y) 2 + sin(β) 2 (x + y) 2 = 2(x 2 + y 2 )(1 -cos(β)) + 4xy cos(β)(1 -cos(β)).
Therefore, if (x, y) ∈ [-2, 2] 2 and cos(β) ≥ 0 then

|f β (x, y)| 2 ≤ 16(1 -cos(β)) + 16 cos(β)(1 -cos(β)) = 16 sin(β) 2 ,
while if cos(β) < 0, then

|f β (x, y)| 2 ≤ 16(1 -cos(β)) -16 cos(β)(1 -cos(β)) = 16(1 -cos(β)) 2 .
Thus, in both case we deduce that |f β (x, y)| ≤ 4g(β) for all (x, y) ∈ [-2, 2]. Inserting this bound in (5.2) completes the proof.

To estimate the sum on the right hand side of Lemma 5.1 we shall use the Fourier series expansion of the function g. Let a n , b n be the Fourier coefficients of g, defined by Since g is even we have b n = 0 for all n ≥ 1, and

a n = 2 π π 0 g(t) cos(nt)dt = 2 π π/2 0 sin(t) cos(nt)dt + 2 π π π/2 cos(nt)dt - 2 π π π/2 cos(t) cos(nt)dt.
When n = 0 we have

a 0 = 2 π π/2 0 sin(t)dt + 1 - 2 π π π/2 cos(t)dt = 1 + 4 π ,
while for n ≥ 1 we have

a n = 1 π π/2 0 sin((n + 1)t) -sin((n -1)t) dt - 2 sin(nπ/2) nπ - 1 π π π/2
cos((n + 1)t) + cos((n -1)t) dt.

Hence, an easy calculation shows that a 1 = -1 π -1 2 and for n ≥ 2 we have (5.3)

a n = 1 -cos((n + 1)π/2) (n + 1)π - 1 -cos((n -1)π/2) (n -1)π - 2 sin(nπ/2) nπ + sin((n + 1)π/2) (n + 1)π + sin((n -1)π/2) (n -1)π =            -4 (n 2 -1)π if n ≡ 0 mod 4, -2 n(n+1)π if n ≡ 1 mod 4, 0 if n ≡ 2 mod 4, -2 n(n-1)π if n ≡ 3 mod 4.
Finally, since a n 1/n 2 for all n ≥ 1 we have n≥1 |a n | < ∞, which implies that uniformly for t ∈ R we have (5.4)

g(t) = a 0 2 + ∞ n=1
a n cos(nt).

For t ∈ R, let ||t|| be the distance from t to the nearest integer. Using the Fourier series expansion (5.4), we shall obtain an asymptotic estimate for the sum h≤H g(2παh)/h, which depends on whether α is close to a rational number of small denominator. Lemma 5.2. Let H be large, and R = log H. Then, for any α ∈ [0, 1) such that rα / ∈ Z for all r ≤ R, we have

(5.5) h≤H g(2παh) h = a 0 2 log H - 1≤r≤R a r log |1 -e(rα)| + O 1 + 1 H 1≤r≤R |a r | ||rα|| ,
where the a r are defined by (5.3). Furthermore, if α = b/ where (b, ) = 1 and ≤ R then

(5.6) h≤H g(2παh) h =   a 0 2 + 1≤m≤R/ a m   log H - 1≤r≤R r a r log |1 -e(rα)| + O(1).
Proof. Since a n 1/n 2 for all n ≥ 1, we deduce from (5.4) that Hence, combining this bound with partial summation we obtain h>H e(rαh) h

g(t) = a 0 2 + 1≤r≤R a r cos(rt) + O 1 R , uniformly for t ∈ R. This gives (5.7) h≤H g(2παh) h = a 0 2 log H + 1≤r≤R a r h≤H cos(2πrαh) h + O (1) . Now if rα / ∈ N,
1 ||rα||H .
Thus, if rα / ∈ N we deduce that (5.8)

h≤H cos(2πrαh) h = Re ∞ h=1 e(rαh) h + O 1 ||rα||H = -log |1 -e(rα)| + O 1 ||rα||H .
Inserting this estimate in (5.7) completes the proof of (5.5). Now, suppose that α = b/ where (b, ) = 1 and ≤ R.

If | r then h≤H cos(2πrαh) h = log H + O(1).
On the other hand if r, then ||rα|| ≥ 1/ ≥ 1/R. Hence, it follows from (5.8) that in this case we have

h≤H cos(2πrαh) h = -log |1 -e(rα)| + O log H H .
The proof of (5.6) follows upon combining these estimates with (5.7).

We are now ready to prove Theorem 4.1.

Proof of Theorem 4.1. By Lemma 5.1 it suffices to prove that for all α ∈ [0, 1) we have (5.9)

h≤H g(2παh) h ≤ a 0 2 log H + O(1).
Let α ∈ [0, 1). By Dirichlet's approximation theorem, there exists (b, r) = 1 with 0 ≤ b ≤ r and 1 ≤ r ≤ H such that

(5.10) α - b r ≤ 1 rH .
Let R = log H. We say that α lies in a "major arc" if such an approximation exists with r ≤ R, and otherwise α is said to lie in a "minor arc". We first prove (5.9) when α lies in a minor arc. In this case we have ||rα|| > 1/H for all 1 ≤ r ≤ R. Thus, it follows from Lemma 5.2 that

h≤H g(2παh) h = a 0 2 log H - 1≤r≤R a r log |1 -e(rα)| + O 1 + 1≤r≤R |a r | .
Moreover, since a r ≤ 0 and |a r | 1/r 2 for all r ≥ 1, and log |1 -e(rα)| ≤ log 2, we deduce that

h≤H g(2παh) h = a 0 2 log H + 1≤r≤R |a r | log |1 -e(rα)| + O(1) ≤ a 0 2 log H + O(1),
which yields the result in this case. We now suppose that α lies in a major arc. In this case there exists a rational number b/r such that (b, r) = 1, 1 ≤ r ≤ R and |α-b/r| ≤ 1/rH. Since g is continuous and has a piecewise continuous derivative, we have |g(2παh) -g(2πbh/r)| h/H. Therefore, appealing to Lemma 5.2 we obtain

h≤H g(2παh) h = h≤H g 2πbh r h + O(1) =   a 0 2 + 1≤m≤R/r a mr   log H - 1≤n≤R r n a n log |1 -e(nb/r)| + O(1).
The inequality (5.9) follows in this case upon noting that a r ≤ 0 and |a r | 1/r 2 for all r ≥ 1, and log |1 -e(nb/r)| ≤ log 2. This completes the proof. Let p be a large prime, and k be a large positive integer such that k ≤ (log p)/(100 log log p). Let y ≤ k 2 be a positive real number. Then, it follows from Minkowski's inequality that

   a∈F × p max α∈S y≤|h|<p/2 e (αh) -1 h Bi p (a -h) 2k    1/2k ≤    a∈F × p max α∈S y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k    1/2k +    a∈F × p max α∈S k 2 ≤|h|<p/2 e (αh) -1 h Bi p (a -h) 2k    1/2k
. Therefore, Theorem 4.2 is an immediate consequence of the following propositions.

Proposition 6.1. Let p be a large prime, and k be a large positive integer such that k ≤ (log p)/(100 log log p). Let S be a non-empty subset of [0, 1), and put y = 10 5 k. In order to prove these results, we shall use the following lemma which follows from combining Proposition 2.2 and Lemma 3.1. Lemma 6.3. Let p be a large prime, and 1 ≤ y < z ≤ p/2 be real numbers. Let {c(h)} h∈Z be a sequence of complex numbers such that |c(h)| ≤ c 0 /|h| for |h| ≥ 1, where c 0 is a positive constant. Then, for all positive integers k ≤ (log p)/(5 log log p) we have

1 p -1 a∈F × p y≤|h|<z c(h)Bi p (a -h) 2k 16c 2 0 k y k + (16c 0 log p) 2k p 1/2 .
Proof. It follows from Proposition 2.2 that

1 p -1 a∈F × p y≤|h|<z c(h)Bi p (a -h) 2k = E    y≤|h|<z c(h)X(h) 2k    + O (16c 0 log p) 2k p 1/2 ,
since |h|<z |c(h)| ≤ 4c 0 log p. Using (3.1) completes the proof.

We start by proving Proposition 6.1, since its proof is simpler due to the fact that the inner sum over |h| is very short.

Proof of Proposition 6.1. Let A k = {b/k 4 : 1 ≤ b ≤ k 4 }. Then for all α ∈ S, there exists

β α ∈ A k such that |α -β α | ≤ 1/k 4 .
In this case we have e(αh) = e(β α h) + O(h/k 4 ), and hence

y≤|h|<k 2 e (αh) -1 h Bi p (a -h) = y≤|h|<k 2 e(β α h) -1 h Bi p (a -h) + O 1 k 2 .
Therefore, using the simple inequality |x + y| 2k ≤ (2 max(|x|, |y|)) 2k ≤ 2 2k (|x| 2k + |y| 2k ) we deduce that (6.1)

max α∈S y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k ≤ 2 2k max α∈A k y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k + c 1 k 2 2k ≤ 2 2k α∈A k y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k + c 1 k 2 2k
, for some positive constant c 1 . Thus, it follows from Lemma 6.3 that in this case we have (6.2)

1 p -1 a∈F × p max α∈S y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k ≤ 2 2k α∈A k 1 p -1 a∈F × p y≤|h|<k 2 e (αh) -1 h Bi p (a -h) 2k + c 1 k 2 2k k 4 2 2k 64k y k + (32 log p) 2k √ p + c 1 k 2 2k e -4k ,
which completes the proof.

Proof of Proposition 6.2. Since the inner sum over h is very long in this case, we shall split it into dyadic intervals. Let J 1 = log(k 2 )/ log 2 and J 2 = log(p/2)/ log 2 . We define z J 1 := k 2 , z J 2 +1 := p/2, and z j := 2 j for J 1 + 1 ≤ j ≤ J 2 . Then, using Hölder's inequality we obtain (6.3)

k 2 ≤|h|<p/2 e (αh) -1 h Bi p (a -h) 2k = J 1 ≤j≤J 2 1 j 2 •   j 2 z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h)   2k ≤ J 1 ≤j≤J 2 1 j 4k/(2k-1) 2k-1    J 1 ≤j≤J 2 j 4k z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k    ≤ c 2 log k 2k+1 J 1 ≤j≤J 2 j 4k z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k ,
for some constant c 2 > 0. Therefore, this reduces the problem to bounding the corresponding moments over each dyadic interval [z j , z j+1 ], namely

1 p -1 a∈F × p max α∈S z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k .
We shall consider two cases, depending on whether j is large in terms of |S|. First, if 4 j ≥ |S| then by Lemma 6.3 we have (6.4)

1 p -1 a∈F × p max α∈S z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k ≤ α∈S 1 p -1 a∈F × p z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k 4 j 64k 2 j k + |S|(32 log p) 2k √ p .
since z j ≥ 2 j for J 1 ≤ j ≤ J 2 . We now suppose that 4 j < |S|, and let B j = {b/4 j : 1 ≤ b ≤ 4 j }. Then for all α ∈ S there exists β α ∈ B j such that |α -β α | ≤ 1/4 j . In this case we have e(αh) = e(β α h) + O(h/4 j ), and hence we obtain

z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) = z j ≤|h|<z j+1 e(β α h) -1 h Bi p (a -h) + O 1 2 j ,
since z j+1 z j 2 j . Therefore, similarly to (6.1) we derive max

α∈S z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k ≤ 2 2k max α∈B j z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k + c 3 2 j 2k ,
for some positive constant c 3 . Thus, appealing to Lemma 6.3 we get (6.5) for some positive constant c 4 , since j 4 ≤ 2 j/4 for j large enough, and 2 J 1 k 2 . This completes the proof.

1 p -1 a∈F × p max α∈S z j ≤|h|<z j+1 e (αh) -1 h Bi p (a -h) 2k ≤ 2 2k α∈B j 1 p -1 a∈F × p z j ≤|h|<z j+1 e (

Proof of the lower bound of Theorem 1.1

In this section we shall investigate the partial Birch sum (1.4) in the special case x = p/2. More precisely, we will prove the following result from which the lower bound of Theorem 1.1 follows.

Theorem 7.1. Let p be a large prime. Uniformly for V in the range 1 ≤ V ≤ 2 π log log p -2 log log log p we have

1 p -1    a ∈ F × p : 1 √ p Im 0≤n≤p/2 e p (n 3 + an) > V    = exp -A 0 exp π 2 V 1 + O √ V e -πV /4 .
Furthermore, the same estimate holds for the proportion of a ∈ F p such that

1 √ p Im 0≤n≤p/2 e p (n 3 + an) < -V , in the same range of V . Recall from (3.6) that 1 √ p Im 0≤n≤p/2 e p (n 3 + an) = |h|<p/2 γ p (h)Bi p (a -h),
where γ p (h) = 1 √ p Im(γ p (h; p/2)). In order to prove Theorem 7.1, we will show that the Laplace transform of the sum |h|<p/2 γ p (h)Bi p (a -h) (after removing a "small" set of "bad" points a) is very close to the Laplace transform of the probabilistic random model |h|<p/2 γ p (h)X(h), which we already estimated in Proposition 3.2. Proposition 7.2. Let p be a large prime. There exists a set E p ⊂ F × p with cardinality |E p | ≤ p 9/10 such that for all complex numbers s with |s| ≤ (log p)/(50 log log p) 2 we have Using the saddle-point method and Propositions 3.2 and 7. The result trivially holds if V is small, so we might assume that V is a sufficiently large real number such that V ≤ 2 π log log p -2 log log log p. We shall choose s (the saddle point) such that Furthermore, since N p (t) is non-increasing as a function of t we can bound the above integral as follows e sV +O(sδ) N p (V + 2δ/π) ≤

1 p -1 a∈F × p \Ep exp   s • |h|<p/2 γ p (h)Bi p (a -h)   = E   exp   s • |h|<p/2 γ p (h)X(h)     + O
V +2δ/π V -2δ/π e st N p (t)dt ≤ e sV +O(sδ) N p (V -2δ/π).

Inserting these bounds in (7.6) and using the definition of s in terms of V , we obtain

N p (V + 2δ/π) ≤ exp - 2 π exp π 2 V - π 2 B 0 -1 1 + O(δ) ≤ N p (V -2δ/π),
and thus

N p (V ) = exp - 2 π exp π 2 V - π 2 B 0 -1 1 + O √ V e -πV /4 .
as desired.

e p n 3

 3 + an , 2010 Mathematics Subject Classification. Primary 11L03, 11T23; Secondary 14F20, 60F10. The author is partially supported by a Discovery Grant from the Natural Sciences and Engineering Research Council of Canada.

e p n 3 √ p 0≤n≤x e p (n 3 +

 33 + an ,for 0 ≤ x ≤ p -1. Let M p (a) = M Bip (a) := max x<p 1 an) .

2 γ

 2 p (h; x)Bi p (a -h), where γ p (h; x) := 1 √ p 0≤m≤x e p (mh) are the Fourier coefficients modulo p of the characteristic function of the interval [0, x].

Theorem 4 .

 4 2 gives a non-trivial bound for the 2k-th moment of the maximum over α ∈ S of the sum | y≤|h|<p/2 e(αh)-1 h

(4. 4 )

 4 n∈I e p (n 3 + an) ε |I| 1/4+ε p 1/4 , for any interval I ⊂[1, p]. We prove the following lemma.

Lemma 4 . 4 .e (αh) - 1 h

 441 Let p be a large prime and L = p 1/8 . There exists a set S ⊂ [0, 1) with |S| = L such that for all a ∈ F × p we haveM p Bi p (a -h) + O(1).Proof. By (4.1), the implicit lower bound is trivial, so it remains to prove the implicit upper bound. We split the interval [1, p] into L intervals I := [x , x +1 ] where x 0 := 1, x L := p, and for 1 ≤ ≤ L -1, we define (4.5)x := p L .

e p (n 3 + 1 1 √ p 0≤n≤x e p (n 3 +2π max α∈S 1≤|h|<p/ 2 e (αh) - 1 h

 31321 an) . Now, we use the bound (4.4) to obtain 1 √ p x ≤n≤j(a) e p (n 3 + an) ε p -1/4 |I | 1/4+ε p -1/50 . Inserting this estimate in (4.6) gives M p (a) ≤ max 0≤ ≤L-an) + O p -1/50 . Finally, choosing S = {x /p : 0 ≤ ≤ L -1} and using (1.6) and (1.7) we deduce M p (a) ≤ 1 Bi p (a -h) + O(1). as desired. With Theorems 4.1 and 4.2 now in place, we are ready to prove the upper bound of Theorem 1.1. Proof of the upper bound of Theorem 1.1. Let S be the set in the statement of Lemma 4.4. Let k ≤ (log p)/(100 log log p) be a large positive integer to be chosen, and put y = 10 5 k. Then, it follows from Lemma 4.4 and Theorem 4.1 that

  sin(nt)dt for n ≥ 1.

  then for any positive integer N we have h≤N e(rαh) = e((N + 1)rα) -1 e(rα) -1 1 ||rα|| .

6 .

 6 Completing the proof of the upper bound in Theorem 1.1: Proof of Theorem 4.2

2r p 9 / 10 . 7 γ 2 γ 2 γγ 2 γ

 9107222 Let N = log p/(20 log log p) . Then we have(p (h)Bi p (a -h) p (h)Bi p (a -h) log p) k ≤ k>N 20|s| log log p N k e -Nby Stirling's formula and our assumption on s. Furthermore, note that |h|<p/2 |γ p (h)Bi p (a -h)| ≤ follows from equation (7.1) and Proposition 2.2 that for all integers 0≤ k ≤ p (h)Bi p (a -h) p (h)Bi p (a -h)   k + O p -1/10 (5 log p) k = E   |h|<p/2 γ p (h)X(h) k   + O p -1/25 .Moreover, it follows from equation (3.7), Lemma 3.1 and Stirling's formula that k>N p (h)Bi p (a -h) e -N + p -1/20 e |s|

2 V - π 2 B 0 - 1 .

 221 s + B 0 s -sV = 0 ⇐⇒ s = exp π Let 0 < δ < 1 be a small parameter to be chosen, and put S = se δ . Then, it follows from (7.4) that∞ V +2δ/π e st N p (t)dt ≤ exp s(1 -e δ )(V + 2δ/π) ∞ V +2δ/π e St N p (t)dt ≤ exp s(1 -e δ )(V + 2δ/π) + 2 π se δ log s + 2 π se δ δ + B 0 se δ + O(log s) = exp 2 π s log s + B 0 s + 2 π s(1 + δ -e δ ) + O(log s) .Therefore, choosing δ = C 0 (log s)/s for a suitably large constant C 0 and using (7.4) we obtain∞ V +2δ/π e st N p (t)dt ≤ e -V ∞ -∞ e st N p (t)dt.A similar argument shows thatV -2δ/π -∞ e st N p (t)dt ≤ e -V ∞ -∞ e st N p (t)dt.Combining these bounds with (7.4) gives (7.6)V +2δ/π V -2δ/πe st N p (t)dt = exp 2 π s log s + B 0 s + O(log s) .

4 .

 4 Proof of the upper bound in Theorem 1.1: Strategy and keyBi p (a -h) . However, it turns out that a more efficient method is to truncate this sum at a parameter 1 ≤ H < p/2, and treat the terms Bi p (a -h) for 1 ≤ |h| ≤ H as random points in [-2, 2] (see Remark 4.3 below).Remark 4.3. If we proceed to directly bound the moments of M p (a) using the techniques of the proof of Theorem 4.2 (without truncating the sum at H and appealing to Theorem 4.1), we will obtain that the 2k-th moment of M p (a) is bounded by (B log k) 2k

								ingredients
	First, combining equations (1.6) and (1.7) we obtain
	(4.1)		M p (a) =	1 2π	max 1≤x≤p	1≤|h|<p/2	e p (xh) -1 h	Bi p (a -h) + O(1).
	In order to bound the distribution function of M p (a), a standard approach is to bound
	the moments of max 1≤x≤p	1≤|h|<p/2	ep(xh)-1 h
		This gives
	(4.2)	M p (a) ≤	G(H) 2π	+	1 2π	max 1≤x≤p	H<|h|<p/2
	It remains now to bound the moments of the "tail"
	(4.3)					max 1≤x≤p	H<|h|<p/2	e p (xh) -1 h	Bi p (a -h) .
	Using results from Sections 2 and 3, we shall establish the following theorem in Section
	6.
	Theorem 4.2. Let p be a large prime, and k be a large positive integer such that k ≤ (log p)/(100 log log p). Let S be a non-empty subset of [0, 1) such that |S| ≤ √ p,
	and put y = 10 5 k. Then we have
		1 p -1	a∈F × p	max α∈S	y≤|h|<p/2

e p (xh) -1 h Bi p (a -h) + O(1),

where

G(H) := max α∈[0,1) max (y -H ,...y -1 ,y 1 ,...,y H )∈[-2,2] 2H 1≤|h|≤H e(αh) -1 h y h .

In Section 5, we will investigate the quantity G(H) and obtain a non-trivial upper bound for it. More precisely, we shall prove Theorem 4.1. Let H be a positive integer. Then, we have G(H) ≤ 2 + 8 π log H + O(1). e (αh) -1 h Bi p (a -h) 2k e -2k + |S|(4 log p) 10k √ p .

  1) and (y -H , . . . y -1 , y 1 , . . . , y H ) ∈ [-2, 2] 2H . Then, we have

	(5.2)	1≤|h|≤H	e(αh) -1 h	y h =	1≤h≤H	e(αh) -1 h	y h +	1 -e(-αh) h	y -h
				≤

1≤h≤H |f 2παh (y h , y -h )| h , where f β (x, y) = (e iβ -1)x + (1 -e -iβ )y, for β ∈ R and (x, y) ∈ [-2, 2] 2 . Morover, we note that

  Proposition 6.2. Let p be a large prime, and k be a large positive integer such that k ≤ (log p)/(100 log log p). Let S be a non-empty subset of [0, 1) such that |S| ≤ √ p.

	Then we have
										2k
	1 p -1	a∈F × p	max α∈S	k 2 ≤|h|<p/2	e (αh) -1 h	Bi p (a -h)	e -4k +	|S|(4 log p) 8k √ p	.
	Then we have
										2k
		1 p -1	a∈F × p	max α∈S	y≤|h|<k 2	e (αh) -1 h	Bi p (a -h)	e -4k .

  2, we prove Theorem 7.1. Let E p be the set in the statement of Proposition 7.2, and N p (t) be the proportion of a ∈ F × p \ E p such that |h|<p/2 γ p (h)Bi p (a -h) > t. Then, it follows from (3.6) that N p (t) = N p (t) + O p -1/10 . Furthermore, it follows from Propositions 7.2 and 3.2 that for all positive real numbers s such that 2 ≤ s ≤ (log p)/(50 log log p) 2 we have

		∞ -∞	e st N p (t)dt =	1 p -1	a∈F × p \Ep	-∞ |h|<p/2 γp(h)Bip(a-h)	e st dt
										
	(7.4)			=	1 s(p -1)	a∈F × p \Ep	exp	 s •	|h|<p/2	γ p (h)Bi p (a -h) 
				= exp	2 π	s log s + B
	Proof Theorem 7.1. For a real number t, we define
					
	(7.3)	N p (t) :=	1 p -1	  a ∈ F × p :	1 √ p	Im	0≤n≤p/2

e p (n 3 + an) > t    . 0 s + O(log s) .


Alexander Dahl
email: aodahl@mathstat.yorku.ca

Youness Lamzouri
email: lamzouri@mathstat.yorku.ca

THE DISTRIBUTION OF CLASS NUMBERS IN A SPECIAL FAMILY OF REAL QUADRATIC FIELDS

We investigate the distribution of class numbers in the family of real quadratic fields Q( √ d) corresponding to fundamental discriminants of the form d = 4m 2 + 1, which we refer to as Chowla's family. Our results show a strong similarity between the distribution of class numbers in this family and that of class numbers of imaginary quadratic fields. As an application of our results, we prove that the average order of the number of quadratic fields in Chowla's family with class number h is (log h)/2G, where G is Catalan's constant. With minor modifications, one can obtain similar results for Yokoi's family of real quadratic fields Q( √ d), which correspond to fundamental discriminants of the form d = m 2 + 4.

Introduction

A fundamental problem in number theory is to understand the size of the class group of an algebraic number field K. This quantity, called the class number of K, is a measure of how badly factorization in the ring of integers of K fails to be unique. The case of quadratic fields had received great attention, and its rich history stretches back to the work of Gauss. Let d be a fundamental discriminant and h(d) be the class number of the quadratic field Q( √ d). Gauss conjectured that h(d) → ∞ as d → -∞, and asked for the determination of all imaginary quadratic fields with a given class number h, a question that became known as the Gauss class number problem. The former conjecture of Gauss was proved by Heilbronn, and his class number problem for h = 1 was solved by Heegner, Baker, and Stark. We now have a complete list of all imaginary quadratic fields with class number h for all h ≤ 100 thanks to the work of Watkins [START_REF] Watkins | Class numbers of imaginary quadratic fields[END_REF].

Unlike imaginary quadratic fields, very little is known about real quadratic fields. In this case, Gauss conjectured that there are infinitely many real quadratic fields with class number 1, a problem that is still open. The main difference with imaginary quadratic fields is the existence of non-trivial units in Q( √ d) if d > 0, which heavily affect the size of the class number h(d) in this case. Indeed, Dirichlet's class number formula states that for d > 0 we have Although it is a difficult problem to estimate the fundamental unit ε d in general, there exist several families of real quadratic fields for which ε d is small in terms of d, and hence for which h(d) is large. One important example is the family of real quadratic fields Q( √ d) corresponding to fundamental discriminants d the form 4m 2 + 1, where m is a positive integer. This family was first studied by Chowla, who conjectured that for any positive integer m > 13 such that 4m 2 + 1 is squarefree, we have h(4m 2 + 1) > 1 (see [START_REF] Chowla | Class numbers and quadratic residues[END_REF]). Another example is the family of fields Q( √ d) corresponding to fundamental discriminants d of the form m 2 +4, which was studied by Yokoi in [START_REF] Yokoi | Class number one problem for certain kind of real quadratic fields[END_REF]. In particular, he conjectured that h(m 2 + 4) > 1 for all m > 17. Both Chowla's and Yokoi's conjectures were settled by Biró in [START_REF] Biró | Yokoi's conjecture[END_REF] and [START_REF] Biró | Chowla's conjecture[END_REF]. There are further generalizations of Chowla's and Yokoi's families, commonly known as real quadratic fields of Richaud-Degert type. The class number problem for these fields was studied by several authors, notably by Mollin and Williams [START_REF] Mollin | An overview of the solution to the class number one problem for real quadratic fields of Richaud-Degert type[END_REF], [START_REF] Mollin | Solution of the class number one problem for real quadratic fields of extended Richaud-Degert type (with one possible exception). Number theory[END_REF].

Here and throughout we denote by D ch Chowla's family of fundamental discriminants, defined by for any d ∈ D ch , where γ is the Euler-Mascheroni constant. These bounds follow from the corresponding bounds for L(1, χ d ) obtained by Littlewood [START_REF] Littlewood | On the class number of the corpus P ( √ -k)[END_REF] under GRH. Note that the upper bound in (1.4) holds for all real quadratic fields, since ε d ≥ √ d/2 for all positive fundamental discriminants.

Chowla's family D ch was used by Montgomery and Weinberger [START_REF] Montgomery | Real quadratic fields with large class number[END_REF] to produce real quadratic fields with extremely large class numbers. More precisely, they proved that there are at least

x 3/8 discriminants d ∈ D ch (x) such that h(d) √ d log d log log d.
This result was recently refined by Lamzouri [START_REF] Lamzouri | Extreme Values of Class Numbers of Real Quadratic Fields[END_REF], who showed that there are at least

x 1/2-1/ log log x discriminants d ∈ D ch (x) such that (1.5) h(d) ≥ (2e γ + o(1)) √ d log d log log d.
The lower bound (1. (1.4). One can refer to [START_REF] Granville | The distribution of values of L(1, χ d )[END_REF] for a discussion and results related to these conjectures.

In this paper, we shall investigate the distribution of h(d) over fundamental discriminants d in Chowla's family. With minor modifications, one can obtain similar results for Yokoi's family of real quadratic fields. Here and throughout we let log j be the j-fold iterated logarithm; that is, log 2 = log log, log 3 = log log log and so on. Our main result shows that the tail of the distribution of large (and small) values of h(d) over d ∈ D ch is double exponentially decreasing. In particular, it implies (1.5).

Theorem 1.1. Let x be large, and

1 ≤ τ ≤ log 2 x -3 log 3 x. The number of discrimi- nants d ∈ D ch (x) such that h(d) ≥ 2e γ √ d log d • τ, equals (1.6) |D ch (x)| • exp - e τ -C 0 τ 1 + O 1 τ ,
where

(1.7) C 0 := 1 0 tanh(t) t dt + ∞ 1 tanh(t) -1 t dt = 0.8187 • • • .
Moreover, the same estimate holds for the number of discriminants d ∈ D ch (x) such that

h(d) ≤ 2e -γ ζ(2) √ d log d • 1 τ ,
in the same range of τ .

In view of the class number formula (1.3), the distribution of h(d) is completely determined by that of L(1, χ d ) over d ∈ D ch . Our strategy is to compare the distribution of

L(1, χ d ) over d ∈ D ch to that of a random Euler product L(1, X) = p (1 -X(p)/p) -1 ,
where the X(p)'s are independent random variables taking the values 0, ±1 with suitable probabilities that are described below. One can think of the random variable X(p) as a model for the value of χ d (p) as d varies in D ch .

One should compare our results with those of Granville and Soundararajan [START_REF] Granville | The distribution of values of L(1, χ d )[END_REF] concerning the distribution of values of L(1, χ d ) over all fundamental discriminants d such that |d| ≤ x (their results also hold if one restricts attention to either positive or negative discriminants). Although the probabilistic random model for this family is different from that of Chowla's family (for arithmetic reasons that are explained below), the tail of the distribution of these values satisfy a similar estimate to (1.6). In particular, one can deduce from their results that the proportion of imaginary quadratic fields

Q( √ -d) with d ≤ x such that h(-d) ≥ √ d π e γ τ (or h(-d) ≤ ζ(2) √ d π (e γ τ ) -1 ) equals exp -e τ -C 0 τ 1 + O 1 τ
, in asymptotically the same range for τ . This shows a strong similarity between the distribution of class numbers in Chowla's family and that of class numbers of imaginary quadratic fields.

Let {X(p)} p be a sequence of independent random variables taking the value 1 with probability α p , -1 with probability β p , and 0 with probability γ p , where α 2 = β 2 = 1/2, γ 2 = 0, and for odd p we have

(1.8) α p = 1 2 1 - c(p) + 1 p 1 - c(p) p 2 -1
, (1.9)

β p = 1 2 1 - c(p) -1 p 1 - c(p) p 2 -1
, and

γ p = pc(p) -c(p) p 2 -c(p) = 1 -1 - c(p) p 1 - c(p) p 2 -1
.

The argument for choosing these probabilities is as follows: Let p be an odd prime. If d = 4m 2 + 1 is squarefree then d lies in one of p 2 -c(p) residue classes modulo p 2 , since p 2 4m 2 + 1. Among these, χ d (p) = 0 for exactly pc(p) -c(p) of them, which justifies the choice of γ p . Furthermore, since d belongs to one of p 2 -c(p) residue classes modulo p 2 , then we must have (1.10)

α p -β p = E(X(p)) = p 2 -c(p) p 2 -1 1 p p-1 m=0 4m 2 + 1 p = - 1 p 1 - c(p) p 2 -1
which follows from the Jacobsthal sum identity p-1 m=0 4m 2 +1 p = -1 (see for example [START_REF] Storer | Cyclotomy and difference sets[END_REF]). Combining (1.10) with the fact that α p + β p = 1 -γ p yield (1.8) and (1.9). For the prime 2, note that 4m 2 + 1 lies in one of the residue classes 1, 5 (mod 8), and the values ±1 occur equally often.

We extend the X(p)'s multiplicatively to all positive integers by setting X(1) = 1 and X(n

) := X(p 1 ) a 1 • • • X(p k ) a k if n = p a 1 1 • • • p a k k . We now define L(1, X) := ∞ n=1 X(n) n = p 1 - X(p) p -1
, where both the series and the product are almost surely convergent by Lemma 2.2 below together with Kolmogorov's three-series Theorem. For τ > 0, define Φ X (τ ) := P L(1, X) > e γ τ and Ψ X (τ ) :

= P L(1, X) < ζ(2) e γ τ .
We prove that the distribution of L(1, χ d ) over d ∈ D ch is very well approximated by that of L(1, X) uniformly in almost all of the viable range.

Theorem 1.2. Let x be large. Uniformly in the range 1 ≤ τ ≤ log 2 x -2 log 3 x -log 4 x, we have

1 |D ch (x)| {d ∈ D ch (x) : L(1, χ d ) > e γ τ } = Φ X (τ ) 1 + O e τ (log 2 x) 2 log 3 x log x , and
1 |D ch (x)| d ∈ D ch (x) : L(1, χ d ) < ζ(2) e γ τ = Ψ X (τ ) 1 + O e τ (log 2 x) 2 log 3 x log x .
In order to deduce Theorem 1.1, we need to study the asymptotic behaviour of the distribution functions Φ X (τ ) and Ψ X (τ ) in terms of τ when τ is large. We accomplish this by a careful saddle point analysis.

Theorem 1.3. For large τ we have

(1.11) Φ X (τ ) = exp - e τ -C 0 τ 1 + O 1 τ ,
where C 0 is defined in (1.7). The same estimate also holds for Ψ X (τ ). Moreover, if 0 ≤ λ ≤ e -τ , then we have

(1.12) Φ X e -λ τ = Φ X (τ ) 1 + O (λe τ ) , and Ψ X e -λ τ = Ψ X (τ ) 1 + O (λe τ ) .
Our proof of Theorem 1.2 relies on computing complex moments of L(1, χ d ) over d ∈ D ch . To this end, we show that the average of L(1, χ d ) z over Chowla's family is asymptotically equal to the corresponding moments of the probabilistic random model L(1, X) uniformly in a wide range of the complex variable z.

Theorem 1.4. Let x be large. There exists a positive constant B such that uniformly for all complex numbers z with |z| ≤ B log x/(log 2 x log 3 x) we have

1 |D ch (x)| d∈D ch (x) L(1, χ d ) z = E (L(1, X) z ) + O exp - log x 20 log 2 x ,
where indicates that the sum is over non-exceptional discriminants d. As an application of our results, we investigate the number of discriminants in the family D ch with class number h, which we denote by F ch (h). The number of imaginary quadratic fields with class number h was studied by Soundararajan in [START_REF] Soundararajan | The number of imaginary quadratic fields with a given class number[END_REF]. In particular, he developed an asymptotic formula for its average value, a result whose error term was improved upon in [START_REF] Lamzouri | On the average of the number of imaginary quadratic fields with a given class number[END_REF]. A variant of Soundararajan's asymptotic formula (over odd h) was recently used by Holmin, Jones, Kurlberg, McLeman and Petersen [START_REF] Holmin | Missing class groups and class number statistics for imaginary quadratic fields[END_REF] to investigate statistics of class numbers of imaginary quadratic fields.

By the class number formula (1.3), one expects that the main contribution to the average of

F ch (h) over h ≤ H comes from discriminants d of size H 2 (log H) 2 , since L(1, χ d ) is constant on average (by Theorem 1.

4). Since there are

H log H such discriminants in D ch , this heuristic argument suggests that the average size of F ch (h) should be around log h. We prove that this is indeed the case.

Theorem 1.6. As H → ∞, we have h≤H F ch (h) = 1 2G H log H + O H(log 2 H) 2 log 3 H , where G = L(2, χ -4 ) = 1 - 1 3 2 + 1 5 2 - 1 7 2 + 1 9 2 + • • • = 0.916...
is Catalan's constant, and χ -4 is the non-principal character modulo 4.

This paper is organized as follows: In Section 2 we establish an asymptotic formula for the average value of χ d (m) over d in D ch (x). In particular, we show that in a certain range of m in terms of x, the average order of χ d (m) equals E(X(m)). This is used to compute complex moments of L(1, χ d ) over d ∈ D ch (x) and prove Theorem 1.4 in Section 3. In Section 4 we use the saddle-point method to study the distribution of the random Euler product L(1, X) and prove Theorem 1.3. These results are then used to prove Theorems 1.1 and 1.2 in Section 5. Finally, we apply our results to study F ch (h) and prove Theorem 1.6 in Section 6.

An asymptotic formula for the character sum d∈D

ch (x) χ d (m)
In order to prove that the moments of L(1, χ d ) over d ∈ D ch (x) are nearly equal to the corresponding moments of L(1, X), we first need to show that the average order of χ d (m) equals E(X(m)) when m is small compared to x. Proposition 2.1. Let m be a positive integer. Then we have

1 |D ch (x)| d∈D ch (x) χ d (m) = E(X(m)) + O m 2/3 x -1/6 log x .
To prove this result, we first need the following lemmas. Here and throughout we let ω(n) be the number of distinct prime factors of n.

Lemma 2.2. Let m = 2 p a 1 1 • • • p a k
k be the prime factorization of m, and let m 0 be the squarefree part of

p a 1 1 • • • p a k k . Then we have E(X(m)) =          1 m 0 (-1) ω(m 0 ) 1≤j≤k 2|a j 1 - c(p j ) p j k j=1 1 - c(p j ) p 2 j -1 if is even, 0 if is odd.
Proof. Using the independence of the X(p)'s we obtain

(2.1) E(X(m)) = E X(2) k j=1 E (X(p j ) a j ) .
First, if a j is even then

E (X(p j ) a j ) = α p j + β p j = 1 -γ p j = 1 - c(p j ) p j 1 - c(p j ) p 2 j -1
.

On the other hand, if a j is odd then

E (X(p j ) a j ) = α p j -β p j = - 1 p j 1 - c(p j ) p 2 j -1
.

Finally, note that E X(2) equals 1 is is even, and 0 otherwise. Inserting these estimates in (2.1) completes the proof.

Lemma 2.3. Let m = 2 p a 1 1 • • • p a k
k be the prime factorization of m, and let m 0 be the squarefree part of p a

1 1 • • • p a k k . Then we have 1 m m n=1 4n 2 + 1 m =        1 m 0 (-1) ω(m 0 ) 1≤j≤k 2|a j 1 - c(p j ) p j if is even, 0 if is odd. Proof. Let g(n) = 4n 2 +1.
Observe that the sum m n=1 (g(n)/m) is a complete character sum, and hence by multiplicativity and the Chinese remainder theorem, we have

m n=1 g(n) m = 2 n 0 =1 g(n 0 ) 2 k j=1    p a j j n j =1 g(n j ) p j a j    .
If a j is even then

p a j j n j =1 g(n j ) p j a j = p a j -1 j (p j -c(p j )) = p a j 1 - c(p j ) p j ,
since there are exactly c(p j )p a j -1 j

integers n j such that 1 ≤ n j ≤ p a j j and g(n j ) ≡ 0 (mod p j ). On the other hand, if a j = 2b j + 1 is odd then

p a j j n j =1 g(n j ) p j a j = p a j -1 j n j =1 p j c=1 g(n j p j + c) p j 2b j +1 = p a j -1 j p j c=1 g(c) p j = -p a j -1 j , since p-1 m=0 4m 2 +1 p = -1. Finally, note that g(b 0 ) 2 = 4b 2 0 +1 2 equals 1 if b 0 is even, and -1 otherwise. Hence, it follows that 2 b 0 =1 g(b 0 ) 2 = 2 , even, 0, odd.
Combining the above estimates completes the proof.

Proof of of Proposition 2.1. To simplify our notation, we define S(x) = d∈D ch (x) χ d (m), and put y = √ x -1/2. Then, using that µ 2 (n) = r 2 |n µ(r) we obtain

S(x) = n≤y 4n 2 + 1 m µ 2 (4n 2 + 1) = n≤y 4n 2 + 1 m r 2 |4n 2 +1 µ(r) = r≤ √ x (r,2m)=1 µ(r) n≤y r 2 |4n 2 +1 4n 2 + 1 m .
Let 2 ≤ T ≤ y be a real parameter to be chosen later. We split the above sum over r into two parts r ≤ T and T < r ≤ √ x. Writing 4n 2 + 1 = r 2 s, it follows that the contribution of the second part is

T <r≤ √ x n≤y r 2 |4n 2 +1 1 s≤x/T 2 n,r (2n) 2 -sr 2 =-1 1.
From the theory of Pell's equation, the number of pairs (u, v) for which 1 ≤ u ≤ U and u 2 -sv 2 = -1, is log U uniformly in s. Hence, we deduce that the contribution of

the terms T ≤ r ≤ √ x to S(x) is x(log x)/T 2 . Thus, (2.2) S(x) = r≤T (r,2m)=1 µ(r) n≤y r 2 |4n 2 +1 4n 2 + 1 m + O x log x T 2 .
Let r ≤ T such that (r, 2m) = 1, and consider the equation 4n 2 + 1 ≡ 0 (mod r 2 ). This congruence has c(r 2 ) = c(r) solutions modulo r 2 where c(r) = p|r c(p). Denote these solutions by {a 1 , ..., a c(r) }. Then, for any integer k we have

kr 2 m<n≤(k+1)r 2 m r 2 |4n 2 +1 4n 2 + 1 m = c(r) i=1 kr 2 m<n≤(k+1)r 2 m n≡a i mod r 2 4n 2 + 1 m = c(r) i=1 m u=1 4u 2 + 1 m kr 2 m<n≤(k+1)r 2 m n≡a i mod r 2 n≡u mod m 1 = c(r) m u=1 4u 2 + 1 m ,
by the Chinese remainder theorem, since (r, m) = 1. Therefore, we deduce that

n≤y r 2 |4n 2 +1 4n 2 + 1 m = y c(r) r 2 1 m m u=1 4u 2 + 1 m + O c(r)m = y c(r) r 2 E(X(m)) p|m p>2 1 - c(p) p 2 + O c(r)m ,
S(x) = y • E(X(m)) p|m p>2 1 - c(p) p 2 r≤T (r,2m)=1 µ(r) c(r) r 2 + O m r≤T c(r) + x log x T 2 .
Since c(r) ≤ 2 ω(r) ≤ d(r) (where d(r) is the divisor function), we get r≤T c(r) T log T and

r>T (r,2m)=1 µ(r) r 2 c(r) r>T d(r) r 2 log T T ,
by using that r≤t d(r) ∼ t log t, together with partial summation. Thus, we deduce

S(x) = y • E(X(m)) p|m p>2 1 - c(p) p 2 r≥1 (r,2m)=1 µ(r) c(r) r 2 + O mT log T + √ x log T T + x log x T 2 = y • E(X(m)) p>2 1 - c(p) p 2 + O mT log T + √ x log T T + x log x T 2 .
Choosing T = x/m 1/3 and using (1.2) completes the proof.

3. Complex moments of L(1, χ d ) over d ∈ D ch (x): Proof of Theorem 1.4
For any z ∈ C, we have In order to prove Theorem 1.4, we first need some preliminary results. We define a discriminant d to be exceptional if there exists a complex number s such that L(s, χ d ) = 0 and

L(1, X) z = ∞ n=1 d z (n) n X(n)
(3.2) Re(s) ≥ 1 - c log(|d|(Im(s) + 2))
for some sufficiently small constant c > 0. One expects that there are no such discriminants, but what is known unconditionally is that these discriminants, if they exist, must be very rare. Indeed, it is shown in Chapter 14 of [START_REF] Davenport | Multiplicative number theory[END_REF] that between any two powers of 2 there is at most one exceptional discriminant d. In particular, it follows that there are at most O(log x) such discriminants up to x.

If χ is a non-principal and non-exceptional Dirichlet character modulo q, then we have the following standard bound for log L(1 + it, χ) (see for example Lemma 2.2 of [START_REF] Lamzouri | Extreme values of arg L(1, χ)[END_REF])

(3.3) log L(1 + it, χ) log 2 q(|t| + 2) .
We can obtain a much better bound for log L(s, χ), with s close to 1, if L(s, χ) has no zeros in a certain rectangle containing s.

Lemma 3.1. Let q be large and put η = 1/ log 2 q. Let 0 < < 1/2 be fixed. Assume that L(z, χ) has no zeros in the rectangle {z : 1 -≤ Re(z) ≤ 1 and |Im(z)| ≤ 2(log q) 2/ }. Then for any s = σ + it with 1 -η ≤ σ ≤ 1 and |t| ≤ log 4 q we have

| log L(s, χ)| ≤ log 3 q + O (1).
To prove this result we need the following lemma from [START_REF] Granville | Large character sums[END_REF].

Lemma 3.2 (Lemma 8.2 of [START_REF] Granville | Large character sums[END_REF]). Let s = σ + it with σ > 1/2 and |t| ≤ 2q. Let y ≥ 2 be a real number, and let 1/2 ≤ σ 0 < σ. Suppose that the rectangle {z :

σ 0 < Re(z) ≤ 1, |Im(z) -t| ≤ y + 3} contains no zeros of L(z, χ). Put σ 1 = min( σ+σ 0 2 , σ 0 + 1 log y ). Then log L(s, χ) = y n=2 Λ(n)χ(n) n s log n + O log q (σ 1 -σ 0 ) 2 y σ 1 -σ .
Proof of Lemma 3.1. We use Lemma 3.2 with 1 -η ≤ σ ≤ 1, σ 0 = 1 -and y = (log q) 2/ . Therefore, if L(z, χ) has no zeros in the rectangle {z : 1 -≤ Re(z) ≤ 1 and |Im(z)| ≤ 2(log q) 2/ }, we get

| log L(s, χ)| = p≤(log q) 2/ χ(p) p s +O(1) ≤ p≤(log q) 2/ 1 + O(η log p) p +O(1) ≤ log 3 q+O (1).
Using Lemma 3.1 we obtain the following approximation to L(1, χ) z , if L(z, χ) has no zeros in a small region to the left of the line Re(s) = 1. Proposition 3.3. Let q be large and 0 < < 1/2 be fixed. Let y be a real number such that log q/ log 2 q ≤ log y ≤ log q. Furthermore, assume that L(s, χ) has no zeros inside the rectangle {s : 1 -< Re(s) ≤ 1 and |Im(s)| ≤ 2(log q) 2/ }. Then for any complex number z such that |z| ≤ log y/(4 log 2 q log 3 q) we have

L(1, χ) z = ∞ n=1 d z (n)χ(n) n e -n/y + O exp - log y 2 log 2 q . Proof. Since 1 2πi 2+i∞ 2-i∞ y s Γ(s)ds = e -1/y then 1 2πi 2+i∞ 2-i∞ L(1 + s, χ) z Γ(s)y s ds = ∞ n=1 d z (n)χ(n) n e -n/y .
we shift the contour to C, where C is the path which joins -i∞, -i(log q) 4 , -η -i(log q) 4 , -η + i(log q) 4 , -i(log q) 4 , +i∞, where η = 1/ log 2 q. We encounter a simple pole at s = 0 which leaves the residue L(1, χ) z . Using the bound (3.3) together with Stirling's formula we obtain 1 2πi

-i(log q) 4 -i∞

+ +i∞ i(log q) 4 L(1 + s, χ) z Γ(s)y s ds ∞ (log q) 4
e O(|z| log 2 qt) e -π 3 t dt 1 q .

Finally, using that Γ(s) has a simple pole at s = 0 together with Lemma 3.1 and Stirling's formula, we deduce that

1 2πi -η-i(log q) 4 -i(log q) 4 + -η+i(log q) 4 -η-i(log q) 4 + i(log q) 4 -η+i(log q) 4 L(1 + s, χ) z Γ(s)y s ds exp - π 3 (log q) 4 + O(|z| log 3 q) + y -η η exp |z| log 3 q + O (|z|) (log q) 4
exp -log y 2 log 2 q .

We are now ready to prove Theorem 1.4.

Proof of Theorem 1.4. Let D ch (x) be the set of fundamental discriminants d ∈ D ch (x) such that d > √

x and L(s, χ d ) has no zeros in the rectangle {s : 9/10 < Re(s) ≤ 1 and |Im(s)| ≤ 2(log x) 20 }. To bound |D ch (x) \ D ch (x)| we use the following zerodensity result of Heath-Brown [START_REF] Heath-Brown | A mean value estimate for real character sums[END_REF], which states that for 1/2 < σ < 1 and any > 0 we have

|d|≤x N (σ, T, χ d ) (xT ) x 3(1-σ)/(2-σ) T (3-2σ)/(2-σ) ,
where N (σ, T, χ d ) is the number of zeros ρ of L(s, χ d ) with Re(ρ) ≥ σ and |Im(ρ)| ≤ T , and indicates that the sum is over fundamental discriminants. Then, it follows from this bound that

|D ch (x)| -| D ch (x)| x 1/3 .
Using this estimate together with the bound (3.3) we obtain (3.4)

d∈D ch (x) L(1, χ d ) z - d∈ D ch (x) L(1, χ d ) z x 1/3 exp O(|z| log 2 x) x 3/8 .
Let y = x 1/6 , and put k = |z| . Then, it follows from Proposition 3.3 that (3.5)

d∈ D ch (x) L(1, χ d ) z = d∈ D ch (x) ∞ m=1 d z (m)χ d (m)e -m/y m +O |D ch (x)| exp - log x 20 log log x .
We now extend the main term of the last estimate, so as to include all fundamental discriminants d ∈ D ch (x). Using (3.1), we deduce that

d∈D ch (x)\ D ch (x) ∞ m=1 d z (m)χ d (m)e -m/y m (|D ch (x)| -| D ch (x)|) ∞ m=1 d k (m) m e -m/y x 3/8 .
Combining this estimate with (3.4) and (3.5) gives

d∈D ch (x) L(1, χ d ) z = ∞ m=1 d z (m) m e -m/y d∈D ch (x) χ d (m) + O x 1/2 exp - log x 20 log log x .
Now, it follows from Proposition 2.1 that

(3.6) 1 |D ch (x)| ∞ m=1 d z (m) m e -m/y d∈D ch (x) χ d (m) = ∞ m=1 d z (m)E(X(m)) m e -m/y + O x -1/6 log x ∞ m=1 d k (m) m 1/3 e -m/y .
To bound the error term in the last estimate, we split the sum into two parts: m ≤ y log 2 y and m > y log 2 y. The contribution of the first part is

≤ m≤y log 2 y y log 2 y m 2/3 d k (m) m 1/3 e -m/y ≤ (y log 2 y) 2/3 ∞ m=1 d k (m) m e -m/y y 2/3 (log 3y) k+4/3 ,

by (3.1). The remaining terms contribute

≤ exp - (log y) 2 2 ∞ m=1 d k (m) m 1/3 e -m/(2y) ≤ exp - (log y) 2 2 e 1/(2y) ∞ a=1 e -a/(2y) a 1/3 k exp - (log y) 2 2 y k exp - (log y) 2 4 ,
using an argument similar to (3.1). Therefore, we deduce that the error term in (3.6) is x -1/6 y 2/3 (log x) k+2

x -1/20 . We now wish to remove the e -n/y factor from the main term of (3.6), and in so doing we introduce an error of

(3.7) ∞ m=1 d z (m)E(X(m))(1 -e -m/y ) m .
We shall use the bound 1 -e -t t α which is valid for all t > 0 and 0 < α ≤ 1. Also, by Lemma 2.2 we have |E(X(m))| m -1 0 , where m 0 is the squarefree part of m. Choosing α = 1/ log 2 x, and writing m = m 0 m 2 1 we deduce that this sum is

y -α ∞ m=1 d k (m) m 0 m 1-α ≤ y -α ∞ m 0 =1 d k (m 0 ) m 2-α 0 ∞ m 1 =1 d 2 k (m 1 ) m 2-2α 1 = y -α ζ(2 -α) k ∞ n=1 d 2 k (n) n 2-2α .
Finally, we use the following bound, which follows from Lemma 3.

3 of [9] ∞ n=1 d 2 k (n) n 2-2α ≤ exp ((2 + o(1))k log 2 k) .
This shows that the sum in (3.7) is exp (-log x/(20 log 2 x)) , which completes the proof.

4. The distribution of the random model L(1, X) 4.1. Main results and proof of Theorem 1.3. Throughout this section, we shall focus only on proving the desired results for Φ X (τ ), since the proofs for Ψ X (τ ) require only some minor adjustments. Since the X(p) are independent, then for any z ∈ C we have

E (L(1, X) z ) = p E p (z), where (4.1) E p (z) := E 1 - X(p) p -z = α p 1 - 1 p -z + β p 1 + 1 p -z + γ p .
For z ∈ C we define

L(z) := log E (L(1, X) z ) = p log E p (z).
Let τ be a large real number and consider the equation

(4.2) E (L(1, X) r ) (e γ τ ) -r = 0 ⇐⇒ L (r) = log τ + γ,
where the derivative is taken with respect to the real variable r. Then it follows from Proposition 4.2 below that lim r→∞ L (r) = ∞. Moreover, a simple calculation shows that E p (r)E p (r) > (E p (r)) 2 for all primes p, and hence that L (r) > 0. Thus, we deduce that equation (4.2) has a unique solution κ = κ(τ ). Using a careful saddle point analysis we obtain an asymptotic formula for Φ X (τ ) in terms of the moment E (L(1, X) r ) evaluated at the saddle point κ.

Theorem 4.1. Let τ be large and κ denote the unique solution to (4.2). Then, we have

(4.3) Φ X (τ ) = E (L(1, X) κ ) (e γ τ ) -κ κ 2πL (κ) 1 + O log κ κ .
Moreover, for any 0 ≤ λ ≤ 1/κ we have

(4.4) Φ X e -λ τ = Φ X (τ ) 1 + O(λκ) .
In order to deduce Theorem 1.3 from this result, we need to estimate L(r) and its first few derivatives when r is large. We prove Proposition 4.2. For any real number r ≥ 4 we have 2 , and

(4.5) L(r) = r log log r + γ + C 0 -1 log r + O 1 (log r)
(4.6) L (r) = log log r + γ + C 0 log r + O 1 (log r) 2 .
Moreover, for all real numbers y, t such that |y| ≥ 3 and |t| ≤ |y| we have Proof of Theorem 1.3. By Theorem 4.1 and equation (4.7), we have

Φ X (τ ) = E (L(1, X) κ ) (e γ τ ) -κ κ 2πL (κ) 1 + O log κ κ = exp L(κ) -κ(log τ + γ) + O(log κ) ,
where κ is the unique solution to L (κ) = log τ + γ. Furthermore, by (4.6) we have

(4.8) log τ = log log κ + C 0 log κ + O 1 (log κ) 2 ,
and hence we deduce from (4.5) that 2 .

Φ X (τ ) = exp - κ log κ + O κ (log κ)
The estimate (1.11) follows upon noting that log κ = τ -C 0 + O(1/τ ) by (4.8). Finally, using this fact together with (4.4) imply (1.12).

The remaining of this section will be devoted to the proofs of Theorem 4.1 and Proposition 4.2. We begin by proving the latter. 4.2. Proof of Proposition 4.2. We first need some preliminary lemmas. Lemma 4.3. Let r ≥ 4 be a real number. Then we have

(4.9) log E p (r) = -r log(1 -1/p) + O(1) if p ≤ r 2/3 log cosh r p + O r p 2 if p > r 2/3 .

and

(4.10)

E p (r) E p (r) =    -log(1 -1/p) 1 + O e -r 1/3 if p ≤ r 2/3 1 p tanh r p + O 1 p 2 + r p 3 if p > r 2/3 .
Proof. We start by proving (4.9). First, if p < r 2/3 then (4.11)

E p (r) = α p 1 - 1 p -r 1 + O exp -r 1/3 ,
from which the desired estimate follows in this case. Now if p > r 2/3 , we use that α p -β p 1/p and γ p 1/p, together with the bounds cosh(t) -1 t cosh(t) and sinh(t) t cosh(t), which are valid for all t ≥ 0. Thus we derive (4.12)

E p (r) = α p e r/p + β p e -r/p 1 + O r p 2 + γ p = (α p + β p ) cosh r p 1 + O r p 2 + γ p = cosh r p 1 + O r p 2 .
which completes the proof of (4.9). Next, by (4.1) we have

E p (r) = -α p 1 - 1 p -r log 1 - 1 p -β p 1 + 1 p -r log 1 + 1 p .
For p < r Define

f (t) := log cosh(t) if 0 ≤ t < 1 log cosh(t) -t if t ≥ 1.
Then we have the following standard estimates for f and f . Lemma 4.4 (Lemma 4.5 of [START_REF] Lamzouri | The distribution of Euler-Kronecker constants of quadratic fields[END_REF]). f is bounded on [0, ∞) and

f (t) = t 2 /2 + O(t 4 ) if 0 ≤ t < 1. Moreover we have f (t) = t + O(t 2 ) if 0 < t < 1 O(e -2t ) if t > 1.
We are now ready to prove Proposition 4.2.

Proof of Proposition 4.2. We only prove (4.5) and (4.6) since (4.7) follows along the same lines. First, by Lemmas 4.3 and 4.4 we have (4.13)

L(r) = -r p≤r 2/3 log 1 - 1 p + p>r 2/3 log cosh r p + O r 2/3 = -r p≤r log 1 - 1 p + r 2/3 <p<r 4/3 f r p + O r 2/3 .
Now, using the prime number theorem in the form π(t) -Li(t) t/(log t) 3 , together with partial summation and Lemma 4.4, we obtain (4.14)

r 2/3 <p<r 4/3 f r p = r 4/3 r 2/3 f r t dt log t + O r (log r) 2 = r log r r 1/3 r -1/3 f (u) u 2 du + O r (log r) 2 , since ∞ 0 (f (u)(log u)/u 2 )du < ∞.
Extending the integral in the right hand side of this estimate gives (4.15)

r 1/3 r -1/3 f (u) u 2 du = ∞ 0 f (u) u 2 du + O r -1/3 .
by Lemma 4.4. Finally, by a easy integration by parts along with Lemma 4.4 we have

∞ 0 f (u) u 2 du = ∞ 0 f (u) u du -lim x→1 - f (x) x -lim x→0 + f (x) x + lim x→∞ f (x) x -lim x→1 + f (x) x = ∞ 0 f (u) u du -1.
Collecting the above estimates yields (4.5). Next, we prove (4.6). First, similarly to (4.13), we derive from equation (4.10) and Lemma 4.4 that

L (r) = - p≤r 2/3 log 1 - 1 p + r 2/3 <p 1 p tanh r p + O r -1/3 = - p≤r log 1 - 1 p + r 2/3 <p<r 4/3 1 p f r p + O r -1/3 .
Finally, using the prime number theorem and partial summation as in (4.14) and (4.15), one can see that

r 2/3 <p<r 4/3 1 p f r p = 1 log r ∞ 0 f (u) u du + O 1 (log r) 2 ,
from which the estimate (4.6) follows. 4.3. Proof of Theorem 4.1. One of the key ingredients in the proof of Theorem 4.1 is to show that E (L(1, X) r+it ) /E (L(1, X) r ) is rapidly decreasing in t in the range |t| ≥ √ r log r. To this end, we establish the following lemma, which is the analogue of Lemma 3.2 of [START_REF] Granville | The distribution of values of L(1, χ d )[END_REF]. Lemma 4.5. Let r be large. If p > r/4, then for some positive constant b 1 we have

|E p (r + it)| E p (r) ≤ exp -b 1 1 -cos t log p + 1 p -1 .
Proof. Let x 1 , x 2 , x 3 be positive real number numbers, and θ 2 , θ 3 be real numbers. We shall use the following inequality which is established in the proof of Lemma 3.2 of [6]:

x 1 + x 2 e iθ 2 + x 3 e iθ 3 ≤ (x 1 + x 2 + x 3 ) exp - x 1 x 3 (1 -cos θ 3 ) (x 1 + x 2 + x 3 ) 2 .
Indeed, applying this inequality with

x 1 = α p (1 -1/p) -r , x 2 = γ p , x 3 = β p (1 + 1/p) -r ,
and θ 2 = t log(1-1/p), and θ 3 = t log p-1 p+1 yields the desired bound, since p > r/4. Using this lemma, we deduce the following result. Lemma 4.6. Let r be large. Then, there exists a constant b 2 > 0 such that

|E (L(1, X) r+it )| E (L(1, X) r )    exp -b 2 t 2 r log r if |t| ≤ r/4 exp -b 2 |t| log |t| if |t| > r/4.
Proof. Let z = r + it. Since |E p (z)| ≤ E p (r) we obtain that for any real numbers 2 ≤ y 1 < y 2 (4. [START_REF] Montgomery | Real quadratic fields with large class number[END_REF])

|E (L(1, X) z )| E (L(1, X) r ) ≤ y 1 ≤p≤y 2 |E p (z)| E p (r) .
Moreover, note that |t| log p+1 p-1 ∼ 2|t|/p, whence for |t| ≤ p/4 we have

1 -cos t log p + 1 p -1 |t| 2 p 2 .
If |t| ≤ r/4 we choose y 1 = r and y 2 = 2r. Then, appealing to Lemma 4.5 gives the desired bound in this case. Finally, in the case |t| > r/4, we use the same argument with y 1 = 4|t| and y 2 = 8|t|.

Let ϕ(y) = 1 if y > 1 and equals 0 otherwise. To relate the distribution function of L(1, X) (or that of L(1, χ d ) over d ∈ D ch (x)) to its complex moments, we use the following smooth analogue of Perron's formula. Lemma 4.7. Let λ > 0 be a real number and N be a positive integer. For any c > 0 we have for y > 0 (4.17 Proof. For any y > 0 we have

1 2πi c+i∞ c-i∞
y s e λs -1 λs

N ds s = 1 λ N λ 0 • • • λ 0 1 2πi c+i∞ c-i∞ ye t 1 +•••+t N s ds s dt 1 • • • dt N
so that by Perron's formula we obtain

(4.19) 1 2πi c+i∞ c-i∞
y s e λs -1 λs

N ds s =      = 1 if y ≥ 1, ∈ [0, 1] if e -λN ≤ y < 1, = 0 if 0 < y < e -λN .
Therefore we deduce that

1 2πi c+i∞ c-i∞
y s e -λN s e λs -1 λs

N ds s ≤ ϕ(y) ≤ 1 2πi c+i∞ c-i∞
y s e λs -1 λs N ds s , which implies (4.17). Using these bounds for ϕ(y) and ϕ(e λ y) with N = 1 gives (4.18).

Proof of Theorem 4.1. We start by proving (4.3). Let 0 < λ < 1/(2κ) be a real number to be chosen later. Using (4.17 E (L(1, X) s ) (e γ τ ) -s e λs -1 λs 2 ds λκ 3/5 + e -b 3 κ 1/6 λκ 3/5 E (L(1, X) κ ) (e γ τ ) -κ .

On the other hand, it follows from equation (4.7) that for |t| ≤ κ 3/5 we have

L(κ + it) = L(κ) + itL (κ) - t 2 2 L (κ) + O |t| 3 κ 2 log κ .
Also, note that e λs -1

λs 2 = 1 s 1 + O(λκ) = 1 κ 1 -i t κ + O λκ + t 2 κ 2 .
Hence, using that E (L(1, X) s ) = exp(L(s)) and L (κ) = log τ + γ we obtain

E (L(1, X) s ) (e γ τ ) -s e λs -1 λs 2 = 1 κ E (L(1, X) κ ) (e γ τ ) -κ exp - t 2 2 L (κ) 1 -i t κ + O λκ + t 2 2 + |t| 3 κ 2 log κ .
Thus, we get (4.24) 1 2πi

κ+iκ 3/5
κ-iκ 3/5 E (L(1, X) s ) (e γ τ ) -s e λs -1

λs 2 ds = 1 κ E (L(1, X) κ ) (e γ τ ) -κ 1 2π κ 3/5 -κ 3/5 exp - t 2 2 L (κ) 1 + O λκ + t 2 κ 2 + |t| 3 κ 2 log κ dt
since the integral involving it/κ vanishes. Further, since L (κ) 1/(κ log κ) by (4.7), then we have for some constant b 4 > 0 1 2π

κ 3/5 -κ 3/5 exp - t 2 2 L (κ) dt = 1 2πL (κ) 1 + O e -b 4 κ 1/6
, and

κ 3/5 -κ 3/5 |t| n exp - t 2 2 L (κ) dt ≤ ∞ -∞ |t| n exp - t 2 2 L (κ) dt 1 L (κ) (n+1)/2 (κ log κ) n/2 L (κ)
.

Inserting these estimates in (4.24) we deduce that (4.25)

1 2πi κ+iκ 3/5 κ-iκ 3/5 E (L(1, X) s ) (e γ τ ) -s e λs -1 λs 2 ds = E (L(1, X) κ ) (e γ τ ) -κ κ 2πL (κ) 1 + O λκ + log κ κ .
Finally, combining the estimates (4.23) and (4.25) and choosing λ = κ -2 completes the proof of (4.3). We now prove (4.4). Let 0 ≤ λ ≤ 1/κ be a real number. Then, by (4.18) we have

Φ X (e -λ τ ) -Φ X (τ ) ≤ 1 2πi κ+i∞ κ-i∞ E (L(1, X) s ) (e γ τ )
-s e λs -1 λs e λs -e -λs s ds.

We write s = κ + it, and split the above integral into two parts |t| ≤ √ κ log κ and |t| > √ κ log κ. Note that both |(e λs -1)/λs| and |(e λs -e -λs )/λs| are always less than 4, which is easily seen by looking at the cases |λs| ≤ 1 and |λs| > 1 separately. Therefore, it follows that the contribution of the first part is λ √ κ log κ • E (L(1, X) κ ) (e γ τ ) -κ . Furthermore, by Lemma 4.6 we obtain that the contribution of the second part is

λE (L(1, X) κ ) (e γ τ ) -κ √ κ log κ<|t|≤κ/4 e -b 2 t 2 /(κ log κ) dt + |t|≥κ/4 e -b 2 |t|/ log |t| dt λ κ log κ • E (L(1, X) κ ) (e γ τ ) -κ .
The desired bound follows from (4.3) and (4.7), which show that We shall first prove Theorem 1.2 and then deduce Theorem 1.1. To shorten our notation we let

(4.26) Φ X (τ ) E (L(1, X) κ ) (e γ τ ) -κ κ L (κ) log κ κ • E (L(1, X) κ ) (e γ τ ) -κ .
P x (L(1, χ d ) ∈ S) := 1 |D ch (x)| {d ∈ D ch (x) : L(1, χ d ) ∈ S} , and
M x (z) := 1 |D ch (x)| d∈D ch (x) L(1, χ d ) z ,
where as before indicates that the sum is over non-exceptional discriminants d.

Proof of Theorem 1.2. As in Section 4, let κ be the unique solution to L (r) = log τ +γ.

Let N be a positive integer and 0 < λ < min{1/(2κ), 1/N } be a real number to be chosen later. Let Y = b log x/(log 2 x log 3 x), for some suitably small constant b > 0. If x is large enough then equation (4.8) insures that κ ≤ Y in our range of τ . Also, note that Theorem 1.4 holds for all complex numbers s = κ + it with |t| ≤ Y . We consider the integrals

J(τ ) = 1 2πi κ+i∞ κ-i∞ E (L(1, X) s ) (e γ τ ) -s e λs -1 λs N ds s and J x (τ ) = 1 2πi κ+i∞ κ-i∞ M x (s)(e γ τ ) -s e λs -1 λs N ds s .
Then, it follows from Lemma 4.7 that (5.1) Φ X (τ ) ≤ J(τ ) ≤ Φ X (e -λN τ ), and (5.2)

P x L(1, χ d ) > e γ τ + O log x √ x ≤ J x (τ ) ≤ P x L(1, χ d ) > e γ-λN τ + O log x √ x ,
since there are at most O(log x) exceptional discriminants d ≤ x. Now, using that |e λs -1| ≤ 3 we get

κ-iY κ-i∞ + κ+i∞ κ+iY E (L(1, X) s ) (e γ τ ) -s e λs -1 λs N ds s 1 N 3 λY N E (L(1, X) κ ) (e γ τ ) -κ .
A similar argument together with Theorem 1.4 shows that κ-iY κ-i∞

+ κ+i∞ κ+iY M x (s)(e γ τ ) -s e λs -1 λs N ds s 1 N 3 λY N M x (κ)(e γ τ ) -κ 1 N 3 λY N E (L(1, X) κ ) (e γ τ ) -κ .
Combining these bounds with Theorem 1.4 and using that |(e λs -1)/λs| ≤ 4 we derive (5.3)

J x (τ ) -J(τ ) 1 N 3 λY N E (L(1, X) κ ) (e γ τ ) -κ + Y κ 4 N (e γ τ ) -κ exp - log x 20 log 2 x .
Thus, choosing N = [log log x] and λ = e 10 /Y we deduce from (4.26) that (5.4)

J x (τ ) -J(τ ) 1 (log x) 3 Φ X (τ ).
On the other hand, it follows from Theorem 1.3 that Φ X (e ±λN τ ) = Φ X (τ ) 1 + O e τ (log 2 x) 2 log 3 x log x .

Combining this last estimate with (5.1), (5.2), and (5.4) we obtain

P x (L(1, χ d ) > e γ τ ) ≤ J x (τ ) + O log x √ x ≤ J(τ ) + O Φ X (τ ) (log x) 5 + log x √ x ≤ Φ X (τ ) 1 + O e τ (log 2 x) 2 log 3 x log x + O log x √ x , and
P x (L(1, χ d ) > e γ τ ) ≥ J x (e λN τ ) + O log x √ x ≥ J(e λN τ ) + O Φ X (τ ) (log x) 5 + log x √ x ≥ Φ X (τ ) 1 + O e τ (log 2 x) 2 log 3 x log x + O log x √ x .
The result follows from these estimates together with the fact that Φ X (τ )

x -1/4 in our range of τ , by Theorem 1.

L(1, χ d ) ≥ e γ τ   1 + 2 log 1 + 1 -1/d log d   .
The desired estimate follows from Theorems 1.2 and 1.3, which show that the number of

d ∈ D ch (x) such that d ≥ √ x and L(1, χ d ) ≥ e γ τ (1 + O(1/ log d)) is |D ch (x)| • Φ X τ 1 + O(1/ log x) 1 + O e τ (log 2 x) 2 log 3 x log x =|D ch (x)| • exp - e τ -C 0 τ 1 + O 1 τ .
The analogous estimate for the number of discriminants d ∈ D ch (x) such that h(d) ≤ Recall that F ch (h) is the number of discriminants in the family D ch with class number h. In order to obtain an asymptotic formula for h≤H F ch (h), we first show that we can restrict our attention to discriminants d ∈ D ch such that d ≤ X := H 2 (log H) 8 .

To this end we use Tatuzawa's refinement of Siegel's Theorem [START_REF] Tatuzawa | On a theorem of Siegel[END_REF], which states that for large d, we have L(1, χ d ) ≥ 1/(log d) 2 with at most one exception. This implies that h(d) ≥ √ d • (log d) -3 with at most one exception, by the class number formula (1.3). Thus, if h(d) ≤ H then we must have d ≤ X, with at most one exception. This yields where c = 1/ log H, N is a positive integer, and 0 < λ ≤ 1 is a real number to be chosen later. Using (6. F ch (h).

By (1.2), Theorem 1.4, and Remark 1.5, there exists a constant B > 0 such that for all x ≥ √ X and any complex number z with Re(z) > -1/2 and |z| ≤ T := B log X/(log 2 X log 3 X), we have For brevity, we define

(x) := √ x log( √ x -1 + √ x) .
Then we have h(d) = (d)L(1, χ d ) by the class number formula (1.3). Hence, using integration by parts, we deduce from (6.3) that (6.4)

d∈D ch (X) h(d) -s = C 1 2 E(L(1, X) -s ) X 1
x -1/2 (x) -s dx + O X 1/2 exp -log X 50 log log X for |s| ≤ T and Re(s) = c.

Since h(d) ≥ 1 and |e λs -1| ≤ 3 for large enough H, we see that the contribution of the region |s| > T to the integral in (6.2) is

X 1/2 3 λ N |s|>T Re(s)=c |ds| |s| N +1 X 1/2 N 3 λT N .
We also have |(e λs -1)/λs| ≤ 4 for large enough H. Therefore, it follows from (6.4) that the integral in (6.2) equals (6.5) 1 2πi |s|≤T Re(s)=c

C 1 2 E(L(1, X) -s ) X 1
x -1/2 (x) -s dx H s e λs -1 λs

E A H (log H) A .
Extending the main term of (6.5) to the entire line Re(s) = c, we see that it equals (6.6)

1 2πi c+i∞ c-i∞ C 1 2 E(L(1, X) -s ) X 1
x -1/2 (x) -s dx H s e λs -1 λs

N ds s + O E L(1, X) -c X 1/2 N 3 λT N = C 1 2 E X 1 I c,λ,N H (x)L(1, X)
x -1/2 dx + O A H (log H) A .

To shorten our notation we define Y = HL(1, X) -1 . Then it follows from (4.19) that for 1 < x ≤ X we have

I c,λ,N H (x)L(1, X) =      1 if (x) ≤ Y, ∈ [0, 1] if Y < (x) ≤ e λN Y, 0 if (x) > e λN Y.
Furthermore, note that (x) = (2 √ x)/(log x + ψ(x)) for some ψ(x) that satisfies 0 ≤ ψ(x) ≤ 2. Thus, if for a constant c we define For any c > 0 the function c (x) is strictly increasing on (e 2 , ∞) and hence is invertible on this domain. Let g c be its inverse function. Then we obtain (6.7)

X 1 I c,λ,N H (x)L(1, X)
x -1/2 dx = 2 min g 0 (Y ) 1/2 , X 1/2 + O g 2 (e λN Y ) 1/2 -g 0 (Y ) 1/2 + 1 .

( 1

 1 .1) h(d) = √ d log ε d L(1, χ d ), 2010 Mathematics Subject Classification. Primary 11R11, 11M20. 1 where χ d = d • is the Kronecker symbol, and ε d is the fundamental unit of the quadratic field Q( √ d), defined as ε d = (a+b √ d)/2, where a and b are the smallest positive integer solutions to the Pell equations a 2 -b 2 d = ±4.

D 2 +

 2 ch := {d : d squarefree of the form d = 4m 2 + 1 for m ≥ 1}. We also let D ch (x) = {d ≤ x : d ∈ D ch }. Then it follows from Lemma 1 of [16O x 1/3 log x , where c(p) := 1 + -1 p . If d ∈ D ch then the class number formula (1.χ d ), since the fundamental unit is ε d = 2m + √ d if d = 4m 2 + 1 is squarefree. Therefore, assuming the generalized Riemann hypothesis GRH, we have (1.4) e -γ ζ(2) + o(1) √ d log d log log d ≤ h(d) ≤ (4e γ + o(1)) √ d log d log log d,

≤

  almost surely, where d z (n) is the z-th divisor function. Recall that d z (n) is the multiplicative function defined on prime powers by d z (p a ) = Γ(z + a)/(Γ(z)a!), and for Re(s) > 1 we have ∞ n=1 d z (n) n s = ζ(s) z . We observe that |d z (n)| ≤ d |z| (n) ≤ d k (n) for any integer k ≥ |z|, and d k (mn) ≤ d k (m)d k (n) for any positive integers k, m, n. Furthermore for k ∈ N, and y > 3 we have that d k (n)e -n/y ≤ e k/y a 1 ...a k =ne -(a 1 +...+a k )/y , (log 3y) k .

  , and L (y + it) 1 |y| 2 log |y| . Theorem 1.3 now follows upon combining Theorem 4.1 and Proposition 4.2.

y s e λs - 1

 1 y s e λs -1 λsN ds s -ϕ(y) ≤ 1 2πi c+i∞ c-i∞y s e λs -1 λs N 1 -e -λN s λs e λs -e -λs s ds.

) with N = 1 EE 3 5 E 5 E/ 5 κ-iκ 3/ 5 E( 4

 1355554 (L(1, X) s ) (e γ τ ) -s e λs -(L(1, X) s ) (e γ τ ) -s e λs -1 λs 1 -e -λs s ds.Since λκ < 1/2 we have |e λs -1| ≤ 3 and |e -λs -1| ≤ 2. Hence, using Lemma 4.6 together with the fact that|E (L(1, X) s ) | ≤ E (L(1, X) κ ), we obtain for some constant b (L(1, X) s ) (e γ τ ) -s e λs -1 λs ds s e -b 3 κ 1/6 λκ 3/5 E (L(1, X) κ ) (e γ τ ) -κ , (L(1, X) s ) (e γ τ ) -s e λs -1 λs 1 -e -λss ds e -b 3 κ 1/6 λκ 3/5 E (L(1, X) κ ) (e γ τ ) -κ .Let s = κ + it. If |t| ≤ κ 3/5 then (1 -e -λs )(e λs -1) λ 2 |s| 2 , and hence we getκ+iκ 3(L(1, X) s ) (e γ τ ) -s e λs -1λs1 -e -λs s ds λκ 3/5 • E (L(1, X) κ ) (e γ τ ) -κ .Therefore, combining this estimate with equations (4.20), (4.21) and (4.22) we deduce that

5 .

 5 The distribution of values of L(1, χ d ) over d ∈ D ch (x): Proof of Theorems 1.1 and 1.2

3 .

 3 We now deduce Theorem 1.1. Proof of Theorem 1.1. By the class number formula (1.3), we have h(d) ≥ 2e γ √ d log d • τ if and only if

2e -γ ζ( 2 ) √ d log d • 1 τ follows along the same lines. 6 .

 26 The number of quadratic fields with a given class number: Proof of Theorem 1.6

F

  ch (h) = d∈D ch (X) h(d)≤H 1 + O(1).Proof of Theorem 1.6. We estimate the main term in (6.1) by using the smoothing function I c,λ,N (y)

(6. 3 )

 3 d∈D ch (x) L(1, χ d ) z = C 1 x 1/2 E(L(1, X) z ) + O x 1/2 exp -

  Choosing λ = e 10 /T and N = [A log log H] for a constant A > 1 gives

2

 2 2 (x) ≤ (x) ≤ 0 (x), and therefore (x) > e λN Y, ∈ [0, 1] otherwise.

  5) is believed to be best possible over all positive fundamental discriminants d, in view of the widely believed conjecture that L(1, χ d ) ≤ (e γ + o(1)) log log |d| for all fundamental discriminants d. Note that the true lower bound for L(1, χ d ) is believed to be e -γ ζ(2)+o(1) / log log |d|, which would imply a lower bound for h(d) over d ∈ D ch that is twice as large as the GRH lower bound in

  Remark 1.5. The precise definition of an exceptional discriminant d is stated in (3.2). Note that if d is exceptional, we could have L(1, χ d ) as small as d -, so that when |z| is large and z < 0, the z-th moment of L(1, χ d ) would be heavily affected by the

	contribution of this particular discriminant. This justifies the assumption that d is
	non-exceptional in Theorem 1.4. Furthermore, note that if Re(z) < 0 but |Re(z)| is
	bounded, we no longer need the condition that d is non-exceptional in Theorem 1.4,
	thanks to Siegel's bound L(1, χ d )	d -.

Note that for any c > 0 we have g c (x) = x 2 log x+O c (log log x)

2 for x ≥ e 2 . Moreover, if g 0 (Y ) > X then Y > 0 (X) and hence L(1, X) 1/(log H) 3 . Therefore, it follows from Theorem 1.3 that

Furthermore, a similar argument shows that

Combining these estimates with with equations (6.2), (6.5), (6.6) and (6.7) we deduce

Replacing e λN H by H in the right hand side inequality yields

Finally, by (4.1) and the independence of the X(p)'s, we find that

which completes the proof.