<<

A REFINED CONJECTURE FOR THE VARIANCE OF GAUSSIAN PRIMES ACROSS SECTORS

RYAN C. CHEN, YUJIN H. KIM, JARED D. LICHTMAN, STEVEN J. MILLER, ALINA SHUBINA, SHANNON SWEITZER, EZRA WAXMAN, ERIC WINSOR, JIANING YANG

Abstract. We derive a refined conjecture for the variance of Gaussian primes across sectors, with a power saving error term, by applying the L-functions Ratios Conjecture. We observe a bifurcation point in the main term, consistent with the Random Matrix Theory (RMT) heuristic previously proposed by Rudnick and Waxman. Our model also identifies a second bifurcation point, undetected by the RMT model, that emerges upon taking into account lower terms. For sufficiently small sec- tors, we moreover prove an unconditional result that is consistent with our conjecture down to lower order terms.

1. Introduction Consider the of Gaussian Z[i], which is the of the imaginary quadratic field Q(i). Let a = hαi be an in Z[i] gener- ated by the Gaussian α ∈ Z[i]. The norm of the ideal a is defined as N(a) := α·α, where α 7→ α denotes complex conjugation. Let θα denote the argument of α. Since Z[i] is a domain, and the generators of × a differ by by a {±1, ±i} ∈ Z[i] , we find that θa := θα is well-defined modulo π/2. We may thus fix θa to lie in [0, π/2), which corresponds to choosing a generator α that lies within the first quadrant of the .

We are interested in studying the angular distribution of {θp} ∈ [0, π/2), where p (Z[i] are the collection of prime ideals with norm N(p) ≤ X. To

arXiv:1901.07386v3 [math.NT] 23 Feb 2021 optimize the accuracy of our methods, we employ several standard analytic techniques. In particular, we count the of angles lying in a short segment of length 1/K in [0, π/2] using a smooth window function, denoted by FK (θ), and we count the number of ideals a with norm N(a) ≤ X using a smooth function, denoted by Φ. We moreover count prime ideals using the weight provided by the Von Mangoldt function, defined as Λ(a) = log N(p) if a = pr is a power of a p, and Λ(a) = 0 otherwise.

∞ Let f ∈ Cc (R) be an even, real-valued window function. For K  1,

Date: February 24, 2021. 1 2 RC, YK, JL, SM, AS, SS, EW, EW, JY define X  K  π  (1.1) F (θ) := f θ − · k , K π/2 2 k∈Z which is a π/2-periodic function whose support in [0, π/2) is on a scale of 1/K. The Fourier expansion of FK is given by   X i4kθ 1 k (1.2) FK (θ) = FbK (k)e , FbK (k) = fb , K K k∈Z where the normalization is defined to be f (y) := R f(x)e−2πiyxdx. b R

∞ Let Φ ∈ Cc (0, ∞) and denote the Mellin transform of Φ by

Z ∞ (1.3) Φ(˜ s) := Φ(x)xs−1dx. 0 Define X N(a) (1.4) ψ (θ) := Φ Λ(a)F (θ − θ), K,X X K a a where a runs over all nonzero ideals in Z[i]. We may then think of ψK,X (θ) as a smooth count for the number of prime power ideals less than X lying in a window of scale 1/K about θ. As in Lemma 3.1 of [16], the mean value of ψK,X (θ) is given by

π   1 Z 2 X N(a) X (1.5) hψ i := Φ Λ(a)F (θ − θ)dθ ∼ · C · c , K,X π/2 X K a K Φ f 0 a where Z Z ∞ 1 2 (1.6) cf := 2 f(x)dx, and CΦ := 4π Φ(u)du. 4π R 0 For fixed K > 0, then a smooth version of a result from Hecke [9] states that in the limit as X → ∞,

X (1.7) ψ (θ) ∼ · c · C . K,X K f Φ Alternatively, one may study the behavior of ψK,X (θ) for shrinking inter- vals, i.e. for large K. It follows from the work of Kubilius [13] that under the assumption of the Grand Riemann Hypothesis (GRH), (1.7) continues to hold for K  X1/2−o(1).

In this paper, we wish to study Z π 2 1 2 (1.8) Var(ψK,X ) := ψK,X (θ) − hψK,X i dθ. π/2 0 GAUSSIAN PRIMES ACROSS SECTORS 3

Such a quantity was investigated by Rudnick and Waxman [16], who, as- 1 suming GRH, obtained an upper bound for Var(ψK,X ). They then used this upper bound to prove that almost all arcs of length 1/K contain at 2+o(1) least one angle θp attached to a prime ideal with N(p) ≤ K(log K) .

Montogomery [14] showed that the pair correlation of zeros of ζ(s) behaves similarly to that of an ensemble of random matrices, linking the zero distri- bution of the zeta function to eigenvalues of random matrices. The Katz- Sarnak density conjecture [11, 12] extended this connection by relating the distribution of zeros across families of L-functions to eigenvalues of random matrices. Random matrix theory (RMT) has since served as an important aid in modeling the statistics of various quantities associated to L-functions, such as the spacing of zeros [10, 15, 18], and moments of L-functions [5, 6]. Motivated by a suitable RMT model for the zeros of a family of Hecke L-functions, as well as a function field analogue, Rudnick and Waxman con- jectured that

Z Z ∞ 2 2 (1.9) Var(ψK,X ) ∼ f(y) dy Φ(x) dx · min(log X, 2 log K). R 0 Inspired by calculations for the of matrices aver- aged over the compact classical groups, Conrey, Farmer, and Zirnbauer [3, 4] further exploited the relationship between L-functions and random matri- ces to conjecture a recipe for calculating the ratio of a product of shifted L-functions averaged over a family. The L-functions Ratios Conjecture has since been employed in a variety of applications, such as computing n-level densities across a family of L-functions, mollified moments of L-functions, and discrete averages over zeros of the Riemann Zeta function [7]. The Ra- tios Conjecture has also been extended to the function field setting [1]. While constructing a model using the Ratios Conjecture may pose additional tech- nical challenges, the reward is often a more accurate model; RMT heuristics can model assymptotic behavior, but the Ratios Conjecture is expected to hold down to lower order terms. This has been demonstrated, for exam- ple, in the context of one-level density computations, by Fiorilli, Parks and S¨odergren[8].

This paper studies Var(ψK,X ) down to lower-order terms. Define a new parameter λ such that Xλ = K. We prove the following theorem: Theorem 1.1. Fix λ > 1. Then  2 Var(ψK,X ) 0 2 ˜ 1 (1.10) 1−λ = CΦ log X + CΦ + π Φ + o (1) , Cf X 2 where

1See also [17]. 4 RC, YK, JL, SM, AS, SS, EW, EW, JY

Z Z ∞ 1 2 0 2 2 (1.11) Cf := 2 f(y) dy CΦ := 4π · log x · Φ(x) dx, 4π R 0 and CΦ is as in (1.6). Under GRH, the error term can be improved to − OΦ (X ) for some  > 0 (depending on λ). The proof of Theorem 1.1 is given in Section 2, and is obtained by classical methods. For λ < 1 the computation is more difficult, and we use the Ratios Conjecture to suggest the following. Conjecture 1.2. Fix 0 < λ < 1. We have Var(ψ )  − 1 K,X CΦ log X + ∆Φ + OΦ (X ) if 2 < λ < 1 (1.12) 1−λ = − 1 Cf X CΦ (2λ log X) − KΦ + OΦ (X ) if λ < 2 , where 12 (1.13) ∆ := C0 − π2Φ˜ , Φ Φ 2 and 12  π2   (1.14) K := C − C − A0 + 2π2Φ˜ + C log + 2 , Φ Φ,ζ Φ,L Φ 2 Φ 4 0 for some constant  > 0 (depending on λ). Here CΦ,ζ , CΦ,L, and AΦ, are as in (9.25), (9.26), and (9.27), respectively.

Figure 1. A plot of the ratio Var(ψK,X )/(hψK,X i log X) versus λ = log K/ log X, for X ≈ 109 with test functions Φ = 1(0,1] and f = 1 1 1 . The red line is the prediction given by [− 2 , 2 ] Conjecture 1.2, while the blue line is the RMT Conjecture of (1.9). GAUSSIAN PRIMES ACROSS SECTORS 5

Conjecture 1.2 provides a refined conjecture for Var(ψK,X ) with a power saving error term (away from the bifurcation points). It moreover recovers the asymptotic prediction given by (1.9), which was initially obtained by completely different methods. Numerical data for Var(ψK,X ) is provided in Figure 1.

A saturation effect similar to the one above was previously observed by Bui, Keating, and Smith [2], when computing the variance of sums in short intervals of coefficients of a fixed L-function of high degree. There, too, the contribution from lower order terms must be taken into account in order to obtain good agreement with the numerical data.

A proof of Theorem 1.1 is provided in Section 2 below. When λ > 1 the main contribution to the variance is given by the diagonal terms, which we directly compute by separately considering the weighted contribution of split primes (Lemma 2.1) and inert primes (Lemma 2.2). When 0 < λ < 1 we may no longer trivially bound the off-diagonal contribution, and so we instead shift focus to the study of a relevant family of Hecke L-functions. In Section 3 we compute the ratios recipe for this family of L-functions, and in Section 4 we apply several necessary simplifications. Section 5 then relates the output of this recipe to Var(ψK,X ), resulting in Conjecture 5.1, which expresses Var(ψK,X ) in terms of four double contour integrals. Section 6 is dedicated to preliminary technical lemmas, and the double integrals are then computed in Sections 7−9. One finds that the main contributions to Var(ψK,X ) come from second-order poles, while first-order poles contribute a correction factor smaller than the main term by a factor of log X.

The Ratios Conjectures moreover suggests an enlightening way to group terms. The first integral, which corresponds to taking the first piece of each approximate functional equation in the ratios recipe, corresponds to the con- tribution of the diagonal terms, computed in Theorem 1.1. In particular, we note that its contribution to Var(ψK,X ) is independent of the value of λ (Lemma 5.2). In contrast, the contribution emerging from the second and third integrals depends on the value of λ (Lemma 5.3). This accounts for the emergence of two bifurcation points in the lower order terms: one at λ = 1/2 and another at λ = 1. The fourth integral, corresponding to tak- ing the second piece of each approximate functional equation in the ratios recipe, only makes a significantly contribution to Var(ψK,X ) when λ < 1/2 (Lemma 5.4). This accounts for the bifurcation point in the main term, previously detected by the RMT model, as well as for the contribution of a complicated lower-order term, which appears to nicely fit the numerical data.

Acknowledgments: This work emerged from a summer project developed and guided by E. Waxman, as part of the 2017 SMALL Undergraduate Re- search Project at Williams College. We thank Zeev Rudnick for advice, 6 RC, YK, JL, SM, AS, SS, EW, EW, JY and for suggesting this problem, as well as Bingrong Huang and J. P. Keat- ing for helpful discussions. The summer research was supported by NSF Grant DMS1659037. Chen was moreover supported by Princeton Univer- sity, and Miller was supported by NSF Grant DMS1561945. Waxman was supported by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013) / ERC grant agreement no 320755., as well as by the Czech Science Foundation GACR,ˇ grant 17- 04703Y.

2. Proof of Theorem 1.1 λ Recall that X = K. To compute Var(ψK,X ) in the regime λ > 1, it suffices to calculate the second moment, defined as

(2.1) Z π 2 1 2 ΩK,X := ψK,X (θ) dθ π/2 0     π 2 X N(a) N(b) Z 2 = Φ Φ Λ(a)Λ(b) FK (θa − θ)FK (θb − θ)dθ. π X X 0 a,b⊂Z[i] Indeed, note that as in Lemma 3.1 of [16],

X Z Z ∞ X  (2.2) hψK,X i ∼ f(x)dx Φ(u)du = O , K R 0 K so that for λ > 1,

2 Var(ψK,X ) = ΩK,X − hψK,X i (2.3) 1− = ΩK,X + O X , where  = 2λ − 1.

Suppose a 6= b, and that at least one of θa, θb 6= 0. Then by Lemma 2.1 in [16], 1 1 (2.4) |θ − θ | ≥  . a b X K Moreover, in order for the integral

