\begin{thm}\label{thm:1.1} For $G=\operatorname{PGL}(3,\mathbb{F}_q(\!(t^{-1})\!))$ and $\Gamma=\operatorname{PGL}(3,\mathbb{F}_q[t])$, the type 1 chamber zeta function $Z_{\Gamma}(u)$ converges for sufficiently $u$, and it is given by
$$Z_{\Gamma}(u)=\frac{(1-q^4u^6)(1-q^2u^3)}{(1-q^3u^6)(1-q^3u^3)}
.$$
\end{thm}

\label{sec:1}
In this paper we define and compute a chamber zeta function for the standard non-uniform arithmetic quotient of the Bruhat--Tits building of $\mathrm{PGL}_3$. Our zeta function is defined via weighted tailless galleries of chambers and admits an Ihara--Bass type determinant formula in terms of a natural chamber transfer operator.

Ihara introduced a zeta function associated with prime elements in discrete subgroups of rank one $p$-adic groups \cite{I}. This zeta function has been generalized by Sunada \cite{Su}, Hashimoto \cite{Has}, and Bass \cite{B} to uncover the connections between number theory and representation theory.

 In recent years, the extension of zeta functions to infinite graphs has been studied \cite{CS,Cla,GZ,CJK,DK18}. In particular, Deitmar and Kang considered cycles obtained from geodesics in the universal covering tree of infinite weighted graphs. We defined a Selberg zeta function of graphs of groups and compared it with the zeta function introduced by Deitmar and Kang \cite{HK2}.

 Building on Ihara's insights, Kang and Li defined a zeta function of a finite quotient of a Bruhat-Tits building associated with $\PGL_3(F)$ over a non-archimedean field by a discrete cocompact torsion-free subgroup $\Gamma\subset \PGL_3(F)$, and found a necessary and sufficient condition for Ramanujan complexes \cite{KL}.
 This article aims to generalize zeta functions of infinite graphs and complexes of groups simultaneously.

In \cite{KLW10} and \cite{KL}, the authors considered not only edge zeta function but also the chamber zeta function. Given a torsion-free cocompact lattice $\Gamma$ of $\operatorname{PGL}(3,F)$, the type 1 chamber zeta function for $\Gamma$ is defined as follows. Let $X=\Gamma\backslash \mathcal{B}$ be the quotient complex. Every vertex $v$ has a color $\tau(v)$ (see Section \ref{sec:2}). The action of $\Gamma$ does not preserve the color of vertices whereas it preserves the color difference between the endpoints of each directed edge. This enables us to define the type of oriented edges and pointed chambers. A pointed chamber $c=\{v_1,v_2,v_3\}$ is called \textit{type} $k$ if  for any $i\in \mathbb{Z}/3\mathbb{Z}$, $$\tau(v_{i+1})-\tau(v_i)=k.$$
A sequence of type $k$ pointed chambers $(c_1,\cdots,c_n)$ is called a \textit{type $k$ gallery} if the sequence consists of the edge-adjacent pointed chambers, i.e. for any $ i$, $$v_{2,i}=v_{1,i+1},v_{3,i}=v_{2,i+1},$$
where $c_i=\{v_{1,i},v_{2,i},v_{3,i}\}.$ A gallery $\mathcal{G}=(c_1,\cdots,c_n)$ is called \textit{tailless} if $v_{1,i}\neq v_{3,i+1}$ for any $i$.
A gallery $\mathcal{G}=(c_1,\cdots,c_n)$ is called \emph{closed} if $v_{1,1}=v_{2,n}$ and $v_{2,1}=v_{3,n}.$ The \emph{shift map} of a gallery is defined by $\sigma(\mathcal{G})=(c_2,\ldots,c_n,c_1)$.  Two closed galleries $\mathcal{G}_1$ and $\mathcal{G}_2$ are equivalent if $\mathcal{G}_1=\sigma^i(\mathcal{G}_2)$ for some $i$. An equivalence class $\mathcal{C}=[\mathcal{G}]$ of closed galleries is called a
\emph{closed gallery class}, or simply a \emph{class} when no confusion arises. The power $\mathcal{C}^n$ of a closed gallery class $\mathcal{C}$ is the class obtained by winding around the same gallery for $n$ times. A class $\mathcal{C}_0$ is called \emph{primitive} if it is not a power of a shorter one. For each class $\mathcal{C}$, there exists a unique primitive class $\mathcal{C}_0$ satisfying $\mathcal{C}=\mathcal{C}_0^m$. The number $m=m(\mathcal{C})$ is called the \emph{multiplicity} of $\mathcal{C}$. As an analogy of edge zeta function, the \emph{type 1 chamber zeta function} for $\Gamma$ is defined by
$$Z_{\Gamma}:=\prod_{\mathcal{C}}\left(1-u^{\ell(\mathcal{C})}\right)^{-1},$$
where the product runs over all tailless type 1 primitive classes and and $\ell(\mathcal{C})$ is the length (the number of chambers) of the class $\mathcal{C}$. Let $T$ be the edge adjacency operator on $L^2$-space on the set of type 1 pointed chambers in $X$ defined by
$$Tf(c):=\sum_{c'}f(c'),$$
where the sum is taken over the edge adjacency type 1 pointed chamber of $c$ in $X$.
The authors of \cite{KLW10} and \cite{KL} proved that the type 1 chamber zeta function and the operator $T$ also satisfy the determinant formula
$$Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}.$$

By extending the idea in \cite{DK18} to higher dimension, we have defined the edge zeta function for non-compact weighted complexes.
Combining the ideas in \cite{DK18} and \cite{KL}, we regarded classes of galleries as image of the tailless galleries in the Bruhat-Tits building $\mathcal{B}_3$ associated to $\operatorname{PGL}_3(F).$ Similar to \cite{HK1} and \cite{HK3}, we define the weight $w$ of two type 1 pointed chambers.
For a pointed chamber $\widetilde{c}$ of $\mathcal{B}_3$ and a pointed chamber $c'$ of $X$, let
$$w(\widetilde{c},c'):=\#\{\widetilde{c}'\colon\widetilde{c}\textrm{ is a lift }\textrm {of }c',(\widetilde{c},\widetilde{c}') \textrm{ is a talless gallery in }\mathcal{B}\}.$$
For a pointed chamber $c$ of $X$, let $\widetilde{c}$ be a lift of $c$ in $\mathcal{B}$ and $w(c,c')=w(\widetilde{c},c')$. The weight $w(c,c')$ does not depend on the specific choice of the preimage $\widetilde{c}$. Thus it is well-defined.

The weight of a closed gallery $\mathcal{G}=(c_1,c_2,\ldots,c_n)$ is defined by
$$w(\mathcal{G}):=\prod_{j\textrm{ mod }n}w(c_j,c_{j+1}).$$
Then, the type 1 chamber zeta function for $\Gamma$ is defined by
$$Z_{\Gamma}(u):=\prod_C\left(1-w(\mathcal{C})u^{\ell(\mathcal{C})}\right)^{-1},$$
where the product is taken over all primitive type 1 closed gallery classes, and $\ell(\mathcal{C})$ is the length of the class $\mathcal{C}$.

\label{sec:1}
In this paper we define and compute a chamber zeta function for the standard non-uniform arithmetic quotient of the Bruhat--Tits building of $\mathrm{PGL}_3$. Our zeta function is defined via weighted tailless galleries of chambers and admits an Ihara--Bass type determinant formula in terms of a natural chamber transfer operator.

Ihara introduced a zeta function associated with prime elements in discrete subgroups of rank one $p$-adic groups \cite{I}. This zeta function has been generalized by Sunada \cite{Su}, Hashimoto \cite{Has}, and Bass \cite{B} to uncover the connections between number theory and representation theory.

Building on Ihara's insights, Kang and Li defined a zeta function of a finite quotient of a Bruhat-Tits building associated with $\PGL_3(F)$ over a non-archimedean field by a discrete cocompact torsion-free subgroup $\Gamma\subset \PGL_3(F)$, and found a necessary and sufficient condition for Ramanujan complexes \cite{KL}.
 This article aims to generalize zeta functions of infinite graphs and complexes of groups simultaneously.

In \cite{KLW10} and \cite{KL}, the authors considered not only edge zeta function but also the chamber zeta function. Given a torsion-free cocompact lattice $\Gamma$ of $\operatorname{PGL}(3,F)$, the type 1 chamber zeta function for $\Gamma$ is defined as follows. Let $X=\Gamma\backslash \mathcal{B}$ be the quotient complex. Every vertex $v$ has a color $\tau(v)$ (see Section \ref{sec:2}). The action of $\Gamma$ does not preserve the color of vertices whereas it preserves the color difference between the endpoints of each directed edge. This enables us to define the type of oriented edges and pointed chambers. A pointed chamber $c=\{v_1,v_2,v_3\}$ is called \textit{type} $k$ if for any $i\in \mathbb{Z}/3\mathbb{Z}$, $$\tau(v_{i+1})-\tau(v_i)=k.$$
A sequence of type $k$ pointed chambers $(c_1,\cdots,c_n)$ is called a \textit{type $k$ gallery} if the sequence consists of the edge-adjacent pointed chambers, i.e. for any $ i$, $$v_{2,i}=v_{1,i+1},v_{3,i}=v_{2,i+1},$$
where $c_i=\{v_{1,i},v_{2,i},v_{3,i}\}.$ A gallery $\mathcal{G}=(c_1,\cdots,c_n)$ is called \textit{tailless} if $v_{1,i}\neq v_{3,i+1}$ for any $i$.
A gallery $\mathcal{G}=(c_1,\cdots,c_n)$ is called \emph{closed} if $v_{1,1}=v_{2,n}$ and $v_{2,1}=v_{3,n}.$ The \emph{shift map} of a gallery is defined by $\sigma(\mathcal{G})=(c_2,\ldots,c_n,c_1)$. Two closed galleries $\mathcal{G}_1$ and $\mathcal{G}_2$ are equivalent if $\mathcal{G}_1=\sigma^i(\mathcal{G}_2)$ for some $i$. An equivalence class $\mathcal{C}=[\mathcal{G}]$ of closed galleries is called a
\emph{closed gallery class}, or simply a \emph{class} when no confusion arises. The power $\mathcal{C}^n$ of a closed gallery class $\mathcal{C}$ is the class obtained by winding around the same gallery for $n$ times. A class $\mathcal{C}_0$ is called \emph{primitive} if it is not a power of a shorter one. For each class $\mathcal{C}$, there exists a unique primitive class $\mathcal{C}_0$ satisfying $\mathcal{C}=\mathcal{C}_0^m$. The number $m=m(\mathcal{C})$ is called the \emph{multiplicity} of $\mathcal{C}$. As an analogy of edge zeta function, the \emph{type 1 chamber zeta function} for $\Gamma$ is defined by
$$Z_{\Gamma}:=\prod_{\mathcal{C}}\left(1-u^{\ell(\mathcal{C})}\right)^{-1},$$
where the product runs over all tailless type 1 primitive classes and and $\ell(\mathcal{C})$ is the length (the number of chambers) of the class $\mathcal{C}$. Let $T$ be the edge adjacency operator on $L^2$-space on the set of type 1 pointed chambers in $X$ defined by
$$Tf(c):=\sum_{c'}f(c'),$$
where the sum is taken over the edge adjacency type 1 pointed chamber of $c$ in $X$.
The authors of \cite{KLW10} and \cite{KL} proved that the type 1 chamber zeta function and the operator $T$ also satisfy the determinant formula
$$Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}.$$

