\section{Results} \label{sec:results} Our upper bounds rest on two complementary facts about the truncated eta polynomials $\AN$ and $\ANsharp$: at zeros of height $\abs\gamma\le N$ they are small, and over the higher zeros $\abs\gamma>N$ their weighted mean square is bounded directly by contour integration. Throughout this section we use the notation of \cref{sec:prelim} together with the classical zero-count estimate: there is an absolute constant $C_Z\ge1$ such that, counting zeros with multiplicity, \begin{equation}\label{eq:zerocount} \#\set{\rho : T\le\gamma\le T+1} \le C_Z\log(2+\abs{T}) \qquad\text{for every } T\in\R. \end{equation} This follows from the bound $N(T+1)-N(T)=O(\log T)$ for $T\ge T_0$ \citep[Theorem~9.2]{Titchmarsh1986} by covering $[T,T+1]$ with two half-open unit intervals and using the symmetry $\gamma\mapsto-\gamma$ together with the absence of zeros with $\abs\gamma<14$. \subsection{Partial sums of \texorpdfstring{$\eta$}{eta} at the zeros} We first record the behaviour of both the smoothed and sharp truncations on the critical line. \begin{restatable}[Smoothed partial sums near the critical line]{lemma}{LemMellin}\label{lem:mellin} For every integer $k\ge1$ there is a constant $C_k>0$, depending only on $k$ and $w$, such that for all real $N\ge1$ and all $t\in\R$, \[ \abs*{\AN(\tfrac12+it)-\eta(\tfrac12+it)} \le C_k\Bigl(\frac{1+\abs{t}}{N}\Bigr)^{k}. \] In particular, $\abs{\AN(\rho)}\le C_k\bigl((1+\abs{\gamma})/N\bigr)^k$ at every nontrivial zero $\rho=\tfrac12+i\gamma$ of $\zeta$. \end{restatable} \begin{proof}[Proof idea] The Mellin transform of $w$ is $\tilde w(z)=F(z)/z$ with $F(z)\defeq-\int_1^2w'(y)y^z\rd y$ entire, so $\tilde w$ has a single simple pole at $z=0$ of residue $1$ and decays faster than any power on vertical lines. Mellin inversion yields $\AN(s)=\frac1{2\pi i}\int_{(1)}\eta(s+z)N^z\tilde w(z)\rd z$. Shifting the contour to $\re z=-k$ picks up the residue $\eta(s)$ at $z=0$ and leaves an integral carrying $N^{-k}$. On $\re s=\tfrac12-k$, the functional equation and the reflection formula for $\Gamma$ yield the exact bound $\abs{\zeta(\tfrac12-k+iy)}\le 2\zeta(k+\tfrac12)(k/2\pi)^k(1+\abs y)^k$ without appealing to Stirling's formula. Evaluating at $t=\gamma$, where $\eta(\rho)=0$, gives the second assertion. Full proof in \cref{sec:proof-mellin}. \end{proof} The sharp truncation $\ANsharp(s)=\sum_{n\le N}(-1)^{n-1}n^{-s}$ does not enjoy super-polynomial decay at low zeros, because the partial sums of a slowly oscillating alternating series miss their limit by roughly half the first omitted term. Remarkably, it still achieves the optimal uniform bound $O(N^{-1/2})$ throughout $\abs t\le N$ by exact cancellation of the pole terms in the Hardy--Littlewood approximation to $\zeta(s)$. \begin{restatable}[Sharp partial sums near the critical line]{lemma}{LemSharp}\label{lem:sharp} There is an absolute constant $C_0>0$ such that for all real $N\ge1$ and all $t\in\R$ with $\abs t\le N$, \[ \abs*{\ANsharp(\tfrac12+it)-\eta(\tfrac12+it)} \le C_0\,N^{-1/2}. \] In particular, $\abs{\ANsharp(\rho)}\le C_0\,N^{-1/2}$ at every nontrivial zero $\rho=\tfrac12+i\gamma$ of $\zeta$ with $\abs\gamma\le N$. \end{restatable} \begin{proof}[Proof idea] For $1\le N<2$ and $\abs t\le N$ the bound holds by compactness. For $N\ge2$, write $\ANsharp(s)=\sum_{n\le N}n^{-s}-2^{1-s}\sum_{m\le N/2}m^{-s}$ and apply the Hardy--Littlewood approximation $\zeta(s)=\sum_{n\le x}n^{-s}-x^{1-s}/(1-s)+O(x^{-\sigma})$ \citep[Theorem~4.11]{Titchmarsh1986} at $x=N$ and $x=N/2$ (both valid for $\abs t\le N<\tfrac\pi2 N$). The pole terms $N^{1-s}/(1-s)$ and $2^{1-s}(N/2)^{1-s}/(1-s)$ cancel identically, leaving $\ANsharp(s)=\eta(s)+O(N^{-1/2})$. Full proof in \cref{sec:proof-sharp}. \end{proof} Combining these low-zero estimates with contour integration over the high zeros gives our main mean-square bound, matching the naive density-times-mean-square count $(\log N)^2/N$ for both cutoffs. \begin{restatable}[Mean square over the zeros]{proposition}{PropMeansq}\label{prop:meansq} There are constants $C_w>0$ (depending only on $w$) and $C_{\sharp}>0$ (absolute) such that for all real $N\ge1$, \[ \sum_\rho \frac{\abs{\AN(\rho)}^2}{\abs{\rho}^2} \le C_w\,\frac{\log^2(2N)}{N} \qquad\text{and}\qquad \sum_\rho \frac{\abs{\ANsharp(\rho)}^2}{\abs{\rho}^2} \le C_{\sharp}\,\frac{\log^2(2N)}{N}, \] the sums running over all nontrivial zeros of $\zeta$ with multiplicity. \end{restatable} \begin{proof}[Proof idea] Split the zeros at height $N$. For $\abs\gamma\le N$, \cref{lem:mellin} (with $k=1$) gives $O(\log(2N)/N)$ for $\AN$, while \cref{lem:sharp} gives $O(1/N)$ for $\ANsharp$. For $\abs\gamma>N$, partition into dyadic shells $T_j<\abs\gamma\le 2T_j$ with $T_j=2^jN$ (noting that shells with $T_j<7$ are empty). For any real-coefficient Dirichlet polynomial $A(s)=\sum_{n<2N}a_n n^{-s}$ with $\abs{a_n}\le1$ (covering both $\AN$ and $\ANsharp$), $\bar\rho=1-\rho$ gives $\abs{A(\rho)}^2=A(\rho)A(1-\rho)$, which is the residue of $(\zeta'/\zeta)(s)A(s)A(1-s)$ at $\rho$. We integrate $(\zeta'/\zeta)(s)A(s)A(1-s)$ around a rectangle with vertical sides $\re s=1+\delta$ and $\re s=-\delta$, where $\delta=\frac1{2\log(2N)}$, and horizontal cuts $T_1\in[T_j/2,T_j)$ and $T_2\in(2T_j,5T_j/2]$ selected by averaging over the subset of heights staying $\gg 1/\log(2T_j)$ from all zeros. By the functional equation $\frac{\zeta'}{\zeta}(1-s)=\frac{\chi'}{\chi}(1-s)-\frac{\zeta'}{\zeta}(s)$, the vertical sides split into two integrals: \begin{enumerate} \item an integral of $-\frac{\chi'}{\chi}(1-s)A(s)A(1-s)$, which shifts back to $\re s=\tfrac12$ and is bounded by $O(T_j\log(2T_j)\log(2N))$ via the Montgomery--Vaughan mean value inequality \eqref{eq:MV}; \item the real part of $\int (\zeta'/\zeta)(1+\delta+it)A(1+\delta+it)A(-\delta-it)\rd t$, which expands into an absolutely convergent Dirichlet series and integrates term by term to $O((T_j+N)\log^2(2N))$. \end{enumerate} The averaged horizontal cuts contribute only $O(\sqrt{N}\log^2(2T_j))$. Thus $\sum_{T_j<\abs\gamma\le 2T_j}\abs{A(\rho)}^2\ll T_j\log(2T_j)\log(2N)$; dividing by $T_j^2$ and summing over $j\ge0$ gives $O(\log^2(2N)/N)$. Full proof in \cref{sec:proof-meansq}. \end{proof} \subsection{The Chebyshev predictor} For $0<\tau\le\log 2$, the truncated Chebyshev identity uses only past lags $\log n-\tau\ge0$, and its mean-square error in $\Ltwo$ is directly the zero sum of \cref{prop:meansq}. For $\tau>\log 2$, convolving with the truncated Dirichlet inverse $b$ of $\varepsilon(n)=(-1)^{n-1}$ removes the future terms $2\le n0$).} Set $N\defeq e^{L+\tau}$ and $c_n^{\sharp}\defeq\sum_{m\mid n,\,m1$). In case~(i), $N=e^{L+\tau}\ge e^\tau>\Mtau$, so $N/m>1$; in case~(ii), the hypothesis $e^{L+\tau}\ge2\Mtau$ is equivalent to $N\ge\Mtau$, so $N/m\ge1$. Thus $A_{N/m}^*$ is defined and \cref{prop:meansq} applies to each $m$. \textbf{Step 2 (Dirichlet coefficients).} Define $D_N^*(s)\defeq\sum_{1\le mN$ in case~(i) and for $n\ge2N$ in case~(ii). Thus $D_N^*(s)=1+\sum_{e^\tau\le n\le N}c_n^{\sharp}n^{-s}$ in case~(i) and $D_N^*(s)=1+\sum_{e^\tau\le n<2N}c_n n^{-s}$ in case~(ii). \textbf{Step 3 (identification of the prediction error).} At $s=\tfrac12+i\gamma$, \[ e_\tau(\gamma)\,D_N^*(\tfrac12+i\gamma) = e_\tau(\gamma)+\sum_{n}c_n^*\,n^{-1/2}\,e_{\tau-\log n}(\gamma), \] where each index $n$ satisfies $e^\tau\le n\le N=e^{L+\tau}$ in case~(i) (so $s_n\defeq\log n-\tau\in[0,L]$) and $e^\tau\le n<2N=e^{L+\tau}$ in case~(ii) (so $s_n\in[0,L)$). (If the sum is empty, take the admissible zero predictor.) Using $\abs{e_\tau}=1$ and Step~0, \[ \sigsq(L,\tau) \le \Bigl\|e_\tau+\sum_{n}c_n^*\,n^{-1/2}\,e_{\tau-\log n}\Bigr\|_{\Ltwo}^2 =\int_\R\abs{D_N^*(\tfrac12+i\gamma)}^2\rd\mu(\gamma) =\sum_\rho\frac{\abs{D_N^*(\rho)}^2}{\abs\rho^2}. \] \textbf{Step 4 (Cauchy--Schwarz and \cref{prop:meansq}).} Since $\re\rho=\tfrac12$, $\abs{m^{-\rho}}=m^{-1/2}$. Setting $x_m\defeq\abs{b_m}m^{-1/2}$ and $y_m\defeq\abs{A_{N/m}^*(\rho)}$, Cauchy--Schwarz gives \[ \abs{D_N^*(\rho)}^2 \le\Bigl(\sum_{m0$, and put $L'\defeq L+2\tau+2$ and $\Delta\defeq 2\pi/L'$. Suppose $T_*\ge1$ is such that every interval $[T,\,T+\Delta/5]$ with $T\ge T_*$ contains the ordinate of a nontrivial zero of $\zeta$, and set $n_0\defeq\ceil{T_*/\Delta+\tfrac1{10}}$. Then \begin{equation}\label{eq:lower-general} \sigsq(L,\tau)\;\ge\;\frac{\tau L'}{20\,(2n_0+1)^2}\;>\;0. \end{equation} In particular: \begin{enumerate}[label=(\roman*)] \item \emph{Unconditionally:} there is an absolute constant $c>0$ such that for all $L\ge0$ and $\tau>0$, \[ \sigsq(L,\tau)\;\ge\;\tau\exp\bigl(-\exp\bigl(c(L+\tau+1)\bigr)\bigr). \] \item \emph{Under bounded average zero gaps:} if consecutive positive zero ordinates satisfy $\gamma_{n+1}-\gamma_n\le B/\log\gamma_n$ for all sufficiently large $n$, then there exist constants $c_1,c_2>0$ depending only on $B$ such that for all $L\ge0$ and $\tau>0$, \[ \sigsq(L,\tau)\;\ge\;c_1\,\tau\,e^{-c_2(L+\tau)}. \] \end{enumerate} \end{restatable} \begin{proof}[Proof idea] Set $I=(-L-1,2\tau+1)$ (length $L'=L+2\tau+2$). For each integer $n\ge n_0$, choose a zero ordinate $\lambda_n\in[n\Delta-\Delta/10,\,n\Delta+\Delta/10]$, and set $\lambda_{-n}=-\lambda_n$; leave the finitely many central lattice points $\kappa_n=n\Delta$ ($\abs n0$, and for every $\tau>0$ a constant $C_\tau>0$ (independent of $\tau$ for $0<\tau\le\log 2$), such that for all $L\ge1$, \[ \tau\exp\bigl(-\exp\bigl(c(L+\tau+1)\bigr)\bigr) \;\le\;\sigsq(L,\tau) \;\le\;C_\tau\,(L+\tau)^2e^{-(L+\tau)}. \] The upper bound is achieved explicitly by both the sharp and smooth truncated Chebyshev identities of \cref{thm:upper} (taking $C_\tau=3C_{\sharp}\Ktau$ for the sharp cutoff, or $C_\tau=2C_w\Ktau$ for the smooth cutoff). \end{restatable} \begin{proof} The lower bound is \cref{thm:positive}(i). For $L\ge1$, we have $L+\tau+\log 2\le (1+\log 2)(L+\tau)<\sqrt{3}(L+\tau)$, so \cref{thm:upper}(i) gives the upper bound with $C_\tau=3C_{\sharp}\Ktau$. Likewise, $L\ge1$ implies $e^{L+\tau}\ge e^{1+\tau}>2e^\tau>2\Mtau$, so \cref{thm:upper}(ii) gives the same bound with $C_\tau=2C_w\Ktau$. \end{proof} In the variable $N\asymp e^{L+\tau}$, \cref{thm:model} proves an upper bound of order $(\log N)^2/N$, matching the naive density-times-mean-square count of \cref{sec:intro}; the computations of \cref{sec:numerics} indicate a further single-logarithm cancellation down to $(\log N)/N$. \subsection{Back to the actual primes} When passing from the stationary model to the actual Chebyshev function $\psi(x)$, each distinct zero $\rho$ of multiplicity $m_\rho$ contributes $m_\rho^2$ rather than $m_\rho$ to the logarithmic mean square. Bounding $m_\rho\le C_Z\log(2+\abs\gamma)$ via \eqref{eq:zerocount} immediately transfers \cref{prop:meansq} to the multiplicity-weighted sum at the cost of one logarithm. \begin{restatable}[Mean square with multiplicity weights]{proposition}{PropMeansqMult}\label{prop:meansqmult} There are constants $C'_w>0$ (depending only on $w$) and $C'_{\sharp}>0$ (absolute) such that for all real $N\ge1$, \[ \sum_\rho m_\rho\,\frac{\abs{\AN(\rho)}^2}{\abs\rho^2}\le C'_w\,\frac{\log^3(2N)}{N} \qquad\text{and}\qquad \sum_\rho m_\rho\,\frac{\abs{\ANsharp(\rho)}^2}{\abs\rho^2}\le C'_{\sharp}\,\frac{\log^3(2N)}{N}, \] the sums running over all nontrivial zeros of $\zeta$ with multiplicity (so a zero of multiplicity $m$ contributes $m^2\abs{\AN(\rho)}^2/\abs\rho^2$ in total). \end{restatable} \begin{remark}[Multiplicity refinement]\label{rem:multiplicity} Because \cref{prop:meansq} already bounds $\sum_{T_j<\abs\gamma\le 2T_j}\abs{A(\rho)}^2\ll T_j\log(2T_j)\log(2N)$ with multiplicity, \cref{prop:meansqmult} requires only an upper bound on $\max_{\abs\gamma\le 2T_j} m_\rho$. Using $m_\rho\le C_Z\log(2+\abs\gamma)$ from \eqref{eq:zerocount} gives $\log^3(2N)/N$; invoking Littlewood's bound $m_\rho=O(\log\abs\gamma/\log\log\abs\gamma)$ \citep[Theorem~14.13]{Titchmarsh1986} improves this immediately to $O\bigl(\log^3(2N)/(N\log\log(4N))\bigr)$. \end{remark} We can now state our main result for the actual Chebyshev function $\psi(x)$. \begin{restatable}[The Chebyshev predictor for the actual primes]{theorem}{ThmActual}\label{thm:actual} For every real $N\ge1$, let $\DeltaN(x)$ and $\DeltaNsharp(x)$ be the smooth and sharp Chebyshev predictor errors of \eqref{eq:DeltaN}--\eqref{eq:DeltaNsharp}, corresponding to the affine predictors in \eqref{eq:pred-decomp} on $[x/(2N),\,x/2]$ and $[x/N,\,x/2]$, respectively. Then the logarithmic mean square of $\DeltaN$ exists and satisfies \begin{align*} \lim_{X\to\infty}\frac1{\log X}\int_1^X\abs{\DeltaN(x)}^2\,\frac{\rd x}{x^2} &=\sum_{\gamma\ \mathrm{distinct}}\frac{m_\gamma^2\,\abs{\AN(\frac12+i\gamma)}^2}{\frac14+\gamma^2} =\sum_\rho m_\rho\,\frac{\abs{\AN(\rho)}^2}{\abs\rho^2} \le C'_w\,\frac{\log^3(2N)}{N}, \end{align*} and the exact same identity and bound hold for $\DeltaNsharp$ and $\ANsharp$ with the absolute constant $C'_{\sharp}$. If all zeros of $\zeta$ are simple, the limit equals $\int_\R\abs{\AN(\tfrac12+i\gamma)}^2\rd\mu(\gamma)$ (respectively with $\ANsharp$) and the upper bound improves to $C_w\log^2(2N)/N$ (respectively $C_{\sharp}\log^2(2N)/N$). By comparison, the trivial predictor $\psi(x)\approx x$ has logarithmic mean square \[ \lim_{X\to\infty}\frac1{\log X}\int_1^X\abs{\psi(x)-x}^2\,\frac{\rd x}{x^2} =\sum_\rho\frac{m_\rho}{\abs\rho^2} \ge 2+\gamma_E-\log(4\pi)=0.04619\ldots \] \end{restatable} \begin{proof}[Proof idea] The limit identity extends Cram\'er's mean value theorem to a finite linear combination of translates of $E(u)=e^{-u/2}(\psi(e^u)-e^u)$, of the type covered by \citet[Theorem~1.14]{AkbaryNgShahabi2014}. Our self-contained proof in \cref{sec:proof-actual} sets $x=e^u$, applies the truncated explicit formula on each unit window $[k,k+1]$ at height $T_k=e^{k+1}$ to combine the translates into $-\sum_{\abs\gamma\le T_k}D_q(\rho)e^{i\gamma u}/\rho$ plus a square-summable remainder, and controls the tail $\abs\gamma\ge T_0$ uniformly in $k$ by a Fej\'er-kernel local mean value inequality over zeros. Parseval on the remaining finite trigonometric polynomial and a Minkowski exchange of $U\to\infty$ with $T_0\to\infty$ establish the identity for any finite Dirichlet polynomial $D_q$; specialising to $D_q=\AN$, $\ANsharp$, and $1$ and invoking \cref{prop:meansqmult,prop:meansq} complete the proof. \end{proof} \begin{remark}[Asymptotic nature of the constants]\label{rem:actual} The constants $C_w,C_{\sharp},C'_w,C'_{\sharp}$ are not made explicit here, so \cref{thm:actual} establishes an asymptotic decay rate as $N\to\infty$ (with $X\to\infty$ taken first for each fixed $N$) rather than a threshold $N_0$ beyond which the Chebyshev predictor beats the trivial one. Numerically (\cref{tab:primes}), the crossover occurs already between $N=4$ and $N=16$. \end{remark}