Z π/2 (2.5) FK (θa − θ)FK (θb − θ)dθ 0 π to be nonzero, we require that θa − θb < 2K . Since X = o(K), such off- diagonal terms contribute nothing, and the contribution thus only comes GAUSSIAN PRIMES ACROSS SECTORS 7 from terms for which θa = θb. We therefore may write  2 Z π 2 X N(a) 2 2 2 ΩK,X = Φ Λ (a) FK (θ) dθ π X 0 a⊂Z[i] θ 6=0 (2.6) a   2 Z π 2 X N(a) 2 2 + Φ Λ(a) FK (θ) dθ. π X 0 a⊂Z[i] θa=0 By Parseval’s theorem we have that for sufficiently large K, Z π  2 2 2 2 X 2 1 X k 2 Cf (2.7) |FK (θ)| dθ = |FbK (k)| dθ = 2 fb = 4π , π 0 K K K k∈Z k∈Z and therefore (2.8)    2   2 2 Cf  X N(a) 2 X N(a)  ΩK,X = 4π  Φ Λ (a) + Φ Λ(a)  . K  X X  a⊂Z[i] a⊂Z[i] θa6=0 θa=0 Theorem 1.1 then follows from (2.3), (2.8), and the following two lemmas. Lemma 2.1. We have (2.9) 2 X N(a) 1    √  Φ Λ2(a) = C X · log X − XC0 + O Xe−c· log X , X 4π2 Φ Φ Φ a⊂Z[i] θa6=0 2/3 while under GRH, the error term has a power saving, say, to OΦ X . Lemma 2.2. Unconditionally we have that   2   2 √ X N(a) X ˜ 1  −c· log X  (2.10) Λ(a)Φ = Φ + OΦ Xe , X 4 2 a⊂Z[i] θa=0 while, again, under GRH, the error term has a power saving. Proof of Lemma 2.1: Proof. Consider the quantity (2.11) 2 ∞ 2 ∞ 2 X N(a) X X N(pn) X 22m+1  Φ Λ2(a) = Φ Λ2(p) + Φ (log 2)2 X X X a⊂Z[i] p|p≡1(4) n=1 m=0 θa6=0 ∞ 2 X  p 2 X X N(pn) = 2 · Φ (log p)2 + Φ Λ2(p) + O (log X) , X X Φ p≡1(4) p|p≡1(4) n=2 8 RC, YK, JL, SM, AS, SS, EW, EW, JY where we note that since Φ is compactly supported, the sum on the far right has at most OΦ (log X) terms. Moreover,  n 2 X N(p ) 2 1 + (2.12) Φ Λ (p)  X n X p|p≡1(4) 1/n since the sum has at most OΦ(X ) terms. It follows that

∞  n 2 log X X X N(p ) 2 X 1 +  2  (2.13) Φ Λ (p)  X n = O X 3 , X Φ p|p≡1(4) n=2 n=2 and therefore  2 2 X N(a) 2 X  p  2  2  (2.14) Φ Λ (a) = 2 · Φ (log p) + O X 3 . X X Φ a⊂Z[i] p≡1(4) θa6=0 Upon setting  t 2 (2.15) f(t) := log t · Φ X and  2 · log p if p ≡ 1(4) (2.16) a := p 0 otherwise, it follows from Abel’s Summation Formula and the Theorem that (2.17) 2 Z ∞  2 Z ∞  X  p  2 t 1 + 0 2 · Φ (log p) = log t · Φ dt + O t 2 · f (t)dt . X X p≡1(4) 1 1 where the error term assumes RH. Applying the change of variables u := t/X, we then obtain that for sufficiently large X, (2.18) Z ∞  t 2 Z ∞ Z ∞ log t · Φ dt = X · log X Φ(u)2 du + X · log u · Φ(u)2 du 1 X 0 0 1   = X · log XC − XC0 . 4π2 Φ Φ Under RH, the error term is then given as Z ∞ Z ∞  2 1 + 0 − 1 t 2 (2.19) t 2 · f (t)dt  t 3 · Φ dt Φ X 3 , 1 1 X while unconditionally it is as in (2.9). Combining the results of (2.14), (2.17), (2.18), and (2.19), we then obtain Lemma 2.1.  Proof of Lemma 2.2: GAUSSIAN PRIMES ACROSS SECTORS 9

Proof. Next, we consider the quantity (2.20) ∞ ∞ X N(a) X X p2j  X 22m  Φ Λ(a) = 2 Φ log p + Φ log 2 X X X a⊂Z[i] p≡3(4) j=1 m=1 θa=0 ∞ X X p2j  = 2 Φ log p + O (log X) . X Φ p≡3(4) j=1 Since  2j  X p 1 + (2.21) Φ log p  X 2j , X Φ p≡3(4) we have that ∞  2j  X X p 1 +  1  (2.22) Φ log p  (log X) · X 4 = O X 3 , X Φ Φ p≡3(4) j=2 and therefore    2  X N(a) X p  1  (2.23) Φ Λ(a) = 2 Φ Λ(p) + O X 3 . X X Φ a⊂Z[i] p≡3(4) θa=0 Moreover, since (2.24) ∞ X n2  X p2  X X p2j  Φ Λ(n) = Φ Λ(p) + Φ Λ(p) X X X n≡3(4) p≡3(4) p≡3(4) j=3 odd  2  X p  1  = Φ Λ(p) + O X 3 , X Φ p≡3(4) we obtain    2  X N(a) X n  1  (2.25) Φ Λ(a) = 2 Φ Λ(n) + O X 3 . X X Φ a⊂Z[i] n≡3(4) θa=0 By the Mellin inversion theorem, we find that −s X n2  X 1 Z n2  Φ Λ(n) = Λ(n) Φ(˜ s) ds X 2πi X n≡3(4) n≡3(4) (2) (2.26) 1 Z X Λ(n) = Φ(˜ s) Xsds. 2πi n2s (2) n≡3(4) 10 RC, YK, JL, SM, AS, SS, EW, EW, JY

× × Let χ0 ∈ (Z/4Z) denote the principal character, and χ1 ∈ (Z/4Z) de- note the non-principal character, with corresponding L-functions given by L(s, χ0) and L(s, χ1), respectively. Upon noting that  2 if n = 3 mod 4 (2.27) χ (n) − χ (n) = 0 1 0 otherwise, we obtain 0 0 ∞ L L X Λ(n)(χ0(n) − χ1(n)) (2s, χ ) − (2s, χ ) = L 1 L 0 n2s n=1 (2.28) ∞ X Λ(n) = 2 . n2s n≡3(4) It follows that (2.29) X n2  1 Z L0 L0  2 Φ Λ(n) = (2s, χ ) − (2s, χ ) Φ(˜ s)Xsds X 2πi L 1 L 0 n≡3(4) (2) 0 0 1 Z L L  s s = (s, χ1) − (s, χ0) Φ˜ X 2 ds. 4πi (4) L L 2 Moreover, we compute L0 1 (2.30) (s, χ ) = − + γ + log 2 + O(s − 1), L 0 s − 1 0 0 where γ0 is the Euler-Mascheroni constant, while L /L(s, χ1) is holomorphic about s = 1. Shifting integrals, we pick up a pole at s = 1 and find that     √ √ X N(a) 1 1 1  −c· log X  (2.31) Λ(a)Φ = X 2 Φ˜ + O Xe X 2 2 Φ a⊂Z[i] θa=0 for some c > 0. Squaring this then yields 2

    2 √ X N(a) X ˜ 1  −c· log X  (2.32) Λ(a)Φ = Φ + OΦ Xe . X 4 2 a⊂Z[i] θa=0 As above, we note that under the assumption of GRH the error term can be improved to have a power-saving. 

3. Implementing the Ratios Conjecture Throughout this section, and the remainder of the paper, we will assume GRH. GAUSSIAN PRIMES ACROSS SECTORS 11

3.1. The Recipe. The L-Functions Ratios Conjecture described in [3], pro- vides a procedure for computing an average of L-function ratios over a des- ignated family. Let L(s, f) be an L-function, and F = {f} a family of characters with conductors c(f), as defined in section 3 of [4]. L(s, f) has an approximate functional equation given by

X An(f) X Am(f) (3.1) L(s, f) = + (f, s) + remainder. ns m1−s n 1. To conjecture an as- ymptotic formula for the average 1 1 X L( + α, f)L( + β, f) (3.3) 2 2 , L( 1 + γ, f)L( 1 + δ, f) f∈F 2 2 the Ratios Conjecture suggests the following recipe.

Step One: Start with 1 1 L( 2 + α, f)L( 2 + β, f) (3.4) 1 1 . L( 2 + γ, f)L( 2 + δ, f) Replace each L-function in the numerator with the two terms from its ap- proximate functional equation, ignore the remainder terms and allow each of the four resulting sums to extend to infinity. Replace each L-function in the denominator by its series (3.2). Multiply out the resulting expression to obtain 4 terms. Write these terms as X (3.5) (product of (f, s) factors) (summand).

n1,...,n4 Step Two: Replace each product of (f, s) factors by its expected value when averaged over the family.

Step Three: Replace each summand by its expected value when averaged over the family.

Step Four: Call the total Mf := Mf (α, β, γ, δ), and let F = |F|. Then for 1 1 1 1 (3.6) − < Re(α), Re(β) < ,  Re(γ), Re(δ) < , 4 4 log F 4 and 1− (3.7) Im(α), Im(β), Im(γ), Im(δ)  F , 12 RC, YK, JL, SM, AS, SS, EW, EW, JY the conjecture is that (3.8) 1 1 X L( 2 + α, f)L( 2 + β, f) X   (− 1 +)c(f) g(c(f)) = Mf 1 + O e 2 g(c(f)) L( 1 + γ, f)L( 1 + δ, f) f∈F 2 2 f∈F for all  > 0, where g is a suitable weight function.

3.2. Hecke L-functions. We are interested in applying the ratios recipe to the following family of L-functions. Consider the Hecke character

2k i4kθa (3.9) Ξk(a) := (α/α) = e , k ∈ Z, which provides a well-defined function on the ideals of Z[i]. To each such character we may associate an L-function  −1 X Ξk(a) Y Ξk(p) (3.10) L (s) := = 1 − , Re(s) > 1. k N(a)s N(p)s a⊆Z[i] p prime a6=0

Note that Lk(s) = L−k(s), and that

(3.11) 0 0 0 Lk X Λ(a)Ξk(a) X Λ(a)Ξk(a) L−k Lk (s) = − = − s = (s) = (s). Lk s N(a) L−k Lk a6=0 N(a) a6=0

Moreover, when k 6= 0, then Lk(s) has an analytic continuation to the entire complex plane, and satisfies the functional equation

−(s+|2k|) (3.12) ξk(s) := π · Γ(s + |2k|) · Lk(s) = ξk(1 − s).

3.3. Step One: Approximate Function Equation. We seek to apply the above procedure to compute the average

  2 1 1 X k Lk( + α)Lk( + β) (3.13) fb 2 2 K L ( 1 + γ)L ( 1 + δ) k6=0 k 2 k 2 for specified values of α, β, γ, δ. For this particular family of L-functions, we have L (s) Γ(1 − s + |2k|) (3.14) (f, s) := k = π2s−1 · , Lk(1 − s) Γ(s + |2k|) and X (3.15) Ak(n) = Ξk(a), N(a)=n GAUSSIAN PRIMES ACROSS SECTORS 13 which is a multiplicative function defined explicitly on prime powers by  l/2 P e2j4kiθp if p ≡ 1(4), l even  j=−l/2  (l−1)/2  P e(2j+1)4kiθp if p ≡ 1(4), l odd l  j=−(l+1)/2 (3.16) Ak(p ) = 0 if p ≡ 3(4), l odd   1 if p ≡ 3(4), l even   (−1)lk if p = 2, where, for prime p ≡ 1(4), we define θp := θp, where p ⊂ Z[i] is a prime ideal lying above p. Note, moreover, that the above formula is independent of our specific choice of p.

As per the recipe, we ignore the remainder term and allow both terms in the approximate functional equation to be summed to infinity. This allows us to write

X Ak(n) Γ(1 − s + |2k|) X Ak(m) (3.17) L (s) ≈ + π2s−1 · , k ns Γ(s + |2k|) m1−s n m upon noting that Ak(n) = Ak(n) for all Ak(n).

To compute the inverse coefficients, write

