# Discrepancies in the distribution
of Gaussian primes

Lucile Devin<EMAIL_ADDRESS>Univ. Littoral Côte d’Opale, UR
2597 LMPA, Laboratoire de Mathématiques Pures et Appliquées Joseph Liouville,
F-62100 Calais, France

###### Abstract.

Motivated by questions of Fouvry and Rudnick on the distribution of Gaussian
primes, we develop a very general setting in which one can study inequities in
the distribution of analogues of primes through analytic properties of
infinitely many $L$-functions. In particular, we give a heuristic argument for
the following claim : for more than half of the prime numbers that can be
written as a sum of two squares, the odd square is the square of a positive
integer congruent to $1\bmod 4$.

###### Key words and phrases:

Chebyshev’s bias, Gaussian primes, Hecke characters

###### 2010 Mathematics Subject Classification:

11N05, 11K70

##  1\. Introduction

Let $p$ be a prime number, $p\equiv 1\bmod 4$, it can be written uniquely as
$p=a^{2}+4b^{2}$ with $a,b>0$ integers. Here we distinguish the odd and the
even square to have uniqueness, and we are interested in properties of the
coordinates $a$ and $2b$. For example, an open problem in this domain is to
prove that there are infinitely many prime numbers of the form $p=1+4b^{2}$.
Allowing a larger range for the coordinates, Fouvry and Iwaniec [FI97] have
shown that there are infinitely many prime numbers $p=a^{2}+4b^{2}$ with $a$
itself a prime number. While Friedlander and Iwaniec [FI98] established the
case where one of $a$ or $2b$ is a square. More recent results restricting the
values of $a$ and $b$ to thinner sets include [HBL17, LSX20, Pra20, FI21].

In another direction, starting from the result of Hecke [Hec18] ensuring that
the angles defined by $\arctan(\tfrac{2b}{a})$ are equidistributed, it is of
interest to study finer statistics of this distribution. Kubilius [Kub50,
Kub51] and Ankeny [Ank52] initiated the study of the distribution of these
angles in shrinking sectors, and further developments followed [Kov75, Mak77,
Col90, HL01, HLR20, CKL+20]. Recently Rudnick and Waxman [RW19] studied the
function field analogue and obtained statistical results that hold for almost
all arcs of shrinking length.

In this paper we discuss the following two questions:

  1. (1)

how often is $a<2b$ compared to $a>2b$?

  2. (2)

how often is $a\equiv 1\bmod 4$ compared to $a\equiv 3\bmod 4$?

The results of Hecke [Hec18] on the prime number theorem for $L$-functions
associated to Hecke characters provide an answer to these two questions :
asymptotically half of the time. Inspired by the letter of Chebyshev to Fuss
[Che99], and the rich literature that followed on Chebyshev’s bias (see [MS12]
for a survey on the numerous contributions to the questions on “prime number
races”), we investigate the discrepancy in these equidistribution results. We
denote the differences of counting functions

$D_{1}(x)=\lvert\\{p<x:p=a^{2}+4b^{2},\lvert a\rvert>\lvert
2b\rvert\\}\rvert-\lvert\\{p<x:p=a^{2}+4b^{2},\lvert a\rvert<\lvert
2b\rvert\\}\rvert,$ $D_{2}(x)=\lvert\\{p<x:p=a^{2}+4b^{2},\lvert a\rvert\equiv
1\bmod{4}\\}\rvert-\lvert\\{p<x:p=a^{2}+4b^{2},\lvert a\rvert\equiv
3\bmod{4}\\}\rvert.$

Then, assuming the Generalized Riemann Hypothesis, the results of Hecke imply
that, for $i=1$, $2$, $D_{i}(x)=O_{\epsilon}(x^{\frac{1}{2}+\epsilon})$. As
observed in general for functions related to prime counting (see e.g.
[Win41]), the logarithmic scale is the correct scale to study the functions
$D_{i}$. We recall the definition of the upper and lower logarithmic densities
of a set $\mathcal{P}\subset[1,\infty)$:

$\overline{\delta}(\mathcal{P})=\limsup_{Y\rightarrow\infty}\frac{1}{Y}\int_{0}^{Y}\mathbf{1}_{\mathcal{P}}(e^{y})\mathop{}\\!\mathrm{d}y\
\text{ and }\
\underline{\delta}(\mathcal{P})=\liminf_{Y\rightarrow\infty}\frac{1}{Y}\int_{0}^{Y}\mathbf{1}_{\mathcal{P}}(e^{y})\mathop{}\\!\mathrm{d}y,$

where $\mathbf{1}_{\mathcal{P}}$ is the characteristic function of the set
$\mathcal{P}$. If these two densities are equal, we denote
$\delta(\mathcal{P})$ their common value and call it the logarithmic density
of the set $\mathcal{P}$.

In this paper, we give a heuristic model for the distribution of the values of
the functions $D_{1}$ and $D_{2}$. We formulate two conjectures.

######  Conjecture 1.1.

There is a bias towards negative values in the distribution of the values of
the function $D_{1}$. That is to say that for more than half of the
$x\in[2,\infty)$ in logarithmic scale, more than half of the primes below $x$
can be written as a sum of two squares with the even square larger than the
odd square.

However we have $D_{1}(x)=\Omega_{\pm}(\frac{\sqrt{x}}{\log x})$. In
particular, the function changes signs infinitely often.

######  Conjecture 1.2.

There is a complete bias towards positive values in the distribution of the
values of the function $D_{2}$. That is to say that, for almost all (in
logarithmic scale) $x\in[2,\infty)$, more than half of the primes below $x$
can be written as a sum of two squares $p=a^{2}+4b^{2}$ with $\lvert
a\rvert\equiv 1\bmod 4$.

Precisely, we have $D_{2}(x)\geq 0$ for almost all $x$ in logarithmic scale,
and $D_{2}(x)=\Omega_{+}(\frac{\sqrt{x}}{\log x})$.

Figure 1. $D_{1}(x)$ for $x\in[2,5\cdot 10^{9}]$. Figure 2. $D_{2}(x)$ for
$x\in[2,5\cdot 10^{9}]$.

The $\Omega$ notation in the Conjectures is used in the following sense. For
two functions $f,g:[1,\infty)\rightarrow\mathbf{R}$, with $g$ positive, we
write $f(x)=\Omega_{+}(g)$ (resp. $\Omega_{-}(g)$) if we have
$\limsup_{x\rightarrow\infty}\frac{f(x)}{g(x)}>0$ (resp.
$\liminf_{x\rightarrow\infty}\frac{f(x)}{g(x)}<0$).

Numerical data up to $5\cdot 10^{9}$ have been computed to support both
conjectures and the graphs of the prime number races are presented in Figures
1 and 2. Note in particular that no negative value of $D_{2}$ was found in the
interval.

The paper is organized as follows. Section 2 is the technical heart of the
paper where the setting and the precise statement of our main theoretical
contribution (Theorem 2.2) are given. Here we emphasize the novel feature
(compared to previous results e.g. [RS94, ANS14, Dev20]) where we have managed
to obtain distribution results involving infinitely many $L$-functions. In
Section 3, we introduce the setting to study statistics about the distribution
of Gaussian primes, and we state our results towards Conjecture 1.1 and
Conjecture 1.2: Theorem 3.1 and Theorem 3.2. These two results are proved in
Section 4 as consequences of Theorem 2.2. Building on the ideas underlying
Theorem 3.1 and Theorem 3.2, we present in Section 5 heuristics that led us to
state Conjecture 1.1 and Conjecture 1.2. Finally in Section 6, we give the
proofs of the theoretical contributions stated in Section 2, notably Theorem
2.2.

## Acknowledgements

I am very grateful to Zeév Rudnick and Etienne Fouvry whose questions on very
early versions of this project were the starting points for what became
respectively Theorem 3.1 and Conjecture 1.2. This paper also benefited greatly
from discussions with Chantal David, Daniel Fiorilli, Andrew Granville,
Florent Jouve and Anders Södergren. The author was supported successively by
postdoctoral fellowships from the University of Ottawa, from the Centre de
Recherches Mathématiques and from Chalmers University of Technology. The
author is supported by the grant KAW 2019.0517 from the Knut and Alice
Wallenberg Foundation.

The computations presented here were obtained using SageMath [Sag20], with the
help of Valentin Priasso to deal with larger numbers and space.

##  2\. Chebyshev’s bias using infinitely many $L$-functions

###  2.1. Motivations and setting

In [Maz08], Mazur discussed prime number races for elliptic curves, or more
generally, for the Fourier coefficients of a modular form. For example, he
studied graphs of functions

$\displaystyle x\mapsto\lvert\\{p\leq x:a_{p}(E)>0\\}\rvert-\lvert\\{p\leq
x:a_{p}(E)<0\\}\rvert$

where $a_{p}(E)=p+1-\lvert E(\mathbf{F}_{p})\rvert$, for some elliptic curve
$E$ defined over $\mathbf{Q}$, and observed a bias towards negative values
when the algebraic rank of the elliptic curve is large. In [Sar07], Sarnak
commented and explained Mazur’s observations. His analysis of the prime number
race involves the zeros of all the symmetric powers
$L(\operatorname{Sym}^{n}E,s)$ of the Hasse–Weil $L$-function of
$E/\mathbf{Q}$. Sarnak notes that, in the case of an elliptic curve without
complex multiplication, the corresponding distribution may have infinite
variance and concludes that Mazur’s race should be unbiased. However, in the
case of an elliptic curve with complex multiplication, even though an infinite
number of $L$-functions is needed to understand Mazur’s bias, Sarnak states
that it would be possible to observe (and compute) an actual bias. In [CFJ16],
Cha, Fiorilli and Jouve develop these ideas in the context of elliptic curves
over function fields. The heuristics for Conjecture 1.1 (resp. 1.2) is the
implementation of these ideas in the special case of the elliptic curve
$y^{2}=x^{3}-x$ (resp. $y^{2}=x^{3}+x$) with complex multiplication by the
ring of Gaussian integers $\mathbf{Z}[i]$.

In the spirit of [Dev20], the main result of this article is stated in greater
generality and deals with the case of prime number races using infinitely many
real analytic $L$-functions. Before stating our theorem, let us present some
definitions and notation Our main result states the existence of a limiting
logarithmic distribution for a suitable normalization of a counting function,
and thus allow us to discuss the bias in the distribution of the values of
this function.

######  Definition 2.1.

Let $F:[1,\infty)\rightarrow\mathbf{R}$ be a real function. We say that $F$
admits a limiting logarithmic distribution if there exists a probability
measure $\mu$ on the Borel sets in $\mathbf{R}$ such that for any bounded
Lipschitz continuous function $g$, we have

$\displaystyle\lim_{Y\rightarrow\infty}\frac{1}{Y}\int_{0}^{Y}g(F(e^{y}))\mathop{}\\!\mathrm{d}y=\int_{\mathbf{R}}g(t)\mathop{}\\!\mathrm{d}\mu(t).$

If $F$ admits a limiting logarithmic distribution $\mu$, we say that
$\mu([0,\infty))$ is _the bias_ of $F$ towards non-negative values.

Note that our definition of the bias differs from previous literature where it
is usually defined as the logarithmic density of the set of $x$ such that
$F(x)>0$. However, in the setting of Chebyshev’s bias, it is expected (see
[KR03], also [RS94] assuming the Linear Independence and [MN20, Dev20] under
weaker hypotheses) that in general the distribution $\mu$ is continuous at $0$
and then the two definition coincide. We thus consider it as a sufficiently
good approximation.

###  2.2. Statement of the main result

In this paper we use the notion of _analytic $L$-function_ defined in [Dev20,
Def. 1.1]. Let us just recall that a vast majority of the $L$-functions used
in analytic number theory (and all the $L$-functions referred to in this
article) are proven (or at least conjectured) to be analytic $L$-functions. We
are interested in the prime number race associated to a sequence
$\mathcal{S}=\\{L(f_{m},\cdot):m\geq 0\\}$ of real analytic $L$-functions of
degree $d_{m}$, and analytic conductor $\mathfrak{q}(f_{m})$. To this sequence
we associate real coefficients $\underline{c}=(c_{m})_{m\geq 0}$ such that the
series

$\sum_{f_{m}\in\mathcal{S}}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$