By extending the idea in \cite{DK18} to higher dimension, we have defined the edge zeta function for non-compact weighted complexes.
Combining the ideas in \cite{DK18} and \cite{KL}, we regarded classes of galleries as image of the tailless galleries in the Bruhat-Tits building $\mathcal{B}_3$ associated to $\operatorname{PGL}_3(F).$ Similar to \cite{HK1} and \cite{HK3}, we define the weight $w$ of two type 1 pointed chambers.
For a pointed chamber $\widetilde{c}$ of $\mathcal{B}_3$ and a pointed chamber $c'$ of $X$, let
$$w(\widetilde{c},c'):=\#\{\widetilde{c}'\colon\widetilde{c}\textrm{ is a lift }\textrm {of }c',(\widetilde{c},\widetilde{c}') \textrm{ is a talless gallery in }\mathcal{B}\}.$$
For a pointed chamber $c$ of $X$, let $\widetilde{c}$ be a lift of $c$ in $\mathcal{B}$ and $w(c,c')=w(\widetilde{c},c')$. The weight $w(c,c')$ does not depend on the specific choice of the preimage $\widetilde{c}$. Thus it is well-defined.

The weight of a closed gallery $\mathcal{G}=(c_1,c_2,\ldots,c_n)$ is defined by
$$w(\mathcal{G}):=\prod_{j\textrm{ mod }n}w(c_j,c_{j+1}).$$
Then, the type 1 chamber zeta function for $\Gamma$ is defined by
$$Z_{\Gamma}(u):=\prod_C\left(1-w(\mathcal{C})u^{\ell(\mathcal{C})}\right)^{-1},$$
where the product is taken over all primitive type 1 closed gallery classes, and $\ell(\mathcal{C})$ is the length of the class $\mathcal{C}$.

Hence, we have
$$Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}=\exp\left(\sum_{n=1}^{\infty}\frac{N_n(\Gamma\backslash\mathcal{B})}{n}u^{n}\right)$$ which implies the following corollary. (See Section~\ref{sec:4} for the detail.)
\begin{coro}[Counting closed galleries]\label{coro:cycle_intro} Let $\Gamma$ be the discrete subgroup $\operatorname{PGL}(3,\mathbb{F}_q[t])$ of $\operatorname{PGL}(3,\mathbb{F}_q(\!(t^{-1})\!))$ and $N_n(\Gamma\backslash\mathcal{B})$ be defined as above. Then, we have
$$N_{m}=\left\{\begin{array}{ll}3q^{3r}-3q^{2r} & \textrm{ if }n=3r\textrm{ and }n\not\equiv 0 \,(\operatorname{mod}\,{6}) \\
3q^{6r}-9q^{4r}+3q^{3r} & \textrm{ if }n=6r \\ 0
& \textrm{ otherwise}\end{array}\right..$$\end{coro}

The trace of $T^n$ is described by
$$\operatorname{Tr}(T^n)=\sum_{c }\sum_{\mathcal{C}\colon c\in \mathcal{C}}w(\mathcal{C}),$$
where $c$ runs over the type 1 pointed chambers and $\mathcal{C}$ runs over the closed gallery classes containing $c$.
For given a class $\mathcal{C}$ of length $n$, the weight of $\mathcal{C}$ appears $\ell(\mathcal{C}_0)$ times in the above sum. Thus we have the proof of Lemma \ref{lem:4.1}
\end{proof}
\begin{prop}\label{prop:4.2} The type 1 chamber zeta function is formally described by
$$Z_\Gamma(u)=\exp\biggr(\sum_{n=1}^\infty \frac{\operatorname{Tr}(T^n)}{n}u^n\biggr).$$
\end{prop}
\begin{proof}Given a closed gallery class $\mathcal{C}$, let $\mathcal{C}_0$ be the primitive class of $\mathcal{C}$. As in \cite{DK18} and \cite{HK3}, we have
\begin{equation*}
\begin{split}
Z_{\Gamma}(u)^{-1}=&\,\prod_{\mathcal{C}_0}\bigr(1-w(\mathcal{C}_0)u^{\ell(\mathcal{C}_0)}\bigr)=\exp\left(\sum_{\mathcal{C}_0}\log(1-w(\mathcal{C}_0)u^{\ell(\mathcal{C}_0)})\right)\\
=&\,\exp\left(-\sum_{\mathcal{C}_0}\sum_{n=1}^{\infty}\frac{w(\mathcal{C}_0)^nu^{n\ell(\mathcal{C}_0)}}{n}\right)=\exp\left(-\sum_{\mathcal{C}}\frac{w(\mathcal{C})u^{\ell(\mathcal{C})}}{\ell(\mathcal{C})}\ell(\mathcal{C}_0)\right)\\=&\,\exp\left(-\sum_{n=1}^{\infty}\frac{u^{n}}{n}\sum_{\mathcal{C}\colon \ell(\mathcal{C})=n}w(\mathcal{C})\ell(\mathcal{C}_0)\right)=\exp\biggr(-\sum_{n=1}^\infty \frac{\operatorname{Tr}(T^n)}{n}u^n\biggr).
\end{split}
\end{equation*}
This proves Proposition \ref{prop:4.2}.
\end{proof}
Following the proof of Lemma 4.2 in \cite{DK18} and Proposition 4.3 in \cite{HK3}, we have the following proposition.
\begin{prop}For sufficiently small $u$, the type 1 chamber zeta function satisfies
$$Z_\Gamma(u)=\frac{1}{\det(I-uT)}.$$
\end{prop}

\begin{coro}\label{coro:rationality}
For $\Gamma=\mathrm{PGL}_3(\mathbb{F}_q[t])$ acting on the Bruhat--Tits building $\mathcal{B}$ of $G=\mathrm{PGL}_3(\mathbb{F}_q(\!(t^{-1})\!))$, the type~1 chamber zeta function
\[
Z_{\Gamma}(u)
=
\prod_{\mathcal{C}}
\bigl(1-w(\mathcal{C})u^{\ell(\mathcal{C})}\bigr)^{-1}
\]
converges for $|u|$ sufficiently small and extends to a rational function in $u$. In particular, $Z_{\Gamma}(u)$ admits meromorphic continuation to the projective line $\mathbb{P}^1(\mathbb{C})$, with possible poles contained in the spectrum of the chamber transfer operator $T$.
\end{coro}

\subsection{The determinant of $I-uT$} For any $t\geq 2$, we obtain
$$a_{k,(1,t)}(u)=q^3u^4a_{k,(1,t-1)}(u)=q^6u^8a_{k,(1,t-2)}(u)=\cdots=q^{3t-3}u^{4t-4}a_{k,(1,1)}(u).$$
Using this, we have
\begin{equation*}
\begin{split}
a_{k,(1,1)}(u)&=-(q-1)u-q^2(q-1)u^4+a_{k,(1,1)}\sum_{i=1}^k q^{3i}(q-1)u^{6i}
\end{split}
\end{equation*}
and
\begin{equation*}
a_{k,(1,1)}(u)=\frac{-(q-1)u-q^2(q-1)u^4}{1-\displaystyle\sum_{i=1}^kq^{3i}(q-1)u^{6i}}.
\end{equation*}
The sequence $a_{k,(1,1)}$ converges to
$$a_{(1,1)}=\frac{-(1-q^3u^6)((q-1)u+q^2(q-1)u^4)}{1-q^4u^6}.$$
For any $s,t,$ with $s\geq 2$ and $t< s,$
$$a_{k,(s,t)}(u)=q^3u^4a_{k,(s,t-1)}(u)=q^6u^8a_{k,(1,t-2)}(u)=\cdots=q^{3t-3}u^{4t-4}a_{k,(s,1)}(u).$$
For any $s,t$ with $s\geq 2$ and $t\geq s$,
\begin{equation*}
\begin{split}
a_{k,(s,t)}(u)&=q^3u^4a_{k,(s,t-1)}(u)=\cdots=q^{3(t-s)}u^{4(t-s)}a_{k,(s,s)}(u)\\
&=-q^{3(t-s)}(q-1)u^{4(t-s)+1}+q^{3(t-s+1)}u^{4(t-s+1)}a_{k,(s,s-1)}(u)\\
&=-q^{3(t-s)}(q-1)u^{4(t-s)+1}+q^{3(t-1)}u^{4(t-1)}a_{k,(s,1)}(u).
\end{split}
\end{equation*}
Similarly,
\begin{equation*}
\begin{split}
a_{k,(s,1)}=&-q^{2}(q-1)u^{2s+2}+\displaystyle\sum_{i=1}^k a_{k,(s,i)}q^{3}(q-1)u^{2i+4}\\
=&-q^{2}(q-1)u^{2s+2}+\displaystyle\sum_{i=1}^k a_{k,(s,1)}q^{3i}(q-1)u^{6i}\\
&-\sum_{s}^kq^{3(i-s+1)}(q-1)^2u^{6i-4s+5}
\end{split}
\end{equation*}
and
\begin{equation*}
a_{k,(s,1)}=\frac{-q^{2}(q-1)u^{2s+2}-\displaystyle\sum_{s}^kq^{3(i-s+1)}(q-1)u^{6i-4s+5}}{1-\displaystyle\sum_{i=1}^k q^{3i}(q-1)^2u^{6i}}.
\end{equation*}
The sequence $a_{k,(s,1)}$ converges to
\begin{equation*}
a_{(s,1)}=\frac{-q^2(q-1)u^{2s+2}(1-q^3u^6)-q^3(q-1)^2u^{2s+5}}{1-q^4u^6}.
\end{equation*}
Using the limit of $\det(A_{k,0})$, the determinant of $I-uT$ is
\begin{equation*}
\lim_{k\rightarrow \infty}\det(A_{k,0})=\frac{(1-q^3u^6)(1-q^3u^3)}{(1-q^4u^6)(1-q^2u^3)}.
\end{equation*}
By determinant formula, we obtain the following theorem:
\begin{thm}\label{thm:5.1} Let $\Gamma=\PGL_3(\mathbb{F}_q[t])$. The type 1 chamber zeta function $Z_\Gamma(u)$ converges for sufficiently small $u$ and it is given by
$$Z_{\Gamma}(u)=\frac{(1-q^4u^6)(1-q^2u^3)}{(1-q^3u^6)(1-q^3u^3)}.$$
\end{thm}
Recall that we defined $$N_n(\Gamma\backslash\mathcal{B})=\sum_{c\colon\ell(\mathcal{C})=n}w(\mathcal{C})\ell(\mathcal{C}_0)$$ by the weighted number of type $1$ closed galleries in $\Gamma\backslash \mathcal{B}$ of length $n$.
The trace of the operator $T^m$ coincides with $N_m(\Gamma\backslash\mathcal{B})$. By Proposition \ref{prop:4.2}, we have
\begin{equation}\label{eq:5.1}
u\frac{d}{du}\log Z_{\Gamma}(u)=u\frac{Z'_{\Gamma}(u)}{Z_{\Gamma}(u)}=\sum_{m=1}^{\infty} N_m(\Gamma\backslash \mathcal{B})u^m.
\end{equation}
\begin{coro} Let $\Gamma=\operatorname{PGL}(3,\mathbb{F}_q[t])$ and $N_m(\Gamma\backslash\mathcal{B})$ as above. Then, we have
$$N_m(\Gamma\backslash\mathcal{B})=\left\{\begin{array}{ll}3q^{3r}-3q^{2r} & \textrm{ if }m=3r\textrm{ and }m\not\equiv 0 \,(\operatorname{mod}\,{6}) \\
3q^{6r}-9q^{4r}+6q^{3r} & \textrm{ if }m=6r \\ 0
& \textrm{ otherwise}\end{array}\right..$$
\end{coro}
\begin{proof}
By Theorem~5.1, we have
\[
Z_\Gamma(u)
=
\frac{(1-q^{4}u^{6})(1-q^{2}u^{3})}{(1-q^{3}u^{6})(1-q^{3}u^{3})}.
\]
Recall from \eqref{eq:5.1} that
\[
u\frac{d}{du}\log Z_\Gamma(u)
=
\sum_{m\ge1} N_m(\Gamma\backslash B)\,u^m.
\]
Taking the logarithmic derivative of $Z_\Gamma(u)$, we obtain
\begin{align*}
u\frac{d}{du}\log Z_\Gamma(u)
&=
u\frac{d}{du}\Bigl(
\log(1-q^{4}u^{6})
+
\log(1-q^{2}u^{3})
-
\log(1-q^{3}u^{6})
-
\log(1-q^{3}u^{3})
\Bigr) \\
&=
-\frac{6q^{4}u^{6}}{1-q^{4}u^{6}}
-\frac{3q^{2}u^{3}}{1-q^{2}u^{3}}
+\frac{6q^{3}u^{6}}{1-q^{3}u^{6}}
+\frac{3q^{3}u^{3}}{1-q^{3}u^{3}}.
\end{align*}
Equivalently,
\begin{equation}\label{eq:Nm-generating}
\sum_{m\ge1} N_m(\Gamma\backslash B)\,u^m
=
\frac{3q^{3}u^{3}}{1-q^{3}u^{3}}
-
\frac{3q^{2}u^{3}}{1-q^{2}u^{3}}
+
\frac{6q^{3}u^{6}}{1-q^{3}u^{6}}
-
\frac{6q^{4}u^{6}}{1-q^{4}u^{6}}.
\end{equation}
Each term on the right-hand side admits a geometric series expansion:
\[
\frac{3q^{3}u^{3}}{1-q^{3}u^{3}}
=
3\sum_{r\ge1} q^{3r}u^{3r},
\qquad
\frac{3q^{2}u^{3}}{1-q^{2}u^{3}}
=
3\sum_{r\ge1} q^{2r}u^{3r},
\]
\[
\frac{6q^{3}u^{6}}{1-q^{3}u^{6}}
=
6\sum_{r\ge1} q^{3r}u^{6r},
\qquad
\frac{6q^{4}u^{6}}{1-q^{4}u^{6}}
=
6\sum_{r\ge1} q^{4r}u^{6r}.
\]
It follows immediately that $N_m(\Gamma\backslash B)=0$ unless $3\,|\, m$.
If $m=3r$ and $m\not\equiv 0 \pmod{6}$, then only the first two series contribute,
and we obtain
\[
N_{3r}(\Gamma\backslash B)
=
3q^{3r}-3q^{2r}.
\]
If $m=6r$, then all four series in \eqref{eq:Nm-generating} contribute, yielding
\[
N_{6r}(\Gamma\backslash B)
=
\bigl(3q^{6r}-3q^{4r}\bigr)
+
\bigl(6q^{3r}-6q^{4r}\bigr)
=
3q^{6r}+6q^{3r}-9q^{4r}.
\]
This completes the proof.
\end{proof}

\begin{proof}[Idea of Proof] Given a class $\mathcal{C}$, we obtain that $\mathcal{C}=\mathcal{C}_0^n$ for some primitive class $\mathcal{C}_0$. The type 1 chamber zeta function formally satisfies
\begin{align*}
Z_{\Gamma}(u)^{-1}=\exp\left(-\sum_{n=1}^{\infty}\frac{u^{n}}{n}\sum_{\mathcal{C}\colon \ell(\mathcal{C})=n}w(\mathcal{C})\ell(\mathcal{C}_0)\right).
\end{align*}
Let $\operatorname{C}(\Gamma\backslash \mathcal{B})$ be the set of all type 1 pointed chambers in $\Gamma\backslash \mathcal{B}$ and let $S(\operatorname{C}(\Gamma\backslash \mathcal{B}))$ be the formal vector space defined by
$$S(\operatorname{C}(\Gamma\backslash \mathcal{B})):=\displaystyle\bigoplus_{c\in\operatorname{C}(\Gamma\backslash \mathcal{B})}\mathbb{C}c.$$
The operator $T\colon S(\operatorname{C}(\Gamma\backslash \mathcal{B}))\to S(\operatorname{C}(\Gamma\backslash \mathcal{B}))$ is given by
$$Tc=\sum_{c'}w(c,c')c'$$ where the sum runs over all type 1 pointed chambers $c'$ adjacent to $c$. We will prove the operator $T^n$ is traceable, and the trace is represented by
$$\operatorname{Tr}(T_k^n)=\sum_{c\colon\ell(\mathcal{C})=n}w(\mathcal{C})\ell(\mathcal{C}_0).$$
Thus, we obtain that $Z_{\Gamma,k}(q^{-s})^{-1}=\exp\bigr(\!\operatorname{Tr}(\log(1-uT))\bigr)$. Fubini trick and truncation by certain horizontal direction allows us to compute this determinant, which enables us to complete the proof.
\end{proof}

\noindent
\begin{remark}[Idea of the traceable argument]
The traceable property relies on a monotonicity phenomenon along the cuspidal directions of the quotient complex. Certain directed steps force the height to strictly increase (or decrease), and once such a step occurs, returning to the starting point requires traversing a path whose length is bounded below by a uniform constant. Consequently, for each fixed length $n$, only finitely many closed admissible gallery classes can occur.
\end{remark}

The trace of the operator $T^n$ coincides with the weighted number
$$N_n(\Gamma\backslash\mathcal{B})=\sum_{c\colon\ell(\mathcal{C})=n}w(\mathcal{C})\ell(\mathcal{C}_0)$$ of type~$1$ closed gallery classes in $\Gamma\backslash \mathcal{B}$ of length $n$.

Hence, we have
$$Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}=\exp\left(\sum_{n=1}^{\infty}\frac{N_n(\Gamma\backslash\mathcal{B})}{n}u^{n}\right)$$ which implies the following corollary. (See Section~\ref{sec:4} for the detail.)
\begin{coro}[Counting closed galleries]\label{coro:cycle_intro} Let $\Gamma$ be the discrete subgroup $\operatorname{PGL}(3,\mathbb{F}_q[t])$ of $\operatorname{PGL}(3,\mathbb{F}_q(\!(t^{-1})\!))$ and $N_n(\Gamma\backslash\mathcal{B})$ be defined as above. Then, we have
$$N_{m}=\left\{\begin{array}{ll}3q^{3r}-3q^{2r} & \textrm{ if }n=3r\textrm{ and }n\not\equiv 0 \,(\operatorname{mod}\,{6}) \\
3q^{6r}-9q^{4r}+3q^{3r} & \textrm{ if }n=6r \\ 0
& \textrm{ otherwise}\end{array}\right..$$\end{coro}

\begin{remark}[Position within the higher-rank zeta program]
The present work fits into a broader ``higher-rank zeta'' program that originates from the Ihara--Bass theory for regular graphs and its extensions to graphs of groups and Bruhat--Tits buildings. Very roughly, one can distinguish two axes:
\begin{itemize}
\item[(i)] the nature of the quotient $\Gamma\backslash X$ (finite/cocompact versus non-uniform of finite volume);
\item[(ii)] the combinatorial level on which the zeta function is defined (vertex/edge versus higher-dimensional cells such as chambers).
\end{itemize}
On the cocompact side, Ihara's original zeta function and its refinements may be viewed as edge zeta functions for finite regular graphs, while the works of Kang--Li and Kang--Li--Wang treat chamber zeta functions for finite quotients of the $\widetilde{A}_2$-building by cocompact lattices in $\mathrm{PGL}_3(F)$ \cite{KL,KLW10,KLW18}. On the non-uniform side, the edge zeta function for the standard non-uniform complex attached to
\[
G=\mathrm{PGL}_3\bigl(\mathbb{F}_q(\!(t^{-1})\!)\bigr),\qquad
\Gamma=\mathrm{PGL}_3(\mathbb{F}_q[t]),
\]
was recently analyzed in detail, providing explicit determinant formulas and rational expressions \cite{HK3}.

The present paper occupies the remaining natural corner of this picture: we define and study the type~1 chamber zeta function for the same standard non-uniform complex $\Gamma\backslash\mathcal{B}$ and show that it admits an Ihara--Bass type determinant formula together with an explicit rational expression. From this point of view, one may regard our result as completing the first explicit higher-rank case in which both edge and chamber zeta functions are understood for a non-uniform arithmetic quotient of a Bruhat--Tits building. This suggests several possible generalizations, for instance to higher rank groups such as $\mathrm{PGL}_d$ with $d\ge4$ or to other non-uniform complexes of groups, where systematic comparisons between edge- and chamber-level zeta functions remain largely unexplored.
\end{remark}

\begin{figure}[ht]
\centering
\begin{tikzpicture}[>=latex, node distance=3.4cm, font=\small]

\node at (-4.8,3.6) {quotient type};
\node[rotate=90] at (-4.95,1.7) {non-uniform};
\node[rotate=90] at (-4.9,-1.8) {finite / cocompact};

\node at (-2.0,-3.6) {edge-level};
\node at (3.7,-3.6) {chamber-level};

\draw[dashed] (0.77,4) -- (0.77,-4);

\draw[dashed] (-5.2,0) -- (6.2,0);

\node[anchor=south] at (-2,3.3) {edge zeta};
\node[anchor=south] at (3.4,3.3) {chamber zeta};

\node[draw, rounded corners, align=center, minimum width=3.2cm, minimum height=1.6cm] (Q1) at (-2,-1.8)
{finite graphs,\\
(regular or irregular)\\
(Ihara, Bass, Hashimoto\\
Sunada, etc.)};

\node[draw, rounded corners, align=center, minimum width=3.2cm, minimum height=1.6cm] (Q2) at (3.5,-1.8)
{$\widetilde{A}_2$-buildings,\\
cocompact lattices in\\
$\mathrm{PGL}_3(F)$, chamber zeta\\
(\cite{KL},\cite{KLW10},\cite{KLW18})};

\node[draw, rounded corners, align=center, minimum width=3.2cm, minimum height=1.6cm] (Q3) at (-2,1.8)
{weighted graphs (\cite{DK18}),\\standard non-uniform\\
complex for $\mathrm{PGL}_3$\\
 (\cite{HK3})
};

\node[draw, rounded corners, thick, align=center, minimum width=3.2cm, minimum height=1.6cm, fill=gray!10] (Q4) at (3.5,1.8)
{standard non-uniform\\
complex for $\mathrm{PGL}_3$,\\
type~1 chamber zeta\\
\textbf{(this paper)}};

\draw[->, thick] (Q3.east) -- (Q4.west);
\draw[->, thick] (Q2.north) -- (Q4.south);

\end{tikzpicture}
\caption{A schematic position of this work among edge and chamber zeta functions for cocompact and non-uniform quotients.}
\end{figure}

This paper is organized as follows. We provide the preliminary notions on Bruhat-Tits building for $\operatorname{PGL}_3$ in Section~\ref{sec:2}.
In Section~\ref{sec:3}, we deal with the fundamental domain of $\Gamma$ and the image of tailless galleries in the quotient space by the standard non-uniform lattice $\Gamma$ of $G$. In Section~\ref{sec:4}, we define the type 1 chamber zeta function for $\Gamma\backslash \mathcal{B}$ and prove that the zeta function satisfies the determinant formula. In Section \ref{sec:5}, we present the proof of Theorem \ref{thm:1.1} and Corollary \ref{coro:cycle_intro}.

Given a class $\mathcal{C}$, one has $\mathcal{C}=\mathcal{C}_0^n$ for some primitive class $\mathcal{C}_0$, and the type 1 chamber zeta function "formally satisfies"
\[
Z_{\Gamma}(u)^{-1}=\exp\left(-\sum_{n=1}^{\infty}\frac{u^{n}}{n}\sum_{\mathcal{C}:\, \ell(\mathcal{C})=n}w(\mathcal{C})\,\ell(\mathcal{C}_0)\right).
\]
Introduce the formal vector space
\[
S(\operatorname{C}(\Gamma\backslash \mathcal{B})):=\bigoplus_{c\in\operatorname{C}(\Gamma\backslash \mathcal{B})}\mathbb{C}c
\]
of type 1 pointed chambers, and define an operator $T$ by
\[
Tc=\sum_{c'} w(c,c')\,c'
\]
summing over adjacent type 1 pointed chambers $c'$. One "will prove the operator $T^n$ is traceable" and that its trace is
\[
\operatorname{Tr}(T_k^n)=\sum_{\mathcal{C}:\,\ell(\mathcal{C})=n} w(\mathcal{C})\,\ell(\mathcal{C}_0).
\]
Hence $Z_{\Gamma,k}(q^{-s})^{-1}=\exp\bigl(\operatorname{Tr}(\log(1-uT))\bigr)$, yielding the determinant expression
\[
Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}=\exp\left(\sum_{n=1}^{\infty}\frac{N_n(\Gamma\backslash\mathcal{B})}{n}u^{n}\right),\qquad
N_n(\Gamma\backslash\mathcal{B})=\sum_{\mathcal{C}:\,\ell(\mathcal{C})=n}w(\mathcal{C})\,\ell(\mathcal{C}_0).
\]
To justify traceability, the "traceable property relies on a monotonicity phenomenon along the cuspidal directions": certain directed steps force a height to strictly increase/decrease, and returning to the start then requires a path of uniformly bounded-below length, so for each fixed $n$ "only finitely many closed admissible gallery classes can occur." Finally, a "Fubini trick and truncation by certain horizontal direction allows us to compute this determinant," which completes the proof of Theorem~\ref{thm:1.1} (producing the explicit rational expression).

Given a class $\mathcal{C}$, one has $\mathcal{C}=\mathcal{C}_0^n$ for some primitive class $\mathcal{C}_0$, and the type 1 chamber zeta function "formally satisfies"
\[
Z_{\Gamma}(u)^{-1}=\exp\left(-\sum_{n=1}^{\infty}\frac{u^{n}}{n}\sum_{\mathcal{C}:\, \ell(\mathcal{C})=n}w(\mathcal{C})\,\ell(\mathcal{C}_0)\right).
\]
Introduce the formal vector space
\[
S(\operatorname{C}(\Gamma\backslash \mathcal{B})):=\bigoplus_{c\in\operatorname{C}(\Gamma\backslash \mathcal{B})}\mathbb{C}c
\]
of type 1 pointed chambers, and define an operator $T$ by
\[
Tc=\sum_{c'} w(c,c')\,c'
\]
summing over adjacent type 1 pointed chambers $c'$. One "will prove the operator $T^n$ is traceable" and that its trace is
\[
\operatorname{Tr}(T_k^n)=\sum_{\mathcal{C}:\,\ell(\mathcal{C})=n} w(\mathcal{C})\,\ell(\mathcal{C}_0).
\]
Hence $Z_{\Gamma,k}(q^{-s})^{-1}=\exp\bigl(\operatorname{Tr}(\log(1-uT))\bigr)$, yielding the determinant expression
\[
Z_{\Gamma}(u)=\frac{1}{\det(I-uT)}=\exp\left(\sum_{n=1}^{\infty}\frac{N_n(\Gamma\backslash\mathcal{B})}{n}u^{n}\right),\qquad
N_n(\Gamma\backslash\mathcal{B})=\sum_{\mathcal{C}:\,\ell(\mathcal{C})=n}w(\mathcal{C})\,\ell(\mathcal{C}_0).
\]
To justify traceability, the "traceable property relies on a monotonicity phenomenon along the cuspidal directions": certain directed steps force a height to strictly increase/decrease, and returning to the start then requires a path of uniformly bounded-below length, so for each fixed $n$ "only finitely many closed admissible gallery classes can occur." Finally, a "Fubini trick and truncation by certain horizontal direction allows us to compute this determinant," which completes the proof of the main theorem (producing the explicit rational expression).

Question:
Let \(\mathcal B\) be the Bruhat--Tits building of \(G=\operatorname{PGL}(3,\mathbb F_q((t^{-1})))\), and let \(\Gamma=\operatorname{PGL}(3,\mathbb F_q[t])\). For the quotient \(\Gamma\backslash \mathcal B\), define the type 1 chamber zeta function by
\[
Z_\Gamma(u)=\prod_{\mathcal C}\left(1-w(\mathcal C)u^{\ell(\mathcal C)}\right)^{-1},
\]
where the product runs over tailless type 1 primitive closed gallery classes \(\mathcal C\), \(\ell(\mathcal C)\) is the gallery length, and for a representative closed gallery \((c_1,\dots,c_n)\), its weight is \(w(\mathcal C)=\prod_j w(c_j,c_{j+1})\), with \(w(c,c')\) the number of lifts of \(c'\) that form a tailless type 1 gallery with a lift of \(c\). Which statement is valid for \(Z_\Gamma(u)\)?

\(Z_\Gamma(u)\) converges for sufficiently small \(u\), and
\[
Z_\Gamma(u)=\frac{(1-q^4u^6)(1-q^2u^3)}{(1-q^3u^6)(1-q^3u^3)}.
\]

Choices:
B.
\(Z_\Gamma(u)\) converges for sufficiently small \(u\), and
\[
Z_\Gamma(u)=\frac{(1-q^3u^6)(1-q^2u^3)}{(1-q^4u^6)(1-q^3u^3)}.
\]
C. \(Z_\Gamma(u)\) converges for sufficiently small \(u\), and \(Z_\Gamma(u)\) is a rational function of \(u\).
D.
\(Z_\Gamma(u)\) converges for sufficiently small \(u\), and
\[
Z_\Gamma(u)=\frac{1}{\det(I-uT)},
\]
where \(T\) is the weighted type 1 chamber transfer operator on type 1 pointed chambers of \(\Gamma\backslash\mathcal B\).
E.
\(Z_\Gamma(u)\) converges for sufficiently small \(u\), and
\[
Z_\Gamma(u)=\frac{(1-q^4u^3)(1-q^2u^6)}{(1-q^3u^3)(1-q^3u^6)}.
\]

explicit determinant evaluation factors placed on wrong sides

dropped the explicit rational formula while keeping convergence and rationality

formal determinant identity for transfer operator treated as the final theorem in place of the computed closed formula

length divisibility structure in exponents 3 and 6 interchanged


Assume GRH for the non-principal character modulo $4$. Then, the natural density of the set $ \mathcal{P}_{1/2}(4;3,1)=\{ x\ge 2\, :\, \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}$
    exists and equals $1$.

\begin{thm}\label{main}
    Let $q\ge 3$ and assume \text{GRH} for all non-principal Dirichlet characters modulo $q$. Let $\varepsilon>0$ and let $a,b$ be distinct invertible residue classes modulo $q$. Then there exists a (unique) constant $C$ depending on $q,\, a,$ and $b$, such that the natural density of the set \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\M(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{\frac{1}{2}-\varepsilon}}\right\}\]
    exists and equals $1$, and the logarithmic density of the set
    \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\M(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{1-\varepsilon}}\right\}\]
    exists and equals $1$.