(3.18) 1 Y  e4kiθp  = 1 − L (s) N(p)s k p  (−1)k  Y  (e4kiθp + e−4kiθp ) 1  Y  1  = 1 − 1 − + 1 − 2s ps p2s p2s p≡1(4) p≡3(4)      2  Ak(2) Y Ak(p) 1 Y Ak(p) Ak(p ) = 1 − 1 − + 1 − − . 2s ps p2s ps p2s p≡1(4) p≡3(4) We then obtain

1 X µk(h) (3.19) = s , Lk(s) h h where

 1 h = 0   −Ak(p) h = 1 h  (3.20) µk(p ) := −1 h = 2, p ≡ 3(4)  1 h = 2, p ≡ 1(4)  0 otherwise. 14 RC, YK, JL, SM, AS, SS, EW, EW, JY

Multiplying out the resulting expression gives

(3.21) ∞ ! ∞ ! ∞ 1 ∞ ! X µk(h) X µk(l) X Ak(n) 2α Γ( 2 − α + |2k|) X Ak(n) 1 1 × 1 + π · 1 1 2 +γ 2 +δ 2 +α Γ( + α + |2k|) 2 −α h=0 h l=0 l n=0 n 2 n=0 n ∞ 1 ∞ ! X Ak(m) 2β Γ( 2 − β + |2k|) X Ak(m) × 1 + π · 1 1 2 +β Γ( + β + |2k|) 2 −β m=0 m 2 m=0 m

(3.22)   h l n m Y X µk(p )µk(p )Ak(p )Ak(p ) =  h( 1 +γ)+l( 1 +δ)+n( 1 +α)+m( 1 +β)  p m,n,h,l p 2 2 2 2   1 h l n m 2α Γ( 2 − α + |2k|) Y X µk(p )µk(p )Ak(p )Ak(p ) + π · 1  1 1 1 1  Γ( + α + |2k|) h( 2 +γ)+l( 2 +δ)+n( 2 −α)+m( 2 +β) 2 p m,n,h,l p   1 h l n m 2β Γ( 2 − β + |2k|) Y X µk(p )µk(p )Ak(p )Ak(p ) + π · 1  1 1 1 1  Γ( + β + |2k|) h( 2 +γ)+l( 2 +δ)+n( 2 +α)+m( 2 −β) 2 p m,n,h,l p 1 1 2(α+β) Γ( 2 − α + |2k|) Γ( 2 − β + |2k|) + π · 1 1 Γ( 2 + α + |2k|) Γ( 2 + β + |2k|)   h l n m Y X µk(p )µk(p )Ak(p )Ak(p ) × ,  h( 1 +γ)+l( 1 +δ)+n( 1 −α)+m( 1 −β)  p m,n,h,l p 2 2 2 2 where the above follows upon noting that

(3.23) ∞ ! ∞ ! ∞ ! ∞ ! X µk(h) X µk(l) X Ak(n) X Ak(m) 1 +γ ( 1 +δ) 1 +α 1 +β h=0 h 2 l=0 l 2 n=0 n 2 m=0 m 2 h ! l ! n ! m ! Y X µk(p ) X µk(p ) X Ak(p ) X Ak(p ) = h( 1 +γ) l( 1 +α) n( 1 +α) m( 1 +β) p h p 2 l p 2 n p 2 m p 2   h l n m Y X µk(p )µk(p )Ak(p )Ak(p ) = .  h( 1 +γ)+l( 1 +δ)+n( 1 +α)+m( 1 +β)  p m,n,h,l p 2 2 2 2

The algorithm now dictates that we compute the Γ-average

 1 1  2(α+β) Γ( 2 − α + |2k|) Γ( 2 − β + |2k|) (3.24) π · 1 1 , Γ( 2 + α + |2k|) Γ( 2 + β + |2k|) K GAUSSIAN PRIMES ACROSS SECTORS 15 as well as an average for the quantity coming from the first piece of each functional equation, namely    h l n m  Y X µk(p )µk(p )Ak(p )Ak(p ) (3.25) .  h( 1 +γ)+l( 1 +δ)+n( 1 +α)+m( 1 +β)  p m,n,h,l p 2 2 2 2 K

Here we write h·iK to denote the average over all 0 < |k| ≤ K. The average of the remaining three pieces will then follow similarly upon applying the appropriate change of variables. 3.4. Step Two: Averaging the Gamma Factors. The gamma factor averages over the family of Hecke L-functions are provided by the following lemma. 1 Lemma 3.1. Fix 0 < α, β < 2 . We find that

 1  −2α Γ( 2 − α + |2k|) (2K) −1 (3.26) 1 = + O K , Γ( 2 + α + |2k|) K 1 − 2α and similarly  1 1  −2(α+β) Γ( 2 − α + |2k|) Γ( 2 − β + |2k|) (2K) −1 (3.27) 1 1 = + O K . Γ( 2 + α + |2k|) Γ( 2 + β + |2k|) K 1 − 2(α + β) Proof. A proof of (3.26) is given in [19], and the proof of (3.27) is essentially identical. Specifically, one may use Stirling’s approximation and Taylor expansion to demonstrate that (3.28) 1  1   −2(α+β)    Γ 2 + |2k| − α Γ 2 + |2k| − β 1 1 1  1  = + |2k| 1 + O , Γ 2 + |2k| + α Γ 2 + |2k| + β 2 k and then average over 0 < |k| ≤ K to obtain (3.27).  3.5. Step Three: Coefficient Average. In this section, we seek to com- pute the coefficient average   h l n m (3.29) µk(p )µk(p )Ak(p )Ak(p ) . K To do so, we must consider several cases depending on the value of p mod 4. Define   h l n m (3.30) δp(m, n, h, l) := lim µk(p )µk(p )Ak(p )Ak(p ) K→∞ K and write

 δ (m, n, h, l) when p ≡ 3(4)  3(4) (3.31) δp(m, n, h, l) := δ1(4)(m, n, h, l) when p ≡ 1(4)  δ2(m, n, h, l) when p = 2. 16 RC, YK, JL, SM, AS, SS, EW, EW, JY