is convergent. Moreover, we assume that the Generalized Riemann Hypothesis is
true for all the $L$-functions $L(f_{m},\cdot)$, $m\geq 0$ and their _second
moment_ (see [Dev20, Def. 1.1.(iii)]). That is to say that the non-trivial
zeros of the functions $L(f_{m},\cdot)$,
$L(\operatorname{Sym}^{2}f_{m},\cdot)$, and $L(\wedge^{2}f_{m},\cdot)$, $m\geq
0$ all have real part equal to $\tfrac{1}{2}$.

We note that, in this case, the difficulty compared to previous results is to
deal with the fact that there can be an infinite number of zeros of the
functions $L(f_{m},\cdot)$, $m\geq 0$ with bounded imaginary part. Let us
first fix the notation for the sets of zeros of the $L$-functions. For any
$\rho\in\mathbf{C}$, we denote by
$\operatorname{ord}(\rho,m)=\operatorname{ord}_{s=\rho}(L(f_{m},s))$ the order
of the zero at $s=\rho$ of the function $L(f_{m},s)$. For $M\geq 0$, we denote

$\displaystyle\operatorname{ord}_{\mathcal{S},\underline{c},M}(\rho)=\sum_{m\leq
M}c_{m}\operatorname{ord}(\rho,m),\qquad\operatorname{ord}_{\mathcal{S},\underline{c}}(\rho)=\sum_{m\geq
0}c_{m}\operatorname{ord}(\rho,m).$

One has (see e.g. [IK04, Prop. 5.7 (1)]),

$\operatorname{ord}(\rho,m)\ll\log(\mathfrak{q}(f_{m})(\lvert\rho\rvert+3)^{d_{m}}),$

with an absolute implicit constant. Thus, the condition on the coefficients
$c_{m}$ ensures that the series defining
$\operatorname{ord}_{\mathcal{S},\underline{c}}(\rho)$ is convergent for each
$\rho$. When we assume the Generalized Riemann Hypothesis, we omit the
$\frac{1}{2}$ in the notation and write for example, for
$\gamma\in\mathbf{R}$,
$\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)$ instead of
$\operatorname{ord}_{\mathcal{S},\underline{c}}(\tfrac{1}{2}+i\gamma)$. Then,
for $M\geq 0$ and $T>0$, we denote

$\displaystyle\mathcal{Z}_{\mathcal{S},\underline{c}}=\\{\gamma>0:\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\neq
0\\},\quad$
$\displaystyle\quad\mathcal{Z}_{\mathcal{S},\underline{c}}(T)=\mathcal{Z}_{\mathcal{S},\underline{c}}\cap(0,T]$
$\displaystyle\mathcal{Z}_{\mathcal{S},\underline{c},M}=\\{\gamma>0:\operatorname{ord}_{\mathcal{S},\underline{c},M}(\gamma)\neq
0\\},\quad$
$\displaystyle\quad\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)=\mathcal{Z}_{\mathcal{S},\underline{c},M}\cap(0,T],$

the sets of positive imaginary parts of zeros of the product of the
$L$-functions in the family. We do not count with multiplicities in these
sets.

We now have all the tools to state our main theorem.

######  Theorem 2.2.

Let $\mathcal{S}=\\{L(f_{m},\cdot):m\geq 0\\}$ be a sequence of real analytic
$L$-functions of degree $d_{m}$ and analytic conductor $\mathfrak{q}(f_{m})$,
and let $\underline{c}=(c_{m})_{m\geq 0}$ be a sequence of real numbers such
that the series

$\sum_{f_{m}\in\mathcal{S}}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$

is convergent. Assume the Riemann Hypothesis is satisfied for all
$L(f_{m},\cdot)$, $m\geq 0$. Then the function

$E_{\mathcal{S},\underline{c}}(x):=\frac{\log x}{\sqrt{x}}\Bigg{(}\sum_{p\leq
x}\sum_{m\geq 0}c_{m}\lambda_{f_{m}}(p)+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)\Bigg{)}$

admits a limiting logarithmic distribution $\mu_{\mathcal{S},\underline{c}}$
with average value

$\mathbb{E}(\mu_{\mathcal{S},\underline{c}})=m_{\mathcal{S},\underline{c}}:=\sum_{m\geq
0}c_{m}\left(\operatorname{ord}_{s=1}(L(f_{m}^{(2)},s))-2\operatorname{ord}_{s=1/2}(L(f_{m},s))\right)$

and variance

$\operatorname{Var}(\mu_{\mathcal{S},\underline{c}})=2\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}}\frac{\lvert\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\rvert^{2}}{\frac{1}{4}+\gamma^{2}}.$

Moreover, there exists a constant $a>0$ depending on $\mathcal{S}$ and
$\underline{c}$, such that we have

$\mu_{\mathcal{S},\underline{c}}((-\infty,-R)\cup(R,\infty))\ll\exp(-a\sqrt{R}).$

We prove this theorem in Section 6. A way to understand this statement, is to
think that the function $y\mapsto E_{\mathcal{S},\underline{c}}(e^{y})$ takes
its values with some probability law of mean value
$m_{\mathcal{S},\underline{c}}$. In general (see [Dev20, Cor. 2.4]), we expect
the probability law to be symmetric with respect to its mean value, so we
think of the mean value as a good indicator of the behaviour of $y\mapsto
E_{\mathcal{S},\underline{c}}(e^{y})$, and the indication is more precise when
the variance is relatively small.

In the case of [Sar07], $E/\mathbf{Q}$ is an elliptic curve without complex
multiplication, and we consider the $L$-functions $L(f_{1},\cdot)=L(E,\cdot)$
and $L(f_{m},\cdot)=L(\operatorname{Sym}^{m}E,\cdot)$ for $m\geq 2$. The
degree of each $L$-function is $d_{m}=m+1$ and the analytic conductors satisfy
$\log\mathfrak{q}(f_{m})\ll m\log(m\mathfrak{q}(f_{1}))$ (see [Sar07, (ii)]).
We observe that our condition on the convergence of
$\sum_{f_{m}\in\mathcal{S}}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$
corresponds to the condition stated in [CFJ16, Cor. 2.9] — precisely $c_{m}\ll
m^{-3-\eta}$ for some $\eta>0$ — to ensure the existence of the limiting
distribution in the analogous question over function fields.

###  2.3. Signs changes

Most of the conditional results of [RS94, MN20, Dev20] giving more precisions
on the properties of the limiting distribution
$\mu_{\mathcal{S},\underline{c}}$ can be adapted to this case. Let us present
here some results concerning the support of $\mu_{\mathcal{S},\underline{c}}$,
as they can help to answer the question “does the function have infinitely
many sign changes?”, and provide Omega-results. Similarly to [RS94, Th. 1.2],
we have a lower bound for the tails of the distribution, in case all the
coefficients have the same sign.

######  Proposition 2.3.

Let $\mathcal{S}=\\{L(f_{m},\cdot):m\geq 0\\}$ be a sequence of real analytic
$L$-functions of degree $d_{m}$, and analytic conductor $\mathfrak{q}(f_{m})$,
and let $\underline{c}=(c_{m})_{m\geq 0}$ be a sequence of _non-negative_ real
numbers such that the series

$\sum_{f\in\mathcal{S}}c_{m}d_{m}\log\mathfrak{q}(f_{m})$

is convergent, and at least one $c_{m}\neq 0$. Assume the Riemann Hypothesis
is satisfied for all $L(f_{m},\cdot)$, $m\geq 0$. Then, there exist a constant
$b>0$, depending on $\mathcal{S}$ and $\underline{c}$, such that we have

$\min\big{(}\mu_{\mathcal{S},\underline{c}}((R,\infty)),\mu_{\mathcal{S},\underline{c}}((-\infty,-R))\big{)}\gg\exp(-\exp
bR).$

As we may want to use coefficients of different signs, we now state a result
inspired by [MN20, Th. 1.5(b and c)] and using the notion of _self-sufficient
zero_ that Martin and Ng introduced.

######  Definition 2.4.

We say that an ordinate $\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}$ is
self-sufficient if it is not in the $\mathbf{Q}$-span of
$\mathcal{Z}_{\mathcal{S},\underline{c}}\smallsetminus\\{\gamma\\}$.

A priori, if there is no special reason for the imaginary parts of the zeros
of some $L$-functions to be related, then we do not expect that there are any
relation between them. This general idea is called the General Simplicity
Hypothesis, or the Linear Independence hypothesis (LI). It is used in
particular in [RS94] to give more precisions on the limiting distribution in
the original case of Chebyshev’s bias as well as to compute an explicit value
of this bias. To state our next result, we do not need all the strength of
this hypothesis. We show that if there are enough self-sufficient zeros in
$\mathcal{Z}_{\mathcal{S},\underline{c}}$ then the distribution
$\mu_{\mathcal{S},\underline{c}}$ is supported on all $\mathbf{R}$.

######  Proposition 2.5.

Let $\mathcal{S}=\\{L(f_{m},\cdot):m\geq 0\\}$ be a sequence of real analytic
$L$-functions of degree $d_{m}$ and analytic conductor $\mathfrak{q}(f_{m})$,
and let $\underline{c}=(c_{m})_{m\geq 0}$ be a sequence of real numbers such
that the series

$\sum_{f\in\mathcal{S}}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$

is convergent. Assume the Riemann Hypothesis is satisfied for all
$L(f_{m},\cdot)$, $m\geq 0$. Let
$\mathcal{Z}_{\mathcal{S},\underline{c}}=\\{\gamma>0:\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\neq
0\\}$ and $\mathcal{Z}_{\mathcal{S},\underline{c}}^{\mathrm{LI}}$ the set of
self-sufficient elements in $\mathcal{Z}_{\mathcal{S},\underline{c}}$. Assume
that

$\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}^{\mathrm{LI}}}\frac{\lvert\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\rvert}{\gamma}$

diverges. Then $\mathrm{supp}(\mu_{\mathcal{S},\underline{c}})=\mathbf{R}$.

In particular, under such conditions, we deduce that there cannot be a
complete bias, that is to say that the function
$E_{\mathcal{S},\underline{c}}$ changes sign infinitely many times, and we
obtain Omega-results.

######  Corollary 2.6.

Under the assumptions of Proposition 2.3 or of Proposition 2.5, we have

$\displaystyle\sum_{p\leq x}\sum_{m\geq 0}c_{m}\lambda_{f_{m}}(p)+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)=\Omega_{\pm}(\tfrac{\sqrt{x}}{\log
x}).$

In particular, the function $x\mapsto\sum_{p\leq x}\sum_{m\geq
0}c_{m}\lambda_{f_{m}}(p)+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)$ has
infinitely many changes of signs.

Finally, we observe that in the case of a non-real111The case of a real zero
of maximal real part would give only one direction of Omega-result as in
[FM20, Lem. 2.1]. counter-example to the Generalized Riemann Hypothesis,
oscillations results are more easily obtained thanks to Landau’s Theorem.

######  Proposition 2.7.

Let $\mathcal{S}=\\{L(f_{m},\cdot):m\geq 0\\}$ be a sequence of real analytic
$L$-functions of degree $d_{m}$ and analytic conductor $\mathfrak{q}(f_{m})$,
and let $\underline{c}=(c_{m})_{m\geq 0}$ be a sequence of real numbers such
that the series

$\sum_{f\in\mathcal{S}}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$

is convergent. Let
$\Theta=\sup\\{\operatorname{Re}(\rho):\operatorname{ord}_{\mathcal{S},\underline{c}}(\rho)\neq
0\\}$. Assume that $\Theta>\frac{1}{2}$ and that for each $m\geq 0$, one has
$L(f_{m},\Theta)\neq 0$. Then for any $\epsilon>0$, we have

$\displaystyle\sum_{p\leq x}\sum_{m\geq 0}c_{m}\lambda_{f_{m}}(p)+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)=\Omega_{\pm}(x^{\Theta-\epsilon}).$

##  3\. Distribution of the angles of Gaussian primes

The representation of a prime number as a sum of two squares is explained in
the ring of Gaussian integers $\mathbf{Z}[i]$ where the prime numbers $p\equiv
1\bmod 4$ split as $p=(a+i2b)(a-i2b)$, while the prime numbers $p\equiv 3\bmod
4$ are inert. The aim of Conjectures 1.1 and 1.2 is to understand fine
statistics on the distribution of Gaussian primes in the plane. To do so, we
study the distribution of the angles of the Gaussian primes which are defined
as follows. For any $\mathfrak{p}\neq(1+i)$ prime ideal in $\mathbf{Z}[i]$,
there exists a unique Gaussian integer $a+2ib\equiv 1\bmod(2+2i)$ generating
$\mathfrak{p}$ (starting from $a,b\geq 0$ then either $a+2ib\equiv
1\bmod(2+2i)$ or $-a-2ib\equiv 1\bmod(2+2i)$). Then we say that the angle of
$\mathfrak{p}$ is the argument of this uniquely determined generator,