\end{thm}

\begin{equation}\label{DRH-estimate}
    \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b)=-\frac{\M(q;a,b)}{2\varphi(q)} \log \log x+C+o(1) \, ,
\end{equation}

In a letter~\cite{Chebyshev} sent to Fuss in 1853, Chebyshev observed that primes congruent to $3\bmod\,  4$ seem to appear more often than those congruent to $1\bmod\,  4$. Let $q\ge3$ and let $a\in \mathbb Z$ be coprime to $q$, and define $\pi(x;q,a)=\#\{ p\le x\, :\,  p\equiv a\bmod\,  q\}$. Although the prime number theorem in arithmetic progressions asserts that primes are equidistributed among invertible classes modulo $q$, it gives no control over the difference $\pi(x;q,a)-\pi(x;q,b)$ when $b\in\mathbb Z$ is coprime to $q$. In 1914, Littlewood~\cite{Littlewood} proved that the function $x\mapsto\pi(x;4,1)-\pi(x;4,3)$ changes sign infinitely often. This naturally raised the question of the existence of the natural density of the set $\mathcal{P}(q;a,b):=\{x\ge 2\, :\, \pi(x;q,a)>\pi(x;q,b)\}$, namely the limit \[ \lim_{X\to \infty}\frac{\boldsymbol{m}\{2\le x\le X\, :\, x\in \mathcal{P}(q;a,b) \}}{X},\] where $\boldsymbol{m}$ is the Lebesgue measure on $\mathbb R$. This question was first addressed by Kaczorowski~\cite{Kac} who proved under $\text{GRH}$ that the natural density of $\mathcal{P}(4;3,1)$ does not exist.