3.5.1. p ≡ 1(4): By (3.20), we may restrict to the case in which h, l ∈ m n {0, 1, 2}. If h, l ∈ {0, 2}, then δ1(4)(m, n, h, l) reduces to hAk(p )Ak(p )iK , where  m P 2 2j4kiθp  j=− m e m even m  2 (3.32) Ak(p ) = (m−1) P 2 e(2j+1)4kiθp m odd.  (m+1) j=− 2 m n Expanding the product Ak(p )Ak(p ) yields a double sum of points on the unit circle, and averaging over k ≤ K then eliminates, in the limit, any such terms which are not identically equal to 1. Collecting the significant terms, we find that ( min {m, n} + 1 m + n even (3.33) δ (m, n, h, l) = 1(4) 0 m + n odd. If either h = 1 and l ∈ {0, 2}, or l = 1 and h ∈ {0, 2}, then the product h l 4kiθp −4kiθp µk(p )µk(p ) = −Ak(p) = −(e + e ), so that (3.29) reduces to D   E 4kiθp −4kiθp m n (3.34) − e + e Ak(p )Ak(p ) . K Expanding out this product yields again a sum of points on the unit circle, which upon averaging over k ≤ K eliminates, in the limit, any such terms not identically equal to 1. We then obtain ( 0 m + n even (3.35) δ (m, n, h, l) = 1(4) −2 (min {m, n} + 1) m + n odd.

h l Finally, suppose h = l = 1. In this case, the product µk(p )µk(p ) = 2 2·4kiθp −2·4kiθp Ak(p) = e + 2 + e , so that (3.29) reduces to D  E 2·4kiθp −2·4kiθp m n (3.36) e + 2 + e Ak(p )Ak(p ) . K Collecting significant contributions as before, we conclude that  4n + 2 m = n  (3.37) δ1(4)(m, n, h, l) = 4 (min {m, n} + 1) m 6= n, m + n even 0 m + n odd.

3.5.2. p ≡ 3(4): Again we may restrict to the case in which h, l ∈ {0, 2}. h l If h = l ∈ {0, 2}, then µk(p )µk(p ) = 1, and therefore ( 1 m, n are even (3.38) δ (m, n, h, l) = 3(4) 0 otherwise.

h l Likewise, if (h, l) = (0, 2) or (h, l) = (2, 0) then µk(p )µk(p ) = −1 and ( −1 m, n are even (3.39) δ (m, n, h, l) = 3(4) 0 otherwise. GAUSSIAN PRIMES ACROSS SECTORS 17

3.5.3. p = 2: When p = 2, we may restrict to the case in which h, l ∈ {0, 1}. If, moreover, h = l, then

( (m+n)k 1 m + n is even (3.40) δ2(m, n, h, l) = (−1) = K 0 otherwise, while if h 6= l, ( (m+n+1)k −1 m + n is odd (3.41) δ2(m, n, h, l) = − (−1) = K 0 otherwise.

3.5.4. Summary: Summarizing the above results, we then conclude that (3.42)  min {m, n} + 1 m + n even, h, l ∈ {0, 2}  −2(min {m, n} + 1) m + n odd, (h, l) = (0, 1), (1, 0), (1, 2) or (2, 1)  δ1(4)(m, n, h, l) = 4n + 2 m = n, (h, l) = (1, 1)  4 (min {m, n} + 1) m 6= n, m + n even, (h, l) = (1, 1)  0 otherwise,  1 m, n even, (h, l) = (0, 0) or (2, 2)  δ3(4)(m, n, h, l) = −1 m, n even, (h, l) = (0, 2) or (2, 0) 0 otherwise,  1 m + n even, (h, l) = (0, 0) or (1, 1)  δ2(m, n, h, l) = −1 m + n odd, (h, l) = (0, 1) or (1, 0) 0 otherwise.

3.6. Step Four: Conjecture. Upon applying the averages, the Ratios Conjecture recipe claims that for α, β, γ, δ satisfying the conditions specified in (3.6), we have

(3.43)   2 1 1   2 X k Lk( 2 + α)Lk( 2 + β) X k  1 + fb = fb MK (α, β, γ, δ) + O K 2 , K L ( 1 + γ)L ( 1 + δ) K k6=0 k 2 k 2 k6=0 where (3.44) 2α Y (π/2K) Y MK (α, β, γ, δ) := Gp(α, β, γ, δ) + Gp(−α, β, γ, δ) p 1 − 2α p 2β 2(α+β) (π/2K) Y (π/2K) Y + Gp(α, −β, γ, δ) + Gp(−α, −β, γ, δ), 1 − 2β p 1 − 2(α + β) p 18 RC, YK, JL, SM, AS, SS, EW, EW, JY and

X δp(m, n, h, l) (3.45) Gp(α, β, γ, δ) := . h( 1 +γ)+l( 1 +δ)+n( 1 +α)+m( 1 +β) m,n,h,l p 2 2 2 2

4. Simplifying the Ratios Conjecture Prediction

In this section we seek a simplified form of MK (α, β, γ, δ). First, we again consider several separate cases, depending on the value of p mod 4.

4.1. Pulling out Main Terms. Suppose p ≡ 3(4). By (3.42), we expand each local factor as (4.1) X δ3(4)(m, n, 0, 0) δ3(4)(m, n, 2, 2) Gp(α, β, γ, δ) = + n( 1 +α)+m( 1 +β) 2( 1 +γ)+2( 1 +δ)+n( 1 +α)+m( 1 +β) m,n p 2 2 p 2 2 2 2 even δ (m, n, 0, 2) δ (m, n, 2, 0) + 3(4) + 3(4) 2( 1 +δ)+n( 1 +α)+m( 1 +β) 2( 1 +γ)+n( 1 +α)+m( 1 +β) p 2 2 2 p 2 2 2 X 1 1 = + n( 1 +α)+m( 1 +β) (1+2γ)+(1+2δ)+n( 1 +α)+m( 1 +β) m,n p 2 2 p 2 2 even 1 1 − − (1+2δ)+n( 1 +α)+m( 1 +β) (1+2γ)+n( 1 +α)+m( 1 +β) p 2 2 p 2 2  1 1 1  X 1 = 1 + − − . p2+2γ+2δ p1+2δ p1+2γ pn(1+2α)+m(1+2β) m,n

Assuming small positive fixed values of Re(α), Re(β), Re(γ), Re(δ), we factor out all terms which, for fixed p, converge substantially slower than 1/p2 and note that (4.2)  1 1  1   1 1  1  G (α, β, γ, δ) = 1 − − + O 1 + + + O p p1+2δ p1+2γ p2 p1+2α p1+2β p2 1 1 1 1  1  = 1 − − + + + O p1+2δ p1+2γ p1+2α p1+2β p2  1 −1  1 −1  1   1   1  = 1 − 1 − 1 − 1 − + O . p1+2α p1+2β p1+2γ p1+2δ p2

In fact we write

Gp(α, β, γ, δ) = Yp(α, β, γ, δ) × Ap(α, β, γ, δ), GAUSSIAN PRIMES ACROSS SECTORS 19 where

 1   1   1   1  1 − p1+α+γ 1 − p1+β+γ 1 − p1+α+δ 1 − p1+β+δ Yp(α, β, γ, δ) :=  1   1   1   1  1 − p1+2α 1 − p1+2β 1 − p1+α+β 1 − p1+γ+δ  1   1   1   1  1 + p1+α+γ 1 + p1+β+γ 1 + p1+α+δ 1 + p1+β+δ (4.3) ×  1   1   1   1  1 + p1+α+β 1 + p1+2γ 1 + p1+2δ 1 + p1+γ+δ and Ap(α, β, γ, δ) := Gp(α, β, γ, δ)/Yp(α, β, γ, δ) is another local function, which converges like 1/p2 for sufficient small Re(α), Re(β), Re(γ), and Re(δ).

Next, suppose p ≡ 1(4). Factoring out terms with slow convergence as above, we expand Gp(α, β, γ, δ) as

(4.4) X  min {m, n} + 1 min {m, n} + 1 Gp(α, β, γ, δ) = + n( 1 +α)+m( 1 +β) (1+2γ)+(1+2δ)+n( 1 +α)+m( 1 +β) m+n p 2 2 p 2 2 even min {m, n} + 1 min {m, n} + 1  + + (1+2δ)+n( 1 +α)+m( 1 +β) (1+2γ)+n( 1 +α)+m( 1 +β) p 2 2 p 2 2 X  −2(min {m, n} + 1) −2(min {m, n} + 1) + + ( 1 +δ)+n( 1 +α)+m( 1 +β) ( 1 +γ)+n( 1 +α)+m( 1 +β) m+n p 2 2 2 p 2 2 2 odd −2(min {m, n} + 1) −2(min {m, n} + 1)  + + ( 1 +γ)+2( 1 +δ)+n( 1 +α)+m( 1 +β) 2( 1 +γ)+( 1 +δ)+n( 1 +α)+m( 1 +β) p 2 2 2 2 p 2 2 2 2 X  4n + 2  X 4 (min {m, n} + 1) + + p(1+γ+δ)+n(1+α+β) (1+γ+δ)+n( 1 +α)+m( 1 +β) n m+n p 2 2 even m6=n   X min{m, n} + 1  1 1 1  =   1 + + +  n( 1 +α)+m( 1 +β)  p1+2γ p1+2δ p2+2γ+2δ m+n p 2 2 even   ! X −2(min{m, n} + 1) 1 1 1 1 +   × + + +  n( 1 +α)+m( 1 +β)  1 +γ 1 +δ 3 +2γ+δ 3 +γ+2δ m+n p 2 2 p 2 p 2 p 2 p 2 odd    X 4 min{m, n} + 4 X 4n + 2   1  +  +  .  n( 1 +α)+m( 1 +β) pn(1+α+β)  p1+γ+δ m+n p 2 2 n  even m6=n 20 RC, YK, JL, SM, AS, SS, EW, EW, JY

Since (4.5) X min{m, n} + 1  1 1 2  1  = 1 + + + + O , n( 1 +α)+m( 1 +β) p1+2α p1+2β p1+α+β p2 m+n p 2 2 even !! X −2(min{m, n} + 1) −2 −2 1 (4.6) = + + O , n( 1 +α)+m( 1 +β) 1 +α 1 +β 3 m+n p 2 2 p 2 p 2 p 2 odd and (4.7)    X 4 min{m, n} + 4 X 4n + 2   1  2  1   +  = + O ,  n( 1 +α)+m( 1 +β) pn(1+α+β)  p1+γ+δ p1+γ+δ p2 m+n p 2 2 n  even m6=n we conclude that, for p ≡ 1(4), we may write

(4.8) Gp(α, β, γ, δ) = Yp(α, β, γ, δ) × Ap(α, β, γ, δ), where  1   1   1   1  1 − p1+α+γ 1 − p1+β+γ 1 − p1+α+δ 1 − p1+β+δ Yp(α, β, γ, δ) :=  1   1   1   1  1 − p1+2α 1 − p1+2β 1 − p1+α+β 1 − p1+γ+δ  1   1   1   1  1 − p1+α+γ 1 − p1+β+γ 1 − p1+α+δ 1 − p1+β+δ (4.9) × ,  1   1   1   1  1 − p1+α+β 1 − p1+2γ 1 − p1+2δ 1 − p1+γ+δ and Ap(α, β, γ, δ) is a function that converges sufficiently rapidly.

Finally, note that (4.10)   X δ2(m, n, 0, 0) δ2(m, n, 1, 1) G2(α, β, γ, δ) = + n( 1 +α)+m( 1 +β) ( 1 +γ)+( 1 +δ)+n( 1 +α)+m( 1 +β) m+n 2 2 2 2 2 2 2 2 even   X δ2(m, n, 1, 0) δ2(m, n, 0, 1) + + ( 1 +γ)+n( 1 +α)+m( 1 +β) ( 1 +δ)+n( 1 +α)+m( 1 +β) m+n 2 2 2 2 2 2 2 2 odd  1  X  1  = 1 + 21+γ+δ n( 1 +α)+m( 1 +β) m+n 2 2 2 even  1 1  X  1  − + . 1 +γ 1 +δ n( 1 +α)+m( 1 +β) 2 2 2 2 m+n 2 2 2 odd GAUSSIAN PRIMES ACROSS SECTORS 21

We therefore may write

(4.11) G2(α, β, γ, δ) = Y2(α, β, γ, δ) × A2(α, β, γ, δ), where (4.12) 1  1  1  1  1 − 21+α+γ 1 − 21+β+γ 1 − 21+α+δ 1 − 21+β+δ Y2(α, β, γ, δ) := 1  1  1  1  1 − 21+2α 1 − 21+2β 1 − 21+α+β 1 − 21+γ+δ and A2(α, β, γ, δ) := G2(α, β, γ, δ)/Y2(α, β, γ, δ).

4.2. Expanding the Euler Product. Recall that for Re(x) > 0,

−1 Y  1  (4.13) ζ(1 + x) = 1 − , p1+x p and

−1 −1 Y  1  Y  1  L(1 + x) = 1 − 1 + , (4.14) p1+x p1+x p≡1(4) p≡3(4) where L(s) := L(s, χ1). Incorporating the above simplifications, and again collecting only terms which converge substantially slower that p−3/2, we arrive at the following conjecture.

Conjecture 4.1. With constraints on α, β, γ, δ as described in (3.6) and (3.7), we have

(4.15)   2 1 1   2 X k Lk( + α)Lk( + β) X k fb 2 2 = fb G(α, β, γ, δ) K L ( 1 + γ)L ( 1 + δ) K k6=0 k 2 k 2 k6=0 1  π 2α 1  π 2β + G(−α, β, γ, δ) + G(α, −β, γ, δ) 1 − 2α 2K 1 − 2β 2K   2(α+β)  1  π   1 + + G(−α, −β, γ, δ) + O K 2 , 1 − 2(α + β) 2K where

Y G(α, β, γ, δ) := Gp(α, β, γ, δ)(4.16) p (4.17) = Y (α, β, γ, δ) × A(α, β, γ, δ), 22 RC, YK, JL, SM, AS, SS, EW, EW, JY

(4.18) Y Y (α, β, γ, δ) := Yp(α, β, γ, δ) p ζ(1 + 2α)ζ(1 + 2β)ζ(1 + γ + δ)ζ(1 + α + β) = ζ(1 + α + γ)ζ(1 + β + γ)ζ(1 + β + δ)ζ(1 + α + δ) L(1 + 2γ)L(1 + 2δ)L(1 + γ + δ)L(1 + α + β) × , L(1 + α + γ)L(1 + β + γ)L(1 + β + δ)L(1 + α + δ) Q and A(α, β, γ, δ) := p Ap(α, β, γ, δ) is an Euler product that converges for sufficiently small fixed values of Re(α), Re(β), Re(γ), Re(δ).

In further calculations, it will be helpful to define

ζ(1 + 2α)ζ(1 + 2β)ζ(1 + γ + δ)ζ(1 + α + β) (4.19) Y(α, β, γ, δ) := , ζ(1 + α + γ)ζ(1 + β + γ)ζ(1 + β + δ)ζ(1 + α + δ) as well as G(α, β, γ, δ) (4.20) A(α, β, γ, δ) := . Y(α, β, γ, δ)

It will also be necessary to make use of the following lemma.

Lemma 4.2. We have that

(4.21) A(α, β, α, β) = A(α, β, α, β) = 1.

Proof. Since Y (α, β, α, β) = Y(α, β, α, β) = 1, it suffices to show that G(α, β, α, β) = 1. Note that G2(α, β, α, β) = 1, and upon writing

−1 −1 X 1  1   1  (4.22) = 1 − 1 − , pn(1+2α)+m(1+2β) p1+2β p1+2α m,n we similarly obtain that Gp(α, β, α, β) = 1 whenever p ≡ 3(4). Moreover, we rewrite

X min(m, n) + 1 p2(1+α+β)(1 + p1+α+β) (4.23) = , m( 1 +α)+n( 1 +β) (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1) m+n p 2 2 even and

5 +2α+2β α β X −2(min(m, n) + 1) −2p 2 (p + p ) (4.24) = , m( 1 +α)+n( 1 +β) (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1) m+n p 2 2 odd GAUSSIAN PRIMES ACROSS SECTORS 23 as well as X 4 · min(m, n) + 4 4p2(1+α+β)(1 + p1+α+β) = m( 1 +α)+n( 1 +β) (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1) m6=n p 2 2 (4.25) m+n even 4p2(1+α+β) − , (p1+α+β − 1)2 and

∞ X 4n + 2 2p1+α+β(1 + p1+α+β) (4.26) = , pn(1+α+β) (p1+α+β − 1)2 n=0 so that for p ≡ 1(4), ! p2(1+α+β)(1 + p1+α+β) G (α, β, γ, δ) = p (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1)

5 +2α+2β α β !  1 1 1  2p 2 (p + p ) × 1 + + + − p1+2γ p1+2δ p2+2γ+2δ (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1) ! 1 1 1 1 2p1+α+β(1 + p1+α+β) × + + + + 1 +γ 1 +δ 3 +2γ+δ 3 +γ+2δ 1+α+β 2 p 2 p 2 p 2 p 2 (p − 1) 4p2+2α+2β(1 + p1+α+β) 4p2+2α+2β   1  + − . (p1+2α − 1)(p1+α+β − 1)(p1+2β − 1) (p1+α+β − 1)2 p1+γ+δ

Upon setting α = γ and β = δ, we then have Gp(α, β, α, β) = 1. The lemma then follows from (4.16). 

Lemma 4.3. Define Aβ(α) := A(−α, −β, α, β). Then 2+8β 2 4β d X p + p − 2p log p (4.27) Aβ(α) = −2 . dα p2+8β + p2 − p4β − p4+4β α=−β p≡3(4) Proof. Write Y (4.28) Aβ(α) = pβ(α), p where

(4.29) pβ(α) := Ap(−α, −β, α, β) are the local factors of Aβ(α), and note that pβ(−β) = 1 at each prime p. By the product rule, d X d Y (4.30) A = p q . dα β dα β β q p6=q 24 RC, YK, JL, SM, AS, SS, EW, EW, JY

Note that (4.31)  2−α−β (−2+2α+β )(−1+21+α+β )(2−21+2α+2α+β −21+2β +21+2α+2β )(−2+22α)(−2+22β )  1/2 α 1/2 α 1/2 β 1+α β 1/2 β α 1+β if p = 2  (2 −2 )(2 +2 )(2 −2 )(2 −2 )(2 +2 )(2 −2 )  − 1 p−4(α+β)(−1 + p1+2α)(−p + pα+β) if p ≡ 1(4)  (−1+p)4(p1+α−pβ )2(pα−p1+β )2  1+α+β 2 1+2β 1+2α 2+2α α+β 3(α+β)  ×(−1 + p ) (−1 + p )(p − 2p + p + p − 2p pβ(α) = −4p1+α+β − 4p2(1+α+β) + 2p2+α+β + 3p1+3α+β − 2p2+3α+β − 2p1+2β  +p2+2β + 4p1+2α+2β + p3+2α+2β + 3p1+α+3β − 2p2+α+3β + p2+3α+3β)   p−4(α+β)(−1+p1+2α)(1+p1+2α)(−p+pα+β )(p+pα+β )(−1+p1+α+β )  2 2 2+4α 2(α+β) 2(2+α+β) 2+4β ) if p ≡ 3(4),  (−1+p ) (p −p −p +p  ×(1 + p1+α+β)(−1 + p1+2β)(1 + p1+2β) so that  0 if p = 2 d  (4.32) p (α) = 0 if p ≡ 1(4) β 2+8β 2 4β dα α=−β  (p +p −2p ) log p  −2 p2+8β +p2−p4β −p4+4β if p ≡ 3(4), from which the result follows. 

5. The Ratios Conjecture Prediction for Var(ψK,X ):

Let FK (θ) be as in (1.1). By the Fourier expansion of FK , we may write X N(a) ψ (θ) = Φ Λ(a)F (θ − θ) K,X X K a a (5.1) X N(a) X 1  k  = Φ Λ(a) fb e4ki(θa−θ). X K K a k∈Z Since the mean value is given by the zero mode k = 0, the variance may be computed as (5.2) Z π 2 2 2 Var(ψK,X ) = ψK,X (θ) − hψK,X i dθ π 0 Z π     2 2 2 X −i4kθ 1 k X N(a) = e fb Φ Λ(a)Ξk(a) dθ. π K K X 0 k6=0 a By applying the Mellin Inversion Formula 1 Z (5.3) Φ(x) = Φ(˜ s)x−sds, 2πi (2) we obtain   Z s X N(a) 1 X X ˜ Λ(a)Ξk(a)Φ = Λ(a)Ξk(a) s Φ(s)ds X 2πi (2) N(a) (5.4) a a 1 Z L0 = − k (s)Φ(˜ s)Xsds. 2πi (2) Lk GAUSSIAN PRIMES ACROSS SECTORS 25

Inserting this into (5.2), we find that (5.5) Z π     2 2 2 X −i4kθ 1 k X N(a) Var(ψK,X ) = e fb Λ(a)Ξk(a)Φ dθ π K K X 0 k6=0 a Z π   Z 0 2 2 2 X −i4kθ 1 k i L s = e fb k (s)Φ(˜ s)X ds dθ. π K K 2π Lk 0 k6=0 (2) Upon recalling that

Z π  0 2 4i(k0−k)θ 0 if k 6= k (5.6) e dθ = π 0 0 2 if k = k ,

Var(ψK,X ) can be restricted to terms for which the Fourier coefficients are equal, i.e., (5.7)   2 0 0 1 Z Z k L L 0 X k k 0 ˜ ˜ 0 s s 0 Var(ψK,X ) = 2 2 fb (s) (s )Φ(s)Φ(s )X X dsds 4π K K Lk Lk (2) (2) k6=0

L0 by Fubini’s theorem. Moreover, under GRH, k (s) is holomorphic in the Lk 1 half-plane Re(s) > 2 , and thus we may shift the vertical integrals to Re(s) = 1 0 1 0 0 2 + , and Re(s ) = 2 +  , for any ,  > 0. Upon making the change of 1 0 1 variables α := s − 2 and β := s − 2 we find that (5.8) 1−2λ Z Z   2 0   0   X X k Lk 1 Lk 1 Var(ψK,X ) = − 2 fb + α + β 4π 0 K Lk 2 Lk 2 ( ) () k6=0 1  1  × Φ˜ + α Φ˜ + β XβXαdαdβ. 2 2 Note by (3.7) that the substitution of the ratios conjecture is only valid 1−c 1−c when Im(α), Im(β) c K , for small c > 0. If either Im(α) > K or Im(β) > K1−c, we use the rapid decay of Φ,˜ as well as upper bounds on L0 the growth of k within the critical strip, to show that the contribution to Lk −1+c the double integral coming from these tails is bounded by Oc K . For Im(α), Im(β) < K1−c, we take the derivative of (3.43) to obtain (5.9)

  2 0   0     2 X k Lk 1 Lk 1 X k 0  1 + fb + α + β = fb MK (α, β) + O K 2 , K Lk 2 Lk 2 K k6=0 k6=0 26 RC, YK, JL, SM, AS, SS, EW, EW, JY where2

0 ∂ ∂ (5.10) M (α, β) := MK (α, β, γ, δ) . K ∂β ∂α (α,β,α,β) Plugging (5.9) into (5.8) for Im(α), Im(β) < K1−c, and using a similar argu- ment as above to bound the tails, we then arrive at the following conjecture: Conjecture 5.1. We have that   X  − λ + (5.11) Var(ψ ) = −C I + I + I + I + O X 2 , K,X f K 1 2 3 4 where Z Z ∂ ∂ I1 : = G(α, β, γ, δ) (0) () ∂β ∂α (5.12) (α,β,α,β) 1  1  × Φ˜ + α Φ˜ + β Xα+βdαdβ, 2 2

Z Z ∂ ∂ π 2β 1 I2 : = G(α, −β, γ, δ) (0) () ∂β ∂α 2 1 − 2β (5.13) (α,β,α,β) 1  1  × Φ˜ + α Φ˜ + β XαXβ(1−2λ)dαdβ 2 2

Z Z ∂ ∂ π 2α 1 I3 : = G(−α, β, γ, δ) (0) () ∂β ∂α 2 1 − 2α (5.14) (α,β,α,β) 1  1  × Φ˜ + α Φ˜ + β Xα(1−2λ)Xβdαdβ 2 2 and (5.15) Z Z   ∂ ∂ 1 π 2(α+β) I4 := G(−α, −β, γ, δ) (0) () ∂β ∂α 1 − 2(α + β) 2 (α,β,α,β) 1  1  × Φ˜ + α Φ˜ + β Xα(1−2λ)Xβ(1−2λ)dαdβ. 2 2 Conjecture 1.2 now follows from Conjecture 5.1 as a consequence of the following three lemmas: Lemma 5.2. We have  2 0 2 1  − 1  (5.16) I = −(log X)C − C − π Φ˜ + O X 5 . 1 Φ Φ 2 Φ

2Here, and elsewhere, we allow for a slight abuse of notation: α and β denote coordi- nates of MK , as well as coordinates of the point at which the derivative is then evaluated. GAUSSIAN PRIMES ACROSS SECTORS 27

Lemma 5.3. We have −  OΦ (X ) if λ > 1   2  2π2 Φ˜ 1  + O (X−) if 1 < λ < 1 (5.17) I2 + I3 = 2 Φ 2  2  2 ˜ 1  − 1  4π Φ 2 + OΦ (X ) if λ < 2 , where  > 0 is a constant (depending on λ). Lemma 5.4. We have  − 1 CΦ(1 − 2λ) log X + κ + OΦ (X ) if 2 < λ (5.18) I4 = − 1 OΦ (X ) if 2 > λ, where  π2    12 (5.19) κ := C log + 2 +C −C +C0 −π2 Φ˜ −A0 . Φ 4 Φ,ζ Φ,L Φ 2 Φ 0 Here  > 0 is a constant (depending on λ), and CΦ,ζ , CΦ,L, and AΦ, are as in (9.25), (9.26), and (9.27), respectively. Conjecture 1.2 follows upon inserting the results from Lemma 5.2, Lemma 5.3, and Lemma 5.4, into Conjecture 5.1. Note that when λ > 1, Conjecture 5.1 moreover agrees with Theorem 1.1.

6. Auxiliary Lemmas Before proceeding to the proofs of Lemmas 5.2, 5.3, and 5.4, we will prove a few auxiliary lemmas that will be used frequently in the rest of the paper.  1 Lemma 6.1. Let h(α) be holomorphic in Ω := − 4 < Re(α) <  for some  > 0, except for possibly at a finite set of poles. Moreover, suppose that h(α) does not grow too rapidly in Ω, i.e., there exists a fixed d > 0 such that h(α)  |α|d away from the poles in Ω. Set 1  (6.1) f(α) := h(α)Φ˜ + α Xα, 2 where α, β, and Φ˜ are as above. Then

Z X  − 1  (6.2) f(α)dα = 2πi · Res(f, ak) + O X 5 , () k where Res(f, ak) denotes the residue of f at each pole ak ∈ Ω. Proof. Consider the contour integral drawn counter-clockwise along the closed box

(6.3) CT := V1 ∪ H1 ∪ V2 ∪ H2, 28 RC, YK, JL, SM, AS, SS, EW, EW, JY where   V1 := [ − iT,  + iT ]  H := [ + iT, − 1 +  + iT ] (6.4) 1 4 V := [− 1 +  + iT, − 1 +  − iT ]  2 4 4  1 H2 := [− 4 +  − iT,  − iT ]. By Cauchy’s residue theorem,

Z X  Z  (6.5) f(α) dα = 2πi · Res(f, ak) − lim f(α)dα . T →∞ () k H1∪V2∪H2 Set α = σ + iT . By the properties of the Mellin transform, we find that for any fixed A > 0, 1  (6.6) Φ˜ + it  min(1, |t|−A). 2 Since moreover h(α) does not grow too rapidly, we bound Z Z −1/4+ 1  X (6.7) ˜ σ+iT f(α)dα = h(σ + iT )Φ + σ + iT X dσ  A , H1  2 T so that Z (6.8) lim f(α)dα = 0, T →∞ H1 and similarly Z (6.9) lim f(α)dα = 0. T →∞ H2 Finally, we bound

(6.10) Z Z     1 1 (− 1 ++it) lim f(α)dα = −i h − +  + it Φ˜ +  + it X 4 dt T →∞ 4 4 V2 R Z −A − 1 + it − 1  min(1, |t| )X 4 X dt  X 5 , R from which the theorem then follows.  Lemma 6.2. Let α, β, Φ˜ be as above. Suppose h(α, β) is holomorphic3 in the region  1  (6.11) Ω × Ω := (α, β): − < Re(α), Re(β) <  4

3 2 A function f :Ω ⊂ C 7→ C is said to be homolorphic if it is holomorphic in each variable separately. GAUSSIAN PRIMES ACROSS SECTORS 29 for some  > 0, and moreover that h(α, β) does not grow too rapidly in Ω × Ω, i.e., does not grow too rapidly in each variable, separately. Then Z   Z   1 1 α+β − 2 (6.12) Φ˜ + β h(α, β)Φ˜ + α X dαdβ  X 5 . (0) 2 () 2 Proof. Set 1  (6.13) f (α) := h (α)Φ˜ + α Xα, β β 2 where hβ(α) := h(α, β). Since fβ is holomorphic, by an application of Lemma 6.1 we write Z  − 1   − 1  (6.14) fβ(α)dα = Oβ X 5 = O g(β) · X 5 , () where g does not grow too rapidly as a function of β. By another application of Lemma 6.1, it then follows that

(6.15) Z    Z  Z   1 β 1 − 1 +β Φ˜ + β X fβ(α) dα dβ  g(β)Φ˜ + β X 5 dβ (0) 2 () (0) 2 − 2  X 5 .



Lemma 6.3. Let α, β,Φ˜, and fβ be as above. Suppose fβ(α) has a finite pole at ak(β) with residue Res(fβ, ak(β)). Moreover, suppose that for each  1 ak(β), Res(fβ, ak(β)) is holomorphic in Ω := − 4 < Re(β) <  for some  > 0, and that Res(fβ, ak(β)) does not grow too rapidly in Ω. Then Z   Z 1 β − 1 (6.16) Φ˜ + β X fβ(α) dαdβ  X 5 . (0) 2 () Proof. By Lemma 6.1, we write Z X  − 1  (6.17) fβ(α)dα = 2πi · Res(fβ, ak(β)) + O g(β) · X 5 , () k where, as in the proof of Lemma 6.2, we explicitly note the dependence of the error term on β. Applying Lemma 6.2 to the error term in (6.17), we obtain (6.18) Z   Z 1 β Φ˜ + β X fβ(α) dαdβ (0) 2 () Z   1 X β  − 2  (6.19) = 2πi · Φ˜ + β Res(fβ, ak(β))X dβ + O X 5 , 0 2 ( ) k 30 RC, YK, JL, SM, AS, SS, EW, EW, JY and finally by another application of Lemma 6.1, Z   1 X β − 1 (6.20) Φ˜ + β Res(fβ, ak(β))X dβ  X 5 . 0 2 ( ) k  0 Lemma 6.4. Let CΦ and CΦ be as in (1.6) and (1.11), respectively. Then Z 1  1  (6.21) CΦ = −2πi Φ˜ + β Φ˜ − β dβ (0) 2 2 and Z     0 ˜ 1 ˜ 0 1 (6.22) CΦ = −2πi Φ + β Φ − β dβ. (0) 2 2 Proof. Set φ(y) = Φ(ey)ey/2 so that

  Z ∞ Z   1 − 1 +it iyt t (6.23) Φ˜ + it = Φ(x)x 2 dx = φ(y)e dy = φb − , 2 0 R 2π ˜ 1  t  and similarly Φ 2 − it = φb 2π . By shifting the integral to Re(β) = 0 we obtain (6.24) Z 1  1  Z  t   t  2πi Φ˜ + β Φe − β dβ = 2πi φb − φb i dt. (0) 2 2 R 2π 2π t  t  Since φb − 2π = φb 2π , we moreover have that

(6.25) Z  t   t  Z  t  2 Z 2

φb − φb idt = φb − idt = 2πi · φb(x) dx R 2π 2π R 2π R Z ∞ = 2πi · Φ(x)2dx, 0 i.e., Z ∞ Z     2 2 ˜ 1 1 (6.26) CΦ = 4π Φ(x) dx = −2πi Φ + β Φe − β dβ. 0 (0) 2 2 Next, note that     Z ∞ 0 1 d 1 d 1 −β−1 Φ˜ − β = − Φ˜ − β = − Φ(x)x 2 dx 2 dβ 2 dβ 0 (6.27) Z ∞ −β− 1 = Φ(x)(log x)x 2 dx. 0 Upon setting g(y) = y · Φ(ey)ey/2, we write Z ∞ Z   − 1 −it −iyt t (6.28) Φ(x)(log x)x 2 dx = g(y)e dy = gb , 0 R 2π GAUSSIAN PRIMES ACROSS SECTORS 31 so that by shifting to the half-line Re(β) = 1/2, it follows that (6.29) Z     Z     ˜ 1 ˜ 0 1 t t 2πi Φ + β Φ − β dβ = 2πi gb φb − i dt (0) 2 2 R 2π 2π Z 2 = (2πi) · gb(x)φb(x) dx R Z = −4π2 · g(x)φ(x) dx R Z ∞ = −4π2 · log x · Φ(x)2 dx. 0 

7. Proof of Lemma 5.2 In this section we seek to compute

(7.1) Z Z     ∂ ∂ ˜ 1 ˜ 1 α+β I1 = G(α, β, γ, δ) Φ + α Φ + β X dαdβ. (0) () ∂β ∂α (α,β,α,β) 2 2 Note that

(7.2)   ∂ ∂ ∂ ∂ G(α, β, γ, δ) = Y(α, β, γ, δ) ·A(α, β, γ, δ) ∂α ∂β (α,β,α,β) ∂α ∂β (α,β,α,β) ζ00 ζ0 ζ0 ζ0 = (1 + α + β) − (1 + α + β)2 + (1 + 2α) (1 + 2β) ζ ζ ζ ζ 0 ζ ∂ + (1 + 2α) · A(α, β, γ, δ) ζ ∂β (α,β,α,β) 0 ζ ∂ ∂ ∂ + (1 + 2β) · A(α, β, γ, δ) + A(α, β, γ, δ) , ζ ∂α (α,β,α,β) ∂α ∂β (α,β,α,β) where we recall that A˜(α, β, α, β) = 1. Since

∂ ∂ (7.3) h(α, β) := A(α, β, γ, δ) ∂α ∂β (α,β,α,β) is holomorphic in Ω×Ω, by Lemma 6.2 we find that the integral correspond- ing to this term is bounded by O X−2/5. Moreover, by an application of Lemma 6.3, the integrals corresponding to (7.4) 0 0 ζ ∂ ζ ∂ (1+2α)· A(α, β, γ, δ) and (1+2β)· A(α, β, γ, δ) ζ ∂β (α,β,α,β) ζ ∂α (α,β,α,β) 32 RC, YK, JL, SM, AS, SS, EW, EW, JY are each bounded by O X−1/5. The main contributions to (7.1) thus come from ζ00 ζ0 ζ0 ζ0 (7.5) (1 + α + β), − (1 + α + β)2, and (1 + 2α) · (1 + 2β), ζ ζ ζ ζ and we now proceed to separately compute each of the three corresponding integrals.

ζ00 7.1. Computing ζ (1 + α + β):. The first double integral we would like to compute is

Z Z 00     ζ ˜ 1 ˜ 1 (α+β) I(7.1) := (1 + α + β)Φ + α Φ + β X dα dβ (0) () ζ 2 2 (7.6) Z   Z ˜ 1 β = Φ + β X f(7.1)(α) dα dβ, (0) 2 () where ζ00 1  (7.7) f (α) := (1 + α + β)Φ˜ + α Xα. (7.1) ζ 2

Since f(7.1) has one double pole at α = −β, it follows from Lemma 6.1 that

Z  − 1  (7.8) f(7.1)(α) dα = 2πi · Res(f(7.1), −β) + O X 5 . ()

To compute Res(f(7.1), −β), we split f(7.1)(α) into two parts.

ζ00 i) First, we expand ζ (1 + α + β) about the point α = −β, yielding

ζ00 2 2γ (7.9) (1 + α + β) = − 0 + 2(γ2 + γ ) + h.o.t., ζ (α + β)2 (α + β) 0 1 where γi are Stieltjes constants, not to be confused with the variable γ used previously.

˜ 1  α ii) Next, we expand g(α) = Φ 2 + α X about the point α = −β. Since 1  d 1  (7.10) g0(α) = Φ˜ + α (log X)Xα + Φ˜ + α Xα, 2 dα 2 it follows that 1   1  g(α) = Φ˜ − β X−β + Φ˜ − β (log X)X−β 2 2 (7.11) 1   + Φ˜ 0 − β X−β (α + β) + h.o.t. 2 Multiplying the two Taylor expansions above, we find that GAUSSIAN PRIMES ACROSS SECTORS 33

(7.12)  1  1  1   Res(f , −β) = 2 Φ˜ − β (log X) + Φ˜ 0 − β − γ Φ˜ − β X−β, (7.1) 2 2 0 2 and therefore Z         ˜ 1 ˜ 0 1 ˜ 1 −β f(7.1)(α) dα = 4πi Φ − β (log X) + Φ − β − γ0Φ − β X () 2 2 2  − 1  + O X 5 . By an application of Lemma 6.1, it follows that

(7.13)  Z     ˜ 1 ˜ 1 I(7.1) = 4πi log X Φ + β Φ − β dβ (0) 2 2 Z     Z      1 0 1 1 1 + Φ˜ + β Φ˜ − β dβ − γ0 Φ˜ + β Φ˜ − β dβ (0) 2 2 (0) 2 2  − 2  + O X 5 , i.e.,

0  − 2  (7.14) I(7.1) = −2(log X)CΦ − 2CΦ + 2γ0CΦ + O X 5 .

ζ0 2 7.2. Computing − ζ (1 + α + β) . Next, we are interested in the integral (7.15) Z Z 0     ζ 2 ˜ 1 ˜ 1 α+β I(7.2) := − (1 + α + β) · Φ + α Φ + β X dα dβ (0) () ζ 2 2 Z   Z β ˜ 1 = − X Φ + β f(7.2)(α) dα dβ, (0) 2 () where ζ0 1  (7.16) f (α) := (1 + α + β)2 · Φ˜ + α Xα. (7.2) ζ 2

Since f(7.2)(α) has a single pole at α = −β, it follows from Lemma 6.1 that

Z  − 1  (7.17) f(7.2)(α) dα = 2πi · Res(f(7.2), −β) + O X 5 . () To determine the residue of this integral at the point α = −β, we expand ζ0 2 ˜ 1  α ζ (1 + α + β) and g(α) := Φ 2 + α X about the point α = −β, yielding ζ0 1 2γ (7.18) (1 + α + β)2 = − 0 + h.o.t., ζ (α + β)2 (α + β) 34 RC, YK, JL, SM, AS, SS, EW, EW, JY and 1   1  g(α) = Φ˜ − β X−β + Φ˜ − β (log X)X−β 2 2 (7.19) 1   + Φ˜ 0 − β X−β (α + β) + h.o.t., 2 so that

(7.20)  1  1  1   Res(f , −β) = Φ˜ − β (log X) + Φ˜ 0 − β − 2γ Φ˜ − β X−β. (7.2) 2 2 0 2 It follows that Z      ˜ 1 ˜ 0 1 f(7.2)(α) dα = 2πi Φ − β (log X) + Φ − β () 2 2    1 −β  − 1  − 2γ Φ˜ − β X + O X 5 , 0 2 from which we obtain

0  − 2  (7.21) I(7.2) = (log X)CΦ + CΦ − 2γ0CΦ + O X 5 .

 ζ0   ζ0  7.3. Computing ζ (1 + 2α) ζ (1 + 2β) . Next we are interested in the integral

(7.22) Z Z 0 0     ζ ζ ˜ 1 ˜ 1 α+β I(7.3) := (1 + 2α) · (1 + 2β)Φ + α Φ + β X dα dβ (0) () ζ ζ 2 2 Z Z = f(7.3)(β) dβ · f(7.3)(α)dα, (0) () where ζ0 1  (7.23) f (α) := (1 + 2α)Φ˜ + α Xα. (7.3) ζ 2 Since ζ0 1 (7.24) (1 + 2α) = − + γ + h.o.t., ζ 2α 0 f has a simple pole at α = 0 with residue

  1 ˜ 1 (7.25) Res(f(7.3), 0) = lim α · f(7.3)(α) = − Φ . α→0 2 2 GAUSSIAN PRIMES ACROSS SECTORS 35

It thus follows from Lemma 6.1 that Z   ˜ 1  − 1  (7.26) f(7.3)(α)dα = −πiΦ + O X 5 , () 2 and similarly Z   ˜ 1  − 1  (7.27) f(7.3)(β)dβ = −πiΦ + O X 5 , () 2 from which we conclude that

  2 2 1  − 1  (7.28) I = −π Φ˜ + O X 5 . (7.3) 2 Lemma 5.2 then follows upon combing the results of (7.14), (7.21), and (7.28).

8. Proof of Lemma 5.3 Next, we consider the quantity (8.1) ! ∂ ∂ 1 π 2α ζ(1 − 2α) π 2α G(−α, β, γ, δ) = A(−α, β, α, β) ∂α ∂β 1 − 2α 2 (1 − 2α) 2 (α,β,α,β)  0 0 0  ! ζ ζ ζ d − (1 + 2β) − (1 − α + β) + (1 + α + β) − A(α, β, γ, δ) ζ ζ ζ dβ (−α,β,α,β) coming from the integral I2, as well as the symmetric quantity (8.2)   ∂ ∂ 1 π 2β ζ(1 − 2β) π 2β G(α, −β, γ, δ) = A(α, −β, α, β) ∂α ∂β 1 − 2β 2 (α,β,α,β) (1 − 2β) 2  0 0 0  ! ζ ζ ζ ∂ − (1 + 2α) − (1 + α − β) + (1 + α + β) − A(α, β, γ, δ) ζ ζ ζ ∂α (α,−β,α,β) coming from the integral I3. As before, we approach this term by term, and note that by an application of Lemma 6.3, the integrals over

d ∂ (8.3) A(α, β, γ, δ) and A(α, β, γ, δ) dβ (−α,β,α,β) ∂α (α,−β,α,β)

 − 1  may be bounded by O X 5 . Significant contributions then come from integration against the following integrands:

ζ0 ζ0 i) − ζ (1 + 2β) and − ζ (1 + 2α), 36 RC, YK, JL, SM, AS, SS, EW, EW, JY

ζ0 ζ0 ii) − ζ (1 − α + β) and − ζ (1 + α − β),

ζ0 iii) 2 · ζ (1 + α + β).

ζ0 ζ0 8.1. Computing − ζ (1 + 2β) and − ζ (1 + 2α): Combining the discussion above with (5.1), we seek to compute the following integral:

(8.4) Z 2α    Z  ζ(1 − 2α) π  ˜ 1 α(1−2λ) I(8.1) := − · Φ + α X f(8.1)(β)dβ dα, () (1 − 2α) 2 2 (0) where

ζ0 1  (8.5) f (β) := A(−α, β, α, β) (1 + 2β)Φ˜ + β Xβ. (8.1) ζ 2

Note that since

ζ0 1 (8.6) (1 + 2β) = − + γ + h.o.t., ζ 2β 0 f(8.1) has a simple pole at β = 0 with residue

1 1 (8.7) Res(f , 0) = −A(−α, 0, α, 0) Φ˜ , (8.1) 2 2 so that by Lemma 6.1,

Z   ˜ 1  − 1  (8.8) f(8.1)(β)dβ = −πiA(−α, 0, α, 0)Φ + O X 5 . (0) 2

Inserting this back into the outer integral, we find that

1 Z  1  ˜ 0 − 5 (8.9) I(8.1) = πiΦ f(8.1)(α) dα + O X , 2 () where

π 2α ζ(1 − 2α) 1  (8.10) f 0 (α) := A(−α, 0, α, 0) Xα(1−2λ) Φ˜ + α . (8.1) 2 (1 − 2α) 2 GAUSSIAN PRIMES ACROSS SECTORS 37

1 If λ > 2 , we shift to the vertical line Re(α) = 1/5, so that (8.11) 1 +it Z Z    2 1−2λ  5 0 1 1 π X f(8.1)(α) dα = i A − − it, 0, + it, 0 () R 5 5 4 ζ( 3 − 2it)   5 ˜ 7 × 3 Φ + it dt ( 5 − 2it) 10 1 it π2X1−2λ  5 Z  1 1  π2X1−2λ  = i A − − it, 0, + it, 0 4 R 5 5 4 ζ 3 − 2it   5 ˜ 7 × 3  Φ + it dt. 5 − 2it 10 Since the integrand decays rapidly as a function of t, the integral is bounded absolutely by a constant that is independent of λ. It follows that for any 1 fixed λ > 2 , ( 1 )(1−2λ) (8.12) I(8.1)  X 5 . 1 If λ < 2 we shift to the vertical line Re(α) = −1/5, pick up a residue at  − 1 (1−2λ) α = 0, and bound the remaining contour by O X( 5 ) . Since

1 (8.13) ζ(1 − 2α) = − + γ + h.o.t., 2α 0 the residue is given by 1 1 (8.14) Res(f 0 , 0) = − Φ˜ , (8.1) 2 2 where we make use of Lemma 4.2. Since 1 1 1  12 (8.15) 2πi · − Φ˜ πiΦ˜ = π2 Φ˜ , 2 2 2 2 it follows that

  2  1  2 ˜ 1  (− 5 )(1−2λ) 1  π Φ 2 + O X if λ < 2 (8.16) I(8.1) =  1  (− 5 )(2λ−1) 1  O X if λ > 2 .

ζ0 Upon including the contribution from the integral over − ζ (1 + 2α) coming from the third piece of the Ratios Conjecture, we conclude that the combined contribution from these two symmetric pieces together is equal to

  2  1  2 ˜ 1  (− 5 )(1−2λ) 1  2π Φ 2 + O X if λ < 2 (8.17) 2 · I(8.1) =  1  (− 5 )(2λ−1) 1  O X if λ > 2 . 38 RC, YK, JL, SM, AS, SS, EW, EW, JY

ζ0 ζ0 8.2. Computing − ζ (1 − α + β) and − ζ (1 + α − β). In this section we assume that 0 < Re(α) < Re(β) = 0. The integral that we are interested in computing is

(8.18) Z   2α  Z  ζ(1 − 2α) ˜ 1 π  α(1−2λ) I(8.2) := − Φ + α X f(8.2)(β) dβ dα, () (1 − 2α) 2 2 (0) where ζ0 1  (8.19) f (β) = A(−α, β, α, β) (1 − α + β)Φ˜ + β Xβ. (8.2) ζ 2 Recalling that

ζ0 1 (8.20) (1 − α + β) = + γ + h.o.t., ζ α − β 0 we find that f(8.2) has a simple pole at α = β. Under the assumption that 0 < Re(α) < Re(β) = 0, this pole is picked up upon shifting the contour to the line Re(α) = −1/5, and the residue is 1  (8.21) Res(f , α) = −A(−α, α, α, α)Φ˜ + α Xα. (8.2) 2 It follows that (8.22) Z   2α   ζ(1 − 2α) ˜ 1 π  α(1−2λ)  − 1  I(8.2) = − Φ + α X − 2πi · Res(f(8.2), α) + O X 5 dα () (1 − 2α) 2 2 Z  1  0 − 5 = 2πi f(8.2)(α) dα + O X , () where (8.23) ζ(1 − 2α) π 2α 1  1  f 0 (α) = A(−α, α, α, α) X2α(1−λ)Φ˜ + α Φ˜ + α . (8.2) (1 − 2α) 2 2 2 If λ > 1, we shift to the vertical line Re(α) = 1/5, and bound

Z  1  0 ( 5 )(2−2λ) (8.24) f(8.2)(α) dα = X , () 1 while if λ < 1, we shift to the vertical line Re(α) = − 5 , pick up a pole at α = 0, and bound the remaining contour by O X(−1/5)(2−2λ). Since 1 1 1 (8.25) Res(f 0 , 0) = − Φ˜ Φ˜ , (8.2) 2 2 2 we conclude that GAUSSIAN PRIMES ACROSS SECTORS 39

 2 2  1   (− 2 )(1−λ)  2π Φ˜ + O X 5 if λ < 1 (8.26) I = 2 (8.2)  (− 2 )(λ−1)  O X 5 if λ > 1.

Lastly, we consider the integral

(8.27) Z   2β  Z  ζ(1 − 2β) ˜ 1 π  β(1−2λ) I(8.2,sym) := − Φ + β X f(8.2,sym)(β) dα dβ, (0) (1 − 2β) 2 2 () where ζ0 1  (8.28) f (β) = A(α, −β, α, β) (1 + α − β)Φ˜ + α Xα, (8.2,sym) ζ 2 which is the symmetry quantity corresponding to I(8.2,sym) coming from (8.2) above. Under the assumption that 0 < Re(α) < Re(β), the inner integral is 1 holomorphic in the region − 5 < Re(α) < , from which it follows that

 − 1  (8.29) I(8.2,sym) = O X 5 .

Note that had we instead assumed 0 < Re(β) < Re(α) < 1/5, we would obtain a significant contribution from I(8.2,sym) and a negligible contribution from I(8.2). In this way, the symmetry between α and β is preserved.

ζ0 8.3. Computing ζ (1 + α + β). Next, we compute

(8.30) ! Z 2α   Z π  ζ(1 − 2α) ˜ 1 α(1−2λ) I(8.3) := Φ + α X f(8.3)(β)dβ dα, () 2 (1 − 2α) 2 (0) where ζ0 1  (8.31) f (β) = A(−α, β, α, β) (1 + α + β)Φ˜ + β Xβ. (8.3) ζ 2 Since

ζ0 1 (8.32) (1 + α + β) = − + γ + h.o.t., ζ α + β 0 the residue at β = −α is

1  (8.33) Res(f , −α) = −A(−α, −α, α, −α)Φ˜ − α X−α. (8.3) 2 40 RC, YK, JL, SM, AS, SS, EW, EW, JY

It follows that (8.34) Z   ˜ 1 −α  − 1  f(8.3)(β)dβ = −2πiA(−α, −α, α, −α)Φ − α X + O X 5 , (0) 2 and thus upon shifting the line of integration to Re(α) = 1/5, we conclude that

(8.35) Z 2α   π  ζ(1 − 2α) ˜ 1 α(1−2λ)   − 1  I(8.3) = Φ + α X Res(f(8.3), −α) + O X 5 dα () 2 (1 − 2α) 2  − 2 λ = O X 5 .

Lemma 5.3 then follows upon combining the computations in (8.17), (8.26), (8.29), and (8.35).

9. Proof of Lemma 5.4 Since (9.1)   ∂ ∂ 1 π 2(α+β) G(−α, −β, γ, δ) = ∂α ∂β 1 − 2(α + β) 2 (α,β,α,β) ! ζ(1 − 2α)ζ(1 − 2β) π 2(α+β) ζ(1 − α − β)ζ(1 + α + β) A(−α, −β, α, β), (1 − 2(α + β)) 2 ζ(1 + α − β)ζ(1 − α + β) we write Z   2β  Z  1 π  β(1−2λ) (9.2) I4 = ζ(1 − 2β)Φ˜ + β X f4(α) dα dβ, (0) 2 2 () where π 2α ζ(1 − 2α) f (α) = A(−α, −β, α, β) Xα(1−2λ) 4 2 (1 − 2(α + β)) (9.3) ! ζ(1 − α − β)ζ(1 + α + β) 1  × Φ˜ + α . ζ(1 + α − β)ζ(1 − α + β) 2

Suppose λ > 1/2. We then shift to the vertical line Re(α) = 1/5, so that (9.4) 1 it Z π2X1−2λ  5 Z  1 1  π2X1−2λ  f4(α) dα = i A − − it, −β, + it, β () 4 R 5 5 4 ! ζ( 3 − 2it) ζ( 4 − it − β)ζ 6 + it + β   5 5 5 ˜ 7 × 3 6  4  Φ + it dt. ( 5 − 2it − 2β) ζ 5 + it − β ζ 5 − it + β 10 GAUSSIAN PRIMES ACROSS SECTORS 41

By the decay properties of Φ, the integral is bounded by a constant (de- pending on β) that is independent of λ. It follows that Z  1 (1−2λ)  1 (1−2λ) (9.5) f4(α) dα = Oβ X 5 = O g(β) · X 5 , () where g does not grow too rapidly as a function of β. Inserting this back into the outer integral, and shifting the line of integration to Re(β) = 1/5, we obtain (9.6) Z   2β 1 (1−2λ) 1 π  β(1−2λ) 2 (1−2λ) I4  X 5 · g(β) · ζ(1 − 2β)Φ˜ + β X dβ  X 5 . (0) 2 2 Next, suppose λ < 1/2. We shift the line of integration to Re(α) = −1/5, and pick up a simple at α = 0, and a double pole at α = −β. By an application of Lemma 6.1, we then find Z    − 1 (1−2λ) (9.7) f4(α)dα = 2πi · Res(f4, 0) + Res(f4, −β) + O X 5 . () It remains to compute these two residue contributions.

9.1. Simple Pole at α = 0: Note that f4 has a simple pole at α = 0 with residue 1 1 1 (9.8) Res(f , 0) = − A(0, −β, 0, β) Φ˜ , 4 2 (1 − 2β) 2 which contributes when λ < 1/2. Inserting this into the outer integral, we find that (9.9) Z 1  π 2β  1 1 ζ(1 − 2β)Φ˜ + β Xβ(1−2λ) −πiA(0, −β, 0, β) Φ˜ dβ (0) 2 2 (1 − 2β) 2   Z ˜ 1 = −πiΦ f(9.1)(β)dβ, 2 (0) where ζ(1 − 2β) 1  π 2β (9.10) f (β) = Φ˜ + β Xβ(1−2λ)A(0, −β, 0, β). (9.1) (1 − 2β) 2 2 The integral in (9.9) has a simple pole at β = 0 with residue 1 1 (9.11) Res(f , 0) = − Φ˜ , (9.1) 2 2 so that the total contribution from this pole is   2 2 1  − 1 (1−2λ) (9.12) −π Φ˜ + O X 5 . 2 42 RC, YK, JL, SM, AS, SS, EW, EW, JY

9.2. Double Pole at α = −β: To compute the residue of f4 at the point α = −β, we split f4(α) into three components. i) First, define ζ(1 − 2α) Φ˜ 1 + α (9.13) h(α) := A(−α, −β, α, β) 2 . ζ(1 + α − β)ζ(1 − α + β) (1 − 2(α + β)) Since h(α) is holomorphic at α = −β, we may expand it as a power series of the form (9.14) h(α) = h(−β) + h(1)(−β)(α + β) + h.o.t. ii) Next, we expand