$\theta_{\mathfrak{p}}=\arg(a+2ib)\in(-\pi,\pi]\text{ where
}\mathfrak{p}=(a+2ib),\quad a+2ib\equiv 1\bmod(2+2i).$

Note that, if $\mathfrak{p}$ is generated by $a+2ib\equiv 1\bmod(2+2i)$, then
one also has $a-2ib\equiv 1\bmod(2+2i)$ and this latter Gaussian integer
generates $\overline{\mathfrak{p}}$. So for a rational prime $p\equiv 1\bmod
4$, one can define its Gaussian angle up to its sign,
$\theta_{p}=\pm\theta_{\mathfrak{p}}\in[0,\pi]$, where $\mathfrak{p}\mid p$.
We observe also that this choice is natural : the number of $\mathbf{F}_{p}$
points of the elliptic curve with affine model $y^{2}=x^{3}-x$ is exactly
given by $p+1-2\sqrt{p}\cos(\theta_{p})$. Note finally that with this
definition, the natural angle associated to an inert prime $p\equiv 3\bmod 4$
is $\theta_{p}=\pi$.

Hecke proved in [Hec18] that the angles of Gaussian primes are equidistributed
on the circle. In particular, for $0\leq\alpha<\beta\leq\pi$, one has

$\lim_{X\rightarrow\infty}\frac{\lvert p\leq X:p\equiv 1\bmod
4,\alpha<\theta_{p}<\beta\rvert}{\lvert p\leq X:p\equiv 1\bmod
4\rvert}=\frac{\beta-\alpha}{\pi}.$

The limit depends only on the length of the interval. In the context of
Conjecture 1.1, we are interested in the error term in this result, and in
particular to show how it depends on the interval $[\alpha,\beta]$. Our main
heuristic for this conjecture is the following result.

######  Theorem 3.1.

Assume the Generalized Riemann Hypothesis. Let $\phi$ be a $2\pi$-periodic
even function on $\mathbf{R}$, with Fourier coefficients
$\hat{\phi}(m):=\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)e^{2i\pi
mt}\mathop{}\\!\mathrm{d}t$ for $m\in\mathbf{Z}$, satisfying
$\hat{\phi}(m)\ll\lvert m\rvert^{-1-\epsilon}$ for some $\epsilon>0$. Then the
function

$\displaystyle E_{\phi}(x):=\frac{\log
x}{\sqrt{x}}\Bigg{(}\sum_{\begin{subarray}{c}p\leq x\\\ p\equiv
1\bmod{4}\end{subarray}}\phi(\theta_{p})-\operatorname{Li}(x)\int_{0}^{\pi}\phi(t)\frac{\mathop{}\\!\mathrm{d}t}{2\pi}\Bigg{)}$

admits a limiting logarithmic distribution $\mu_{\phi}$ as
$x\rightarrow\infty$.

Assume also that the vanishing at $s=\frac{1}{2}$ of the Hecke $L$-functions
involved is exactly given by the sign of its functional equation. Then the
average value of $\mu_{\phi}$ is equal to

$\frac{-\hat{\phi}(0)}{2}-\frac{\phi(0)+\phi(\pi)}{4}+\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\frac{\cos(t)}{\cos(2t)}\mathop{}\\!\mathrm{d}t,$

where the integral is understood as the Cauchy principal value.

Theorem 3.1 is just an $\epsilon$ away from Conjecture 1.1. Indeed, we would
like to choose $\phi$ to be a step function but the $m$-th Fourier coefficient
of such a function is of size $\lvert m\rvert^{-1}$.

However, as the function $\phi$ can be chosen very generally, it actually
gives fine information on the distribution of the angles $\theta_{p}$. Figure
3 shows the difference between a histogram of the distribution of the angles
$\theta_{p}$ and equidistribution. We observe some irregularities in the
otherwise relatively well equidistributed behaviour happening at
$\frac{\pi}{4}$ and $\frac{3\pi}{4}$ corresponding to the poles of
$\frac{\cos(t)}{\cos(2t)}$. This irregularity might only be due to our
“unfolding” of the angle $\theta_{p}$ (observe that the angle $2\theta_{p}$ or
even $4\theta_{p}$ is more usually studied in the literature [Kub50, Col90,
RW19] and does not exhibit such a bias). We note that our choice of
$a+2ib\equiv 1\bmod(2+2i)$ imply that the only possibilities for $\lvert
a\rvert$ and $\lvert 2b\rvert$ to be very close to each other are $a=\pm 2b+1$
while $a=\pm 2b-1$ are excluded. This could explain the behaviour of the
distribution around $\frac{\pi}{4}$ and $\frac{3\pi}{4}$.

Figure 3. Relative distribution of the angles $\theta_{p}$ for $p\leq 10^{8}$
: we count the number of angles $\theta_{p}$ in $200$ subintervals of
$[0,\pi]$ and withdraw the mean value; in red equidistribution; in blue the
“secondary term” $\frac{\cos x}{\cos 2x}-\frac{1}{2}$.

In the case $\phi$ is $\pi$-periodic with mean value $0$, we find that the
mean value of $\mu_{\phi}$ is equal to $\frac{-\phi(\pi)}{2}$, this indicates
a bias in the distribution of the angles $\theta_{p}$ due to the fact that our
sum defining $E_{\phi}$ does not include the inert primes $p\equiv 3\bmod 4$.

Note finally that this is a case where the function field analogue differs
from the original question. Indeed, [PG20, Th. 1.8] shows that there is a bias
in the distribution of the analogue of angles of Gaussian primes in function
fields that is in the direction of sectors parametrized by non-squares. Such a
phenomenon does not seem to appear here.

In the context of Conjecture 1.2, let us first note that for $p=a^{2}+4b^{2}$
with $a+2ib\equiv 1\bmod(2+2i)$ then $p\equiv 1\bmod 8\Leftrightarrow a\equiv
1\bmod 4$ and $p\equiv 5\bmod 8\Leftrightarrow a\equiv-1\bmod 4$, so we have

$\displaystyle\sum_{p=a^{2}+4b^{2}\leq x}\mathbf{1}_{\lvert a\rvert\equiv
1\bmod 4}(p)-\mathbf{1}_{\lvert a\rvert\equiv-1\bmod 4}(p)$
$\displaystyle=\sum_{\begin{subarray}{c}p\leq x\\\ p\equiv
1\bmod{8}\end{subarray}}\phi(\theta_{p})-\sum_{\begin{subarray}{c}p\leq x\\\
p\equiv 5\bmod{8}\end{subarray}}\phi(\theta_{p})$
$\displaystyle=\sum_{\begin{subarray}{c}p\leq x\\\ p\equiv
1\bmod{4}\end{subarray}}\phi(\tilde{\theta}_{p}),$

where $\phi=\mathbf{1}_{(0,\frac{\pi}{2})}-\mathbf{1}_{(\frac{\pi}{2},\pi)}$
(so that for $a\equiv 1\bmod 4$ one counts $+1$ when $a$ is positive, and $-1$
when it is negative; and the other way round for $a\equiv-1\bmod 4$) and we
define $\tilde{\theta}_{p}=\begin{cases}\theta_{p}&\text{ if }p\equiv
1\bmod{8}\\\ \pi-\theta_{p}&\text{ if }p\equiv 5\bmod{8}\end{cases}$.
Similarly to Theorem 3.1, we have an analogous result in the case $\phi$ is
just slightly smoother than a step function.

######  Theorem 3.2.

Assume the Generalized Riemann Hypothesis. Let $\phi$ be a $2\pi$-periodic
even function on $\mathbf{R}$ with Fourier coefficients
$\hat{\phi}(m):=\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)e^{2i\pi
mt}\mathop{}\\!\mathrm{d}t$ for $m\in\mathbf{Z}$, satisfying
$\hat{\phi}(m)\ll\lvert m\rvert^{-1-\epsilon}$ for some $\epsilon>0$. Then the
function

$\displaystyle F_{\phi}(x):=\frac{\log
x}{\sqrt{x}}\Bigg{(}\sum_{\begin{subarray}{c}p\leq x\\\ p\equiv
1\bmod{8}\end{subarray}}\phi(\theta_{p})-\sum_{\begin{subarray}{c}p\leq x\\\
p\equiv 5\bmod{8}\end{subarray}}\phi(\theta_{p})\Bigg{)}$

admits a limiting logarithmic distribution $\nu_{\phi}$ as
$x\rightarrow\infty$.

Assume also that the vanishing at $s=\frac{1}{2}$ of the Hecke $L$-functions
involved is exactly given by the sign of its functional equation. Then the
average value of $\nu_{\phi}$ is equal to

$\frac{-\hat{\phi}(0)}{2}-\frac{\phi(0)+\phi(\pi)}{4}+\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\frac{1}{2\cos(t)}\mathop{}\\!\mathrm{d}t,$

where the integral is understood as the Cauchy principal value.

Taking $\phi$ such that $\phi(\pi-\theta)=-\phi(\theta)$ in Theorem 3.2 gives
fine information on the distribution of the angles $\tilde{\theta}_{p}$.
Figure 4 shows the difference between a histogram of the distribution of the
angles $\tilde{\theta}_{p}$ and equidistribution. We observe some irregularity
in the otherwise relatively well equidistributed behaviour happening at
$\frac{\pi}{2}$ corresponding to the pole of $\frac{1}{\cos(t)}$. Note that
along the prime numbers $p=1+4b^{2}$ we have
$\tilde{\theta}_{p}\rightarrow\frac{\pi}{2}^{-}$. The jump in the distribution
goes well with the idea that there are infinitely many such prime numbers.

Figure 4. Relative distribution of the angles $\tilde{\theta}_{p}$ for $p\leq
10^{8}$ : we count the number of angles $\tilde{\theta}_{p}$ in $200$
subintervals of $[0,\pi]$ and withdraw the mean value; in red
equidistribution; in blue the “secondary term” $\frac{1}{\cos x}-\frac{1}{2}$.

Theorem 3.1 and 3.2 both follow from the decomposition of the function $\phi$
in Fourier series and an application of Theorem 2.2 to a sequence of
$L$-functions associated to the powers of a given Hecke character, with
coefficients the Fourier coefficients of $\phi$. We give the details on the
precise Hecke characters in Section 4. We also comment there on the hypothesis
that allows us to give a formula for the mean value of the limiting
distribution.

##  4\. $L$-functions of Hecke characters on $\mathbf{Z}[i]$

Let us first review some properties of Hecke characters that will be useful in
this paper. Our references for this section are mostly [Roh11], [Neu99, Chap.
VII.6] and [IK04, Chap. 3.8, Chap. 5.10]. Let $\xi$ be a unitary primitive
Hecke character on $\mathbf{Z}[i]$ of conductor $\mathfrak{f}$ and frequency
$\ell$, we define the Hecke $L$-function associated to $\xi$ as the following
Dirichlet series on the half-plane $\operatorname{Re}(s)>1$:

(1)
$L(s,\xi)=\sum_{\mathfrak{n}}\xi(\mathfrak{n})N(\mathfrak{n})^{-s}=\prod_{\mathfrak{p}}\left(1-\xi(\mathfrak{p})N(\mathfrak{p})^{-s}\right)^{-1}$

where $\mathfrak{n}$ runs over all non-zero ideals of $\mathbf{Z}[i]$. Hecke
proved that $L(s,\xi)$ extends meromorphically to the whole plane $\mathbf{C}$
with at most a simple pole at $s=1$ when $\xi$ is the trivial character.
Moreover, the completed $L$-function

$\Lambda(s,\xi):=(4N\mathfrak{f})^{s/2}\pi^{-s-(\lvert\ell\rvert+1)/2}\Gamma\left(\frac{s+\frac{\lvert\ell\rvert}{2}}{2}\right)\Gamma\left(\frac{s+1+\frac{\lvert\ell\rvert}{2}}{2}\right)L(s,\xi),$

