\section{The quadratic twist and the test squares} \label{sec:analytic-setup} \teamanchor{proof.weighted-twist}% Put \(M=18480\), and fix an integer \(k\ge13\). The parameters for the analytic estimate and the arithmetic comparison are \begin{equation}\label{eq:analytic-precision} \Delta=\frac1k,\qquad \beta_k=\frac12+\Delta,\qquad \varepsilon=\varepsilon_k=\frac{1}{16k}. \end{equation} Write \(\Lambda\) for the von Mangoldt function, \(\varphi\) for Euler's totient function, and \(v_+=\max(v,0)\) for real \(v\). \subsection{Fixed progressions and the boundary of the strip} \teamanchor{proof.fixed-modulus-pnt}% \begin{lemma}[Prime number theorem in a fixed progression] For each fixed positive integer \(u\), each reduced class \(r\bmod u\) and each \(B>0\), as real \(t\to\infty\), \begin{equation}\label{eq:weighted-fixed-pnt} \sum_{\substack{n\le t\\ n\equiv r\bmod u}}\Lambda(n) =\frac{t}{\varphi(u)}+O_{u,B}\bigl(t(\log t)^{-B-1}\bigr). \end{equation} \end{lemma} \begin{proof} Koukoulopoulos's prime number theorem for progressions \cite[Theorem~1.1 in arXiv v3, p.~2]{koukoulopoulos-pnt} states that for a fixed \(A>0\), \(u\le(\log t)^A\), and \((r,u)=1\), the von Mangoldt sum in \eqref{eq:weighted-fixed-pnt} has main term \(t/\varphi(u)\) and error \[ O_A\!\left(t\exp\!\left(-c_A (\log t)^{3/5}(\log\log t)^{-1/5}\right)\right) \] for sufficiently large \(t\), where \(c_A>0\) may be ineffective. For each fixed \(u\ge2\) the hypothesis holds eventually with \(A=1\), and the exponential factor is \(O_B((\log t)^{-B-1})\). For \(u=1\), take the odd class modulo \(2\) and restore the powers of \(2\), of total weight \(O(\log t)\). \end{proof} \teamanchor{proof.centered-ramp-count}% For coefficients \(b(n)\) with \(|b(n)|\ll\Lambda(n)\), set \[ A_b(t)=\sum_{n\le t}b(n),\qquad H_b(t)=A_b(t)-a_b t,\qquad D_b(s)=\sum_{n\ge1}b(n)n^{-s}\quad(\Re s>1), \] where \(a_b\) is a constant. For \(y\ge1\) and any constant \(c\) write \[ \mathcal R_b(y)=\sum_{n\ge1}b(n)(1/n-1/y)_+-a_b\log y-c . \] Integrating the step function \(A_b\) gives \begin{equation}\label{eq:common-ramp-count} \mathcal R_b(y)+c=\int_1^y H_b(t)t^{-2}\,dt,\qquad \int_1^\infty H_b(t)t^{-s-1}\,dt =\frac{D_b(s)}{s}-\frac{a_b}{s-1}\quad(\Re s>1). \end{equation} In the first formula the term at \(n\le y\) is integrated from \(n\) to \(y\). In the second formula the analogous integral runs to infinity and the interchange is justified by \(\sum_n |b(n)|n^{-\sigma}/\sigma<\infty\) for \(\sigma=\Re s>1\). \teamanchor{proof.centered-ramp-tail}% Put \(C_b(s)=D_b(s)-a_b s/(s-1)\). If \(C_b\) is holomorphic at \(1\), \(c=C_b(1)\), and \(\int_1^\infty |H_b(t)|t^{-2}\,dt<\infty\), taking real \(s\downarrow1\) in the second identity of \eqref{eq:common-ramp-count} gives \(\int_1^\infty H_b(t)t^{-2}\,dt=c\) by dominated convergence. Hence \begin{equation}\label{eq:common-ramp-tail} \mathcal R_b(y)=-\int_y^\infty H_b(t)t^{-2}\,dt . \end{equation} \teamanchor{proof.dirichlet-zero-free-line}% Extend each character \(\xi\bmod u\) by zero off the units of its declared modulus. Write \(\delta_\xi=1\) for the principal character and \(\delta_\xi=0\) otherwise. Define \(\widetilde L_\xi(s)=(s-1)^{\delta_\xi}L(s,\xi)\), with its limiting value at \(1\) in the principal case. For \(\Re s>1\), complete multiplicativity and absolute convergence give \[ L(s,\xi)=\prod_p(1-\xi(p)p^{-s})^{-1}. \] In particular \(L(s,\xi)\ne0\) there. For nonprincipal \(\xi\) the partial sums of \(\xi\) are bounded by periodicity and the zero mean over a period. Thus \[ L(s,\xi)=s\int_1^\infty\left(\sum_{n\le t}\xi(n)\right)t^{-s-1}\,dt \] continues it holomorphically to \(\Re s>0\). For principal \(\xi\) the Euler product gives \(L(s,\xi)=\zeta(s)\prod_{p\mid u}(1-p^{-s})\). In \(\Re s>1\) one has \[ \zeta(s)-\frac{1}{s-1} =\sum_{n\ge1}\left(n^{-s}-\int_n^{n+1}t^{-s}\,dt\right). \] Each summand is \(O(|s|n^{-1-\Re s})\) on \(\Re s>0\), so the sum continues holomorphically there. Its value at \(1\) is Euler's constant \(\gamma=\lim_{N\to\infty}(\sum_{n\le N}n^{-1}-\log(N+1))\). This proves both holomorphy of \(\widetilde L_\xi\) on \(\Re s>0\) and \(\zeta(s)=1/(s-1)+\gamma+O(s-1)\) at \(1\). Differentiating the Euler product gives, for \(\Re s>1\), \begin{equation}\label{eq:common-character-series} \sum_{n\ge1}\frac{\Lambda(n)\xi(n)}{n^s} =-\frac{L'(s,\xi)}{L(s,\xi)} =\delta_\xi\frac{s}{s-1} -\frac{\widetilde L_\xi'(s)}{\widetilde L_\xi(s)}-\delta_\xi . \end{equation} Summing \eqref{eq:weighted-fixed-pnt} against \(\xi\) gives \(H_b(t)=O_{u,B}(t(\log t)^{-B-1})\) with \(b(n)=\Lambda(n)\xi(n)\) and \(a_b=\delta_\xi\). By \eqref{eq:common-ramp-count} and \eqref{eq:common-character-series}, \[ -\frac{\widetilde L_\xi'(s)}{\widetilde L_\xi(s)}-\delta_\xi =s\int_1^\infty H_b(t)t^{-s-1}\,dt \qquad(\Re s>1). \] Along a horizontal approach to any point \(1+it_0\), the integral has a finite limit by domination by \(|H_b(t)|t^{-2}\). A zero of \(\widetilde L_\xi\) at that point would give a pole of its logarithmic derivative. Therefore \(\widetilde L_\xi\) is nonzero on \(\Re s\ge1\). \subsection{A single prime for the twisted characters} \teamanchor{proof.weighted-twist-density}% \begin{proposition}\label{prop:common-quadratic-twist} There is a prime \(d=d_k\equiv9239\bmod M\) such that, for \(\chi_d(n)=(n/d)\) and all \(\xi\bmod M\), \begin{equation}\label{eq:weighted-twist-free} L(s,\xi\chi_d)\ne0 \qquad\bigl(\Re s\ge\beta_k,\ |\Im s|\le k\bigr). \end{equation} Here \(\xi\chi_d\) is taken at modulus \(Md\). The prime satisfies \(d\equiv7\bmod8\), \(M\mid 2(d+1)\) and \(M\nmid d+1\). \end{proposition} \begin{proof} Let \(r_0=M/2-1=9239\). Since \(16\mid M\), one has \(r_0^2\equiv1\bmod M\), and every prime in this class has the stated congruences. \teamanchor{proof.coprime-character-product}% Products of primitive characters of coprime conductors are primitive of conductor equal to the product. Indeed, a factorization through a proper divisor of that product would, by the Chinese remainder theorem, induce a factorization on the units in at least one conductor through a proper divisor of that conductor. \teamanchor{proof.dirichlet-change-of-conductor}% If a character \(\eta\bmod u\) is induced from a primitive \(\eta^*\) of conductor \(f_\eta\), their Euler products give \begin{equation}\label{eq:common-character-conductor} L(s,\eta)=L(s,\eta^*)\prod_{\substack{p\mid u\\p\nmid f_\eta}} (1-\eta^*(p)p^{-s}). \end{equation} The finite factors are nonzero on \(\Re s>0\) since \(|\eta^*(p)p^{-s}|<1\) there. The identity holds by continuation throughout that half-plane. \teamanchor{proof.weighted-twist-conductor}% Fix \(\xi\bmod M\), with primitive associate \(\xi^*\) of conductor \(f_\xi\mid M\). For a prime \(d\equiv r_0\bmod M\), the Legendre symbol \(\chi_d\) is real and primitive of conductor \(d\). Thus \(\psi_d=\xi^*\chi_d\) is primitive of conductor \(q=f_\xi d>1\). It induces \(\xi\chi_d\) at modulus \(Md\), whose zeros on \(\Re s>0\) are exactly those of \(L(s,\psi_d)\) by \eqref{eq:common-character-conductor}. In particular the twist is nonprincipal, and the Euler product excludes zeros on \(\Re s>1\). \teamanchor{proof.weighted-twist-exceptions}% For integers \(X\ge3\) let \(\mathcal P_X\) be the primes up to \(X\) in the class \(r_0\). Let \(\mathcal B_{\xi,X}\) be those \(d\in\mathcal P_X\) for which \(L(s,\psi_d)\) has a zero in the box \(\beta_k\le\Re s\le1,\ |\Im s|\le k\). We show that \(\#\mathcal B_{\xi,X}\ll_{M,k} X^{1-\Delta^2/16}\). \teamanchor{proof.weighted-mollified-zero-test}% Put \(U=\lfloor X^{\Delta/4}\rfloor\), \(P=\lfloor X/U\rfloor\) and \(N=UP\le X\). Since \(U^2\le X\), we have \(P\ge U\). For a primitive character \(\psi\) of conductor \(q>1\), define its finite Fourier coefficients by \[ \widehat\psi(h)=\sum_{u\bmod q}\psi(u)e^{2\pi ihu/q}. \] Changing variables gives the same modulus at every unit frequency. At a nonunit frequency \(h\), the reduction of units from \(q\) to \(q/(q,h)\) is surjective. The character is nontrivial on its kernel by primitivity. Multiplication by a kernel element with \(\psi\)-value different from \(1\) fixes the additive phase and forces \(\widehat\psi(h)=0\). Finite Parseval gives \(\sum_h |\widehat\psi(h)|^2=q\varphi(q)\), so the unit coefficients have modulus \(\sqrt q\). Fourier inversion and the bound \(O(q/\min(h,q-h))\) for a geometric sum of \(e^{-2\pi ihu/q}\) over any interval of integers give \[ |A_\psi(t)|\ll\sqrt q\log(2q),\qquad A_\psi(t)=\sum_{n\le t}\psi(n). \] For \(\Re s>0\), partial summation gives \[ L(s,\psi)-\sum_{n\le P}\psi(n)n^{-s} =-A_\psi(P)P^{-s}+s\int_P^\infty A_\psi(t)t^{-s-1}\,dt . \] At a tested zero \(\rho\) of \(L(s,\psi_d)\), we have \(q\le MX\), \(\Re\rho\ge\beta_k\) and \(|\rho|\ll_k1\). The finite sum at \(\rho\) therefore has size \(O_{M,k}(X^{1/2}P^{-\beta_k}\log(2X))\). Multiply it by the finite sum \(\mathcal M_U(s,\psi_d)=\sum_{m\le U}\mu(m)\psi_d(m)m^{-s}\), where \(\mu\) is the M\"obius function. Since \(|\mathcal M_U(\rho,\psi_d)|\ll_k U^{1-\beta_k}\) and \(P\asymp X/U\), the product at \(\rho\) is \[ O_{M,k}\bigl(X^{-\Delta}U\log(2X)\bigr) =O_{M,k}\bigl(X^{-3\Delta/4}\log(2X)\bigr). \] The coefficient of \(n^{-s}\) in the product is \(b_{U,P}(n)\psi_d(n)\), where \[ b_{U,P}(n)=\sum_{\substack{m\mid n\\m\le U,\ n/m\le P}}\mu(m). \] It satisfies \(b_{U,P}(1)=1\), \(b_{U,P}(n)=0\) for \(10\), that \begin{equation}\label{eq:quadratic-large-sieve} \sum_{\chi\in S(Q_0)}\left|\sum_{n\le N}a_n\chi(n)\right|^2 \ll_\eta (Q_0N)^\eta(Q_0+N) \sum_{\substack{n,m\le N\\nm\text{ a square}}}|a_n a_m|. \end{equation} The indices \(n,m\) range over all positive integers up to \(N\). Use \(Q_0=X\), with the distinct \(\chi_d\) as a subfamily and \(a_n=b_{U,P}(n)\xi^*(n)n^{-s}\) on \(U0\) gives \begin{equation}\label{eq:twist-mean-square} \sum_{d\in\mathcal P_X}|E_d(s)|^2 \ll_{\Delta,\omega} X^{1+\omega}U^{-\Delta/2} \qquad (\Re s\ge1/2+\Delta/2). \end{equation} Choose one zero \(\rho_d\) in the box for each \(d\in\mathcal B_{\xi,X}\). Its disk of radius \(\Delta/2\) lies in the common rectangle \[ \mathcal D=\{s:1/2+\Delta/2\le\Re s\le1+\Delta/2,\ |\Im s|\le k+\Delta/2\}. \] The mean of \(|E_d|^2\) on the disk is at least \(|E_d(\rho_d)|^2\), by expanding the entire polynomial in powers of \(s-\rho_d\) and integrating on circles. Summing the disk estimates, enlarging each disk to \(\mathcal D\) and using \eqref{eq:weighted-mollified-zero-test} and \eqref{eq:twist-mean-square} yields \[ \frac{\#\mathcal B_{\xi,X}}4\le \frac{4}{\pi\Delta^2}\int_{\mathcal D} \sum_{d\in\mathcal P_X}|E_d(s)|^2\,dA(s) \ll_{M,k,\omega} X^{1+\omega}U^{-\Delta/2}. \] Here \(dA\) is planar area measure. Since \(U\asymp X^{\Delta/4}\), \(\omega=\Delta^2/16\) gives the asserted exceptional count. \teamanchor{proof.weighted-twist-choice}% The union over the finitely many \(\xi\bmod M\) has size \(O_{M,k}(X^{1-\Delta^2/16})=o(X/\log X)\). In class \(r_0\bmod M\) the estimate \eqref{eq:weighted-fixed-pnt} gives von Mangoldt weight asymptotic to \(X/\varphi(M)\). Proper prime powers contribute \(O(\sqrt X\log X)\), since their prime bases are at most \(\sqrt X\) and each contributes at most \(\log X\). As each prime contributes at most \(\log X\), there are \(\gg_M X/\log X\) primes in the class up to \(X\). For large \(X\) one can choose \(d_k\) outside the union, giving \eqref{eq:weighted-twist-free} for every \(\xi\bmod M\). \end{proof} \subsection{The centered sums and the choice of squares} \teamanchor{proof.weighted-prime-series}% Fix a prime \(d=d_k\) supplied by Proposition~\ref{prop:common-quadratic-twist}. For \(Q\in\{M,1\}\) use the nonnegative weights and sums \begin{equation}\label{eq:weighted-ramp-weights} \lambda_{d,Q}(n)=\mathbf 1_{n\equiv1\bmod Q}\Lambda(n)(1-\chi_d(n)), \qquad S_{d,Q}(y)=\sum_{n\ge1}\lambda_{d,Q}(n)(1/n-1/y)_+ \quad(y\ge1). \end{equation} At \(Q=1\) the residue condition is automatic and \(\varphi(1)=1\). By the Chinese remainder theorem there is a unit modulo \(Qd\) that is \(1\bmod Q\) and a nonsquare modulo \(d\). Each \(\xi\chi_d\) with \(\xi\bmod Q\) takes the value \(-1\) there and is therefore nonprincipal at modulus \(Qd\). Define \(F_{d,Q}(s)=\sum_n \lambda_{d,Q}(n)n^{-s}\) for \(\Re s>1\). Character orthogonality gives, on every integer \(n\), \[ \varphi(Q)\mathbf 1_{n\equiv1\bmod Q}(1-\chi_d(n)) =\sum_{\xi\bmod Q}\bigl(\xi(n)-(\xi\chi_d)(n)\bigr). \] At a multiple of \(d\) the twisted term vanishes, and the untwisted term is included. Applying \eqref{eq:common-character-series} gives the exact series \begin{equation}\label{eq:weighted-series} F_{d,Q}(s)=\frac{s}{\varphi(Q)(s-1)}+G_{d,Q}(s), \end{equation} where \begin{equation}\label{eq:weighted-centered-log-derivative} G_{d,Q}(s)=\frac{1}{\varphi(Q)} \left[\sum_{\xi\bmod Q}\left( \frac{\widetilde L_{\xi\chi_d}'(s)}{\widetilde L_{\xi\chi_d}(s)} -\frac{\widetilde L_\xi'(s)}{\widetilde L_\xi(s)}\right)-1\right]. \end{equation} The pole term and the subtraction of \(1\) arise from the single untwisted principal character. The boundary calculation makes \(G_{d,Q}\) holomorphic at \(1\), and \eqref{eq:weighted-series} makes it real along the real axis to the right of \(1\). Define the real constant and the centered sum by \begin{equation}\label{eq:weighted-centered-ramp} c_{d,Q}=G_{d,Q}(1),\qquad R_{d,Q}(y)=S_{d,Q}(y)-\frac{\log y}{\varphi(Q)}-c_{d,Q}. \end{equation} At \(Q=1\) the untwisted function is \((s-1)\zeta(s)\), whose logarithmic derivative at \(1\) is \(\gamma\). Thus \begin{equation}\label{eq:weighted-modulus-one-center} \ell_d=\gamma-\Re\!\left(\frac{L'(1,\chi_d)}{L(1,\chi_d)}\right), \qquad c_{d,1}=-1-\ell_d . \end{equation} The logarithmic derivative of \(L(s,\chi_d)\) at \(1\) is real, since \(\chi_d\) is real and \(L(1,\chi_d)\ne0\). \teamanchor{proof.centered-ramp-maximum}% For a finite nonempty set of scales in \([1,\infty)\), if \(y_*\) maximizes \(R_{d,M}(y)-\tfrac12y^{\beta_k-1}\), a bound \(R_{d,M}(y_*)\le\tfrac12y_*^{\beta_k-1}\) gives the same inequality at every scale in that set. The choice of maximizer depends on \(S_{d,M}(y)-\log y/\varphi(M)-\tfrac12 y^{\beta_k-1}\), since subtracting the constant \(c_{d,M}\) preserves all comparisons. \teamanchor{proof.weighted-square-selection}% For \(j\ge1\) let \(X_j=2^{2^j}\). Both endpoints of \([X_j,X_{j+1}]\) are squares. Its finite set of integer squares has a least maximizer \(y_j\) of \begin{equation}\label{eq:weighted-square-selection} S_{d,M}(y)-\frac{\log y}{\varphi(M)}-\tfrac12y^{\beta_k-1}. \end{equation} These choices use the fixed \(k,d_k\) and the prime sums on the block. The arithmetic construction takes \(x=y_j\) for each sufficiently large \(j\), with \(d=d_k\) and \(\varepsilon=\varepsilon_k<1/100\).