In 1994, Rubinstein and Sarnak~\cite{RS94} established a theoretical framework that enabled them to address the question of Chebyshev's bias for general moduli. They proved, under GRH and a linear independence hypothesis on non-negative imaginary parts of the zeros of Dirichlet $L$-functions (LI), that the logarithmic density \[ \lim_{X\to \infty} \frac{1}{\log X}\int_{2}^X \mathds{1}_{\mathcal{P}(q;a,b)}(u)\frac{\mathrm{d}u}{u}\]
of the set $\mathcal{P}(q;a,b)$ exists. Furthermore, they quantified the bias for $q=4$, proving that the logarithmic density of the set $\mathcal{P}(4;3,1)$ is approximately $0.9959\dots$

More recently, a new framework for studying Chebyshev's bias was introduced by Aoki and Koyama~\cite{Ao-Ko}. They observed that since one of the reasons for the existence of the logarithmic density is that the factor $1/u$ in the integral dampens the contribution of large primes, it would be natural to consider the prime counting function \begin{equation}\label{pi_1/2}
    \pi_{1/2}(x;q,a)=\sum_{\substack{p\le x\\ p\equiv a\bmod\, {q}}}\frac{1}{\sqrt{p}}
\end{equation}
and ask whether the natural density of the set $\mathcal{P}_{1/2}(q;a,b):=\{x\ge 2\, :\, \pi_{1/2}(x;q,a)>\pi_{1/2}(x;q,b)\}$ exists. In their framework, and that of subsequent authors~\cite{Ko-Ku, Sheth}, the idea was to avoid using a hypothesis as strong as LI. Therefore, they worked in the context of the Deep Riemann Hypothesis (DRH), a hypothesis stronger than GRH introduced by K. Conrad~\cite{Conrad}, which states that for all non-principal Dirichlet characters modulo $q$ we have \begin{equation}\label{DRH} (\log x)^{m_\chi} \prod_{p\le x}\left(1-\frac{\chi(p)}{p^{1/2}}\right)^{-1}=\ell_\chi+o(1) \quad(x\to \infty) ,\end{equation}
where $\ell_\chi\ne 0$ and $m_\chi:=\text{ord}_{s=1/2}L(s,\chi)$ is the order of vanishing of $L(s,\chi)$ at the central point $s=1/2$. Aoki and Koyama observed that taking the logarithm in~\eqref{DRH}, and using its Taylor expansion, then using Mertens' theorem to estimate $\sum_{p\le x} \chi(p^2)/p$, leads to an estimate of $\sum_{p\le x} \chi(p)/\sqrt{p}$, which allowed them to prove that DRH holds if and only if for all invertible residue classes $a,b$ modulo $q$ one has \begin{equation}\label{DRH-estimate}
    \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b)=-\frac{\text{M}(q;a,b)}{2\varphi(q)} \log \log x+C+o(1) \, ,