admits a functional equation
$\Lambda(\xi,s)=W(\xi)\Lambda(\overline{\xi},1-s)$, where $W(\xi)$ is a
complex number of modulus $1$ (the sign of the functional equation) that can
be given explicitly via a Gauss sum [IK04, (3.85)]. In the case
$\xi(\overline{\mathfrak{p}})=\overline{\xi}(\mathfrak{p})$, one has
$\Lambda(\xi,s)=\Lambda(\overline{\xi},s)$ and $W(\xi)=\pm 1$. Then, as it is
believed to be true in $100\%$ of the cases (see for example [Gre85] and
[Wax21] for partial results in a family of $L$-functions associated to Hecke
characters close to the ones we are considering in this paper), it is common
to assume that the multiplicity of the zero at $s=\tfrac{1}{2}$ of $L(s,\xi)$
is determined by the sign of the functional equation. Precisely, in Theorem
3.1 and 3.2, to give a formula for the mean value of the limiting
distribution, we assume that

$\operatorname{ord}_{s=1/2}(L(s,\xi))=\frac{1-W(\xi)}{2}$

for each Hecke character $\xi$ involved. With these notation and assumptions
fixed, let us now prove Theorem 3.1.

###### Proof of Theorem 3.1 as a consequence of Theorem 2.2.

Let us first write $\phi$ as a sum of its Fourier series. Since it is even of
period $2\pi$, one has $\phi(\theta)=\sum_{m\geq 0}c_{m}(\phi)\cos(m\theta)$
where the Fourier coefficients are

$\displaystyle c_{0}(\phi)$
$\displaystyle=\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\mathop{}\\!\mathrm{d}t$
$\displaystyle c_{m}(\phi)$
$\displaystyle=\frac{1}{\pi}\int_{-\pi}^{\pi}\phi(t)\cos(mt)\mathop{}\\!\mathrm{d}t\text{,
for }m\geq 1.$

In equation (3), the definition of the angle of Gaussian primes is given so
that the function $\mathfrak{p}\rightarrow e^{i\theta_{\mathfrak{p}}}$ comes
from a Hecke character. Precisely, let $\mathfrak{m}=(2+2i)$, there are
exactly $4$ invertible elements in $\mathbf{Z}[i]/\mathfrak{m}$ corresponding
to the $4$ units of $\mathbf{Z}[i]$ : $\pm 1,\pm i$. Thus, every ideal
$\mathfrak{a}\subset\mathbf{Z}[i]$ co-prime to $\mathfrak{m}$ has a unique
generator $\alpha\equiv 1\bmod\mathfrak{m}$. Let $\xi$ be the Hecke character
on the multiplicative groups of fractional ideals of $\mathbf{Z}[i]$ modulo
$\mathfrak{m}$ defined by

$\xi((\alpha))=\begin{cases}\frac{\alpha}{\lvert\alpha\rvert}&\text{ if
}\alpha\equiv 1\bmod\mathfrak{m}\\\ 0&\text{ if }(\alpha,\mathfrak{m})\neq
1.\end{cases}$

So that for any prime ideal $\mathfrak{p}$ co-prime to $2$, one has
$\xi(\mathfrak{p})=e^{i\theta_{\mathfrak{p}}}$. Then $\xi$ is a unitary Hecke
character of frequency $1$, and conductor $\mathfrak{m}$, its finite part is
the Dirichlet character $\chi:u\mapsto u^{-1}$ for $u\in\\{\pm 1,\pm i\\}$
representing the invertible congruence classes modulo $\mathfrak{m}$. Coming
back to our decomposition, for any unramified splitting rational prime
$(p)=\mathfrak{p}\overline{\mathfrak{p}}$, one has, for any $m\in\mathbf{N}$

$\displaystyle
2\cos(m\theta_{p})=\xi^{m}(\mathfrak{p})+\xi^{m}(\overline{\mathfrak{p}}).$

Moreover, for any integer $m\geq 1$, the character $\xi^{m}$ has frequency $m$
and finite part $\chi(u)=u^{-m}$ for $u\in\\{\pm 1,\pm i\\}$ (again seen as
elements in $\mathbf{Z}[i]/\mathfrak{m}$), it is primitive of conductor
respectively $(2+2i)$ if $m$ is odd, $(2)$ if $m\equiv 2\bmod 4$ and non-
primitive of conductor $(1)$ if $m\equiv 0\bmod 4$. Let us denote $\xi_{m}$
the primitive character associated to $\xi^{m}$,

$\displaystyle\xi^{m}=\begin{cases}\xi_{m}&\text{ if }m\not\equiv 0\bmod 4,\\\
\xi_{m}\chi_{0}&\text{ if }m\equiv 0\bmod 4\end{cases}$

where $\chi_{0}$ is the principal character modulo $(1+i)$. In particular,

$\displaystyle\sum_{N\mathfrak{p}\leq
x}\xi^{m}(\mathfrak{p})=\sum_{N\mathfrak{p}\leq x}\xi_{m}(\mathfrak{p})+O(1),$

so we only loose a small error term in considering $\xi_{m}$ instead of
$\xi^{m}$.

Note that $L(s,\xi_{0})=\zeta_{\mathbf{Q}(i)}(s)$ and for $m\geq 1$,

$L(s,\xi_{m})=(1-\xi_{m}(1+i)2^{-s})^{-1}\prod_{p\equiv 1\bmod
4}(1-2\cos(m\theta_{p})p^{-s}+p^{-2s})^{-1}\\\ \times\prod_{p\equiv 3\bmod
4}(1-(-1)^{m}p^{-2s})^{-1}$

are analytic $L$-functions in the sense of [Dev20, Def. 1.1] (see e.g. [IK04,
5.10]). Hence, we apply Theorem 2.2 with
$\mathcal{S}=\mathcal{S}_{1}=\\{L(s,\xi_{m}):m\geq 0\\}$, and
$\underline{c}=\\{c_{m}(\phi):m\geq 0\\}$. Each of these $L$-functions has
degree $d_{m}=2$, and for $m\geq 1$ we have

$\displaystyle\mathfrak{q}(\xi^{m})\leq 4\times
N(2+2i)(\tfrac{m}{2}+3)(\tfrac{m}{2}+4)\ll m^{2},$

the hypothesis on the Fourier coefficients of $\phi$ is exactly here to ensure
that the series $\sum_{m\geq 1}\lvert c_{m}(\phi)\rvert\log m^{2}$ is
convergent.

Thus, we apply Theorem 2.2. Under the Riemann Hypothesis for $L(s,\xi_{m})$,
$m\geq 0$, the function

$\displaystyle E_{\phi}(x)$ $\displaystyle=\frac{\log
x}{2\sqrt{x}}\Bigg{(}\sum_{\begin{subarray}{c}p\leq x\\\ p\equiv 1\bmod
4\end{subarray}}\sum_{m\geq 0}c_{m}(\phi)2\cos(m\theta_{p})+\sum_{m\geq
0}c_{m}(\phi)\operatorname{ord}_{s=1}(L(s,\xi_{m}))\operatorname{Li}(x)\Bigg{)}$
$\displaystyle=\frac{\log x}{\sqrt{x}}\Bigg{(}\sum_{\begin{subarray}{c}p\leq
x\\\ p\equiv 1\bmod
4\end{subarray}}\phi(\theta_{p})-\frac{c_{0}(\phi)\operatorname{Li}(x)}{2}\Bigg{)}$

admits a limiting distribution $\mu_{\phi}$ (where we used the fact that for
all $m\geq 1$, the function $L(\cdot,\xi_{m})$ does not have a pole nor a zero
at $s=1$). Moreover, Theorem 2.2 yields the following expression for the mean
value of $\mu_{\phi}$:

$\displaystyle\mathbb{E}(\mu_{\phi})=\frac{1}{2}\sum_{m\geq
0}c_{m}(\phi)\left(\operatorname{ord}_{s=1}(L(s,\xi_{m}^{(2)}))-2\operatorname{ord}_{s=1/2}(L(s,\xi_{m}))\right).$

In the case $m=0$, we have
$L(s,\xi_{0})=\zeta_{\mathbf{Q}(i)}(s)=\zeta(s)L(s,\chi_{4})$. Up to the
factor at $2$, we have $L(s,\chi_{4}^{(2)})=\zeta(s)$, thus, we get that
$\operatorname{ord}_{s=1}(L(s,\xi_{0}^{(2)}))=-2$. For $m\geq 1$, we have that

$\displaystyle L(s,\xi^{m(2)})$ $\displaystyle=\prod_{p\equiv 1\bmod
4}(1-e^{i2m\theta_{p}}p^{-s})^{-1}(1-e^{-i2m\theta_{p}}p^{-s})^{-1}\prod_{p\equiv
3\bmod 4}(1-(-1)^{m}p^{-s})^{-2}$
$\displaystyle=\begin{cases}L(s,\xi^{2m})\frac{\zeta(s)}{L(s,\chi_{4})}(1-2^{-s})&\text{
for }m\text{ even, }\\\
L(s,\xi^{2m})\frac{L(s,\chi_{4})}{\zeta(s)}(1-2^{-s})^{-1}&\text{ for }m\text{
odd. }\end{cases}$

For each $m\geq 1$, $\operatorname{ord}_{s=1}(L(s,\xi^{2m}))=0$, so, the
function $L(s,\xi_{m}^{(2)})$ has a pole of order $1$ at $s=1$ when $m$ is
even and a zero of order $1$ at $s=1$ when $m$ is odd. We have

$\displaystyle\sum_{m\geq
0}c_{m}(\phi)\operatorname{ord}_{s=1}(L(s,\xi_{m}^{(2)}))=-c_{0}(\phi)-\sum_{m\geq
0}(-1)^{m}c_{m}(\phi)=-\hat{\phi}(0)-\phi(\pi).$

Now, we need to determine the values of
$\operatorname{ord}_{s=1/2}(L(s,\xi_{m}))$. The sign of the functional
equation for $L(s,\xi_{m})$ depends on the congruence class of $m$ modulo $8$.
Precisely, the formula [IK04, 3.85] for the sign of the functional equation
gives

$\displaystyle
W(\xi_{m})=i^{-m}N(\mathfrak{f}_{m})^{-\frac{1}{2}}\xi_{m,\infty}(\gamma_{m})\sum_{x\in\mathbf{Z}[i]/\mathfrak{f}_{m}}\xi_{m,\mathrm{fin}}(x)e^{2i\pi\operatorname{tr}(\tfrac{x}{\gamma_{m}})}$

where $\mathfrak{f}_{m}$ is the conductor of $\xi_{m}$ — that is $(2+2i)$ is
$m$ is odd, $(2)$ if $m\equiv 2\bmod 4$ and $(1)$ if $m\equiv 0\bmod 4$ —,
$\xi_{m,\infty}$ and $\xi_{m,\mathrm{fin}}$ are respectively the infinite and
finite part of $\xi_{m}$, and $\gamma_{m}\in\mathbf{Z}[i]$ is such that
$(\gamma_{m})=2\mathfrak{f}_{m}$. In particular for odd $m$,

$\displaystyle W(\xi_{m})$
$\displaystyle=i^{-m}8^{-\frac{1}{2}}e^{i\pi\frac{m}{4}}\sum_{x\in\\{\pm 1,\pm
i\\}}x^{-m}e^{2i\pi\operatorname{tr}(\tfrac{x}{4+4i})}$
$\displaystyle=\frac{e^{-i\pi\frac{m}{4}}}{2\sqrt{2}}(2i-2i^{m+1})=\begin{cases}e^{i\pi\frac{1-m}{4}}&\text{
if }m\equiv 1\bmod 4,\\\ e^{i\pi\frac{3-m}{4}}&\text{ if }m\equiv 3\bmod
4.\end{cases}$

For $m\equiv 2\bmod 4$, we have

$\displaystyle
W(\xi_{m})=i^{-m}4^{-\frac{1}{2}}\sum_{x\in\\{1,i\\}}x^{-m}e^{2i\pi\operatorname{tr}(\tfrac{x}{4})}=1,$

and for $m\equiv 0\bmod 4$,

$\displaystyle
W(\xi_{m})=i^{-m}1^{-\frac{1}{2}}e^{2i\pi\operatorname{tr}(\tfrac{1}{2})}=1.$

So that

$\displaystyle W(\xi_{m})=\begin{cases}1&\text{ if }m\equiv 0,1,2,3,4,6\bmod
8,\\\ -1&\text{ if }m\equiv 5,7\bmod 8.\end{cases}$

Assuming that the sign of the functional equation determines the order of
vanishing at $\tfrac{1}{2}$ for each $L$-function, it yields

