\section{The finite digit average and the class sieve}\label{sec:arith} \paragraph{An order truncation.} For any positive integer \(D\) with \(\log D\le2Y^2,\ Y\ge100\), \begin{equation}\label{eq:product} \Ctw\prod_{\substack{p\mid D\\p>2}}\left(1+\frac1{p-2}\right)\le3\log Y. \end{equation} For primes up to \(Y^3\) include all odd primes and multiply their twin factors. The product is bounded by \(\tfrac12\prod_{p\le Y^3}p/(p-1)\). There are at most \(2Y^2/\log(Y^3)\) remaining prime divisors, each adding at most \(1/(Y^3-2)\) to the log. Rosser and Schoenfeld's Theorem 8, (3.29), for \(x\ge286\), bounds the product through \(x\) by \(e^{\gamma_E}\log x(1+1/(2\log^2 x))\), with \(\gamma_E\) Euler's constant. At \(x=Y^3\) the resulting bound divided by \(\log Y\) is \(<3\) at \(Y=100\) and decreases. \cite{RS} The integer \(D=\prod_{1\le j\le Y}(2^j-1)\) has logarithm at most \(Y^2\). It contains every odd squarefree modulus of order at most \(Y\) as a divisor. Hence \(\Ctw\sum_{o_d\le Y}g(d)\le3\log Y\), and partial summation gives \(\Ctw\sum_{o_d>Y}g(d)/o_d\le3(\log Y+1)/Y\). \begin{lemma}\label{lem:period} For a monomial of degree \(k\) in either design, let \(j(\boldsymbol\nu)\) denote its signed target. On the product of the \(k\) uniform probability spaces \([1,\ell]\cap\mathbb Z\), let \(I\) be the product of the indicators imposing its required digit parities. Then \begin{equation}\label{eq:period} \left|\mathbb E[If(j)]- \sum_{(d,6)=1}g(d)\,2^{-k}p_{d,m}(N\bmod d)\right| \le\frac{(6k+6)\log\ell+3}{\Ctw\ell}. \end{equation} \end{lemma} \begin{proof} For all choices \(0\ell\). In the \(i\)-th term of the product-measure telescoping identity, the other digit laws are \(\pi\) in slots before \(i\), \(\mu\) after \(i\), and slot \(i\) carries \(\mu-\pi\). Choose any second slot \(l\ne i\), possible since \(k\ge2\). Fix the digit in slot \(i\) and every digit except slot \(l\). For the target to vanish, \(2^{\nu_l}\) must hit one fixed residue modulo \(d\), for either sign. If attainable, this is a single class modulo \(o\). Its probability under \(\pi\) is \(1/o\) and under \(\mu\) at most \(1/o+1/\ell\). Imposing any of the parity indicators can only decrease that absolute bound. Integrating over slot \(l\) first therefore bounds the integrand seen by \(\mu-\pi\) by \(2/o\). The cost per replaced coordinate is at most \(2/\ell\). Under the final product of uniform laws the prescribed parities occur with probability \(2^{-k}\). Conditional on them, the digits modulo \(d\) have the two uniform subgroup or coset laws defining \(p_{d,m}\). Summing the \(k\) replacements against \(g(d)\) costs at most \(6k\log\ell/(\Ctw\ell)\). For \(o_d>\ell\), fix the other \(k-1\) digits and form \(D=\prod_{\nu=1}^{\ell}|j(\nu)|\). All factors are nonzero and \(\log D\le\ell\log(2N)\le2\ell^2\). Each such modulus divides at most one target as the free exponent varies. The total finite tail, even after dropping the parities, is at most \(\ell^{-1}\sum_{d\mid D}g(d)\le3\log\ell/(\Ctw\ell)\). The uniform tail likewise costs at most \(\sum_{o_d>\ell}g(d)/o_d\), by ignoring the parity indicator of a free digit. Adding the three bounds proves \eqref{eq:period}. \end{proof} On \(\mathcal D\), \eqref{eq:cert} gives a lower bound for the complete signed mean simultaneously in \(N\). On its complement drop the positive monomials. For each negative monomial the conditional hit probability with the required parities is at most \(1/\ord_d4=\gcd(2,o_d)/o_d\le\bar K(o_d)/o_d\) after fixing the other digits. Using \eqref{eq:order} gives the complete signed mean at least \(H_c=C_c-U_c(\sigma-H_*)\), Droll's floor \(\mathrm{mainFloor}_4\), by the argument in the proof of \cite[Proposition 7.2]{D}. In particular the genuine major-arc signed integral \(T_{N,\M}\), with the same integrand as \(T_N\), satisfies \begin{equation}\label{eq:majorfloor} T_{N,\M}/N\ge 2\Ctw H_c-p(t),\qquad p(t)=40\,\frac{30\log(2V)+3}{\ell}+14\cdot10^{-7}. \end{equation} Here the periodic error is multiplied by \(2\Ctw\sum|\gamma_m|\lambda_m\), and the coefficient error by \(\sum|\gamma_m|\). The parity restriction was imposed before both sums. \begin{lemma}\label{lem:sieve} Under the hypotheses and at the even \(N\) of Theorem~\ref{th:main}, for every positive even \(hz\). This gives \[ |A(z)-\log z/(2\Ctw)|\le200,\qquad A(z)\le 2f(h)H_{3h}(z). \] The latter follows by removing all prime factors of \(3h\) before summing \(g\). Take \(z=\lfloor N^{1/4}/t^3\rfloor\). Droll's finite minimizing Selberg weights on the odd squarefree \(d\le z\) prime to \(3h\) have \(\xi_1=1,\ |\xi_d|\le1\) and \(\sum_{d,e}\xi_d\xi_e/\varphi([d,e])=1/H_{3h}(z)\). \cite[Lemma 5.1(i)--(ii) and the proof of Proposition 5.2]{D} For a prime \(n+h>z\), \((\sum_{d\mid n+h}\xi_d)^2=1\). Bound its log by \(t\) and sum the nonnegative square against \(\Lambda(n)\) in class \(r\). Each \([d,e]=M\) imposes one unit class modulo \(3M\), given by \(n\equiv-h\bmod M,\ n\equiv r\bmod3\). Orthogonality and \eqref{eq:pnt} give \((N-h)/(2\varphi(M))\) with error at most \(10^6\sqrt N\,t^2\), since \(3M\le3z^2\le4X^2\). There are at most \(z^2\) ordered weight pairs. The omitted small primes and proper powers among \(n+h\) number at most \(z+\sqrt N\,t/\log2\). The resulting upper bound is \[ Nt f(h)/A(z)+10^6 N/t^3+(z+\sqrt N\,t/\log2)t^2 . \] Use \(\log z\ge t/4-3\log t-1\). In units \(2\Ctw f(h)N\) the first term is at most \(t/(t/4-3\log t-1-400\cdot.660162)<4.005\). The remaining terms together are \(<10^{-6}N\) before normalization. Since \(2\Ctw f(h)>1\), this proves \eqref{eq:sieve}. \end{proof}