\end{equation}
    where $\text{M}(q;a,b)=r(a)-r(b)+2\sum_{\chi \ne \chi _0}(\chi(a)-\chi(b))m_\chi$, $r:(\mathbb Z/q\mathbb Z)^\times\to \Z_{\ge 0}$ defined by $r(a)=\#\{ x\in (\mathbb Z/q\mathbb Z)^\times\, :\, x^2=a\}$ and $C$ is a constant depending on $q,a,b$. In a very recent paper, Suzuki~\cite{Su} studied the weighted Chebyshev-type function $\psi_{1/2}(x):=\sum_{n\le x}\Lambda(n)/\sqrt{n}$ and its variants in arithmetic progressions. The author proved that GRH holds for the non-principal Dirichlet character modulo $4$ if and only if
\[\sqrt{x}\left(\sum_{\substack{p\le x\\ p\equiv 1\bmod\, 4}}\frac{\log p}{\sqrt{p}}\log\left(\frac{x}{p}\right)-\sum_{ \substack{p\le x\\ p\equiv 3 \bmod\, 4}}\frac{\log p}{\sqrt{p}}\log \left(\frac{x}{p}\right) \right)\sim-(\log x)^2 \frac{\sqrt{x}}{4}\quad (x\to \infty)\, .\]

This suggests that studying the asymptotic behavior of the difference of prime counting functions of the same type as~\eqref{pi_1/2} requires either hypotheses stronger than GRH (such as DRH in Aoki--Koyama's work), or additional smoothing weights ($\log p \log (x/p)$ in Suzuki's work) which make the contribution of large primes smaller.