$\displaystyle\sum_{m\geq
0}c_{m}(\phi)\operatorname{ord}_{s=1/2}(L(s,\xi_{m}))=\sum_{\begin{subarray}{c}m\geq
0\\\ m\equiv 5,7\bmod 8\end{subarray}}c_{m}(\phi).$

We conclude the proof by writing this sum as an integral. Using Lemma 4.1
below, we have for smooth $\phi$ supported outside $\frac{\pi}{4}\mathbf{Z}$,

$\displaystyle\sum_{\begin{subarray}{c}m\geq 0\\\ m\equiv
5,7\bmod{8}\end{subarray}}(\hat{\phi}(m)+\hat{\phi}(-m))$
$\displaystyle=\lim_{N\rightarrow\infty}\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)2\frac{\cos(t)}{\sin(4t)}(\sin((8N+10)t)-\sin(2t))\mathop{}\\!\mathrm{d}t$
$\displaystyle=-\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\frac{\cos(t)}{\cos(2t)}\mathop{}\\!\mathrm{d}t.$

Moreover, the sum at $t\in\frac{\pi}{4}\mathbf{Z}$ gives the value
$\frac{\phi(0)-\phi(\pi)}{4}$ which concludes the proof. ∎

######  Lemma 4.1.

Let $q,a\in\mathbf{N}$, $q>0$ and $t\notin\frac{2\pi}{q}\mathbf{Z}$ One has

$\sum_{m=0}^{N}(e^{i(qm+a)t}+e^{i(-qm-a)t})=\frac{\sin((\tfrac{q}{2}(2N+1)+a)t)-\sin((a-\tfrac{q}{2})t)}{\sin(\tfrac{q}{2}t)}$

###### Proof.

For $t\notin\frac{2\pi}{q}\mathbf{Z}$ one has

$\displaystyle\sum_{m=0}^{N}(e^{i(qm+a)t}+e^{i(-qm-a)t})$
$\displaystyle=e^{iat}\frac{1-e^{iq(N+1)t}}{1-e^{iqt}}+e^{-iat}\frac{1-e^{-iq(N+1)t}}{1-e^{-iqt}}$
$\displaystyle=2\cos((\tfrac{q}{2}N+a)t)\frac{\sin(\tfrac{q}{2}(N+1)t)}{\sin(\tfrac{q}{2}t)}$
$\displaystyle=\frac{\sin((\tfrac{q}{2}(2N+1)+a)t)-\sin((a-\tfrac{q}{2})t)}{\sin(\tfrac{q}{2}t)}.$

∎

The proof of Theorem 3.2 follows the same lines, we only give the details on
the differences.

###### Proof of Theorem 3.2 as a consequence of Theorem 2.2.

To separate the congruence classes of $a$, we will use characters of larger
modulus. For each $m\geq 0$ let $\psi_{m}$ be the Hecke character on the
multiplicative groups of fractional ideals of $\mathbf{Z}[i]$ modulo $(4)$
defined by

$\psi_{m}((\alpha))=\begin{cases}\big{(}\frac{\alpha}{\lvert\alpha\rvert}\big{)}^{m}&\text{
if }\alpha\equiv 1\bmod(4)\\\
-\big{(}\frac{\alpha}{\lvert\alpha\rvert}\big{)}^{m}&\text{ if }\alpha\equiv
3+2i\bmod(4)\\\ 0&\text{ if }(\alpha,(4))\neq 1.\end{cases}$

Then $\psi_{m}$ is a primitive unitary Hecke character of frequency $m$, and
conductor $(4)$, its finite part is the Dirichlet character

$\psi_{m,\mathrm{fin}}:u\mapsto\begin{cases}u^{-m}&\text{ for }u\in\\{\pm
1,\pm i\\}\\\ -\big{(}\frac{u}{3+2i}\big{)}^{-m}&\text{ for
}u\in\\{3+2i,-3-2i,-2+3i,2-3i\\}\end{cases}$

representing the $8$ invertible congruence classes modulo $(4)$. We have, for
any unramified splitting rational prime
$(p)=\mathfrak{p}\overline{\mathfrak{p}}$, and for any $m\in\mathbf{N}$

$\displaystyle\psi_{m}(\mathfrak{p})+\psi_{m}(\overline{\mathfrak{p}})=\begin{cases}2\cos(m\theta_{p})&\text{
if }p\equiv 1\bmod 8\\\ -2\cos(m\theta_{p})&\text{ if }p\equiv 5\bmod
8.\end{cases}$

So that, for $\phi$ even and $2\pi$-periodic, one has

$\phi(\theta_{p})\mathbf{1}_{p\equiv 1\bmod
8}-\phi(\theta_{p})\mathbf{1}_{p\equiv 5\bmod 8}=\sum_{m\geq
0}c_{m}(\phi)\big{(}\psi_{m}(\mathfrak{p})+\psi_{m}(\overline{\mathfrak{p}})\big{)}.$

We apply Theorem 2.2 with $\mathcal{S}=\mathcal{S}_{2}=\\{L(s,\psi_{m}):m\geq
0\\}$, each of these $L$-function has degree $d_{m}=2$, and conductor
$\mathfrak{q}(\psi_{m})\ll(m+1)^{2}$ for $m\geq 0$, finally we take
$c_{m}=c_{m}(\phi)$ for $m\geq 0$. This gives the existence of the limiting
logarithmic distribution $\nu_{\phi}$ under the Riemann Hypothesis for the
$L(s,\psi_{m}),m\geq 0$. Moreover, its mean value is given by

$\displaystyle\mathbb{E}(\nu_{\phi})=\frac{1}{2}\sum_{m\geq
0}c_{m}(\phi)\left(\operatorname{ord}_{s=1}(L(s,\psi_{m}^{(2)}))-2\operatorname{ord}_{s=1/2}(L(s,\psi_{m}))\right).$

Note that $L(s,\psi_{0})=L(s,\chi)L(s,\chi^{\prime})$, where $\chi$ and
$\chi^{\prime}$ are the primitive characters modulo $8$ in particular, up to
the factor at $2$, $L(s,\psi_{0}^{(2)})=\zeta^{2}(s)$ has a pole of order $2$
at $s=1$. For $m\geq 1$, we have

$\displaystyle L(s,\psi_{m})=$ $\displaystyle\prod_{p\equiv 3\bmod
4}(1-(-1)^{m}p^{-2s})^{-1}\prod_{p\equiv 1\bmod
8}(1-2\cos(m\theta_{p})p^{-s}+p^{-2s})^{-1}$ $\displaystyle\prod_{p\equiv
5\bmod 8}(1+2\cos(m\theta_{p})p^{-s}+p^{-2s})^{-1}.$

Thus, we have

$\displaystyle
L(s,\psi_{m}^{(2)})=L(s,\xi^{m(2)})=\begin{cases}L(s,\xi^{2m})\frac{\zeta(s)}{L(s,\chi_{4})}(1-2^{-s})&\text{
for }m\text{ even, }\\\
L(s,\xi^{2m})\frac{L(s,\chi_{4})}{\zeta(s)}(1-2^{-s})^{-1}&\text{ for }m\text{
odd. }\end{cases}$

The function $L(s,\psi_{m}^{(2)})$ has a pole of order $1$ at $s=1$ when $m$
is even and a zero of order $1$ at $s=1$ when $m$ is odd. We deduce

$\displaystyle\sum_{m\geq
0}c_{m}(\phi)\operatorname{ord}_{s=1}(L(s,\psi^{m(2)}))=-c_{0}(\phi)-\sum_{m\geq
0}(-1)^{m}c_{m}(\phi)=-\hat{\phi}(0)-\phi(\pi).$

Now, we need to determine the values of
$\operatorname{ord}_{s=1/2}(L(s,\psi_{m}))$. As before, we assume that it is
enough to compute the sign of the functional equation. We have

$\displaystyle W(\psi_{m})$
$\displaystyle=i^{-m}N(4)^{-\frac{1}{2}}\psi_{m,\infty}(8)\sum_{x\in\mathbf{Z}[i]/(4)}\psi_{m,\mathrm{fin}}(x)e^{2i\pi\operatorname{tr}(\tfrac{x}{8})}$
$\displaystyle=\frac{i^{-m}}{4}\sum_{x\in\\{\pm 1,\pm
i\\}}x^{-m}(e^{2i\pi\operatorname{tr}(\tfrac{x}{8})}-e^{2i\pi\operatorname{tr}(\tfrac{x(3+2i)}{8})})$
$\displaystyle=\frac{1}{2}((1-(-1)^{m})i^{1-m}+(1+(-1)^{m}))$
$\displaystyle=\begin{cases}1&\text{ if }m\equiv 0\bmod 2\text{ or }m\equiv
1\bmod 4,\\\ -1&\text{ if }m\equiv 3\bmod 4.\end{cases}$

This gives that the mean value of $\nu_{\phi}$ is

$\displaystyle\frac{-\hat{\phi}(0)-\phi(\pi)}{2}-\sum_{m\equiv 3\bmod
4}\hat{\phi}(m)+\hat{\phi}(-m).$

We apply Lemma 4.1 to obtain for smooth $\phi$ supported outside
$\frac{\pi}{2}\mathbf{Z}$,

$\displaystyle\sum_{\begin{subarray}{c}m\geq 0\\\ m\equiv
3\bmod{4}\end{subarray}}(\hat{\phi}(m)+\hat{\phi}(-m))$
$\displaystyle=\lim_{N\rightarrow\infty}\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\frac{\sin((4N+5)t)-\sin(t)}{\sin(2t)}\mathop{}\\!\mathrm{d}t$
$\displaystyle=-\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi(t)\frac{1}{2\cos(t)}\mathop{}\\!\mathrm{d}t.$

Then considering the sum at $t\in\frac{\pi}{2}\mathbf{Z}$, gives the value
$\frac{\phi(0)-\phi(\pi)}{4}$ which concludes the proof of Theorem 3.2. ∎

To conclude this section, let us come back to our hypothesis that the sign of
the functional equation of an $L$-function determines its analytic rank. In
the case of the $L$-functions used in this section, that is the
$L(\cdot,\xi_{m})$ and $L(\cdot,\psi_{m})$ for $m\geq 1$, we first observe
that they correspond to the $L$-functions of certain cusp forms of level a
power of $2$ (the norm of the conductor of the character multiplied by $4$)
and of weight $m+1$. Those $L$-functions are referenced in the $L$-functions
and Modular Forms Database [LMF21], at least for $m\leq 24$, where the
analytic rank is calculated and satisfies our assumption.

##  5\. Heuristic for the conjectures

Let us now develop our heuristic argument for Conjecture 1.1 and 1.2. The main
idea is to replace $\phi$ in Theorems 3.1 and 3.2 by a difference of indicator
function. Precisely, we take
$\phi_{1}=\mathbf{1}_{[0,\tfrac{\pi}{4}]\cup[\frac{3\pi}{4},\pi]}-\mathbf{1}_{(\tfrac{\pi}{4},\frac{3\pi}{4})}$
in Theorem 3.1 and
$\phi_{2}=\mathbf{1}_{[0,\tfrac{\pi}{2}]}-\mathbf{1}_{(\tfrac{\pi}{2},\pi]}$
in Theorem 3.2, where the functions $\phi_{i}$ are defined on $[0,\pi]$ and we
extend their definition to $\mathbf{R}$ so that they are even and
$2\pi$-periodic. Then, we have

$c_{m}(\phi_{1})=\begin{cases}\frac{8}{m\pi}&\text{if }m\equiv 2\bmod 8\\\
-\frac{8}{m\pi}&\text{if }m\equiv 6\bmod 8\\\
0&\text{otherwise}\end{cases}\text{ and
}c_{m}(\phi_{2})=\begin{cases}\frac{4}{m\pi}&\text{if }m\equiv 1\bmod 4\\\
-\frac{4}{m\pi}&\text{if }m\equiv 3\bmod 4\\\ 0&\text{otherwise.}\end{cases}$

As observed earlier, these Fourier coefficients do not satisfy the hypothesis
of decay needed to apply Theorem 3.1 or 3.2. Let us however continue the
heuristic argument by ignoring this.

Then we would obtain logarithmic limiting distributions $\mu_{\phi_{1}}$ and
$\nu_{\phi_{2}}$ with mean values equal to