2α α 2 π   1−2λ α(log( π )+(1−2λ) log X) α·C (9.15) X = e 4 = e 2 about the point α = −β, where π2  (9.16) C := log + (1 − 2λ) log X. 4 The expansion is given as

(9.17) eα·C = e−β·C + C · e−β·C (α + β) + h.o.t. iii) Finally, we note that (9.18)  1   1  ζ(1 − α − β)ζ(1 + α + β) = − + γ + h.o.t. + γ + h.o.t. . α + β 0 α + β 0 The total residue is then found to be the full coefficient of (α + β)−1, i.e., −β·C −β·C (1) (9.19) Res(f4, −β) = −C · e h(−β) − e h (−β). We now compute these two contributions separately.

9.2.1. First Piece. The total contribution from the first piece is

(9.20)  π2   π −2β Φ˜ 1 − β − 2πi · log + (1 − 2λ) log X X−β(1−2λ) · 2 , 4 2 ζ(1 − 2β) where we note that A(β, −β, −β, β) = 1. Inserting this into the outer inte- gral of (9.2), we find that the main contribution of this piece is

(9.21) Z 1  1   π2   −2πi Φ˜ + β Φ˜ − β · log + (1 − 2λ) log X dβ, (0) 2 2 4 GAUSSIAN PRIMES ACROSS SECTORS 43 i.e., the total contribution is given by

  2   π  − 1 (1−2λ) (9.22) C log + (1 − 2λ) log X + O X 5 . Φ 4