In this paper, we show that GRH is sufficient to prove that the equality~\eqref{DRH-estimate} holds for a set of $x\ge 2$ of natural density $1$. More precisely:
\begin{thm}\label{main}
    Let $q\ge 3$ and assume \text{GRH} for all non-principal Dirichlet characters modulo $q$. Let $\varepsilon>0$ and let $a,b$ be distinct invertible residue classes modulo $q$. Then there exists a (unique) constant $C$ depending on $q,\, a,$ and $b$, such that the natural density of the set \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\text{M}(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{\frac{1}{2}-\varepsilon}}\right\}\]
    exists and equals $1$, and the logarithmic density of the set
    \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\text{M}(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{1-\varepsilon}}\right\}\]
    exists and equals $1$.
\end{thm}
Assuming that $m_\chi=0$ for all $\chi \bmod\,  q$, we have $\text{M}(q;a,b)=r(a)-r(b)$. Therefore, if $r(a)<r(b)$, then assuming GRH for all non-principal Dirichlet characters modulo $q$, we have the natural density of the set $\mathcal{P}_{1/2}(q;a,b)$ exists and equals $1$. Thus, Theorem~\ref{main} explains Chebyshev's bias, thanks to these weighted prime counting functions, without the need for any strong additional hypotheses (such as LI or DRH). For historical reasons, we state the particular case $q=4$:

In 1994, Rubinstein and Sarnak~\cite{RS94} established a theoretical framework that enabled them to address the question of Chebyshev's bias for general moduli. They proved, under GRH and a linear independence hypothesis on non-negative imaginary parts of the zeros of Dirichlet $L$-functions (LI), that the logarithmic density \[ \lim_{X\to \infty} \frac{1}{\log X}\int_{2}^X \mathds{1}_{\mathcal{P}(q;a,b)}(u)\frac{\mathrm{d}u}{u}\]
of the set $\mathcal{P}(q;a,b)$ exists. Furthermore, they quantified the bias for $q=4$, proving that the logarithmic density of the set $\mathcal{P}(4;3,1)$ is approximately $0.9959\dots$

More recently, a new framework for studying Chebyshev's bias was introduced by Aoki and Koyama~\cite{Ao-Ko}. They observed that since one of the reasons for the existence of the logarithmic density is that the factor $1/u$ in the integral dampens the contribution of large primes, it would be natural to consider the prime counting function \begin{equation}\label{pi_1/2}
 \pi_{1/2}(x;q,a)=\sum_{\substack{p\le x\\ p\equiv a\bmod\, {q}}}\frac{1}{\sqrt{p}}
\end{equation}
and ask whether the natural density of the set $\mathcal{P}_{1/2}(q;a,b):=\{x\ge 2\, :\, \pi_{1/2}(x;q,a)>\pi_{1/2}(x;q,b)\}$ exists. In their framework, and that of subsequent authors~\cite{Ko-Ku, Sheth}, the idea was to avoid using a hypothesis as strong as LI. Therefore, they worked in the context of the Deep Riemann Hypothesis (DRH), a hypothesis stronger than GRH introduced by K. Conrad~\cite{Conrad}, which states that for all non-principal Dirichlet characters modulo $q$ we have \begin{equation}\label{DRH} (\log x)^{m_\chi} \prod_{p\le x}\left(1-\frac{\chi(p)}{p^{1/2}}\right)^{-1}=\ell_\chi+o(1) \quad(x\to \infty) ,\end{equation}
where $\ell_\chi\ne 0$ and $m_\chi:=\text{ord}_{s=1/2}L(s,\chi)$ is the order of vanishing of $L(s,\chi)$ at the central point $s=1/2$. Aoki and Koyama observed that taking the logarithm in~\eqref{DRH}, and using its Taylor expansion, then using Mertens' theorem to estimate $\sum_{p\le x} \chi(p^2)/p$, leads to an estimate of $\sum_{p\le x} \chi(p)/\sqrt{p}$, which allowed them to prove that DRH holds if and only if for all invertible residue classes $a,b$ modulo $q$ one has \begin{equation}\label{DRH-estimate}
 \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b)=-\frac{\text{M}(q;a,b)}{2\varphi(q)} \log \log x+C+o(1) \, ,
\end{equation}
 where $\text{M}(q;a,b)=r(a)-r(b)+2\sum_{\chi \ne \chi _0}(\chi(a)-\chi(b))m_\chi$, $r:(\mathbb Z/q\mathbb Z)^\times\to \Z_{\ge 0}$ defined by $r(a)=\#\{ x\in (\mathbb Z/q\mathbb Z)^\times\, :\, x^2=a\}$ and $C$ is a constant depending on $q,a,b$. In a very recent paper, Suzuki~\cite{Su} studied the weighted Chebyshev-type function $\psi_{1/2}(x):=\sum_{n\le x}\Lambda(n)/\sqrt{n}$ and its variants in arithmetic progressions. The author proved that GRH holds for the non-principal Dirichlet character modulo $4$ if and only if
\[\sqrt{x}\left(\sum_{\substack{p\le x\\ p\equiv 1\bmod\, 4}}\frac{\log p}{\sqrt{p}}\log\left(\frac{x}{p}\right)-\sum_{ \substack{p\le x\\ p\equiv 3 \bmod\, 4}}\frac{\log p}{\sqrt{p}}\log \left(\frac{x}{p}\right) \right)\sim-(\log x)^2 \frac{\sqrt{x}}{4}\quad (x\to \infty)\, .\]

This suggests that studying the asymptotic behavior of the difference of prime counting functions of the same type as~\eqref{pi_1/2} requires either hypotheses stronger than GRH (such as DRH in Aoki--Koyama's work), or additional smoothing weights ($\log p \log (x/p)$ in Suzuki's work) which make the contribution of large primes smaller.

In this paper, we show that GRH is sufficient to prove that the equality~\eqref{DRH-estimate} holds for a set of $x\ge 2$ of natural density $1$. More precisely:
\begin{thm}\label{main}
 Let $q\ge 3$ and assume \text{GRH} for all non-principal Dirichlet characters modulo $q$. Let $\varepsilon>0$ and let $a,b$ be distinct invertible residue classes modulo $q$. Then there exists a (unique) constant $C$ depending on $q,\, a,$ and $b$, such that the natural density of the set \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\text{M}(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{\frac{1}{2}-\varepsilon}}\right\}\]
 exists and equals $1$, and the logarithmic density of the set
 \[\left\{x\ge 2\, :\, \left| \pi_{1/2}(x;q,a)-\pi_{1/2}(x;q,b) +\frac{\text{M}(q;a,b)}{2\varphi(q)}\log \log x-C\right|\le \frac{1}{(\log x)^{1-\varepsilon}}\right\}\]
 exists and equals $1$.
\end{thm}
Assuming that $m_\chi=0$ for all $\chi \bmod\, q$, we have $\text{M}(q;a,b)=r(a)-r(b)$. Therefore, if $r(a)<r(b)$, then assuming GRH for all non-principal Dirichlet characters modulo $q$, we have the natural density of the set $\mathcal{P}_{1/2}(q;a,b)$ exists and equals $1$. Thus, Theorem~\ref{main} explains Chebyshev's bias, thanks to these weighted prime counting functions, without the need for any strong additional hypotheses (such as LI or DRH). For historical reasons, we state the particular case $q=4$:

In 1994, Rubinstein and Sarnak~\cite{RS94} established a theoretical framework that enabled them to address the question of Chebyshev's bias for general moduli. They proved, under GRH and a linear independence hypothesis on non-negative imaginary parts of the zeros of Dirichlet $L$-functions (LI), that the logarithmic density \[ \lim_{X\to \infty} \frac{1}{\log X}\int_{2}^X \mathds{1}_{\mathcal{P}(q;a,b)}(u)\frac{\mathrm{d}u}{u}\]
of the set $\mathcal{P}(q;a,b)$ exists. Furthermore, they quantified the bias for $q=4$, proving that the logarithmic density of the set $\mathcal{P}(4;3,1)$ is approximately $0.9959\dots$

This suggests that studying the asymptotic behavior of the difference of prime counting functions of the same type as~\eqref{pi_1/2} requires either hypotheses stronger than GRH (such as DRH in Aoki--Koyama's work), or additional smoothing weights ($\log p \log (x/p)$ in Suzuki's work) which make the contribution of large primes smaller.

Our last main result concerns the mean $\frac{1}{x}\int_2^x(\pi_{1/2}(u;q,a)-\pi_{1/2}(u;q,b))\mathrm{d}u$, our method allows us to obtain, under GRH, the exact estimate that one would obtain assuming the DRH estimate~\eqref{DRH-estimate}:

\end{proof}
\section{Proofs of the main theorems}
As explained at the beginning of section~\ref{sec:Prel}, we will prove our theorems for a general function $t:(\Z/q\Z)^\times\to \C$ satisfying $\langle t,\chi_0\rangle=0$. Our main theorems are obtained by replacing $t$ with $\mathds{1}_{\{a\}}-\mathds{1}_{\{b\}}$. In what follows, we assume GRH for all Dirichlet characters $\chi$ modulo $q$ satisfying $\langle t,\chi\rangle \ne 0$.
\begin{proof}[Proof of Theorem~\ref{main}]
 We begin with a summation by parts, yielding, for all $x\ge 2$,