$\displaystyle\mathbb{E}(\mu_{\phi_{1}})$
$\displaystyle=-\frac{\phi_{1}(0)+\phi_{1}(\pi)}{4}+\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi_{1}(t)\frac{\cos(t)}{\cos(2t)}\mathop{}\\!\mathrm{d}t=\frac{-1}{2}$
$\displaystyle\text{and }\mathbb{E}(\nu_{\phi_{2}})$
$\displaystyle=-\frac{\phi_{2}(0)+\phi_{2}(\pi)}{4}+\frac{1}{2\pi}\int_{-\pi}^{\pi}\phi_{2}(t)\frac{1}{2\cos(t)}\mathop{}\\!\mathrm{d}t=\infty.$

The variance of $\mu_{\phi_{1}}$ is given by

$\operatorname{Var}(\mu_{\phi_{1}})=2\sum_{\gamma\in\mathcal{Z}_{\mathcal{S}_{1},\underline{c}}}\frac{\lvert\sum_{m\geq
0}c_{m}(\phi_{1})\operatorname{ord}(\gamma,m)\rvert^{2}}{\frac{1}{4}+\gamma^{2}}\in\mathbf{R}\cup\\{\infty\\},$

where $\mathcal{S}_{1}$ is the set of Hecke $L$-functions used in the proof of
Theorem 3.1, and $\underline{c}=\\{c_{m}(\phi_{1}):m\geq 0\\}$. We obtain the
same formula for $\operatorname{Var}(\nu_{\phi_{2}})$ with $\phi_{1}$ replaced
by $\phi_{2}$ and $\mathcal{S}_{1}$ replaced by $\mathcal{S}_{2}$, the set of
Hecke $L$-functions used in the proof of Theorem 3.2.

Let $\phi=\phi_{1}$ or $\phi_{2}$ and $\mathcal{S}=\mathcal{S}_{1}$ or
$\mathcal{S}_{2}$. Let us assume that there exists $B>0$ such that for all
$\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}$, we have $\lvert\sum_{m\geq
0}c_{m}(\phi)\operatorname{ord}(\gamma,m)\rvert<B\max\\{\lvert
c_{m}(\phi)\operatorname{ord}(\gamma,m)\rvert:m\geq 0\\}$. That is, we assume
that for each $\gamma>0$ there are not to many $L$-functions in $\mathcal{S}$
that vanish at $\tfrac{1}{2}+i\gamma$. This hypothesis is reminiscent of the
bounded multiplicity hypothesis used by Fiorilli in [Fio14a] and is supported
by the general idea that zeros of $L$-functions should be independent while
being weaker than the Linear Independence hypothesis. Then we have

$\displaystyle\operatorname{Var}(\mu_{\phi_{1}})$
$\displaystyle<B^{2}\sum_{m\geq 0}\sum_{\gamma\in\mathcal{Z}_{m}}\frac{\lvert
c_{m}(\phi)\operatorname{ord}(\gamma,m)\rvert^{2}}{\frac{1}{4}+\gamma^{2}}$
$\displaystyle=B^{2}\sum_{m\geq 0}\lvert
c_{m}(\phi)\rvert^{2}\sum_{\gamma\in\mathcal{Z}_{m}}\frac{\lvert\operatorname{ord}(\gamma,m)\rvert^{2}}{\frac{1}{4}+\gamma^{2}}.$

Recall that

$\sum_{\gamma\in\mathcal{Z}_{m}}\frac{\lvert\operatorname{ord}(\gamma,m)\rvert^{2}}{\frac{1}{4}+\gamma^{2}}\ll(\log\mathfrak{q}_{m})^{3}\ll(\log
m)^{3},$

and that $c_{m}(\phi)\ll\frac{1}{m}$. It yields
$\operatorname{Var}(\mu_{\phi_{1}})<\infty$ and similarly,
$\operatorname{Var}(\nu_{\phi_{2}})<\infty$.

This concludes our heuristic for Conjecture 1.1, we found a limiting
logarithmic distribution with negative mean value and bounded variance. This
indicates a bias towards negative values in the distribution of the values of
the function $D_{1}$. Moreover, if we assume that the set
$\mathcal{Z}_{\mathcal{S}_{1},\underline{c}}$ has many self-sufficient
elements, as in Proposition 2.5 — assumption that is again supported by the
fact that the zeros of $L$-functions should be independent — then we deduce
the Omega-result with the aid of Corollary 2.6.

In the case of Conjecture 1.2, we obtained a limiting logarithmic distribution
that has infinite mean value and bounded variance, this indicates a very
strong bias in the direction of positive values. Let us approach this
heuristic by another way and let us write $\phi_{2,N}(\theta)=\sum_{m\leq
N}c_{m}(\phi_{2})\cos(m\theta)$. By Chebyshev’s inequality, as in [Fio14b,
Lem. 2.10] (see also [Dev20, Cor. 5.8]) we have

$\nu_{\phi_{2,N}}([0,\infty))\geq
1-\frac{\operatorname{Var}(\mu_{\phi_{2,N}})}{\mathbb{E}(\nu_{\phi_{2,N}})}=1-O((\log
N)^{-1}).$

This heuristically indicates that, in the limit when $N\rightarrow\infty$
there is a complete bias, namely we expect $\nu_{\phi_{2}}([0,\infty))=1$, or
in other terms, the function $D_{2}$ is almost always (in logarithmic scale)
positive.

##  6\. Proof of Theorem 2.2

To prove Theorem 2.2, we follow the proof of [ANS14, Th. 1.2] or [Dev20, Th.
2.1], but keeping explicit the dependency on the $L$-function. We show that
Theorem 2.2 is the consequence of the following result.

######  Proposition 6.1.

Under the hypotheses of Theorem 2.2, for each $M>0$ and $T>2$, let

$G_{\mathcal{S},\underline{c},M,T}(x)=m_{\mathcal{S},\underline{c}}-\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)}2\operatorname{Re}\left(\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\frac{x^{i\gamma}}{\frac{1}{2}+i\gamma}\right).$

The function $G_{\mathcal{S},\underline{c},M,T}$ admits a limiting logarithmic
distribution $\mu_{\mathcal{S},\underline{c},M,T}$. Moreover, there exists a
function $M(T)$ satisfying $M(T)\rightarrow\infty$ as $T\rightarrow\infty$
such as for any bounded Lipschitz continuous function $g$, one has

$\displaystyle\lim_{T\rightarrow\infty}\int_{\mathbf{R}}g(t)\mathop{}\\!\mathrm{d}\mu_{\mathcal{S},\underline{c},M(T),T}(t)=\int_{\mathbf{R}}g(t)\mathop{}\\!\mathrm{d}\mu_{\mathcal{S},\underline{c}}(t).$

For every $M,T$ fixed, the set $\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)$
is finite. Thus, by hypothesis, the function
$G_{\mathcal{S},\underline{c},M,T}$ is well-defined and it admits a limiting
logarithmic distribution as a consequence of Kronecker–Weyl equidistribution
Theorem (see e.g. [Dev20, Th. 4.2], [Hum10, Lem. 4.3], or [MN20, Lem. B.3]).
The convergence of the measures needs more work on the estimation of the error
terms. Let us first recall the following precise form of [ANS14, Prop. 4.2],
[Dev20, (4.5)].

######  Proposition 6.2.

Let $L(f,s)$ be an analytic $L$-function of degree $d$, we denote by
$L(f^{(2)},s)$ its second moment $L$-function (as in [Dev20, Def. 1.1.(iii)]).
Assume the Riemann Hypothesis holds for $L(f,s)$ and $L(f^{(2)},s)$ . Let
$T>0$, and

$\displaystyle
G_{f,T}(x)=m_{f}-\sum_{\gamma\in\mathcal{Z}_{f}(T)}2\operatorname{Re}\left(\operatorname{ord}(\gamma,L(f,s))\frac{x^{i\gamma}}{\frac{1}{2}+i\gamma}\right).$

We have the following estimate for all $x>0$ :

$\displaystyle E_{f}(x):=$ $\displaystyle\frac{\log
x}{\sqrt{x}}\left(\sum_{p\leq
x}\lambda_{f}(p)+\operatorname{ord}_{s=1}(L(f,s))\operatorname{Li}(x)\right)$
$\displaystyle=G_{f,T}(x)-\epsilon_{f}(x,T)+O\left(d\frac{\log\mathfrak{q}(f)}{\log
x}\right)$

where the function $\epsilon_{f}(x,T)$ satisfies

(2)
$\int_{2}^{Y}\lvert\epsilon_{f}(e^{y},T)\rvert^{2}\mathop{}\\!\mathrm{d}y\ll
Y\frac{\left(\log(\mathfrak{q}(f)T^{d})\right)^{2}}{T}+\frac{\left(\log(\mathfrak{q}(f)T^{d})\right)^{2}\log
T}{T}$

with an absolute implicit constant.

###### Proof.

The proof is contained in [Dev20], where the dependency in the $L$-function is
not always written explicitly. In particular from [Dev20, Prop. 4.4] we have

$\displaystyle\psi(f,x)+\operatorname{ord}_{s=1}(L(f,s))x=-\sum_{\begin{subarray}{c}L(f,\rho)=0\\\
\lvert\operatorname{Im}(\rho)\rvert\leq
T\end{subarray}}\frac{x^{\rho}}{\rho}-x^{1/2}\epsilon_{f}(x,T)+O\left(\log(\mathfrak{q}(f)x^{d})\log
x\right)$

with an absolute implicit constant. Then taking care of the sum over squares
of primes, we use the Ramanujan–Petersson Conjecture and the Prime Number
Theorem to obtain:

$\theta(f,x):=\sum_{p\leq x}\lambda_{f}(p)\log p=\psi(f,x)-\sum_{p^{2}\leq
x}\left(\sum_{j=1}^{d}\alpha_{j}(p)^{2}\right)\log p+O(dx^{1/3}).$

To evaluate the second term, we use the Riemann Hypothesis for the function
$L(f^{(2)},s)=L(\operatorname{Sym}^{2}f,s)L(\wedge^{2}f,s)^{-1}$. One has
$\frac{L^{\prime}(f^{(2)},s)}{L(f^{(2)},s)}=\frac{L^{\prime}(\operatorname{Sym}^{2}f,s)}{L(\operatorname{Sym}^{2}f,s)}-\frac{L^{\prime}(\wedge^{2}f,s)}{L(\wedge^{2}f,s)}$,
thus

$\displaystyle\sum_{p^{2}\leq
x}\left(\sum_{j=1}^{d}\alpha_{j}(p)^{2}\right)\log p$
$\displaystyle=-\operatorname{ord}_{s=1}(L(\operatorname{Sym}^{2}f,s))x^{\frac{1}{2}}+O(x^{\frac{1}{4}}\log
x\log(x^{d(d+1)/2}\mathfrak{q}(\operatorname{Sym}^{2}f)))$
$\displaystyle\quad+\operatorname{ord}_{s=1}(L(\wedge^{2}f,s))x^{\frac{1}{2}}+O(x^{\frac{1}{4}}\log
x\log(x^{d(d-1)/2}\mathfrak{q}(\wedge^{2}f)))+O(dx^{1/4})$
$\displaystyle=-\operatorname{ord}_{s=1}(L(f^{(2)},s))x^{\frac{1}{2}}+O(dx^{\frac{1}{4}}\log
x\log(x^{d}\mathfrak{q}(f))).$

Finally, using Stieltjes integral, we write $E_{f}(x)=\frac{\log
x}{x^{1/2}}\int_{2}^{x}\frac{\mathop{}\\!\mathrm{d}(\theta(f,t)+\operatorname{ord}_{s=1}(L(f,s))t)}{\log
t}$. After integration by parts this yields

$E_{f}(x)=\frac{1}{\sqrt{x}}\big{(}\psi(f,x)+x\operatorname{ord}_{s=1}(L(f,s))\big{)}+\operatorname{ord}_{s=1}(L(f^{(2)},s))\\\
+O\left(\frac{\log
x}{\sqrt{x}}\int_{2}^{x}\frac{\psi(f,t)+t\operatorname{ord}_{s=1}(L(f,s))+\sqrt{t}\operatorname{ord}_{s=1}(L(f^{(2)},s))}{t(\log
t)^{2}}\mathop{}\\!\mathrm{d}t\right)\\\ +O(dx^{-1/6}\log
x\log(\mathfrak{q}(f)x^{d})).$

Using the explicit formula