9.2.2. Second Piece. One directly computes

(9.23)

1 1  1   ζ0 ζ0 h(1)(−β) = Φ˜ 0 − β + Φ˜ − β 2 − (1 − 2β) − (1 + 2β) ζ(1 − 2β) 2 2 ζ ζ ! L0 L0  + A0 (−β) + (1 − 2β) + (1 + 2β) , β L L upon noting that Aβ(−β) = A(β, −β, −β, β) = 1. Inserting this expression back into the outer integral of (9.2), we find that the total contribution from this piece is

0 0  − 1 (1−2λ) (9.24) 2CΦ + CΦ,ζ − CΦ,L + CΦ − AΦ + O X 5 , where (9.25) Z 1  1  ζ0 ζ0  CΦ,ζ := 2πi Φ˜ + β Φ˜ − β (1 − 2β) + (1 + 2β) dβ, (0) 2 2 ζ ζ (9.26) Z 1  1  L0 L0  CΦ,L := 2πi Φ˜ + β Φ˜ − β (1 + 2β) + (1 − 2β) dβ, (0) 2 2 L L and (9.27) ! Z     p2+8β + p2 − 2p4β log p 0 ˜ 1 ˜ 1 X AΦ := −4πi Φ + β Φ − β 2+8β 2 4β 4+4β dβ, 0 2 2 p + p − p − p ( ) p≡3(4) p prime where we have made use of Lemma 4.3. Lemma 5.4 then follows upon combining the results of (9.12), (9.22), and (9.24).