\[\pi_{1/2}(x;t)=\frac{\pi(x;t)}{\sqrt{x}}+\frac{1}{2}\int_2^x\frac{\pi(u;t)}{u^{3/2}}\mathrm{d}u\, .\]
Thus, for all $y\ge 1$
\begin{align*}\pi_{1/2}(e^y;t)&=\frac{\pi(e^y;t)}{\exp(y/2)}+\frac{1}{2}\int_{\log 2}^y\frac{\pi(e^u;t)}{\exp(u/2)}\mathrm{d}u\\
&=\frac{1}{y}\left(\Delta(y;t)-\frac{\M(t)}{\varphi(q)} \right)+\frac{1}{2}\int_{\log 2}^y\frac{1}{u}\left(\Delta(u;t)-\frac{\M(t)}{\varphi(q)}\right)\mathrm{d}u\, .
\end{align*}
Hence, by the second estimate of Lemma~\ref{ing}, denoting $C=(\varphi(q)L+\M(t)\log \log 2)/(2\varphi(q))$, we have
\begin{equation}\label{main-form}
 \pi_{1/2}(e^y;t)+\frac{\M(t)}{2\varphi(q)}\log y-C=\frac{1}{y}\left( \Delta(y;t)-\frac{\M(t)}{\varphi(q)}+R(y)\right)
\end{equation}
where $|R(y)|\ll \log y$. Let $Y_0=Y_0(t)$ be a large positive constant such that for all $y\ge Y_0$ we have $|R(y)-\M(t)/\varphi(q)|<\sqrt{y}/2$. Denote by $\m$ the Lebesgue measure on $\R$, fix $\varepsilon>0$, and define \[E:=\left\{ x\ge 2\, :\, \left|\pi_{1/2}(x;t)+\frac{\M(t)}{2\varphi(q)}\log \log x-C\right|>\frac{1}{(\log x)^{\frac{1}{2}-\varepsilon}}\right\}\, .\]
Let $Y>Y_0$, by the triangle inequality and Markov's inequality
\begin{align*}
 \m \left\{ \log 2\le y\le Y\, :\, e^y\in E\right\} &\le Y_0+ \m\left\{ Y_0\le y\le Y\, :\, \left| \Delta(y;t)-\frac{\M(t)}{\varphi(q)}+R(y)\right|>y^{\frac{1}{2}+\varepsilon} \right\}\\
 &\le Y_0+ \m\left\{ Y_0\le y\le Y\, :\, \bigl| \Delta(y;t) \bigr|>\frac{y^{\frac{1}{2}+\varepsilon}}{2}\right\}\\
 &\le Y_0+ 4 \int_{\log 2}^Y \frac{|\Delta(y;t)|^2}{y^{1+2\varepsilon}}\mathrm{d}y\ll1\, .