$\psi(f,x)+\operatorname{ord}_{s=1}(L(f,s))x=-\sum_{\begin{subarray}{c}L(f,\rho)=0\\\
\lvert\operatorname{Im}(\rho)\rvert\leq
X\end{subarray}}\frac{x^{\rho}}{\rho}\\\ +O\left(d\log
x+\frac{x}{X}\left(d(\log
x)^{2}+\log(\mathfrak{q}(f)X^{d})\right)+\log(\mathfrak{q}(f)X^{d})\log
X\right),$

and another integration by parts to evaluate the second term we have

$\int_{2}^{x}\frac{\psi(f,t)+t\operatorname{ord}_{s=1}(L(f,s))+\sqrt{t}\operatorname{ord}_{s=1}(L(f^{(2)},s))}{t(\log
t)^{2}}\mathop{}\\!\mathrm{d}t\\\
\ll\operatorname{ord}_{s=1}(L(f^{(2)},s))\frac{x^{1/2}}{(\log
x)^{2}}+\sum_{\begin{subarray}{c}L(f,\rho)=0\\\
\lvert\operatorname{Im}(\rho)\rvert\leq x\end{subarray}}\frac{\lvert
x^{\rho}\rvert}{\lvert\rho^{2}\rvert(\log
x)^{2}}+\log(\mathfrak{q}(f)x^{d})\log x$

where after the integration we take $X=x$. The sum over the zeros is
convergent and this concludes the proof of Proposition 6.2. ∎

Then we sum over the $L$-functions, we obtain the following result.

######  Proposition 6.3.

Under the hypotheses of Theorem 2.2, there exists a function
$M(T)=M_{\mathcal{S},\underline{c}}(T)$, with $M(T)\rightarrow\infty$ as
$T\rightarrow\infty$, such that we have the following estimate for all $x>0$
and $T>0$.

$E_{\mathcal{S},\underline{c}}(x)=G_{\mathcal{S},\underline{c},M(T),T}(x)-\epsilon_{\mathcal{S},\underline{c}}(x,T)+O_{\mathcal{S},\underline{c}}\left(\frac{1}{\log
x}+\frac{1}{T}\right),$

where the function $\epsilon_{\mathcal{S},\underline{c}}(x,T)$ satisfies

(3)
$\int_{2}^{Y}\lvert\epsilon_{\mathcal{S},\underline{c}}(e^{y},T)\rvert^{2}\mathop{}\\!\mathrm{d}y\ll_{\mathcal{S},\underline{c}}Y\frac{(\log
T)^{2}}{T}+\frac{(\log T)^{3}}{T}.$

###### Proof of Proposition 6.3.

By definition, one has

$E_{\mathcal{S},\underline{c}}(x)=\sum_{m\geq 0}c_{m}E_{f_{m}}(x).$

Thus, using Proposition 6.2, one has

$\displaystyle E_{\mathcal{S},\underline{c}}(x)$
$\displaystyle=\sum_{m=0}^{\infty}c_{m}\left(G_{f_{m},T}(x)-\epsilon_{f_{m}}(x,T)+O\left(d_{m}\frac{\log\mathfrak{q}(f_{m})}{\log
x}\right)\right).$

For each $x$ and $T$, the three series are convergent, we separate

$E_{\mathcal{S},\underline{c}}(x)=G_{\mathcal{S},\underline{c},M,T}(x)-\sum_{m>M}\Bigg{(}c_{m}\sum_{\begin{subarray}{c}\gamma\in\mathcal{Z}_{f_{m}}(T)\\\
\gamma\notin\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)\end{subarray}}2\operatorname{Re}\Big{(}\operatorname{ord}(\gamma,m)\frac{x^{i\gamma}}{\frac{1}{2}+i\gamma}\Big{)}\Bigg{)}\\\
-\sum_{m=0}^{\infty}c_{m}\epsilon_{f_{m}}(x,T)+O\left(\sum_{m=0}^{\infty}\lvert
c_{m}\rvert d_{m}\frac{\log\mathfrak{q}(f_{m})}{\log x}\right).$

For each $m>M$, one has

$\displaystyle\sum_{\gamma\in\mathcal{Z}_{f_{m}}(T)\smallsetminus\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)}2\operatorname{Re}\left(\operatorname{ord}(\gamma,m)\frac{x^{i\gamma}}{\frac{1}{2}+i\gamma}\right)\ll\log
T\log(\mathfrak{q}(f_{m})T).$

Thus

$\displaystyle\sum_{m>M}c_{m}\sum_{\begin{subarray}{c}\gamma\in\mathcal{Z}_{f_{m}}(T)\\\
\gamma\notin\mathcal{Z}_{\mathcal{S},\underline{c},M}(T)\end{subarray}}2\operatorname{Re}\left(\operatorname{ord}(\gamma,m)\frac{x^{i\gamma}}{\frac{1}{2}+i\gamma}\right)\ll(\log
T)^{2}\sum_{m>M}\lvert c_{m}\rvert\log(\mathfrak{q}(f_{m})).$

For each $T$ the series is convergent, so there exist
$M=M_{\mathcal{S},\underline{c}}(T)$ such that

$\sum_{m>M}\lvert c_{m}\rvert\log(\mathfrak{q}(f_{m}))\leq\frac{1}{(\log
T)^{2}T}.$

Let

$\displaystyle\epsilon_{\mathcal{S},\underline{c}}(x,T)=\sum_{m=0}^{\infty}c_{m}\epsilon_{f_{m}}(x,T).$

One has

$\displaystyle\int_{2}^{Y}\lvert\epsilon_{\mathcal{S},\underline{c}}(e^{y},T)\rvert^{2}\mathop{}\\!\mathrm{d}y$
$\displaystyle\leq\sum_{m=0}^{\infty}\sum_{n=0}^{\infty}\lvert
c_{m}\rvert\cdot\lvert
c_{n}\rvert\int_{2}^{Y}\lvert\epsilon_{f_{m}}(e^{y},T)\rvert\cdot\lvert\epsilon_{f_{n}}(e^{y},T)\rvert\mathop{}\\!\mathrm{d}y$
$\displaystyle\ll\left\\{\sum_{m=0}^{\infty}\lvert
c_{m}\rvert\left(Y\frac{\left(\log(\mathfrak{q}(f_{m})T^{d_{m}})\right)^{2}}{T}+\frac{\left(\log(\mathfrak{q}(f_{m})T^{d_{m}})\right)^{2}\log
T}{T}\right)^{1/2}\right\\}^{2}$ (4)
$\displaystyle\ll_{\mathcal{S},\underline{c}}Y\frac{(\log
T)^{2}}{T}+\frac{(\log T)^{3}}{T}.$

Finally, since the series

$\displaystyle\sum_{m\geq 0}\lvert c_{m}\rvert d_{m}\log\mathfrak{q}(f_{m})$

is convergent, the proof is complete. ∎

We can now come back to the proof of Proposition 6.1.

###### Proof of Proposition 6.1.

By Proposition 6.3, $E_{\mathcal{S},\underline{c}}$ is a $B^{2}$-almost
periodic function well approximated by the
$G_{\mathcal{S},\underline{c},M(T),T}$’s. Thus Proposition 6.1 follows
from222Note that there is a misprint in the proof of [ANS14, Th. 2.9], (2.10)
should read
$\frac{1}{Y}\int_{0}^{Y}\lvert\vec{\phi}(y)-\vec{P}_{M}(y)\rvert\mathop{}\\!\mathrm{d}y<\epsilon$
for $Y$ large enough, the constant $A_{\epsilon}$ may have to be enlarged to
include smaller $Y$’s, see also [Bai20, Th. 1.17], correcting this in more
details. [ANS14, Th. 2.9]. ∎

Then Theorem 2.2 follows.

###### Proof of Theorem 2.2.

The existence of the limiting logarithmic distribution
$\mu_{\mathcal{S},\underline{c}}$ is stated in Proposition 6.1. In the process
of the proof, we used the fact that the function
$E_{\mathcal{S},\underline{c}}$ is a $B^{2}$-almost periodic function, by
[Bes55, Chap. II, §6, 4°] it admits a mean value which is

$\mathbb{E}(\mu_{\mathcal{S},\underline{c}})=\lim_{T\rightarrow\infty}\mathbb{E}(\mu_{\mathcal{S},\underline{c},M(T),T})=m_{\mathcal{S},\underline{c}}.$

Then it follows from [Bes55, Chap. II, §9, 1°] that it admits a second moment
which is given via Parseval’s identity. The formula for the variance follows
as in [ANS14, Th. 1.14] and [Fio14b, Lem. 2.5, 2.6].

For the decay of the tails of the distribution, the proof is similar to the
proof of [RS94, Th. 1.2] (see also [Dev20, Lem. 4.8]) noting that the measure
$\mu_{\mathcal{S},\underline{c},M(T),T}$ is supported inside an interval of
the form $[-A(\log T)^{2},A(\log T)^{2}]$, for a positive constant $A$
depending on $\mathcal{S}$ and $\underline{c}$. ∎

Let us now prove the results on the support of
$\mu_{\mathcal{S},\underline{c}}$ and on sign changes that depends on
supplementary conditions.

###### Proof of Proposition 2.3.

The proof is similar to the proof of [RS94, Th. 1.2], Following the notation
of [RS94, Sec. 2.2], let $\epsilon>0$, $t\geq\log 2+\tfrac{1}{2}\epsilon$, and

$F_{\epsilon}(t)=\frac{1}{\epsilon}\int_{t-\frac{\epsilon}{2}}^{t+\frac{\epsilon}{2}}E_{\mathcal{S},\underline{c}}(e^{y})\mathop{}\\!\mathrm{d}y.$

Using Proposition 6.3 and the bound

$\displaystyle\lvert\epsilon_{\mathcal{S},\underline{c}}(x,T)\rvert\leq\sum_{m=0}^{\infty}\lvert
c_{m}\epsilon_{f_{m}}(x,T)\rvert\ll\frac{\log
x}{\sqrt{x}}+\frac{\sqrt{x}}{T}\Big{(}(\log x)^{2}+\log T\Big{)},$

letting $T\rightarrow\infty$, we have

$\displaystyle
F_{\epsilon}(t)=\frac{4}{\epsilon}\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}}\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\frac{\sin(t\gamma)\sin(\frac{\epsilon}{2}\gamma)}{\gamma^{2}}+O(1).$

The sum
$\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}}\frac{\lvert\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\rvert}{\gamma^{2}}$
converges, so there exists $T=T(\epsilon)$ such that the function

$\displaystyle\tilde{F}_{\epsilon}(t)=\frac{4}{\epsilon}\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c},M(T)}(T)}\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\frac{\sin(t\gamma)\sin(\frac{\epsilon}{2}\gamma)}{\gamma^{2}}$

satisfies

$\displaystyle F_{\epsilon}(t)=\tilde{F}_{\epsilon}(t)+O(1).$

It is then enough to show that $\tilde{F}_{\epsilon}(t)$ is large on a large
set. As this is a finite sum, the proof follows from the same argument as in
[RS94, Sec. 2.2], under the condition that
$\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\geq 0$ for all
$\gamma$. ∎

###### Proof of Proposition 2.5.

The proof is similar to the proof of [MN20, Th. 1.5(c)]. Using [MN20, Lem. 3.8
and Prop. 3.10], we write
$\mu_{\mathcal{S},\underline{c}}=\mu^{\mathrm{LI}}\ast\mu^{N}$ where
$\hat{\mu}^{\mathrm{LI}}(\xi)=\prod_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}^{\mathrm{LI}}}J_{0}\Bigg{(}\Big{\lvert}\frac{2\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)\xi}{\frac{1}{2}+i\gamma}\Big{\rvert}\Bigg{)}$
and $\mu^{N}$ has positive mass in a small interval centred at $0$. In
particular the law of $\mu^{\mathrm{LI}}$ is the same as the law of
$\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}^{\mathrm{LI}}}\Big{\lvert}\frac{2\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)}{\frac{1}{2}+i\gamma}\Big{\rvert}X_{\gamma}$
where the $X_{\gamma}$ are independent random variables each of which is
uniformly distributed on the unit circle. Applying [MN20, Lem. 6.2] with the
assumption
$\sum_{\gamma\in\mathcal{Z}_{\mathcal{S},\underline{c}}^{\mathrm{LI}}}\Big{\lvert}\frac{2\operatorname{ord}_{\mathcal{S},\underline{c}}(\gamma)}{\frac{1}{2}+i\gamma}\Big{\rvert}=\infty$,
we conclude that $\mathrm{supp}(\mu^{\mathrm{LI}})=\mathbf{R}$ and Proposition
2.5 follows. ∎