Appendix A. Obtaining Numerical Evidence for Conjecture 1.2 The data provided in Figure 1 was obtained using the Mathematica code 9 provided below. Fix X = 10 , Φ = 1(0,1], and f = 1 1 1 . The code outputs [− 2 , 2 ] Var(ψK,X )/(hψK,X i log X) as a function of λ := log K/ log X, for values of λ ranging between 0.1 ≤ λ ≤ 0.7 with step size 0.025. For simplicity, we ignore the small contributions coming from prime powers, as well as from the (1 + i) ⊂ Z[i] lying above 2. 44 RC, YK, JL, SM, AS, SS, EW, EW, JY

In[1]:= X = 10^9;(* This size tooka long time for Mathematica to run.*) A = 1;(* We count primes inZ[i] with norm fromA toB*) B=X;

Roundmod[m_, res_,N_] = Ceiling[(m- res)/N]*N+ res;(* An auxiliary function which finds the smallest integern >=m such thatn=res(modN).*) gauss= Take[ Ratios[Flatten[ Table[PowersRepresentations[p, 2, 2], {p, Select[Range[Roundmod[A, 1, 4],B, 4], PrimeQ]}]]], {1, -1, 2}]; (* For primesp which are1 modulo4 between the specified rangesA andB, we compute the unique representationp=a^2+b ^2 fora,b nonnegative integers witha

anglesWeights= WeightedData[allAngles, allPrimes]; Do[Print[{j, Divide[Variance[ Last[HistogramList[ anglesWeights, {0, Divide[Pi, 2], Divide[Pi, 2 Round[X^j]]}]]],X^{1 -j}*Log[X]]}], {j, .1, .7, .025}](* This outputs pairs{lambda, Var(psi_{K,X})/( log(X))} for .1 <= lambda <= .7, with step size .025 for lambda.*) The following is used to compute a numerical approximation for CΦ,ζ , when Φ = 1(0,1]: In[2]:= << NumericalCalculus‘(* importsa package that allows us to take numerical limits and derivatives*) PhiTilde[s_] := (1/s)(* Mellin transform of Phi.*) PhiTildeProduct[t_] := PhiTilde[1/2 +I*t]*PhiTilde[1/2 -I*t] ZetaPrime[s_] :=ND[Zeta[t],t,s](* Using Mathematica’s in- built Zeta function. We takea derivative*) 2*Pi*I*(I* NIntegrate[ PhiTildeProduct[t]*(ZetaPrime[1 + .2 + 2*I*t]/Zeta[1 + .2 + 2*I*t] + ZetaPrime[1 - .2 - 2*I*t]/Zeta[1 - .2 - 2*I*t]), {t, -25, 25}]) The following is used to compute a numerical approximation for CΦ,L, when Φ = 1(0,1]: In[3]:= << NumericalCalculus‘(* importsa package that allows us to take numerical limits and derivatives*) PhiTilde[s_] := (1/s)(* Mellin transform of Phi.*) PhiTildeProduct[t_] := PhiTilde[1/2 +I*t]*PhiTilde[1/2 -I*t] L[s_] :=N[DirichletL[4, 2,s]](* This is the DirichletL- function for the non-trivial character modulo 4.*) LPrime[s_] :=ND[L[t],t,s](* Takesa derivative of theL- function.*) -2*Pi*I*(I* NIntegrate[ PhiTildeProduct[t]*(LPrime[1 + .2 + 2*I*t]/L[1 + .2 + 2*I*t] + LPrime[1 - .2 - 2*I*t]/L[1 - .2 - 2*I*t]), {t, -25, 25}]) 0 The following is used to compute a numerical approximation for AΦ, when Φ = 1(0,1]: (p^2 - 2p^(4)+p^(2 + 8)) Log[p] In[4]:= h[_, p_] = p^2 -p^(4)-p^(4 + 4)+p^(2 + 8) In[5]:= PhiTilde[s_] := (1/s)(* Mellin transform of Phi.*) PhiTildeProduct[t_] := PhiTilde[1/2 +I*t]*PhiTilde[1/2 -I*t]

qn[p_] = NIntegrate[h[I*t,p]*PhiTildeProduct[t], {t, 0, Infinity }] primes3= Select[Range[3, 1000, 4], PrimeQ];(* Selects the primes congruent to3 modulo4 which are less than 1000.*) 46 RC, YK, JL, SM, AS, SS, EW, EW, JY

output = 0; For[i = 1,i <= Length[primes3],i++, output += 2*qn[primes3[[i]]]] Print["Range is",j,". Integral is", output]

References [1] J.C. Andrade, J.P. Keating, Conjectures for the Integral Moments and Ratios of L- Functions over Function Fields, Journal of 142 (2014), 102−148. [2] Bui, H. M.; Keating, J. P.; Smith, D. J. On the variance of sums of arithmetic functions over primes in short intervals and pair correlation for L-functions in the Selberg class. J. Lond. Math. Soc. (2) 94 (2016), no. 1, 161–185. [3] J.B. Conrey, D.W. Farmer, and M.R. Zirnbauer. Autocorrelation of ratios of L- functions, Commun. Number Theory Phys. 2 (2008) no. 3 593–636. [4] J. B. Conrey, D.W. Farmer, J.P. Keating, M.O. Rubinstein, N.C. Snaith; Integral moments of L-functions,. Proc. London Math. Soc. (3) 91 (2005), no. 1, 33–104. [5] Conrey, B., and D. Farmer. Mean values of L-functions and symmetry. International Mathematics Research Notices 2000, no. 17 (2000): 883−908. [6] Conrey, B., D. Farmer, P. Keating, M. Rubinstein, and N. Snaith. Integral moments of L-functions. Proceedings of the London Mathematical Society (3) 91, no. 1 (2005): 33–104. [7] Conrey, J. B., and N. C. Snaith. Applications of the L-functions Ratios Conjecture. Proceedings of the London Mathematical Society 93, no. 3 (2007): 594−646. [8] D. Fiorilli, J. Parks, and A. S¨odergren, Low-lying zeros of quadratic Dirichlet L- functions: A transition in the Ratios Conjecture (2017): preprint arXiv:1710.06834. [9] E. Hecke, Eine neue Art von Zetafunktionen und ihre Beziehungen zur Verteilung der Primzahlen. I. , Math. Z. 1 (1918), 357-376. II, Math. Z. 6 (1920), 11–51. [10] Hejhal, D. On the triple correlation of zeros of the zeta function. International Math- ematics Research Notices 1994, no. 7 (1994): 294–302. [11] N. Katz and P. Sarnak, Random Matrices, Frobenius Eigenvalues and Monodromy, AMS Colloquium Publications 45, AMS, Providence, 1999. [12] N. Katz and P. Sarnak, Zeros of Zeta Functions and Symmetries, Bull. AMS 36, 1999, 1 – 26. [13] J. Kubilius. On a problem in the n-dimensional analytic theory of . Vilniaus Valst. Univ. Mokslo Darbai. Mat. Fiz. Chem. Mokslu Ser. 4 1955 5–43. [14] Montgomery, H, The Pair Correlation of Zeros of the Zeta Function, , St. Louis, Mo., 1972, (ed. H. G. Diamond), Proceedings of Symposia in Pure Mathematics 24, AMS, Providence (1973), 181–193. [15] Odlyzko, A. On the distribution of spacings between zeros of the zeta function. Math- ematics of Computation 48, no. 177 (1987): 273–308. [16] Z. Rudnick, E. Waxman, Angles of Gaussian Primes, Israel Journal of Mathematics. To appear (2019). https://arxiv.org/abs/1705.07498. [17] O. Parzanchevski, P. Sarnak, Super-Golden-Gates for PU(2). Adv. Math. 327 (2018), 869–901. [18] Soundararajan, K. Nonvanishing of quadratic Dirichlet L-functions at s = 1/2. Annals of Mathematics 152, no. 2 (2000): 447–88. [19] E. Waxman Lower Order Terms for the One Level Density of a Symplectic Family of Hecke L-Functions. J. Number Theory (2021), https://doi.org/10.1016/j.jnt.2020.11.022

Department of Mathematics, Princeton University, Princeton, NJ 08544 Email address: [email protected] GAUSSIAN PRIMES ACROSS SECTORS 47

Department of Mathematics, Columbia University, New York, NY 10027 Email address: [email protected]

Department of Mathematics, Dartmouth College, Hanover, NH 03755 Email address: [email protected]

Department of Mathematics and Statistics, Williams College, Williamstown, MA 01267 Email address: [email protected]

Department of Mathematics and Statistics, Williams College, Williamstown, MA 01267 Email address: [email protected]

Department of Mathematics, University California, Riverside, CA 92521 Email address: [email protected]

Charles University, Faculty of Mathematics and Physics, Department of Al- gebra, Sokolovska´ 83, 18600 Praha 8, Czech Republic Email address: [email protected]

Department of Mathematics, University of Michigan, Ann Arbor, MI 48109 Email address: [email protected]

Department of Mathematics, Colby College, Waterville, ME 04901 Email address: [email protected]