\end{align*}
We just proved that \[ \int_{\log 2}^\infty \mathds{1}_E(e^y)\mathrm{d}y <\infty \, . \]
Thus, by~\eqref{nat-density}, the natural density of the set $E$ exists and equals $0$. Hence, the natural density of its complement exists and equals $1$. We proceed similarly for the statement regarding the logarithmic density. Define
\[E':=\left\{ x\ge 2\, :\, \left|\pi_{1/2}(x;t)+\frac{\M(t)}{2\varphi(q)}\log \log x-C\right|>\frac{1}{(\log x)^{1-\varepsilon}}\right\}\, .\]
Let $Y_1>\log 2$ be large enough so that for all $y\ge Y_1$ we have $|R(y)-\M(t)/\varphi(q)|<y^\varepsilon/2$. We deduce that
\[\m \left\{ \log 2\le y\le Y\, :\, e^y\in E'\right\}\le Y_1+4\int_{\log 2}^Y \frac{|\Delta(y;t)|^2}{y^{2\varepsilon}}\mathrm{d}y\, .\]
This proves that the logarithmic density of the set $E'$ exists and equals $0$, hence the logarithmic density of its complement exists and equals $1$.
\end{proof}
We now move to Theorem~\ref{GRHalmimpliesDRH}
\begin{proof}[Proof of Theorem~\ref{GRHalmimpliesDRH}]
 Define, for $x\ge 2$, $F(x)=(\log x)^{m_\chi} \prod_{p\le x} \bigl(\,1-\chi(p)/\sqrt{p}\,\bigr)$. Following the proof of~\cite{Ao-Ko}*{Proposition 2.1}, and using the following form of Mertens' theorem \[ \sum_{p\le x} \frac{\chi(p^2)}{p}=\langle \chi,r\rangle \log \log x+c+O\left(\frac{1}{\log x}\right) \, ,\]
 where $c\in \C$ is a constant, we deduce that there exists a constant $C'\in \C$ such that
 \[ \log F(x)= \pi_{1/2}(x,\chi)+\frac{\M(\chi)}{2\varphi(q)}\log \log x+C'+O\left(\frac{1}{\log x}\right)\, .\]
 Assume that $t=\chi$, and let $\varepsilon>0$ and $C$ be the constant given by~\eqref{main-form}. Define $\ell_\chi =\exp(C+C')\ne 0$, and fix $x\ge 2$ sufficiently large satisfying the inequality
 \[ \left|\pi_{1/2}(x,\chi)+\frac{\M(\chi)}{2\varphi(q)}\log \log x-C\right|<\frac{1}{(\log x)^{(1-\varepsilon)/2}}\, . \]
 Using the inequality $|\exp(z)-1|\le 2|z|$ for $|z|<1/2$, we deduce that \begin{align*} |F(x)-\ell_\chi|&=|\ell_\chi|\,\bigl|\exp(\log F(x)-C-C')-1\bigr|\\
 &\le 2|\ell_\chi|\, \left|\pi_{1/2}(x,\chi)+\frac{\M(\chi)}{2\varphi(q)}\log \log x-C+O\left(\frac{1}{\log x}\right)\right|\\
 &< \frac{1}{(\log x)^{\frac{1}{2}-\varepsilon}}\, ,
 \end{align*}
 since $x$ is sufficiently large. Since $\mathcal{E}_\chi$ contains all sufficiently large values of a set of natural density $1$. It follows that the natural density of $\mathcal{E}_\chi$ exists and equals $1$.
\end{proof}
We now prove Theorem~\ref{mean}.
\begin{proof}[Proof of Theorem~\ref{mean}]
 Let $x\ge 2$ and set $Y=\log x$.
 From~\eqref{main-form} we deduce that
 \[\int_{\log 2}^Y e^y\pi_{1/2}(e^y;t)\mathrm{d}y=\int_{\log 2}^Y\left(-\frac{\M(t)}{2\varphi(q)}e^y \log y+Ce^y\right)\mathrm{d}y+\int_{\log 2}^Y\frac{e^y}{y}\left(\Delta(y;t)-\frac{\M(t)}{\varphi(q)}+R(y)\right)\mathrm{d}y\, .\]
 We now use Lemma~\ref{ing} together with the bound $ \int_{\log 2}^Y\tfrac{e^y}{y}\mathrm{d}y\ll e^Y/Y$ to deduce that \[ \left| \int_{\log 2}^Y \frac{e^y \Delta(y;t)}{y}\mathrm{d}y\right|=\left| \frac{e^Y}{Y}G(Y;t)-\int_{\log 2}^Y G(y;t)\frac{ye^y-e^y}{y^2}\mathrm{d}y\right|\ll \log Y \frac{e^Y}{Y}\, .\]
 Since $|R(y)|\ll \log y$, we have
 \[ \left|\int_{\log 2}^Y \frac{e^y}{y}\left(\Delta(y;t)-\frac{\M(t)}{\varphi(q)}+R(y)\right)\mathrm{d}y\right|\ll \log Y\frac{e^Y}{Y}\, .\]
 Using the classical estimate
 \[ \int_{\log 2}^Y e^y \log y\, \mathrm{d}y=e^Y \log Y+O\left(\frac{e^Y}{Y}\right)\, , \]
 we conclude that
 \[\int_2^x\pi_{1/2}(u;t)\mathrm{d}u =\int_{\log 2}^Ye^y\pi_{1/2}(e^y;t) \mathrm{d}y=-\frac{\M(t)}{2\varphi(q)}e^Y\log Y+Ce^Y+O\left(\frac{e^Y \log Y}{Y}\right)\, .\]
 The result follows by substituting $Y=\log x$.
\end{proof}

Our second main result shows that if GRH holds, then the equality~\eqref{DRH} holds for a set of natural density $1$.
\begin{thm}\label{GRHalmimpliesDRH}
    Assume GRH for a non-principal Dirichlet character $\chi$ modulo $q$. Then, there exists $\ell_\chi\ne 0$ such that the natural density of the set
    \begin{equation}\label{Echi}
        \mathcal{E}_\chi:=\left\{x\ge 2\, :\, \left|  (\log x)^{m_\chi} \prod_{p\le x}\left(1-\frac{\chi(p)}{p^{1/2}}\right)^{-1}-\ell_\chi  \right|\le \frac{1}{(\log x)^{1/2 - \varepsilon}} \right\}
    \end{equation}
    exists and equals $1$.
\end{thm}

Our last main result concerns the mean $\frac{1}{x}\int_2^x(\pi_{1/2}(u;q,a)-\pi_{1/2}(u;q,b))\mathrm{d}u$, our method allows us to obtain, under GRH, the exact estimate that one would obtain assuming the DRH estimate~\eqref{DRH-estimate}:

\begin{thm}\label{mean}
    Let $q\ge 3$ and assume \text{GRH} for all non-principal Dirichlet characters modulo $q$. Let $a,b$ be distinct invertible residue classes modulo $q$, we have
    \[\frac{1}{x}\int_{ 2}^x \bigl(\pi_{1/2}(u;q,a)-\pi_{1/2}(u;q,b)\bigr)\mathrm{d}u=-\frac{\text{M}(q;a,b)}{2\varphi(q)}\log \log x+C+O\left(\frac{\log \log x}{\log x}\right)\, .\]
\end{thm}
Although our arguments extend straightforwardly to the context of global fields, we restrict our focus to the classical case of primes in arithmetic progressions for the sake of clarity and to highlight the underlying ideas.
To establish our results, we rely on the explicit formula for prime counting functions. However, a direct application of this formula to the natural auxiliary Chebyshev function $\psi_{1/2}$ associated with the weighted function $\pi_{1/2}$ would be inconclusive: the resulting error term is of order $O(\log x)$, while its main term is not expected to be that large; in fact that main term is expected to be of order $O((\log \log \log x)^2)$ by Montgomery's conjecture~\cite{Montg}. Instead, our strategy is to relate $\pi_{1/2}$ to $\pi$ via summation by parts. We show (Lemma~\ref{ing}) that, thanks to the explicit formula for $\pi$, the integral term arising from this summation yields the main bias term
\[-\frac{\text{M}(q;a,b)}{2\varphi(q)} \log \log x +C + O\left(\frac{\log \log x}{\log x}\right).\]
The remaining non-integral term is essentially $(\pi(x;q,a)-\pi(x;q,b))/\sqrt{x}$. Relying on the fact that the limiting distribution of $y\mapsto y(\pi(e^y;q,a)-\pi(e^y;q,b))/\exp(y/2)$ has a finite variance, we apply Markov's inequality to bound the measure of the set of $x\ge 2$ for which the deviation exceeds $1/(\log x)^{1/2-\varepsilon}$. Since our estimates are naturally formulated on a logarithmic scale, we deduce the existence of the natural density, by showing that the set of large deviations has finite logarithmic measure. Indeed, any Borel set $A\subset (1,\infty)$ satisfying $\int_0^\infty \mathds{1}_A(e^y)\mathrm{d}y<\infty$ has zero natural density. To see this, note that for any $L>1$,
 \begin{equation}\label{nat-density}
    0\le \limsup_{x\to \infty}\frac{1}{x} \int_1^x \mathds{1}_A(u)\mathrm{d}u\le \limsup_{x\to \infty}\int_L^x \mathds{1}_A(u) \frac{\mathrm{d}u}{u}=\int_{\log L}^\infty \mathds{1}_{A}\bigl(e^y\bigr)\mathrm{d}y\, .
\end{equation}
The result follows by letting $L\to \infty$.
\subsection*{Acknowledgments} I would like to thank Florent Jouve and Daniel Fiorilli for their constant encouragement and for their suggestions, which were essential to the development of this paper. I am also grateful to Alexandre Bailleul for his detailed reading and for several important remarks.

To establish the results, the authors “rely on the explicit formula for prime counting functions,” but note that a direct application to the auxiliary Chebyshev function $\psi_{1/2}$ “would be inconclusive”: the error term would be $O(\log x)$ while the main term “is expected to be of order $O((\log\log\log x)^2)$.”

Instead, “our strategy is to relate $\pi_{1/2}$ to $\pi$ via summation by parts.” They show (Lemma~\ref{ing}) that, using the explicit formula for $\pi$, “the integral term arising from this summation yields the main bias term”
\[
-\frac{\text{M}(q;a,b)}{2\varphi(q)}\log\log x + C + O\left(\frac{\log\log x}{\log x}\right).
\]
The “remaining non-integral term is essentially $(\pi(x;q,a)-\pi(x;q,b))/\sqrt{x}$.” Using that “the limiting distribution of $y\mapsto y(\pi(e^y;q,a)-\pi(e^y;q,b))/\exp(y/2)$ has a finite variance,” they “apply Markov's inequality to bound the measure of the set of $x\ge 2$ for which the deviation exceeds $1/(\log x)^{1/2-\varepsilon}$.”

Finally, since the estimates are “naturally formulated on a logarithmic scale,” they deduce existence of natural density by showing “the set of large deviations has finite logarithmic measure.” They use the principle that any Borel set $A\subset(1,\infty)$ with $\int_0^\infty \mathds{1}_A(e^y)\,dy<\infty$ has zero natural density, via the bound
\[
0\le \limsup_{x\to\infty}\frac1x\int_1^x \mathds{1}_A(u)\,du \le \int_{\log L}^\infty \mathds{1}_A(e^y)\,dy
\]
(and “letting $L\to\infty$”).

To establish the results, the authors “rely on the explicit formula for prime counting functions,” but note that a direct application to the auxiliary Chebyshev function $\psi_{1/2}$ “would be inconclusive”: the error term would be $O(\log x)$ while the main term “is expected to be of order $O((\log\log\log x)^2)$.”

Instead, “our strategy is to relate $\pi_{1/2}$ to $\pi$ via summation by parts.” They show the following lemma.

\begin{lem}\label{ing}
    If \text{GRH} holds for all Dirichlet characters $\chi$ modulo $q$ satisfying $\langle t,\chi\rangle \ne 0$, then:\begin{enumerate}
        \item Uniformly for $Y\ge 1$: \[\bigl| G(Y;t) \bigr|\ll_t \log Y\,  .\]
        \item There exists $L\in \C$ such that uniformly for $Y \ge1$: \[ \int_{\log 2}^Y\frac{\Delta(y;t)}{y}\mathrm{d}y=L+O_t\left(\frac{\log Y}{Y}\right)\, .\]
        \item For all $\varepsilon>0 $, we have uniformly for $Y\ge 1$: \[\int_{\log 2}^Y \frac{|\Delta(y;t)|^2}{y^{1+\varepsilon}}\mathrm{d}y \ll_{\varepsilon,t} 1\, .\]
        \item For all $\varepsilon>0$, we have \[\lim_{Y\to \infty} \frac{1}{Y} \int_{\log 2}^Y\frac{|\Delta(u;t)|^2}{u^\varepsilon}\mathrm{d}u=0\, .\]
    \end{enumerate}
\end{lem}

Using the explicit formula for $\pi$, they then argue that “the integral term arising from this summation yields the main bias term”
\[
-\frac{\text{M}(q;a,b)}{2\varphi(q)}\log\log x + C + O\left(\frac{\log\log x}{\log x}\right).
\]
The “remaining non-integral term is essentially $(\pi(x;q,a)-\pi(x;q,b))/\sqrt{x}$.” Using that “the limiting distribution of $y\mapsto y(\pi(e^y;q,a)-\pi(e^y;q,b))/\exp(y/2)$ has a finite variance,” they “apply Markov's inequality to bound the measure of the set of $x\ge 2$ for which the deviation exceeds $1/(\log x)^{1/2-\varepsilon}$.”

Finally, since the estimates are “naturally formulated on a logarithmic scale,” they deduce existence of natural density by showing “the set of large deviations has finite logarithmic measure.” They use the principle that any Borel set $A\subset(1,\infty)$ with $\int_0^\infty \mathds{1}_A(e^y)\,dy<\infty$ has zero natural density, via the bound
\[
0\le \limsup_{x\to\infty}\frac1x\int_1^x \mathds{1}_A(u)\,du \le \int_{\log L}^\infty \mathds{1}_A(e^y)\,dy
\]
(and “letting $L\to\infty$”).

Question:
Let
\[
\pi_{1/2}(x;4,a)=\sum_{\substack{p\le x\\ p\equiv a\!\!\pmod 4}}\frac{1}{\sqrt p}
\]
for invertible residue classes $a\bmod 4$, where the sum is over primes $p\le x$. Assume the Generalized Riemann Hypothesis for the non-principal Dirichlet character modulo $4$. Consider
\[
\mathcal P_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}.
\]
Which statement holds about this set, where its natural density means
\[
\lim_{X\to\infty}\frac{1}{X}\int_2^X \mathbf 1_{\mathcal P_{1/2}(4;3,1)}(u)\,du
\]
when the limit exists?

The natural density of $\mathcal P_{1/2}(4;3,1)$ exists and is equal to $1$.

Choices:
B. The natural density of $\mathcal P_{1/2}(4;3,1)$ exists and is equal to $\tfrac12$.
C. The upper natural density of $\mathcal P_{1/2}(4;3,1)$ is equal to $1$.
D. The logarithmic density of $\mathcal P_{1/2}(4;3,1)$ exists and is equal to $1$, but the natural density need not exist.
E. There exists a subset $S\subseteq \mathcal P_{1/2}(4;3,1)$ with natural density $1$.

main bias forces eventual dominance toward residue class $3$ rather than symmetry

existence of the full natural density limit

upgrade from logarithmic-scale control to natural density via finite logarithmic measure of exceptions

replacing density of the whole set by density of a dense subset


Question:
For $x\ge 2$, define the weighted prime-counting function
\[
\pi_{1/2}(x;q,a)=\sum_{\substack{p\le x\\ p\equiv a\!\!\pmod q}}\frac{1}{\sqrt p},
\]
where the sum is over primes $p$. Let
\[
\mathcal{P}_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}.
\]
Assume the Generalized Riemann Hypothesis for the unique non-principal Dirichlet character modulo $4$. Here the natural density of a measurable set $E\subseteq [2,\infty)$ means the limit
\[
\lim_{X\to\infty}\frac{1}{X}\int_2^X \mathbf{1}_E(u)\,du
\]
when it exists. Which existence statement holds for the set $\mathcal{P}_{1/2}(4;3,1)$?

The natural density of $\mathcal{P}_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}$ exists and is equal to $1$.

Choices:
B. The natural density of $\mathcal{P}_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}$ exists and is equal to $\tfrac12$.
C. The upper natural density of $\mathcal{P}_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}$ is equal to $1$.
D. The logarithmic density of $\mathcal{P}_{1/2}(4;3,1)=\{x\ge 2:\ \pi_{1/2}(x;4,3)>\pi_{1/2}(x;4,1)\}$ exists and is equal to $1$, but the natural density is not asserted to exist.
E. There exists a subset $E\subseteq [2,\infty)$ of natural density $1$ such that for every $x\in E$ one has $\pi_{1/2}(x;4,3)\ge \pi_{1/2}(x;4,1)$; consequently, $\mathcal{P}_{1/2}(4;3,1)$ has natural density $1$.