###### Proof of Proposition 2.7.

The idea of the proof is similar to the proof of [MV07, Th. 15.2] and is based
on a theorem of Landau (see [MV07, Th. 15.1], also [KP86]). Fix $\epsilon>0$,
we consider the real functions

$f_{\pm}:x\mapsto\sum_{n\leq x}\sum_{m\geq
0}c_{m}\frac{\Lambda_{f_{m}}(n)}{\log n}+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)\pm
x^{\Theta-\epsilon},$

where $\Theta$ is defined in the statement of Proposition 2.7 and for each
$m\geq 0$, $\Lambda_{f_{m}}$ is the von Mangoldt function associated to
$f_{m}$. Precisely, one has

$\Lambda_{f_{m}}=\begin{cases}\sum_{j=1}^{d_{m}}\alpha_{j,m}(p)^{k}\log
p&\text{ if }n=p^{k}\\\ 0&\text{ if }n\text{ is not a prime
power,}\end{cases}$

where the $\alpha_{j,m}$ are the local roots of $L(f_{m},\cdot)$. In
particular, using the Ramanujan–Petersson Conjecture, the Prime Number Theorem
and the fact that the series $\sum_{m\geq 0}\lvert c_{m}\rvert d_{m}$
converges, we see that the functions $f_{\pm}$ are well-defined and we have
that

(5) $\displaystyle f_{\pm}(x)=\frac{\sqrt{x}}{\log
x}E_{\mathcal{S},\underline{c}}(x)\pm
x^{\Theta-\epsilon}+O_{\mathcal{S},\underline{c}}(x^{\frac{1}{2}})=O_{\mathcal{S},\underline{c},\epsilon^{\prime}}(x^{\Theta+\epsilon^{\prime}}),$

with $\epsilon^{\prime}>0$ arbitrarily small. For
$\operatorname{Re}(s)>\Theta$, write

$\displaystyle F_{\pm}(s)$
$\displaystyle=\int_{1}^{\infty}f_{\pm}(x)x^{-s-1}\mathop{}\\!\mathrm{d}s$
$\displaystyle=\frac{1}{s}\sum_{m\geq
0}c_{m}\Big{(}\log(L(f_{m},s))-\operatorname{ord}_{s=1}(L(f_{m},s))\log(s-1)\Big{)}+\frac{r_{\mathcal{S},\underline{c}}(s)}{s}\pm\frac{1}{s-\Theta+\epsilon}$

where we used absolute convergence to exchange the order of summation between
the integral and the sum over $m\geq 0$, and where the function
$r_{\mathcal{S},\underline{c}}$ is entire. The second expression gives an
analytic continuation of $F_{\pm}$ to a larger set avoiding lines at the left
of points $\beta+i\gamma$ with
$\operatorname{ord}_{\mathcal{S},\underline{c}}(\beta+i\gamma)\neq 0$ where
the functions have logarithmic singularities. In particular, by hypothesis,
the functions $F_{\pm}$ are regular at $s=\Theta$, but are not regular in any
half-plane $\operatorname{Re}(s)>\Theta-\epsilon^{\prime}$ with
$\epsilon^{\prime}>0$. Landau’s Theorem then implies that the functions
$f_{\pm}$ have infinitely many changes of signs. We deduce that there are
infinitely many $x>0$ such that $f_{-}(x)>0$, using (5), we obtain

$\displaystyle\sum_{p\leq x}\sum_{m\geq 0}c_{m}\lambda_{f_{m}}(p)+\sum_{m\geq
0}c_{m}\operatorname{ord}_{s=1}(L(f_{m},s))\operatorname{Li}(x)=\Omega_{+}(x^{\Theta-\epsilon}),$

and similarly $f_{+}$ takes negative values infinitely many times, which then
yields the $\Omega_{-}$-result and concludes the proof. ∎

## References

  * [Ank52] Nesmith C. Ankeny, _Representations of primes by quadratic forms_ , Amer. J. Math. 74 (1952), 913–919.
  * [ANS14] Amir Akbary, Nathan Ng, and Majid Shahabi, _Limiting distributions of the classical error terms of prime number theory_ , Q. J. Math. 65 (2014), no. 3, 743–780.
  * [Bai20] Alexandre Bailleul, _Explicit Kronecker-Weyl theorems and applications to prime number races_ , preprint, arXiv: 2007.05763.
  * [Bes55] Abram S. Besicovitch, _Almost periodic functions_ , Dover Publications, Inc., New York, 1955.
  * [CFJ16] Byungchul Cha, Daniel Fiorilli, and Florent Jouve, _Prime number races for elliptic curves over function fields_ , Ann. Sci. Éc. Norm. Supér. (4) 49 (2016), no. 5, 1239–1277.
  * [Che99] Pafnouti L. Chebyshev, _Oeuvres de P.L. Tchebychef_ , vol. I, ch. Lettre de M. le professeur Tchebychev à M. Fuss, sur le nouveau théorème relatif aux nombres premiers contenus dans les formes $4n+1$ et $4n+3$., pp. 697–698, St. Petersbourg, Commissionaires de l’Academie imperiale des sciences, 1899.
  * [CKL+20] Ryan C. Chen, Yujin H. Kim, Jared D. Lichtman, Steven J. Miller, Alina Shubina, Shannon Sweitzer, Ezra Waxman, Eric Winsor, and Jianing Yang, _A refined conjecture for the variance of gaussian primes across sectors_ , Experimental Mathematics (2020), 1–21.
  * [Col90] M. D. Coleman, _The Distribution of Points at which Binary Quadratic Forms are Prime_ , Proceedings of the London Mathematical Society s3-61 (1990), no. 3, 433–456.
  * [Dev20] Lucile Devin, _Chebyshev’s bias for analytic $L$-functions_, Math. Proc. Cambridge Philos. Soc. 169 (2020), no. 1, 103–140.
  * [FI97] Etienne Fouvry and Henryk Iwaniec, _Gaussian primes_ , Acta Arith. 79 (1997), no. 3, 249–287.
  * [FI98] John Friedlander and Henryk Iwaniec, _Asymptotic sieve for primes_ , Ann. of Math. (2) 148 (1998), no. 3, 1041–1065.
  * [FI21] by same author, _Coordinate Distribution of Gaussian Primes_ , J. Eur. Math. Soc. (2021), Electronically published on May 4, 2021, (to appear in print).
  * [Fio14a] Daniel Fiorilli, _Elliptic curves of unbounded rank and Chebyshev’s bias_ , Int. Math. Res. Not. IMRN (2014), no. 18, 4997–5024.
  * [Fio14b] by same author, _Highly biased prime number races_ , Algebra Number Theory 8 (2014), no. 7, 1733–1767.
  * [FM20] Daniel Fiorilli and Greg Martin, _A disproof of Hooley’s conjecture_ , arXiv:2008.05837, Aug. 2020.
  * [Gre85] Ralph Greenberg, _On the critical values of Hecke $L$-functions for imaginary quadratic fields_, Invent. Math. 79 (1985), no. 1, 79–94.
  * [HBL17] D. R. Heath-Brown and Xiannan Li, _Prime values of $a^{2}+p^{4}$_, Invent. Math. 208 (2017), no. 2, 441–499.
  * [Hec18] Erich Hecke, _Eine neue Art von Zetafunktionen und ihre Beziehungen zur Verteilung der Primzahlen_ , Math. Z. 1 (1918), no. 4, 357–376.
  * [HL01] Glyn Harman and Philip Lewis, _Gaussian primes in narrow sectors_ , Mathematika 48 (2001), no. 1-2, 119–135 (2003).
  * [HLR20] Bingrong Huang, Jianya Liu, and Zeév Rudnick, _Gaussian primes in almost all narrow sectors_ , Acta Arith. 193 (2020), no. 2, 183–192.
  * [Hum10] Peter Humphries, _The Summatory Function of Liouville’s Function and Pólya’s Conjecture_ , https://sites.google.com/view/peterhumphries/the-summatory-function-of-liouvilles-function-and-pólyas-conjecture, October 2010, Honours thesis.
  * [IK04] Henryk Iwaniec and Emmanuel Kowalski, _Analytic number theory_ , American Mathematical Society Colloquium Publications, vol. 53, American Mathematical Society, Providence, RI, 2004.
  * [Kov75] F. B. Koval’čik, _Density theorems for sectors and progressions_ , Litovsk. Mat. Sb. 15 (1975), no. 4, 133–151, 245.
  * [KP86] Jerzy Kaczorowski and János Pintz, _Oscillatory properties of arithmetical functions. I_ , Acta Math. Hungar. 48 (1986), no. 1-2, 173–185.
  * [KR03] Jerzy Kaczorowski and Olivier Ramaré, _Almost periodicity of some error terms in prime number theory_ , Acta Arith. 106 (2003), no. 3, 277–297.
  * [Kub50] Jonas Kubilius, _The distribution of Gaussian primes in sectors and contours_ , Leningrad. Gos. Univ. Uč. Zap. Ser. Mat. Nauk 137(19) (1950), 40–52.
  * [Kub51] by same author, _The decomposition of prime numbers into two squares_ , Doklady Akad. Nauk SSSR (N.S.) 77 (1951), 791–794.
  * [LMF21] The LMFDB Collaboration, _The L-functions and modular forms database_ , http://www.lmfdb.org, 2021, [Online; accessed April 2021].
  * [LSX20] Peter Cho-Ho Lam, Damaris Schindler, and Stanley Yao Xiao, _On prime values of binary quadratic forms with a thin variable_ , J. Lond. Math. Soc. (2) 102 (2020), no. 2, 749–772.
  * [Mak77] M. Maknis, _Refinement of the remainder term in the law of the distribution of prime numbers of an imaginary quadratic field in sectors_ , Litovsk. Mat. Sb. 17 (1977), no. 1, 133–137, 213.
  * [Maz08] Barry Mazur, _Finding meaning in error terms_ , Bull. Amer. Math. Soc. (N.S.) 45 (2008), no. 2, 185–228.
  * [MN20] Greg Martin and Nathan Ng, _Inclusive prime number races_ , Trans. Amer. Math. Soc. 373 (2020), no. 5, 3561–3607.
  * [MS12] Greg Martin and Justin Scarfy, _Comparative prime number theory: A survey_ , arXiv:1202.3408, Feb. 2012.
  * [MV07] Hugh L. Montgomery and Robert C. Vaughan, _Multiplicative number theory. I. Classical theory_ , Cambridge Studies in Advanced Mathematics, vol. 97, Cambridge University Press, Cambridge, 2007.
  * [Neu99] Jürgen Neukirch, _Algebraic number theory_ , Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences], vol. 322, Springer-Verlag, Berlin, 1999, Translated from the 1992 German original and with a note by Norbert Schappacher, With a foreword by G. Harder.
  * [PG20] Corentin Perret-Gentil, _Roots of $L$-functions of characters over function fields, generic linear independence and biases_, Algebra Number Theory 14 (2020), no. 5, 1291–1329.
  * [Pra20] Kyle Pratt, _Primes from sums of two squares and missing digits_ , Proc. Lond. Math. Soc. (3) 120 (2020), no. 6, 770–830.
  * [Roh11] David E. Rohrlich, _Root numbers_ , Arithmetic of $L$-functions, IAS/Park City Math. Ser., vol. 18, Amer. Math. Soc., Providence, RI, 2011, pp. 353–448.
  * [RS94] Michael Rubinstein and Peter Sarnak, _Chebyshev’s bias_ , Experiment. Math. 3 (1994), no. 3, 173–197.
  * [RW19] Zeév Rudnick and Ezra Waxman, _Angles of Gaussian primes_ , Israel J. Math. 232 (2019), no. 1, 159–199.
  * [Sag20] _Sagemath, the Sage Mathematics Software System (Version 9.1)_ , 2020, The Sage Developers.
  * [Sar07] Peter Sarnak, _Letter to : Barry Mazur on “Chebychev’s bias” for $\tau(p)$_, Publications.ias, https://publications.ias.edu/sites/default/files/MazurLtrMay08.PDF, 2007, (version: 2008-05).
  * [Wax21] Ezra Waxman, _Lower order terms for the one-level density of a symplectic family of Hecke $L$-functions_, J. Number Theory 221 (2021), 447–483.
  * [Win41] Aurel Wintner, _On the distribution function of the remainder term of the prime number theorem_ , Amer. J. Math. 63 (1941), 233–248.