\documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \ifdefined\pdftrailerid\pdftrailerid{}\fi \usepackage[utf8]{inputenc} \usepackage{lmodern,microtype,amsmath,amssymb,amsthm,mathtools,booktabs,tabularx,array} \usepackage[top=25mm,bottom=26mm,left=28mm,right=28mm]{geometry} \usepackage{xcolor,graphicx} \definecolor{ink}{HTML}{214B61} \usepackage[colorlinks=true,linkcolor=ink,citecolor=ink,urlcolor=ink,bookmarksnumbered=true]{hyperref} \hypersetup{pdftitle={Observations and Shift Decoding in Divisor Incidences},pdfauthor={Brice Pouly}} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition}\newtheorem{example}[theorem]{Example} \numberwithin{equation}{section} \newcommand{\one}{\mathbf 1} \newcommand{\E}{\mathbb E} \newcommand{\Prob}{\mathbb P} \newcommand{\Ent}{\operatorname{Ent}} \newcommand{\Th}{\vartheta} \newcommand{\eps}{\varepsilon} \newcommand{\Ccal}{\mathcal C} \newcommand{\mass}{\mathcal M} \newcommand{\Ical}{\mathcal I} \newcommand{\SSer}{\mathfrak S} \newcommand{\PhiN}{\Phi} \newcommand{\rank}{\mathop{\rm rank}} \newcommand{\doi}[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}} \newcommand{\ee}{\mathrm e} \newcommand{\norm}[1]{\left\|#1\right\|} \newcommand{\st}{\textstyle} \DeclareMathOperator{\Var}{Var} \setlength{\emergencystretch}{1.3em} \title{\bfseries Observations and Shift Decoding\\ in Divisor Incidences} \author{Brice Pouly\\[3pt]\small Research and writing with AI assistance} \date{} \begin{document} \maketitle \begin{abstract} Hall and Tenenbaum's theorem on local divisor maxima gives the Gaussian success profile for guessing a hidden shift when each origin is weighted by its number of divisors. We extend this profile to uniform sampling of quadruples \((h,n,a,b)\) with \(X0\). \end{abstract} \section{Which displacement produced the observed integer?}\label{sec:exp} Hall and Tenenbaum's 1984 theorem on local maxima of the divisor function already determines how often one can guess a hidden displacement from a single observation in an unrestricted divisor experiment \cite[Thm.~1, p.~376]{hallten}. Choose uniformly a triple \((h,n,d)\) with \(1\le h\le H\), \(X\kappa\). \item If \(\log(H/Q)=\kappa L+t\sigma_L+o(\sqrt L)\), with \(t\in\mathbb R\) fixed, the limit is \(1-\PhiN(t)\), where \(\PhiN\) is the standard normal distribution function. \end{enumerate} For \(\log H=(c+o(1))L\) the two conditional entropies satisfy \[ L^{-1}\Ent(h\mid v),\quad L^{-1}\Ent(h\mid v,b) \ \longrightarrow\ (c-\kappa)_+ . \] \end{theorem} The origin has two sources of small prime factors. One is the sampled divisor \(a\). The other is the unrestricted part of \(m\). The selected origin consequently carries \(2L+O_{\Prob}(\sqrt L)\) distinct small prime factors, with fluctuations that are asymptotically Gaussian. A wrong origin usually has only one source. The upper-tail estimate for a false shift has rate \(I(x)=x\log x-x+1\). At \(x=2\), the value \(I(2)=\kappa\) gives the threshold and the slope \(I'(2)=\log2\) sets the fluctuation scale. In particular, when \(H=\lfloor e^{\kappa L}\rfloor\), the best single guess succeeds half the time in the limit, yet the mean remaining information diverges like \((\log2)\sqrt{L/\pi}\) (Theorem \ref{th:entropy}). For the converse one must control origins with many divisors in the same dyadic interval, since a single guess can collect all their posterior mass. \paragraph{Comparison with weighted prime-factor laws.} For ordinary integers the centring and variance of the prime-factor count are both asymptotic to \(L\) in the Erd\H{o}s--Kac theorem \cite{ek}. Under the weight \(\tau(n)\) both are asymptotic to \(2L\), as in Elliott's result \cite{elliott,elliottcorr} and the moment theorem of Khan, Milinovich and Subedi \cite[Thm.~1.1 and Cor.~1.2]{kms}. Fan \cite{fan} treats a wider class of multiplicative weights by moments. Our incidence law requires the prime-factor fluctuations under both divisor conditions. In addition to the Gaussian law for the selected origin, Lemma~\ref{lem:moment} bounds the multiplicity of its odd dyadic divisors, and Lemma~\ref{lem:false} averages the prime factors forced onto the competing origins. The losses in these two estimates are polynomial in \(L\), small enough to retain the full \(\sqrt L\) window. For a second comparison, Sun \cite[Thm.~1.1]{sun} obtains at \(k=2\) the increasing profile \(\Phi(t)\) for the short sum of the divisor function, relative to its long mean, at almost all ordinary starting points. The scale of the window agrees with \eqref{eq:tau-profile}. Its exceptional set has \(o(X)\) starting points, which can still account for a substantial fraction of the mass of labelled incidences. Hall's theorem on integers with a divisor in \((y,z]\) also has this transition width \cite[Thm.~7.9]{hallbook}. Ford gives the corrected range in \emph{The distribution of integers with a divisor in a given interval} \cite[Thm.~H, pp.~369--370]{ford}. There \(z\le x^{1/\log\log x}\), which excludes a divisor dyad of size \(x^{1/4}\) for large \(x\). That comparison counts each integer admitting a divisor once. The posterior in \eqref{eq:post} depends on the number of representations. \paragraph{What the observation retains.} The list theorem gives the distribution of the true rank by varying the list size (Corollary~\ref{cor:rank}). Theorem~\ref{th:entropy} identifies the arithmetic quantity that approximates conditional entropy to \(O_C(\log(2L))\). Corollary~\ref{cor:common} controls the absolute error on the same sampled incidence for posterior information and for all three ranks. Revealing \(b\) can change the answer on an individual observation, as Example~\ref{ex:finite} shows. Its mean information gain is \(O_C(\log(2L))\). The list form of Fano's inequality used at first order is treated in \cite{sakai}. At displacement two, Theorem~\ref{th:exact} counts prime \(k=(n+2)/b\) when one reports the exact cofactor \(m=n/a\) and one of at most \(X^{1/5-\eps}\) preassigned groups of labels \(a\). An observer can therefore use the full factorisation of \(m\). Theorem~\ref{th:res} instead retains \(a\) and the prime \(k\) exactly and reports \(b\bmod q\). If \(T=B/A\) and \(X^\eps\le S\le T\), the mean discrepancy over primes \(S{\raggedright\arraybackslash}p{.318\linewidth} >{\raggedright\arraybackslash}X >{\raggedright\arraybackslash}p{.275\linewidth}@{}} \toprule Experiment & Source and observation & Target and choice of test\\ \midrule \emph{Reconstruction and sign prediction from sampled prime factors} \cite{sampled} & Harmonic integer. Prime labels are sampled with logarithmic weights. & Recover the integer or predict a prescribed sign under the sampling protocol.\\[2pt] \emph{Parity information in a rough cofactor and exact reconstruction thresholds} \cite{rough} & Uniform integer. Read its rough cofactor and its residue modulo a given modulus. & Optimise recovery, certification or sign prediction for that modulus.\\[2pt] \emph{Visible prime factors under neighbouring critical divisor weights} \cite{visible} & Two divisor-weighted priors. Read a marked prime, its cofactor or successive factor labels. & Distinguish the two laws with bounded tests on the revealed data.\\[2pt] \emph{Simultaneous quadratic probes: reconstruction thresholds and marked Poisson limits} \cite{probes} & Uniform integer. Read four Legendre symbols at each prime of a random panel. & Identify the integer or predict a binary label fixed before the panel is drawn.\\[2pt] Present experiment & Uniform divisor incidence. Read \(v\), or \(v,b\). & Recover \(h\) with a list chosen after seeing the data.\\ \bottomrule \end{tabularx} \caption{The observation and the prior in five reconstruction experiments.} \label{tab:experiments} \end{table} \section{The prime factors of the selected origin}\label{sec:normal} Let \(N_{abh}=|\Ical_{ab}(h)|\) be the number of origins with these three labels. The Chinese remainder theorem gives \begin{equation} N_{abh}=\frac{X}{ab}+O(1)\asymp U,\qquad \mass=\sum_{h\le H}\sum_{\Ccal}N_{abh} \sim\frac{2(\log2)^2}{\pi^2}HX. \label{eq:mass} \end{equation} Indeed, for two independently chosen odd dyadic integers with respective weights \(1/a,1/b\), coprimality has limiting probability \(\prod_{p>2}(1-p^{-2})\). For each odd \(p\le2A\) the probability of a common multiple is \(O(p^{-2})\), since the harmonic probability of a multiple of \(p\) on either dyad is \(O(1/p)\). Finite sets of primes are handled by counting residues. The separate odd harmonic sums tend to \((\log2)/2\). The same argument with \(h\) fixed proves the mass formula per shift. Replacing every \(N_{abh}\) by \(X/(ab)\) changes the joint law of \((h,a,b)\) by \(O(U^{-1})\) in total variation. In particular \(h\) has mass \(O(1/H)\) at each value. Write \(n=am\). For a fixed triple let \[ W_{ab}(m)=\sum_{\substack{p\le y\\p\nmid ab}}\one_{p\mid m}. \] This separation assigns all small divisors of \(a\) to the first summand and avoids repeated counting. \begin{lemma}[The two Gaussian contributions]\label{lem:normal} Under the incidence law, \[ \left(\frac{\omega_y(a)-L}{\sqrt L}, \frac{W_{ab}(m)-L}{\sqrt L}\right) \Longrightarrow (Z_1,Z_2), \] where \(Z_1,Z_2\) are independent standard normal variables. Furthermore \begin{equation} Z_X:=\frac{\omega_y(n)-2L}{\sqrt{2L}}\Longrightarrow N(0,1), \qquad \Omega(n)-\omega_y(n)=O_{\Prob}(\log(2L)).\label{eq:nclt} \end{equation} The same loss satisfies the mean estimate \begin{equation} 0\le\E[\Omega(n)-\omega_y(n)]\ll_C\log(2L). \label{eq:omega-mean} \end{equation} Here \(\Omega\) counts prime factors with multiplicity and \(O_{\Prob}\) denotes boundedness in probability after division by the indicated scale. \end{lemma} \begin{proof} The sum of the reciprocal primes up to \(y\) is \(L-4\log L+O(1)\). If \(d\ll X^2\), deleting its prime factors changes this sum by \(O(\log(2L))\), uniformly in \(d\). The contribution up to \((\log X)^2\) has this bound by Mertens' theorem. The larger prime divisors of \(d\) contribute \(O((\log X)^{-2}\log(2d))\). We first give the moment comparison used twice below. In a progression of step \(b\) with \(N\asymp U\) terms, the probability that a product \(d\) of distinct primes coprime to \(b\) divides \(m\) is \(1/d+O(1/N)\). In the \(r\)-th raw moment of a sum of such indicators, at most \(y^r\) ordered tuples occur. Repeated indices give the same indicator. Comparison with independent Bernoulli variables of means \(1/p\) therefore costs \(O_r(y^r/N)\). In a centred moment it costs at most \(O_r((1+L)^ry^r/N)=o(1)\) for each fixed \(r\). The independent sum has variance equal to its mean up to \(O(1)\), and its cumulants of every fixed positive order are \(O_r(L)\), by differentiating \(\sum_p\log(1+(e^t-1)/p)\) at zero. Its centred moments divided by the corresponding powers of \(\sqrt L\) tend to the Gaussian moments. Replacing its mean by \(L\) costs \(O(\log(2L)/\sqrt L)\) on this scale. For \(W_{ab}\), given \(h,a,b\), the \(m\)'s occupy consecutive terms in one class modulo \(b\). The comparison just proved and the uniform deletion bound apply to every triple, even when the original progression has a common factor with its modulus. By moment determinacy the conditional distribution functions converge to \(\PhiN\) uniformly over triples at each fixed argument. Otherwise a sequence of exceptional triples would have the same limiting moments and a different weak limit. For the divisor label there is a direct comparison that also identifies the change at each prime caused by coprimality. Start with independent odd harmonic labels and restrict to \((a,b)=1\). For any odd squarefree \(d\) composed of at most \(r\) primes \(\le y\), \begin{equation} \Prob\big(d\text{ divides }a\,\big|\,(a,b)=1\big) =\prod_{p\mid d}\frac1{p+1}+O_r(X^{-1/25}).\label{eq:label} \end{equation} To verify the formula expand the coprimality indicator as \(\sum_{\ell\mid a,b}\mu(\ell)\), in which all \(\ell\) are odd. The tail \(\ell>D_0=X^{1/20}\) is \(O(1/D_0)\) in absolute mean, by the dyadic multiple bound for \(a,b\). For \(\ell\le D_0\) the two divisibilities are by \([d,\ell]\) and \(\ell\). On an odd harmonic dyad of size \(A\) the probability of a multiple of an odd \(e\) is \(1/e+O(1/A)\), by partial summation, and likewise for \(B\). Summing the two endpoint errors over \(\ell\le D_0\) and extending the resulting absolutely convergent series gives an error \(O(D_0/A+1/D_0)\), uniformly in \(d\). At a prime dividing \(d\) the unconditioned joint density for the two events is \(p^{-1}(1-p^{-1})\). Dividing by the coprimality density \(1-p^{-2}\) gives \(1/(p+1)\). All other local factors cancel. The same computation with \(d=1\) normalises the probability. By \eqref{eq:mass}, restoring the exact incidence labels costs \(O(1/U)\) per event. Since \(y^r=X^{o(1)}\) for fixed \(r\), \eqref{eq:label} gives the moments of the independent sum with probabilities \(1/(p+1)\) for odd \(p\le y\), up to \(o(1)\) even after centring. Its mean and variance differ by \(O(1)\) from those with probabilities \(1/p\). This is the sieve moment method of \cite{gs}, with the local sampling probabilities computed above. Multiplying the conditional distribution function of \(W_{ab}\) by the indicator of any first-coordinate half-line now gives the product of the two limiting distribution functions. The difference between \(\omega_y(n)\) and \(\omega_y(a)+W_{ab}(m)\) counts only prime factors of \(b\) that divide \(n\), hence divide \(h\). The expectation of \(\Omega(h)\) is \(O(1+\log\log(3H))=O(\log(2L))\), by summing the probabilities of divisibility by prime powers and using \eqref{eq:mass}. This proves the central limit assertion. For the remaining estimate put \(d=(b,h)\). Then \(m'=m/d\) runs through a primitive class modulo \(b/d\), with the same \(N\) terms. Indeed \((m,b)=(h,b)\). Put \(Z=X^{1/30}\). For \(m'\), the expected number of repetitions from primes \(p\le Z\) is bounded by \[ \sum_{p\le Z}\sum_{\substack{j\ge2\\p^j\le3X}} (p^{-j}+O(1/N))\ll 1+Z\log X/N. \] Primes dividing the step have zero contribution. The distinct primes with \(y1\), uniformly for \(1\le j\le H,\ j\ne h\), \[ \Prob(\omega_y(v-j)\ge xL\mid h,a,b) \le \exp\{-[I(x)+o(1)]L\},\quad I(x)=x\log x-x+1. \] More precisely, for fixed \(u\in\mathbb R\), the number \(N_u\) of false shifts with score at least \(T_u=\lceil2L+u\sqrt{2L}\rceil\) satisfies \begin{equation} \E(N_u\mid h,a,b)\ll_{u,C} H(1+L)^{c_5}\exp(-\kappa L-u\sigma_L). \label{eq:compet} \end{equation} \end{lemma} \begin{proof} A prime factor of \(a\) dividing \(v-j\) divides \(h-j\), and one from \(b\) divides \(j\). Thus at most \(F_j=\omega(j|h-j|)\) prime factors of \(ab\) can contribute. Uniformly \(F_j=O_C(L/\log(2L))\), since the product of the first \(d\) primes is at least \(d!\). For the remaining small primes let \(W_j\) count divisibility of \(v-j\). In the selected cell, \(n\) runs in a progression of step \(ab\). For each product of \(\ell\) distinct primes from this remaining set there is exactly one rank class modulo the product. Therefore \[ \E\left[\binom{W_j}{\ell}\,\middle|\,h,a,b\right] \le (L+O(1))^\ell/\ell!+O(y^\ell/U). \] For \(\ell=\lfloor(x-1)L\rfloor\), divide by \(\binom{\lceil xL\rceil-F_j}{\ell}\). Stirling's formula gives \(-I(x)L+o(L)\) for the log of the leading ratio. The additive error is \(X^{-3/20+o(1)}\). For \(T_u\), use \(\ell=\lfloor L\rfloor\). With \(F_j=0\) the log of the ratio is \[ \ell\log(L+O(1))+\log((T_u-\ell)!)-\log(T_u!) =-\kappa L-u\sigma_L+O_u(\log(2L)). \] This follows by Taylor expansion at \(T_u=2L+O(1)\), where the linear coefficient in \(T_u\) is \(-\log2+O(1/L)\). Lowering the threshold by one multiplies the leading ratio by \(r/(r-\ell)\) at threshold \(r\), bounded throughout the \(F_j\) steps. The aggregate loss is polynomial in \(L\). In fact Cauchy--Schwarz gives \[ \sum_{j\ne h}\exp(c_6 F_j)\ll H(1+\log H)^{c_7}. \] To see this, factor the upper bound into terms at \(j\) and \(|h-j|\). For fixed integer \(d\ge e^{2c_6}\), each squared term is bounded by the ordered \(d\)-fold divisor function \(\tau_d\), whose sum up to \(H\) is \(O_d(H(1+\log H)^{d-1})\) by repeated harmonic summation. This averaging step is needed at Gaussian precision because the uniform bound for \(F_j\) alone can exceed \(\sqrt L\). Summing the negligible progression errors proves \eqref{eq:compet}. \end{proof} \begin{proof}[Proof of Theorem \ref{th:main}] Always \(P_{\rm sc}(Q)\le P_v(Q)\le P_{v,b}(Q)\). If the true score is at least \(T\) and fewer than \(Q\) false shifts score at least \(T\), the score order includes the truth. For \(c-s<\kappa\) choose \(1c-s\). The true score exceeds \(xL\) with probability \(1-o(1)\) by Lemma \ref{lem:normal}. Lemma \ref{lem:false} and Markov's inequality control the false shifts. In the central window use \(T_{t+\delta}\), \(\delta>0\). Dividing \eqref{eq:compet} by \(Q\) gives \(o(1)\), while the true score passes with limiting probability \(1-\Phi(t+\delta)\). For the reverse inequality there are only \(O(X)\) possible outputs \((v,b)\), since \(b\mid v\) and \(\sum_{b\sim B}((X+H)/b+1)\ll X\). On incidences with \(d_A^o(n)\le D\), a list can account for at most \(QD\) incidences per output, by \eqref{eq:post}. Consequently, for every \(D>0\), \begin{equation} P_{v,b}(Q)\le \Prob(d_A^o(n)>D)+O(QD/H). \label{eq:conv} \end{equation} For \(c-s>\kappa\), take \(\log D=(\kappa+\eta)L\) with \(0<\eta0\). Then \(\Prob(R\le Q)\to\Phi(u-d)\), the required distribution at every positive continuity point. The choice \(Q=1\) gives the mass at rank one separately. For a posterior row with sorted positive probabilities \(p_1\ge p_2\ge\cdots\), \(r p_r\le1\). The mass of ranks for which \(-\log(rp_r)>z\) is at most \(e^{-z}\sum_{r\le H}1/r\). Thus the difference between information and posterior log rank is nonnegative and \(O_{\Prob}(\log(2L))\), uniformly over the rows. This is \(o_{\Prob}(\sigma_L)\). \end{proof} \subsection{The size of the uncertainty in the critical window} The distribution of the rank describes lists of fixed success probability. To average posterior information one also needs to control rare rows. We control these rows by comparing their posterior probabilities with one explicit probability distribution. A positive-part integral already occurs in Hayashi's lower bound for the divergence of a compressed distribution from uniformity \cite[Thm.~8, \S VI-B, (41)]{hayashi}. Here the quantity to evaluate is the conditional entropy of an arithmetic shift, and the estimate before the Gaussian limit is \eqref{eq:entropy-arith}. Write \(\phi(t)=(2\pi)^{-1/2}e^{-t^2/2}\). \begin{theorem}[Conditional entropy at Gaussian precision]\label{th:entropy} Uniformly for \(1\le H\le(\log X)^C\) and for either observation \(O=v,(v,b)\), \begin{align} \Ent(h\mid O) &=\E\!\left[(\log H+L-(\log2)\omega_y(n))_+\right] +O_C(\log(2L)),\label{eq:entropy-arith}\\ &=\sigma_L\{d_X\Phi(d_X)+\phi(d_X)\}+o_C(\sqrt L), \quad d_X=\frac{\log H-\kappa L}{\sigma_L}. \label{eq:entropy-gauss} \end{align} In particular if \(\log H=\kappa L+o(\sqrt L)\), the entropy is asymptotic to \((\log2)\sqrt{L/\pi}\). For every \(H\) in the stated range the entropy saving from revealing \(b\) in addition to \(v\) is \(O_C(\log(2L))\). \end{theorem} \begin{figure}[htb] \centering \includegraphics[width=.97\linewidth]{profiles.pdf} \caption{At \(\log H=\kappa L+d\sigma_L+o(\sqrt L)\), the limiting probability of a correct single guess is \(1-\Phi(d)\). The limit of the entropy divided by \(\sigma_L\) is \(d\Phi(d)+\phi(d)\). The dots mark the nominal threshold.} \label{fig:profiles} \end{figure} \begin{proof} Set \(D_*=\lceil3L\rceil\), \(s_j=2^{\min(\omega_y(v-j),D_*)}\), and \(B_h=\sum_{j\ne h}s_j\). Two moment bounds will be used. First, \begin{equation} \E[(\omega_y(n)-2L)^2]\ll_C L,\qquad \E[\Omega(n)-\omega_y(n)]\ll_C\log(2L). \label{eq:truemom} \end{equation} For the first, the ordinary dyadic law for \(a\) has centred second moment \(O(L+(\log(2L))^2)\) by the two-prime count in Lemma \ref{lem:normal}. The label marginal is dominated by a constant multiple of that law. The same centred bound holds conditionally for \(W_{ab}\). The remaining \(\omega(h)\) has second moment \(O((1+\log\log(3H))^2)\), by expanding its square and counting multiples up to \(H\) with \(\Prob(h=j)\ll1/H\). The second estimate is \eqref{eq:omega-mean}. In particular \(\E[(\omega_y(n)-D_*)_+]\ll1\). Second, \(\E B_h\ll_C H e^L(1+L)^{c_8}\). For a false \(j\), use \(F_j,W_j\) of Lemma \ref{lem:false} and the deterministic bound \[ s_j\le 2^{F_j}2^{\min(W_j,D_*)} \le 2^{F_j}\sum_{\ell=0}^{D_*}\binom{W_j}{\ell}. \] The second inequality holds also when \(W_j>D_*\), by comparing the binomial coefficients term by term with those for \(D_*\). On each progression the expected sum on the right, without \(2^{F_j}\), is at most \(\exp(\sum_{p\le y}1/p)+O((2y)^{D_*+1}/U)\ll e^L\). The aggregate bound on \(2^{F_j}\) in Lemma \ref{lem:false} gives the claim. Truncation at \(3L\) allows every product in this comparison to be counted within the available progression length. Use \(\pi_j=s_j/\sum_i s_i\) as a candidate conditional distribution given \(v\). Nonnegativity of relative entropy, row by row, gives \[ \Ent(h\mid v)\le \E[-\log\pi_h] =\E\log(1+B_h/s_h). \] Pointwise the last logarithm is bounded by \(\log2+(\log H+L-\log s_h)_++\log(1+B_h/(He^L))\). By Jensen the mean of the last term is \(O_C(\log(2L))\). Unclipping \(\log s_h\) costs \(O(1)\) in expectation by \eqref{eq:truemom}. This proves the upper bound in \eqref{eq:entropy-arith} for both observations. For the lower bound use the finer observation and let \(N(v,b)=\sum_j w_{v,b}(j)\) be the row mass. At most \(O(X)\) rows can occur, so \[ \Prob\{N(v,b)0}\pi_j\le1. \] Integration of the exponential tail gives \(\E[(I_O-J_h)_+]\le1\). In a posterior order, \(R p_h\le1\). In the score order, every preceding entry has clipped weight at least \(s_h\), so \(R\pi_h\le1\). Consequently each \(W\) among the two informations and the three log ranks satisfies \(\E[(W-Y_X)_+]\ll_C\log(2L)\). For the lower bound on the mean of a log rank, condition on the data that specify its order. The shift and its rank are then in bijection. Comparing the conditional law of the rank with the distribution \(1/(r\sum_{u\le H}1/u)\) gives \[ \E\log R\ge\Ent(h\mid O)-\log\!\sum_{u\le H}1/u . \] The last logarithm is \(O_C(\log(2L))\). Theorem~\ref{th:entropy} therefore gives \(\E W\ge\E Y_X-O_C(\log(2L))\) for each of the five variables. The identity \(|z|=2z_+-z\) completes the proof. \end{proof} \section{Prime cofactors at displacement two}\label{sec:cofactor} We now fix \(h=2\). A label \(a\), a residue of \(b\), and a cofactor give different partitions of the solutions of \(am+2=bk\). We compare the observed and predicted masses in the sum of absolute differences over those partitions. This bounds the error against any complex test of modulus at most one on the reported data. Put \(\Th(p)=\log p\) at primes, \(\Th(u)=0\) otherwise, and write \(\mathcal L=\log X\). \begin{theorem}[An exact cofactor]\label{th:exact} Partition the odd \(a\sim A\) into \(V\le X^{1/5-\eps}\) sets \(\mathcal A_j\), chosen before \(m\) is known. Put \(D_j(m)=\#\{a\in\mathcal A_j:X0\), \[ \sum_{j,m}\left|C_j(m)-\one_{2\nmid m}(\log 2)D_j(m)\right| \ll_{\eps,D}X\mathcal L^{-D}. \] In particular a reader may use the full factorisation of \(m\). Reporting \(a\) exactly would require \(\asymp X^{1/4}\) groups. \end{theorem} \begin{proof} In a contributing incidence \(a,b\) are odd and the prime \(k\asymp K\) exceeds two, forcing \(m\) to be odd. Conversely, for odd \(a,m\) and a prime \(k\mid am+2\), the integer \(b=(am+2)/k\) is odd. A common factor of \(a,b\) would divide two, so the pair is coprime. In a rectangular box of \(a,m,k\) write \(S_z(\alpha)=\sum_m z_m e(m\alpha)\), where \(e(t)=e^{2\pi i t}\). Subtract the density \(1/k\) from the condition \(m\equiv-2\bar a\bmod k\). For a set \(\mathcal A\) of labels the absolute error, summed with prime weights, is bounded by \begin{equation} \sum_{k\ {\rm prime}}\frac{\log k}{k} \sum_{r=1}^{k-1}|S_z(r/k)|\, \left|\sum_{a\in\mathcal A}e(2r\bar a/k)\right| \ll\mathcal L\sqrt{|\mathcal A|(M+K^2)}\,\norm{z}_2 . \label{eq:rect} \end{equation} Indeed \(k>2A\) and \(a\mapsto-2\bar a\) is injective. Parseval gives \(k|\mathcal A|\) as an upper bound for the squared label sum over \(r\). Cauchy--Schwarz, \(k\asymp K\), and the additive large sieve \cite{mv} with separation \(\gg K^{-2}\) give \eqref{eq:rect}. By duality choose \(z_m\) separately in each group, supported on odd \(m\), \(|z_m|\le1\). Cauchy over groups gives \(O(X^{9/10}\sqrt V\,\mathcal L)\). To impose the two dyadic conditions, divide each coordinate range into \(G=\lceil\mathcal L^{D+4}\rceil\) comparable subintervals. On boxes meeting a boundary \(am=X,2X\) or \(k=(am+2)/(B), (am+2)/(2B)\), the reference mass is \(O(X\mathcal L/G+X^{1-c})\) for an absolute \(c>0\). For fixed \(m\) the first two boundaries allow \(O(A/G+1)\) nearby labels. For fixed \(a,m\) the last two allow \(O(K/G+1)\) nearby values of \(k\), each with harmonic weight \(O(\mathcal L/K)\). The actual boundary mass satisfies the same bound with \(O(G^3X^{9/10}\sqrt V\,\mathcal L)\) added, by positivity and \eqref{eq:rect}. All these errors are admissible. For each admissible \(a,m\), the density summed over the remaining \(k\)'s is \(\sum_{(am+2)/(2B)\le k<(am+2)/B}\Th(k)/k=\log2+O_D(\mathcal L^{-D-1})\), uniformly by the prime number theorem and partial summation. \end{proof} \paragraph{What a residue of the other divisor reveals.} Here \(a,k\) are given exactly, \(k\) is prime, and a prime \(q\) reveals \(r=b\bmod q\). Put \(T=B/A=M/K=X^{7/20}\) and \[ I_{ak}=\{u\in\mathbb R:X0\) depending on \(c_0\), and restrict to \((1/2+\delta)K2A\). Finally if \(S\mathcal L/T\to\infty\), the predicted mass on all occupied cells is \(O(T/(S\log M))\) times the observed mass. Set \(M_X=\tfrac12(\log2)^2X\). The row estimate and the exclusion bound above give \(|P_q|,|J_q|=(1+o(1))M_X\) uniformly. In the identity \[ D(q)=|P_q|+|J_q|-2\sum_{a,k,r}\min(P_{akr},J_{akr}) \] the overlap is \(o(M_X)\), by the estimate on the occupied cells. This proves \(D(q)/M_X\to2\). Replacing \(P_q/M_X,J_q/M_X\) by \(P_q/|P_q|,J_q/|J_q|\) costs \(o(1)\) in \(\ell^1\) by the same total-mass estimates. Halving the resulting distance gives the claimed probability total variation. \end{proof} \begin{proposition}[A pooled marginal for each modulus]\label{prop:pooled} Let \(W=\lceil\exp\sqrt{\mathcal L}\rceil\) and partition \(K/30). \] The model retains the actual prime weights in each short block. \end{proposition} \begin{proof} Write \(s=(kr-2)\bar a\bmod q\). For each exact row subtract \(k^{-1}\sum_{m\in I_{ak},\,m\equiv s(q)}\Th(m)\) from \(P_{akr}/\Th(k)\). For a fixed interval \(I\), Parseval over residue pairs modulo \(k,q\) bounds the sum of squared errors over \(a,r\) by \[ (kq)^{-1}\sum_{\substack{j\bmod kq\\ k\nmid j}}|S_I(j/(kq))|^2. \] The distinctness of the first residues in \(a\) permits this enlargement to all residue pairs. Frequencies for all prime \(k\asymp K\) are distinct and spaced by \(\gg1/(qK^2)\), including those for which \(q\mid j\). For varying intervals decompose each into at most two binary intervals per level. At any one level sum the coefficient energies over disjoint intervals before applying Cauchy across levels. The large sieve, followed by Cauchy over \(O(AKq)\) rows and insertion of \(\Th(k)\), gives total error \[ \ll X\mathcal L^3\{A^{-1/2}+\sqrt{qK^2/X}\}. \] This saves a fixed power in the asserted range. Freeze the interval \(I_{ak}\) on \(G=\lceil\mathcal L^{D+5}\rceil\) slices per coordinate in \(a,k\), intersecting \(k\)-slices with each block \(J\). The endpoints vary by \(O(M/G)\). Summing the empirical model over all \(r\) charges disjoint residue classes, so the total boundary error is \(O(X\mathcal L/G)\), also for the reference. For a frozen interval \(I\) and a block piece \(J'\), put \[ u_s=\sum_{m\in I,\;m\equiv s(q)}\Th(m),\qquad v_t=\sum_{k\in J',\;k\equiv t(q)}\Th(k)/k. \] The mass is \(\sum_{xs-rt=-2}u_sv_t\) for \(x=a\bmod q\). For uniform \(x,r\in\mathbb F_q\), each nonzero point \((s,t)\) lies on this line with probability \(1/q\). Two noncollinear points give independent incidences, and distinct collinear points are incompatible. The origin has zero weight. Positivity therefore bounds the sum over \(x,r\) of squared deviations from \((\sum u)(\sum v)/q\) by \(q\norm u_2^2\norm v_2^2\). A slice in \(a\) repeats each \(x\) at most \(O(A/(Gq))\) times. Cauchy over \(x,r\) now costs \(O((A/G)\sqrt q\norm u_2\norm v_2)\). Here \(\norm u_2\ll M\mathcal L/\sqrt q\) and \(\norm v_2\ll\sqrt W\mathcal L/K\) since \(W0\). In each cell choose an integer \(0\le t_{ab}\le CU\). For any specified word \(\epsilon\in\{-1,1\}^F\), \[ \sum_{\Ccal}\left|\#\{n\in\Ical_{ab}(2):Y_{t_{ab}+q}(n)=\epsilon_q\ (q\in F)\} -2^{-|F|}N_{ab2}\right|=o_{F,C}(X) \] uniformly in these choices. The estimate also holds with a separate absolute value on every fibre of \[ \left(s(m),(s(L_q))_{q\in F}\right),\qquad s(x)=\prod_p p^{\lfloor v_p(x)/2\rfloor}. \] Here \(q=u_q/d_q\) is in lowest terms and \(L_q=d_q(k+t_{ab}a)+u_q a\). Use the actual fibre size in the main term and sum the errors over fibres. On a squarefree \(L_q\) the word thus supplies its true M\"obius sign, after the known factors \(\lambda(b)\lambda(d_q)\) are restored. \end{theorem} \begin{proof} Expand the word indicator in Walsh characters. For a nonempty \(S\subset F\) and a common denominator \(D\), the corresponding product, up to a cellwise sign, is \(G_a(w)=\prod_{q\in S}\lambda(w+Dqa)\) at \(w=D(k+t_{ab}a)\). In the sum over ranks replace each value by the mean of \(G_a(w+jDa)\) for \(1\le j\le J\). The total endpoint cost is \(O(JAB)\). Cauchy with respect to incidence mass reduces the desired normalised square bound to a constant times \[ \frac1{AK}\sum_{a\sim A}\sum_{c_1K\le w\le c_2K} \left|J^{-1}\sum_{j=1}^J G_a(w+jDa)\right|^2+o_J(1). \] For fixed \(a,w\) with \(D\mid w\), \(b(w/D)\equiv2\bmod a\) allows \(O(B/a)\) possible \(b\)'s since \(a\) is odd. Each \(b\) then determines the original \(k\), also when \(t_{ab}\) varies across the cells. The integrand is positive so the divisibility of \(w\) can be discarded. The constants \(c_1,c_2>0\) cover the full translated range. Expand the square. Each off-diagonal product has slopes in the nonempty symmetric difference of \(DS+Dj\) and \(DS+Dj'\), as repeated factors square to one. Matom\"aki, Radziwi\l\l, Tao, Ter\"av\"ainen and Ziegler \cite[Thm.~1.10]{higher} give cancellation after averaging the absolute \(w\)-sum over the step variable, for polynomials with nonconstant pairwise differences. Here \(A=K^{5/8}\). To fit a prefix of length \(cK\) in \(w\), write \(a=dv+r\) with fixed \(d\) large enough that \(2A/d+1\le(cK)^{5/8}\). The polynomials are \(p(dv+r)\) at the distinct slopes \(p\). The absolute value per \(v\) permits restriction to the desired dyad. Subtract two such prefix estimates. The diagonal contributes \(O(1/J)\). First take \(X\to\infty\), then \(J\to\infty\). For the fibre assertion, initially reveal only the valuations at \(p\le P\) capped at \(e\). This partitions each cell using the rank modulo \(D'=\prod_{p\le P}p^e\). Smooth by the rank shifts \(D'j\), which preserve the mask exactly. There are only finitely many masks for fixed \(P,e\), the endpoint cost is \(O_{P,e}(JAB)\), and after Cauchy the mask can be dropped. The same polynomial argument applies. To remove the cutoffs, fix \(p\le P\). A cell with \(p\nmid b\) contributes \(O(U/p^e+1)\) points with \(p^e\mid m\). Their total is \(O(X/p^e+AB)\). If \(p\mid b\) no such point exists. To bound \(p^e\mid L_q\), lift \(k'=k+t_{ab}a\) to a range of length \(O(K)\) with multiplicity \(O(B/a)\) as above. For each \(a\) its congruence permits at most \((d_q,p^e)\le d_q\) residue classes. This gives \(O_{F,C}(X/p^e+B)\). For \(p>P>\max d_q\), summing the same bound with exponent two up to \(O_{F,C}(\sqrt K)\) costs \(O_{F,C}(X/P+B\sqrt K)\). For \(p^2\mid m\) split instead at \(Z=X^{1/40}\). The smaller primes above \(P\) cost \(O(X/P+ABZ)\) by the progression count. A larger square divides \(n\). Counting multiples gives \(O(X/Z)\) such integers, each carrying at most \(\tau(n)\tau(n+2)=X^{o(1)}\) incidences. Outside all these exceptions the exact message is a function of the truncated one. The errors change by at most twice the exceptional mass. Let \(X\to\infty\), then \(e\to\infty\) and \(P\to\infty\). \end{proof} A common test cannot have large correlations with several independent directions at once. For real \(|x_{ab}(n)|\le1\), put \(D_q(x)=\sum_{\Ccal}|\sum_{n\in\Ical_{ab}(2)}x_{ab}(n)Y_q(n)|\) and \(\mass_2=\sum_{\Ccal}N_{ab2}\). For \(c_q\ge0\), \[ \limsup_{X\to\infty}\frac{\sum_{q\in F}c_q D_q(x)}{\mass_2} \le \E\left|\sum_{q\in F}c_q\epsilon_q\right| \] for independent fair signs \(\epsilon_q\). In each cell choose a sign realising each modulus and use Theorem \ref{th:words} on the resulting linear form. The bound is attained asymptotically by \(x=\operatorname{sgn}(\sum c_qY_q)\), with any choice at zero. For \(F=\{0,q\}\), \(q>0\), the bound for equal weights is one. It leaves open the value of the single correlation at \(q=0\) with \(x=\lambda(n)\). \section{What averaging the displacement permits}\label{sec:windows} The shifts in Theorem \ref{th:main} are hidden. Here the observer knows \(h\) as well as the exact divisors \(a,b\), and the error is summed over a long interval of such shifts. Write \(\mathcal H\subset[1,2X]\) for any interval of \(H\) consecutive integers. Define \[ C_2=\prod_{p>2}\left(1-\frac1{(p-1)^2}\right),\qquad \SSer_{ab}(h)= \begin{cases} 2C_2\displaystyle\prod_{p>2,\;p\mid abh}\frac{p-1}{p-2}, &2\mid h,\ (h,ab)=1,\\ 0,&\text{otherwise}. \end{cases} \] All cell sums below range over \(n\in\Ical_{ab}(h)\), with \(m=n/a,\ k=(n+h)/b\). \begin{theorem}[Three observation ranges]\label{th:windows} The following estimates are uniform in the position of \(\mathcal H\). \begin{enumerate} \item If \(H/A\to\infty\), then, uniformly for all arrays \(|g_{ab}(k)|\le1\) common to the different shifts, \[ \sum_{h\in\mathcal H}\sum_{\Ccal} \left|\sum_{n\in\Ical_{ab}(h)}\lambda(n)g_{ab}(k)\right|=o(HX). \] In particular one may take \(g_{ab}(k)=\lambda(bk)\). The common-test estimate also holds for an interval anywhere in \(\mathbb Z\), using arrays on all integers and extending a positive-argument test by zero for \(k\le0\). \item Let \(P_{ab}(h)=\sum_{n\in\Ical_{ab}(h)}\Th(m)\Th(k)\). For \(H\ge X^{19/44+\eps}\) and every fixed \(D>0\), \[ \sum_{h\in\mathcal H}\sum_{\Ccal} \left|P_{ab}(h)-\frac{X}{ab}\SSer_{ab}(h)\right| \ll_{\eps,D}HX\mathcal L^{-D}. \] \item Let \(N^{(2,1)}_{ab}(h)\) count those incidences for which \(\Omega(m)=2\) and \(k\) is prime. If \(H\ge X^{1/4+\eps}\) and \(b_X=(\log\log M)/(\log M\log K)\), then \[ \sum_{h\in\mathcal H}\sum_{\Ccal} \left|N^{(2,1)}_{ab}(h)-\frac{X}{ab}\SSer_{ab}(h)b_X\right| =o_\eps(HX b_X). \] Prime squares are included. On inadmissible triples the reference is zero, and genuine atypical points can occur in this last population. \end{enumerate} \end{theorem} The proof is in Appendices \ref{app:transfer} and \ref{app:primes}. Its structure is easiest to see by fixing a residue of \(h\bmod a\). A change \(h\mapsto h+a\ell\) keeps the admissible class of \(k\) the same. For a fixed \(k\), it translates \(m\) by \(-\ell\). Cauchy--Schwarz then removes the common second-site test, leaving an autocorrelation at the first cofactor. The result of Matom\"aki, Radziwi\l\l\ and Tao \cite[Thm.~1.3(i)]{long} supplies the prime autocorrelation for lengths at least \(M^{8/33+\delta}\). Requiring \(H/a\) to contain that many translates gives \(1/4+(3/4)(8/33)=19/44\). For the typical semiprime weight, Evans \cite[Props.~9.1--9.2]{evans} supplies the input for any fixed positive power of \(M\). The smaller range in the third assertion reflects this difference in the inputs. Taking absolute values before summing over the observed divisor labels is the additional step here. \paragraph{The common-test condition.} If \(H/A\) stays bounded along a subsequence, choose \(H_0=\min(H,\lfloor A\rfloor)\) consecutive shifts in \(\mathcal H\). For each \(a,b,k\) there is at most one of them, say \(h_0\), with \(bk\equiv h_0\bmod a\). Give \(g_{ab}(k)\) the value \(\lambda(bk-h_0)\) when \(XP}O(p^{-2})+o(1)\). For the pair \(b,h\) with a shifted interval one may use \(O((B/p)(H/p+1))\) and sum the last term as \(O(B\log X)\). On admissible triples \(\log m=\log M+O(1)\), \(\log k=\log K+O(1)\) for primes in the box, giving the unweighted prime-pair equivalent with \(\SSer_{ab}(h)X/(ab\log M\log K)\). \paragraph{Which sign remains hidden?} At polylogarithmic \(H\), Corollary \ref{cor:ent} constructs the sign of the decoded origin below the single-guess threshold. It uses the factorisations of candidate origins and there is no assumption that this test is multiplicative. Above the threshold, failure to find the exact \(h\) leaves open prediction of the one-bit target \(\lambda(v-h)\). At fixed shift two, Theorem \ref{th:words} balances signs at the second site, even on square-divisor fibres. Cancellation of \(\lambda(n)\lambda(n+2)\) in the exact divisor cells remains open, as does the prime-pair asymptotic in those same cells at that prescribed shift. \appendix \section{From cofactor translations to exact divisor cells}\label{app:transfer} We give the dispersion argument for all three claims of Theorem \ref{th:windows}. It is useful to keep two lengths separate. A rank within a fixed cell has about \(U\) possible values. The comparison of shifts in the same residue class uses up to \(H/a\) distinct translates. Write \(\mathcal L=\log X\) and use the scales and primitive label set \(\Ccal\) of Section~\ref{sec:exp}. For an interval \(\mathcal H\) of \(H\) consecutive integers put \[ D_f=\sum_{(a,b)\in\Ccal}\sum_{h\in\mathcal H} \left|\sum_{\substack{am+h=bk\\XX^{3/20}\), Parseval on the full set of residues and the same sieve give \(\sum_{b,t}|S_b(t)|^2\ll (M+P^2)M/P\). Apply \eqref{eq:weight} and divide by \(HX=B\mu_0 M\). The cost is at most \[ O\!\left( [1+(\mu_0^{-1/2}+A/(\sqrt B\mu_0))\mathcal L^3] [P^{-1/2}+\sqrt{P/M}]\right). \] For \(H\ge A\), the first bracket is \(O(X^{1/20}\mathcal L^3)\) and the second is \(O(X^{-3/40})\) up to \(2B\). All these large-denominator slices together cost \(O(X^{-1/40}\mathcal L^4)\) per band. For \(d\le V\) retain absolute values of individual Fourier coefficients. On each band the frozen interval \(I\) is independent of \(\ell\). For each fraction \(j/d\) the defining bound for \(\rho\) therefore applies before summing over fractions. After the \(b\)-sum a denominator \(d\) has weight \(O(1/d)\), and there are at most \(d\) fractions. The contribution per band, averaged in \(\ell\), is \(O(V\rho)\). For \(V0, \label{eq:gram} \end{equation} then for any \(\sum_m|v_m|^2\le Y\) the sum \(\sum_{\ell\le J}|\sum_m v_m F(m+\ell)|\) is \(O_E(JY\mathcal L^{-E})\) when \(J\) grows as a positive power of \(X\). Choose a unit phase for each \(\ell\) and apply Cauchy in \(m\) to bound the square by \[ YJ\left(\norm F_2^2+2\sum_{t=1}^{J-1}\left|\sum_mF(m)F(m+t)\right|\right). \] The same holds for negative translates. Taking \(v_m\) proportional to \(F(m)e(m\alpha)\one_I(m)\) gives \(\rho\) with any logarithmic saving. Thus \eqref{eq:gram} is the only first-site correlation input required for the two prime-counting applications. \section{Prime and semiprime correlation inputs}\label{app:primes} On each of the two dyads \(Y0\), \begin{equation} \sum_{q\le Q_*}\frac{\tau(q)}q \sum_{u\bmod q}^{*}\sup_{I}|E_q(I,u)| \ll_D K\mathcal L^{-D}. \label{eq:weightedbdh} \end{equation} \end{lemma} \begin{proof} On one dyad \(Q\mathcal L^C\), where \(C>D+7\). Their weighted contribution is \(O(K\mathcal L^{4-C})\). Indeed, \(\sum_u^*\sup_I |E_q(I,u)|\ll K\mathcal L\) by summing all positive prime masses and the length bounds over the classes, and \(\sum_{q\sim Q}\tau(q)^2/q\ll\mathcal L^3\). For the remaining moduli take a grid of spacing \(K\mathcal L^{-P}\), with \(P>C+D+6\). For one prefix endpoint \(z\asymp K\) let \(E_q(z,u)\) denote the prime sum up to \(z\) minus \(z/\varphi(q)\). Barban--Davenport--Halberstam \cite[Ch.~29]{davenport} at upper level \(K\mathcal L^{-B_0}\) gives \[ \sum_{q\le Q_*}\sum_u^* |E_q(z,u)|^2\ll_E K^2\mathcal L^{-E} \] for any prescribed \(E>0\), choosing \(B_0\) sufficiently large. The enlarged level exceeds \(Q_*\) for large \(X\). Replacing the von Mangoldt weight by \(\Th\) costs \(O(Q_*K\mathcal L^4)\) in the squared norm, since the prime-power mass in one prefix is \(O(\sqrt K\,\mathcal L^2)\). By Cauchy--Schwarz and \(\sum_{q\sim Q}\varphi(q)/q^2\ll1\), a grid endpoint costs \(O_E(K\mathcal L^{-E/2})\) with weight \(1/q\). Multiplying by \(\mathcal L^C\) and summing over the \(O(\mathcal L^P)\) endpoints covers both ends of every interval. In a segment of length \(K\mathcal L^{-P}\) each class contains at most \(1+K/(q\mathcal L^P)\) integers. Rounding the two endpoints thus costs, over the whole dyad with its weights, at most \[ \ll \mathcal L^C\{Q\mathcal L+K\mathcal L^{1-P}\}. \] Here \(Q_*\ll K X^{-1/10}\). Sum the estimates over \(O(\mathcal L)\) dyads, with \(q=1\) included in the first, and take \(E>2(C+P+D+3)\). This proves \eqref{eq:weightedbdh}. \end{proof} \paragraph{Computing the reference at a prescribed shift.} Fix \(h\in[1,2X]\) even, and restrict to \((ab,h)=1\). If \(\ell_{a,Y}\) is the length of \((X,2X]\cap(aY,2aY]\), we claim \begin{equation} \sum_{\substack{\Ccal\\(ab,h)=1}}\left| \sum_{\substack{n\in\Ical_{ab}(h)\\m\sim Y}}G_R(m)\Th(k) -\frac{\ell_{a,Y}}{ab}\SSer_{ab}(h)\right| \ll_D X\mathcal L^{-D}, \label{eq:fixedmodel} \end{equation} uniformly in \(h\). For \(d\le D_0=X^{1/20}\) squarefree, the condition \(d\mid m\) is empty if \((d,bh)>1\). Indeed \(p\mid(d,b)\) would divide \(h\), and \(p\mid(d,h)\) with \(p\nmid b\) would divide the prime \(k>D_0\). Otherwise \(k\equiv h\bar b\bmod ad\) is a reduced class in an interval of length \(\ell_{a,Y}/b\) in \([K/3,5K]\). Its expected prime mass is \(\ell_{a,Y}g(d)/(b\varphi(a))\) for multiplicative \(g\) on squarefree integers, where \[ g(p)=0\quad(p\mid bh),\qquad g(p)=1/p\quad(p\mid a),\qquad g(p)=1/(p-1)\quad(p\nmid abh). \] Group these prime errors by \(q=ad\le Q_*\). There are at most \(\tau(q)\) ways to write \(q=ad\). For each representation, \((b,q)=(h,q)=1\), so the map \(b\mapsto h\bar b\bmod q\) permutes the reduced classes. Each class occurs \(O(1+B/q)=O(B/q)\) times on the \(b\)-dyad. The interval may depend on \(b\), which accounts for the supremum inside the sum in \eqref{eq:weightedbdh}. Multiplying that bound by \(O(B)\) gives \(O_E(BK\mathcal L^{-E})=O_E(X\mathcal L^{-E})\) for the sum of all absolute remainders. Apply the upper and lower fundamental lemma of the sieve \cite[Chs.~6, 11]{fi} at level \(D_0\), with \(s=\log D_0/\log R\gg\mathcal L^{9/10}\). Its dimension-one condition follows uniformly from \(g(2)=0\) and \(g(p)\le1/(p-1)\) for \(p>2\). After multiplication by \(W_R/\varphi(W_R)\) the local factor is \(1-(p-1)^{-2}\) for \(p\nmid abh\), and \(p/(p-1)\) for \(p\mid abh\), including the factor \(a/\varphi(a)\) in the reference. Completing the tail changes the product by a factor \(1+O(\mathcal L/R)\), by summing \(\sum_{p\ge R}p^{-2}\) and the \(O(\mathcal L)\) prime divisors of \(abh\). This gives \eqref{eq:fixedmodel}. \paragraph{A true prime at the first site.} For \(\ell\ne0\) define \[ S_R(\ell)=\prod_{p2A\), and one of \(b,h\) would divide \(m>2B\). On the other triples \eqref{eq:fixedmodel} evaluates the reference. Since \(\sum_Y\ell_{a,Y}=X\), this proves part 2. \paragraph{A typical semiprime and its small factor.} Put \(u=(\log\log Y)^{-1/2}\), \(P_1=\exp((\log Y)^u)\), \(P_2=\exp((\log Y)^{1-u})\) and \(c_Y=\sum_{P_1\le p\le P_2}1/p\sim\log\log Y\). Let \(w(n)=\log r\) on \(n=pr\sim Y\) with \(p,r\) prime and \(P_1\le p\le P_2\), and zero elsewhere. Such a factorisation is unique for large \(Y\). For \(J\asymp Y^\delta\), \(0<\delta<1/4\) fixed, Evans's estimates imply \begin{equation} J^{-1}\sum_{1\le\ell\le J} \left|\sum_n w(n)w(n+\ell)-Yc_Y^2\SSer(\ell)\right| \ll_{\delta,E}Y\mathcal L^{-E}. \label{eq:evans} \end{equation} For clarity, the input is the logarithmically weighted circle-method estimate in \cite[\S9, Props.~9.1 and 9.2]{evans}. Its (9.1) permits this choice of \(u\), and the lengths satisfy \(P_2(\log Y)^D\le J\) for every fixed \(D\), as well as \(J\ge\exp((\log Y)^{1-\epsilon_0})\) for each fixed \(\epsilon_0>0\). Proposition~9.1 bounds the minor-arc energy on each interval of length \(1/J\) by \(Y(\log Y)^{-B}\). The circle-method Bessel bound \cite[Prop.~3.1]{long} and \(\sum w^2\ll Y\mathcal L^2\) then bound the mean absolute minor-arc coefficient by \(O_E(Y\mathcal L^{-E})\) upon increasing \(B\). Proposition~9.2 gives the stated main term on the major arcs except for \(O(JQ_0^{-1/3})\) shifts, where \(Q_0\) is an arbitrarily large fixed power of \(\log Y\). Their trivial contribution is absorbed. This proves \eqref{eq:evans} with the accuracy used in \eqref{eq:transfer}. Each mixed correlation of \(w\) and \(G_R\) equals \(Yc_Y\SSer(\ell)+O_E(Y\mathcal L^{-E})\), for these same \(\ell\). For even \(\ell\), fix the smaller factor \(p\), write \(n=pr\) and sieve \(pr+\ell\) with \(r\) prime on a dyad of length \(\asymp Y/p=Y^{1-o(1)}\). The \(p\mid\ell\) and their main terms have total size \(O(Y\mathcal L^{O(1)}/P_1)\). For the other \(p\), a sieving prime dividing \(p\ell\) excludes no reduced residue of \(r\), and each other sieving prime excludes one. Bombieri--Vinogradov is applicable at \(Y^{1/8}\) uniformly in \(p\), with errors \(O_E((Y/p)\mathcal L^{-E})\). Summing these costs loses only \(c_Y\). Relative to \(S_R(\ell)\) the factor at \(p1\) there are no typical solutions. If \((b,h)>1\) in a typical solution, some \(p\mid(b,h)\) exceeds \(P_1/2\) because \(p\mid m\). The number of such incidences is \(\ll \sum_{P_1/22,\,p\mid v}(1+1/(p-2))\). Its mean on either dyad, or on \(\mathcal H\) of polynomial length, is bounded by expansion in squarefree divisors. The endpoint error on the shifted interval is \(O(\prod_{21\). With \(e(x)=e^{2\pi i x}\), put \[ \Delta=(\log\log S)^{5/2}\prod_{\substack{p\mid P\\p