% Hexagon source adaptation of the published Zenodo edition. % Changes are limited to packaging, bibliography rendering, navigation and archive links. % Mathematical formulas and their order are preserved; see the local integrity record. \PassOptionsToPackage{expansion=false,nopatch=footnote}{microtype} \documentclass[11pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{lmodern,microtype,amsmath,amssymb,amsthm,mathtools} \usepackage[a4paper,margin=25mm,headheight=14pt]{geometry} \usepackage{booktabs,array,longtable,enumitem,needspace,placeins} \usepackage[numbers,sort&compress]{natbib} \usepackage{hyperref} % Printed contents remain at section level; electronic navigation includes subsections. \hypersetup{bookmarksdepth=2,bookmarksopen=false} % Original source: archive_link.tex % Local companion link only: no verified persistent public URL is available. % Before publication, replace the target below with the verified URL for THIS edition. % Do not use the DOI or repository of another paper. The archive is delivered % alongside the PDF; after extraction the PDF is copied to the package root. \newcommand{\SourceArchiveTarget}{https://doi.org/10.5281/zenodo.23317860} % Compact section entries only in the printed contents (proof typography is unchanged). \makeatletter \newcommand{\CompactContents}{% \begingroup \small\setlength{\parskip}{0pt}% \renewcommand*\l@section[2]{\@dottedtocline{1}{0em}{1.8em}{##1}{##2}}% \tableofcontents \endgroup} \makeatother % Link DOI identifiers without changing their bibliographical content. \providecommand{\doi}[1]{\href{https://doi.org/#1}{doi:\nolinkurl{#1}}} \hypersetup{hidelinks,pdftitle={Arithmetic reconstruction and error recovery from three quadratic traces},pdfauthor={Brice Pouly},pdfsubject={Completely multiplicative signs, arithmetic reconstruction and error recovery}} \setlength{\emergencystretch}{1.5em} \setlength{\parskip}{2pt} \setcounter{tocdepth}{1} \numberwithin{equation}{section} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{remark}[theorem]{Remark} \newcommand{\N}{\mathbb N} \newcommand{\F}{\mathbb F_2} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\T}{\mathbb T} \newcommand{\M}{\mathcal M^{\pm}} \newcommand{\Dset}{\mathcal D} \newcommand{\PN}{\mathcal P_N} \newcommand{\BN}{\mathcal B_N} \newcommand{\CN}{\mathcal C_N} \newcommand{\E}{\mathbb E} \newcommand{\Prob}{\mathbb P} \newcommand{\ind}{\mathbf 1} \newcommand{\core}{\operatorname{core}} \newcommand{\rank}{\operatorname{rank}} \newcommand{\wt}{\operatorname{wt}} \newcommand{\dist}{\operatorname{dist}} \newcommand{\TV}{d_{\mathrm{TV}}} \newcommand{\lcm}{\operatorname{lcm}} \newcommand{\sgn}{\operatorname{sgn}} \newcommand{\sat}{\operatorname{sat}} \newcommand{\bl}{\operatorname{bl}} \newcommand{\phic}{\Phi_c} \newcommand{\ep}{\varepsilon} \DeclareMathOperator{\Bin}{Bin} \title{Arithmetic reconstruction and error recovery\\from three quadratic traces} \author{Brice Pouly\thanks{Research and manuscript preparation assisted by GPT-6 Astra. Details of the assistance and the scope of the computational checks appear at the end of the article.}} \date{} \usepackage{bookmark} \AddToHook{begindocument/end}[HXbibheading]{\renewcommand{\bibsection}{\section*{\refname}\phantomsection\addcontentsline{toc}{section}{References}}} \begin{document} \maketitle \begin{abstract} We study completely multiplicative sign functions $h$ through their values at positive integers of the forms $n^2+1$, $n^2+2$ and $n^2-2$, with observed indices $1\le n\le N$. First occurrences of prime factors give a canonical information set and a complete, prefix-compatible family of parity relations, each involving at most $\lfloor\log_2N\rfloor+3$ readings. These relations yield exact bounded-distance repair, including corrupted information coordinates, in time $N^{O(1)}(4+\lfloor\log_2N\rfloor)^t$ for $t$ errors; erasures enter through an explicit rank parameter. We then construct arithmetic redundancy without estimating a quadratic regulator. If $h(p)=-1$ and $K=\log N/\log\max(3,p)$, the three traces contain at least $\exp(\exp(c\log K/\log\log K))$ negative readings for every fixed $00\}. \end{equation} It has $3N-1$ elements. Labels remain distinct when their integer values coincide; this convention matters both for an adversarial error budget and for independent reading noise. The observation of $h$ is the word $(h(Q_i))_{i\in I_N}$, and the set of all such words is $\CN$. Three different tasks arise. A \emph{recognition} procedure decides whether a proposed word belongs to $\CN$. A \emph{repair} procedure finds a nearby member of $\CN$. A \emph{recovery} procedure determines a value of the source that actually produced the observations. The first two tasks do not imply the third: several genuine sources may lie within the declared error budget. \subsection{A calculation that produces redundancy} There is a useful way to repeat information without reading the same label twice. From \[ 7^2+1=2\cdot5^2 \] we obtain the three identities \begin{align*} (8^2+1)(57^2+1)&=2\cdot325^2,\\ (9^2+1)(32^2+1)&=2\cdot205^2,\\ (12^2+1)(17^2+1)&=2\cdot145^2. \end{align*} For every $h\in\M$, the product of the two readings in any row is $h(2)$. The six labels are distinct, so $h(2)=-1$ forces three negative and three positive readings. Majority vote among the three products recovers $h(2)$ after one incorrect reading. No small-prime signs have been supplied to the observer, and the central reading at $7$ is not used by these three certificates. The general identity behind this calculation is \begin{equation}\label{eq:intro-identity} \begin{gathered} m^2-d=D u^2,\qquad ab=D u^2,\qquad x=m+a,\quad y=m+b,\\ Q_d(x)Q_d(y)=D\,[u(x+y)]^2. \end{gathered} \end{equation} Counting divisors alone is not enough: the resulting indices must fit below $N$, and different certificates must not repeatedly use the same readings. Balanced divisors will pay both costs. Before applying this identity, however, we need a way to express an arbitrary target prime through suitable values $D$. \subsection{Exact presentation and bounded-distance repair} The choice of three curves ensures that every prime is encountered. For an odd prime $q$, the product of the Legendre symbols of $-1$, $-2$ and $2$ is $(4/q)=1$, so at least one of the three quadratics has a root modulo $q$. The values $2$ and $3$ are already read at index one. Lemma~\ref{lem:pivot} turns this coverage into a positive reading with a smaller cofactor. Let $\PN$ be the primes dividing at least one value in \eqref{eq:labels}. For each prime $q$, select the first positive quadratic reading divisible by $q$. These \emph{pivots} form a canonical information set. Their arithmetic, rather than a generic elimination procedure, controls the size of the relations. \begin{theorem}[Complete short presentation]\label{thm:intro-presentation} For $N\ge2$, there is a prefix-compatible collection of $3N-1-|\PN|$ independent square-product relations on $I_N$, each involving at most \[ \ell_N=\lfloor\log_2N\rfloor+3 \] labels. A sign word belongs to $\CN$ if and only if it satisfies these relations. Its pivot values determine all relevant prime signs uniquely. In particular, the noiseless observations determine $h(m)$ for every $m\le2N+1$. \end{theorem} The construction and proof occupy Section~\ref{sec:presentation}. The result is more than injectivity of the infinite observation: it supplies all constraints in the original finite prefix. As a consequence, one can repair data without assuming that any of the information coordinates are trustworthy. \begin{theorem}[Exact repair]\label{thm:intro-repair} Given a word on $I_N$, a nonnegative integer $t$, and prescribed signs on any subset of $\PN$, one can decide whether a compatible source differs from the word at at most $t$ labels in time \begin{equation}\label{eq:intro-repair} N^{O(1)}(1+\ell_N)^t. \end{equation} A positive answer supplies a source and its corrections; a negative answer supplies a verifiable finite search tree. With erasures, replace $\ell_N$ in \eqref{eq:intro-repair} by $(r+1)\ell_N$, where $r$ is the rank of the erased pivot columns after the equations belonging to erased non-pivots have been removed. \end{theorem} Here polynomial time means polynomial in the numerical length $N$ of the supplied table. Factoring the observed integers, each at most $N^2+2$, is included in this bound. The error parameter concerns readings, not negative prime signs. Section~\ref{sec:repair} also decides which prime signs are forced and when the correct answer is ambiguity. \subsection{A uniform lower bound for an unrestricted source} To quantify the distinction between injectivity and stability, set \begin{equation}\label{eq:minimum} E_N(h)=\sum_{i\in I_N}\ind_{h(Q_i)=-1},\qquad m_p(N)=\min_{\substack{h\in\M\\h(p)=-1}}E_N(h). \end{equation} All prime signs other than $h(p)$ are free, and the minimising function may change with $N$. For $K>e$ and $c>0$, write \begin{equation}\label{eq:Phi} \Phi_c(K)=\exp\!\left(\exp\!\left(c\frac{\log K}{\log\log K}\right)\right). \end{equation} Unless a base is displayed, logarithms are natural. \Needspace{12\baselineskip} \begin{theorem}[Uniform separation on a terminal range]\label{thm:main} Fix $\alpha<1$ and $02n$, outside the initial exceptional terms. Their Theorem~5.1 also gives the large-factor counting input used in Section~\ref{sec:information}; Lemma~\ref{lem:largecount} is a specialisation, with its logarithmic-mass proof included. The extra property in Theorem~\ref{thm:presentation} is a \emph{complete} independent presentation of the three-trace prefix, compatible with enlargement and with logarithmic row width. First appearances alone do not state that conclusion. Pell repetition of a represented square class already appears in the study of multiplicative signs. Borwein, Choi and Ganguli~\cite[Theorem 2.2]{BCG} show how a solution of a quadratic equation $F(n)=\ell m^2$ generates infinitely many positive solutions under their hypotheses. This is an arithmetic mechanism, and so repeats the value of any completely multiplicative sign function, not only Liouville. Our use in Section~\ref{sec:replication} starts from a pivot whose own explicit unit gives a uniform height bound; Section~\ref{sec:amplification} adds enough internally disjoint pairs to obtain Theorem~\ref{thm:main}. For the particular source $\lambda$, Srinivasan~\cite[Theorem 1.3]{Srinivasan} proves infinitely many sign changes on $n^2+d$ for every nonzero integer $d$. Theorem~\ref{thm:main} instead concerns the minimum over all sources with only $h(p)=-1$ prescribed, including sources and target primes varying with $N$. Thus the issue is uniform quantitative separation, not the first qualitative occurrence of both Liouville signs. A nearby but different use of square-product equations is the work of de la Bret\`eche, Wang and Xu~\cite{dBWX}: their counts yield limit laws for random multiplicative functions. Here the source is arbitrary, the separation theorem is deterministic, and in Section~\ref{sec:noise} randomness enters only through reading errors. Systematic parity checks and distance-based error correction belong to classical coding theory~\cite{Hamming}; bounded branching on a violated constraint and repetition voting are standard operations. The concentration estimate is Hoeffding's~\cite{Hoeffding}, with its required specialisation proved below. These operations consume the short arithmetic presentation and the height-controlled repetitions; they do not supply them. The norm equations use Lagrange's theorem and, only in the direct prime-class route, the analytic class number formula; see Conrad~\cite{ConradPell} and Sutherland~\cite{Sutherland}. The primitive-divisor input is \cite[Theorem 1.4]{BHV}; the real-pair result of Carmichael--Ward, recorded there as Theorem~A, already suffices. We keep the conservative threshold thirty throughout. The gcd refinement in the compact construction lies in the classical subject studied by Bernstein~\cite{Bernstein}; no complexity bound from that paper is imported. The two central arithmetic statements are the complete short presentation in the original prefix and the regulator-free amplification uniform in the target prime. Certified repair, noisy recovery and the information bounds describe consequences and limitations of this structure. They are not claims to a general nearest-codeword algorithm or to a positive-rate code for all multiplicative sources. The appendices are complementary, not inputs to Theorem~\ref{thm:main}. Appendix~\ref{app:elimination} eliminates the largest factors exactly before localising the remaining conflict. Appendix~\ref{app:harmonic} uses smooth quadratic values in fixed progressions, through \cite[Definition 2.8 and Proposition 2.10]{Teravainen}, to obtain linear bounds for mobile sources under a local harmonic budget. Its relation to the fixed-source pretentious theorem~\cite[Theorem 2.9]{Teravainen} is explained there, with admissibility retained. Appendices~\ref{app:models}--\ref{app:characters} give controlled prime-complexity and moving-character classes, using the stated Kubilius input of Gorodetsky~\cite[Theorem 2.3]{Gorodetsky} and a mixed Weil bound~\cite[Lemma 3.1]{MSW}. None of these structural assumptions is inferred from a small unrestricted error count. \paragraph{Reading routes.} For exact reconstruction, follow Sections~\ref{sec:presentation}--\ref{sec:repair}. The uniform separation proof runs from Section~\ref{sec:replication} to Section~\ref{sec:amplification}; Section~\ref{sec:direct} instead fixes the trace from the target prime. For noisy observations, Section~\ref{sec:compact} supplies compact access and Sections~\ref{sec:noise}--\ref{sec:information} compare recovery with hidden information. % Original source: 02_presentation.tex \section{A complete arithmetic presentation}\label{sec:presentation} The first task is to expose every prime sign using readings that are already in the supplied prefix. A root modulo a prime gives a small cofactor; ordering these roots by their first occurrence makes the resulting reconstruction triangular. \subsection{First occurrences introduce one prime at a time} For a prime $q$, let $\nu(q)$ be the least positive index at which $q$ divides a positive $Q_d(n)$. Let $b(q)$ denote the corresponding label, called the pivot of $q$. The exceptional initial pivots are \[ b(2)=(1,-1),\qquad b(3)=(1,-2). \] We write $D_q=Q_{b(q)}=q c_q$, so that $c_2=c_3=1$. The relation between first appearances of a prime in a quadratic sequence and a centred root is classical; see \cite[Lemma 4.1 and Proposition 4.2]{ESTW} for a single sequence $n^2+\beta$ outside its initial exceptions. The following three-trace formulation also tracks when the cofactor primes have appeared, which is needed for a presentation contained in the same finite prefix. \begin{lemma}[Small cofactors at first occurrence]\label{lem:pivot} Every prime has a pivot. For $q\ge5$, its type is unique, and \begin{equation}\label{eq:pivot} 2\nu(q)1$, the descent gives \begin{equation}\label{eq:short} |B(a)|\le\lfloor\log_4 a_0\rfloor+2, \qquad a_0\prod_{j\in B(a)}Q_j\text{ is a square}. \end{equation} For $a_0=1$, take $B(a)=\varnothing$. In particular, for a prime $p\in\PN$, \begin{equation}\label{eq:prime-cert} \prod_{j\in B(p)}Q_j=pz_p^2, \qquad s_p:=|B(p)|\le\min(\lfloor\log_4p\rfloor+2,\lfloor\log_2p\rfloor), \end{equation} with an integer $z_p\ge1$. \end{proposition} \begin{proof} Every step in \eqref{eq:descent} multiplies the current square class by the class of $D_q=qc_q$ and cancels its largest prime coordinate. The alternative bound $|B(a)|\le\lfloor\log_2\core(a)\rfloor$ follows by induction from \eqref{eq:quarter}: the terminal values $1,2,3,6$ require $0,1,1,2$ steps, respectively, each at most its binary logarithm. After $k>0$ steps with $q\ge5$, the remaining positive integer is less than $a_0/4^k$. Thus there are at most $\lfloor\log_4a_0\rfloor$ such steps. At most two terminal steps remove the primes $2$ and $3$. At termination the square class is trivial. For a prime target, the product in \eqref{eq:prime-cert} has the parity vector of $p$; division by $p$ therefore leaves a positive integer square. \end{proof} The reduction by a factor greater than four explains the logarithmic relation length. Its use of square classes is specific to signs; it must not be substituted without change into a statement about arbitrary complex phases. \begin{remark}[Noiseless recovery beyond the index range]\label{rem:exact-prefix} Every prime $p\le2N+1$ has its pivot in $I_N$, so \eqref{eq:triangular} determines every $h(m)$ with $m\le2N+1$. More generally, for a completely multiplicative function valued in an abelian group, each integer $a\ge2$ has a rational identity \[ a=\prod_{d,r}(r^2-d)^{e_{d,r}},\qquad \sum_{d,r}|e_{d,r}|\le\lfloor\log_2a\rfloor, \quad r\le\lfloor a/2\rfloor. \] Indeed, use $p=D_p/c_p$ at a prime and concatenate already constructed identities for the prime factors of $c_p$; the cost is at most $1+\log_2c_p<\log_2p$. Products handle composite $a$, while $2$ and $3$ have one-term identities. Thus the three infinite traces determine such a source as well. The observations used for a prefix of index $N$ can be integers of size $N^2+2$; this is not recovery from smaller integer arguments. \end{remark} \subsection{All relations, inside the original prefix} For a non-pivot label $i\in I_N\setminus\BN$, put \begin{equation}\label{eq:check} C_i=\{i\}\cup B(Q_i). \end{equation} The union is disjoint. Its other labels are pivots occurring strictly before $i$: a prime dividing $Q_i$ either already appeared or would make $i$ its pivot; subsequent cofactor descent goes backwards again. The product over $C_i$ is a square. \begin{theorem}[Canonical parity presentation]\label{thm:presentation} For $N\ge2$, the sets $C_i$ satisfy \begin{equation}\label{eq:width} |C_i|\le\lfloor\log_4(N^2+2)\rfloor+3 =\lfloor\log_2N\rfloor+3=\ell_N. \end{equation} A word $w\in\{\pm1\}^{I_N}$ is realised by a source if and only if \begin{equation}\label{eq:allchecks} \prod_{j\in C_i}w_j=1\qquad(i\in I_N\setminus\BN). \end{equation} These $3N-1-|\PN|$ relations are independent and generate all parity relations among the readings. They are unchanged when the prefix is enlarged. \end{theorem} \begin{proof} Proposition~\ref{prop:short} gives the inequality in \eqref{eq:width}. To check the equality of integer parts, write $2^k\le N<2^{k+1}$. Then $4^k\le N^2+2<4^{k+1}$, since $N\le2^{k+1}-1$ and $N\ge2$. Every genuine word satisfies the square-product identities. Conversely, preserve the proposed pivot signs and reconstruct prime signs using \eqref{eq:triangular}. This gives a genuine source, after any assignment outside $\PN$. Equation~\eqref{eq:allchecks} forces each non-pivot value to equal the value of that source. Every check contains its own non-pivot and no other non-pivot, so the checks are independent. The valuation matrix has rank $|\PN|$ because of its pivot submatrix; hence its relation space has dimension $3N-1-|\PN|$. Independence with this cardinality proves completeness. First occurrences and the deterministic descent do not depend on a later horizon, proving prefix compatibility. \end{proof} In bits, with $1$ representing a negative sign and the pivots placed first, the matrix of these checks is \begin{equation}\label{eq:systematic} H_N=(A_N\mid I),\qquad \CN=\ker H_N. \end{equation} An abstract information set gives a systematic matrix, but does not by itself give the arithmetic width bound \eqref{eq:width}. Conversely, a short row bound says nothing about how many rows contain a small-prime pivot. \begin{example}[A relation crossing two traces]\label{ex:quartet} The four labelled values \[ Q_{-1}(5)=2\cdot13,\quad Q_2(12)=2\cdot71,\quad Q_{-1}(86)=13\cdot569,\quad Q_2(201)=71\cdot569 \] have product $1\,050\,374^2$. Their four signs must therefore multiply to $+1$. This example illustrates what a relation tests: the repeated prime factors disappear, even though no individual reading reveals all its prime signs. It does not show that four-reading checks generate every relation at every horizon; Theorem~\ref{thm:presentation} supplies the complete family with its logarithmic bound. \end{example} \subsection{Prescribed prime values, and a repair with fixed pivots} To prescribe $h(q)=\kappa(q)$ for $q\in S\subseteq\PN$, add \begin{equation}\label{eq:primeconstraints} \prod_{j\in B(q)}w_j=\kappa(q). \end{equation} These rows have weight at most $\ell_N-1$ and use only pivots. Primes prescribed outside $\PN$ can simply be assigned after reconstruction; processing an explicit list of them has its own input-length cost. A useful consequence is an exact local-to-global assertion: if every set of at most $\ell_N$ labels is separately realisable by a source satisfying $\kappa$, then the whole word is realisable by one such source. Apply this assumption to each support in \eqref{eq:allchecks} and \eqref{eq:primeconstraints}, then use completeness. The small sets may contain widely separated indices. This is not a statement about short consecutive windows. For an arbitrary word, preserve all pivots, reconstruct the source, and call its full word $\widehat w$. If $V_N(w)$ is the number of violated checks in \eqref{eq:allchecks}, then \begin{equation}\label{eq:systematicrepair} d_H(w,\widehat w)=V_N(w),\qquad \dist_H(w,\CN)\le V_N(w). \end{equation} Each check determines exactly its own non-pivot value. Thus this repair is optimal among words preserving the pivots, but need not be globally nearest. If a word is at distance at least $\ep|I_N|$ from $\CN$, a uniformly chosen check rejects it with probability at least $\ep$ and uses at most $\ell_N$ readings. If there are no checks, there are no words at positive distance. This is a consistency test; it does not lower-bound the distance of every source with $h(p)=-1$ from the constant word. % Original source: 03_repair.tex \section{Repair without trusting the pivots}\label{sec:repair} The fixed-pivot repair can magnify an error in a heavily used pivot into many altered non-pivot readings. To find a nearest source, one must allow those pivots to change. The complete short presentation makes an exact search possible without guessing every relevant prime sign. \subsection{Branching on a violated relation} Add any prime constraints \eqref{eq:primeconstraints} to the systematic matrix and write the resulting affine system as \[ Hx=b. \] It has $O(N)$ rows and columns, with row weight at most $\ell_N$. For the received bit word $w$, let $s=Hw+b$. A correction is a vector $e$ satisfying \begin{equation}\label{eq:syndrome} He=s,\qquad \wt(e)\le t. \end{equation} Here $e$ records incorrect readings, not negative prime signs. Maintain a set $F$ of coordinates already chosen for correction and the current syndrome $s+H\ind_F$. If it vanishes, return this correction. Otherwise select a violated row with support $R$. If the remaining budget is zero, or $R\setminus F$ is empty, close this branch. In every other case, branch over all $i\in R\setminus F$, replacing $F$ by $F\cup\{i\}$ and updating the entire syndrome. \begin{proposition}[Exact bounded-radius decision]\label{prop:search} This search decides \eqref{eq:syndrome} and visits at most \begin{equation}\label{eq:searchnodes} \sum_{j=0}^t\ell_N^j\le(1+\ell_N)^t \end{equation} nodes. A successful leaf determines a genuine source satisfying the prescribed prime values. \end{proposition} \begin{proof} Suppose a solution support $F_*$ exists. Follow a branch with $F\subseteq F_*$. On a violated row, the remaining set $F_*\setminus F$ must have odd intersection with $R$, and in particular contains an element of $R\setminus F$. The search explores that choice. In at most $|F_*|$ steps this branch reaches a zero syndrome. Thus failure on every branch proves nonexistence. A zero syndrome means that $w+\ind_F$ satisfies the complete affine presentation, so the triangular reconstruction produces the claimed source. The depth and branching bound give \eqref{eq:searchnodes}. \end{proof} All equations must be updated at each step: an equation previously satisfied can become false. The search is not a relaxation to an ordinary hitting-set problem. Its branching principle is classical; arithmetic completeness supplies a valid constraint of width $O(\log N)$ whenever the current word is inconsistent. The work per node and the preparation of the arithmetic matrix are polynomial in $N$. Successively trying radii $0,1,\ldots,t_*$ finds an optimum at a further factor at most $t_*+1$. The parameterised statement can also be written \[ N^{O(1)}(1+\ell_N)^t \le 2^{O(t\log(t+2))}N^{O(1)}. \] Indeed, $1+\ell_N\le8\log(2N)$ and $x^te^{-x}\le(t/e)^t$ give, for $t\ge1$, \[ (1+\ell_N)^t\le2N(8t/e)^t. \] In particular, the original decision bound is polynomial when $t=O(\log N/\log\log(3N))$. \subsection{A negative answer has a finite certificate} At an unsuccessful internal node, record the selected violated row and every allowed child. At a leaf, record either the exhausted budget or the fact that the violated support contains no unchosen coordinate. A checker verifies the square identities underlying the rows, the current syndromes, completeness of the child lists and the leaf conditions. Its work is polynomial in the arithmetic input and the length of the displayed tree. It need not repeat the strategy that selected each violated row. The union of all supports used by the tree contains at most \[ \ell_N(1+\ell_N)^t \] labels, or $|I_N|$ if smaller. This restricted set, with the same prime constraints, already rules out a radius-$t$ repair. This is a finite support bound for a refutation, not a polynomial bound independent of $t$. An optimal repair can be certified by its positive witness and a negative tree for the preceding radius. \subsection{Erasures are charged by their useful rank} Let $U\subseteq I_N$ be erased and $K=I_N\setminus U$ be known. A non-pivot appears only in its own equation. If that non-pivot is erased, remove its equation: once the pivots have been reconstructed, its missing value can always be filled. No guessing is required for these coordinates. Let $e$ now denote the number of erased pivots, not a correction vector. In the remaining equations, including the prescribed-prime constraints, write \begin{equation}\label{eq:erasedsystem} Jx_K+Eu=b,\qquad u\in\F^e, \qquad r=\rank E. \end{equation} The rank depends on the erased positions and imposed constraints, not on the received signs. \begin{lemma}[Projection with controlled row width]\label{lem:projection} The known coordinates in \eqref{eq:erasedsystem} extend to a solution if and only if they satisfy a system of $O(N)$ equations of row weight at most $(r+1)\ell_N$. Each fixed extendible assignment on $K$ has exactly $2^{e-r}$ completions to a word on $I_N$. \end{lemma} \begin{proof} Select $r$ rows whose restrictions to erased pivot columns form a basis of the row space of $E$. In every other row, cancel those columns by a linear combination of these basis rows. Each resulting equation is a combination of at most $r+1$ original rows, giving the asserted support bound. If the projected equations hold, the chosen $r$ equations impose a consistent rank-$r$ system on $u$: their coefficient rows are independent, so every right-hand side is attained. It has $2^{e-r}$ solutions. The other equations follow by construction, and the erased non-pivots are filled uniquely using their removed equations. Necessity follows by eliminating $u$ from any full solution. \end{proof} Apply Proposition~\ref{prop:search} to the projected system. The exact repair time becomes \begin{equation}\label{eq:erasurerepair} N^{O(1)}[1+(r+1)\ell_N]^t \le2^{O(t\log(t+r+2))}N^{O(1)}. \end{equation} Any number of erased non-pivots preserves the original width if no pivot is erased. At radius zero, extension is a polynomial linear-algebra calculation even if many pivots are erased. Neither observation implies that the original source is unique. \subsection{Recovering a value, or certifying ambiguity} For a prime target $p\in\PN$, run the constrained search twice, with $h(p)=+1$ and $h(p)=-1$. If neither search succeeds, the data do not admit a source within the specified radius. If exactly one succeeds, that sign is forced by the data and budget. If both succeed, the two witnesses certify ambiguity. If $p\notin\PN$ and is not externally prescribed, it is free. The two searches add the same coefficient row, supported on $B(p)$; only its right-hand side changes. With the same erasure mask and other constraints, their erased-pivot matrices are therefore identical: \[ E_+=E_-,\qquad \rank E_+=\rank E_-. \] They may reuse the same elimination of the erased columns, while propagating their different right-hand sides. Adding the target row can increase the rank relative to the system with no constraint on $p$, but changing the prescribed sign of that same target cannot. A distance criterion explains when recovery is guaranteed regardless of the pattern of errors. If a word was produced by $f$, then suffered at most $t$ flips and $s$ erasures, any second compatible source $g$ differs from $f$ at at most $2t+s$ labels. Therefore \begin{equation}\label{eq:unique-radius} 2t+s1,\qquad d\in\Dset. \] The integer $D$ is not a square. Put \begin{equation}\label{eq:explicitunit} U=\frac{2r^2-d}{|d|},\qquad V=\frac{2r}{|d|}. \end{equation} Both are positive integers, and direct calculation gives \[ U^2-DV^2=1,\qquad U+V\sqrt D=\frac{(r+\sqrt D)^2}{|d|}. \] Starting with $(x_0,y_0)=(r,1)$, define \begin{equation}\label{eq:replica} x_{j+1}=Ux_j+DVy_j,\qquad y_{j+1}=Vx_j+Uy_j. \end{equation} Then $x_j^2-d=Dy_j^2$, and $x_j$ increases strictly. Thus \begin{equation}\label{eq:pivotvalue} h(Q_d(x_j))=h(D)\qquad(h\in\M). \end{equation} There is no assertion that $U+V\sqrt D$ is fundamental. Its explicit size is the advantage. \begin{lemma}[Uniform height and disjointness]\label{lem:replicaheight} If the pivot belongs to a prime $q\le P$, where $P\ge3$, then \begin{equation}\label{eq:replicaheight} x_j30$, $L_j$ has a prime divisor not dividing \begin{equation}\label{eq:primitiveexcluded} (\lambda^2-\zeta^2)^2L_1\cdots L_{j-1}. \end{equation} This definition matters: for our pair, $(\lambda^2-\zeta^2)^2=16r^2D/a_0^2$ is an integer divisible by every prime factor of $D$. Primitive divisors obtained at distinct ranks are distinct and avoid $D$. Only real Lehmer pairs and odd ranks greater than $30$ are used. The earlier real-pair theorem of Carmichael--Ward, stated as Theorem~A in \cite{BHV}, is already sufficient; we retain the common conservative threshold $30$. No list of defective pairs at small ranks enters the argument. Let $b$ be an odd squarefree integer dividing the odd rank $k$. Choose one primitive prime at each divisor $j\mid b$ with $j>30$, and let $W$ be their product. There are at most fifteen positive odd integers at most $30$, hence \begin{equation}\label{eq:reserve} W\mid u_k,\quad (W,D)=1,\quad \omega(W)\ge\tau(b)-15. \end{equation} Also $L_j\le\lambda^{2j}$ for the relevant ranks, by \eqref{eq:lehmer} and $\lambda>e^{1/2}$. Consequently \begin{equation}\label{eq:reserveheight} \log W\le2\log\lambda\sum_{j\mid b}j \le2\log\lambda\,b(1+\log b). \end{equation} The last inequality uses $\sigma(b)/b=\sum_{j\mid b}j^{-1}\le1+\log b$. This height cost, not just the number of primitive factors, is needed below. \subsection{Fitting the entire cube in a terminal range} We now prove Theorem~\ref{thm:main}. For $\alpha<0$, the assertion follows from the case $\alpha=0$, so assume $0\le\alpha<1$. Let $L=\log N$, $K=L/\log B_p$ and $\beta=(1+\alpha)/2$. Choose $b$ to be the largest odd primorial not exceeding \begin{equation}\label{eq:primorialcutoff} K/(\log K)^2. \end{equation} The same $b$ will work for all pivots in the certificate of $p$. For each such pivot, let $k$ be the largest odd multiple of $b$ not exceeding $\beta L/\log\lambda$. Once $K$ is large, this rank exists and \begin{equation}\label{eq:rankplacement} \beta L-2b\log B_p\beta-\frac{2}{(\log K)^2}-\frac{\log4}{K\log3},\label{eq:lowerheight}\\ \frac{\log\max(x,y)}{L} &\le\beta+\frac2K+ \frac{2(1+\log K)}{(\log K)^2}.\label{eq:upperheight} \end{align} For a threshold depending only on $\alpha$, the first expression exceeds $\alpha$ and the second is less than one. This proves that every selected pair lies in $(N^\alpha,N]$, with a uniform threshold. The primorial choice spends only a vanishing fraction of the available logarithmic height on divisors; the remaining fixed margin separates the cube from both endpoints. \subsection{How many pairs this gives} Write $b$ as the product of the first $t$ odd primes. The prime number theorem gives \[ \log b\sim\log K,\qquad t=(1+o(1))\frac{\log K}{\log\log K},\qquad \tau(b)=2^t. \] Indeed the logarithm of the next prime is negligible compared with $\log b$, so taking the largest primorial below \eqref{eq:primorialcutoff} does not alter this asymptotic. Only the ordinary prime number theorem is used here \citep[\S27.12]{DLMF}. Let \begin{equation}\label{eq:MK} M(K)=3^{\max(0,\tau(b)-15)}. \end{equation} For every $00$, the range $p\le(\log N)^\kappa$ admits the bound \[ \exp\!\left(\exp\!\left(c\frac{\log\log N}{\log\log\log N}\right)\right) \quad(01$ be pairwise coprime, put $W=\prod_i g_i$, and assume \[ W\mid u,\qquad (W,D)=1. \] For $\mathbf t\in\{0,1,2\}^s$, set \begin{equation}\label{eq:blockcube} a_{\mathbf t}=\frac uW\prod_i g_i^{t_i},\qquad b_{\mathbf t}=D\frac uW\prod_i g_i^{2-t_i}. \end{equation} Their product is $Du^2$, so the pairs $(m+a_{\mathbf t},m+b_{\mathbf t})$ satisfy \eqref{eq:cubeidentity} with this $D$. \begin{proposition}[A block cube]\label{prop:blockcube} The $3^s$ pairs in \eqref{eq:blockcube} use $2\cdot3^s$ distinct labels of trace $d$. Their smallest and largest indices are exactly \begin{equation}\label{eq:blockextrema} m+u/W,\qquad m+DuW. \end{equation} Neither primality nor squarefreeness of the blocks is required. \end{proposition} \begin{proof} For a prime dividing $g_i$, its valuation in $a_{\mathbf t}$ determines $t_i$, because it divides no other block. Thus the $a$'s are distinct; the same holds for the $b$'s. Since $D$ is nonsquare, it has a prime divisor of odd valuation. That prime divides none of the blocks, and its valuations in the $a$'s and the $b$'s differ by the fixed positive valuation in $D$. Hence the two sets are disjoint. The minimum and maximum follow by choosing all exponents equal to zero or two; $D\ge2$ makes the largest $b$ the global maximum. \end{proof} For example, the centre $239^2+1=2\cdot169^2$ admits the single block $169$. It yields three pairs, at indices between $240$ and $57361$, without requiring the factorisation $169=13^2$. The repeated prime in this block causes no collision: only its three distinct exponents matter. \subsection{Producing the blocks by greatest common divisors} For positive integers $v,H$, define \[ \sat(v,H)=\prod_{q\nmid H}q^{v_q(v)}. \] This notation describes an integer that can be computed without its factorisation: start with $z=v$ and repeatedly replace $z$ by $z/\gcd(z,H)$ until the greatest common divisor is one. Each nontrivial step at least halves $z$, so at most $\bl(v)$ such steps are needed, where $\bl(v)=\lfloor\log_2v\rfloor+1$. Fix the Lehmer sequence from Section~\ref{sec:amplification}, an odd integer $b$, and an odd multiple $k$ of $b$. Process the odd divisors $j>1$ of $b$ in increasing order. Starting with $W=1$, compute \begin{equation}\label{eq:saturate} g_j=\sat(L_j,DW). \end{equation} Whenever $g_j>1$, keep it and replace $W$ by $Wg_j$. \begin{proposition}[Factorisation-free reserved blocks]\label{prop:saturate} The blocks retained by \eqref{eq:saturate} are pairwise coprime and coprime to $D$. Their product divides $u_k$. If $s$ is their number, then \begin{equation}\label{eq:blockreserve} s\ge \tau(b)-15,\qquad \log W\le 2(\log\lambda)\sigma(b). \end{equation} \end{proposition} \begin{proof} The coprimality assertions follow from the definition of saturation. Each block divides $L_j$, which divides $L_k$ and hence $u_k$. Pairwise coprimality then implies that their product divides $u_k$. If $j>30$, a primitive divisor of $L_j$ divides neither $D$ nor an earlier Lehmer term, by \eqref{eq:primitiveexcluded}. It therefore survives saturation, and the corresponding block exceeds one. At most fifteen odd divisors of $b$ are at most thirty. Finally $g_j\le L_j$ and $\log L_j\le2j\log\lambda$, so summation gives the height bound. \end{proof} Thus the same choice of $b$ and $k$ as in Section~\ref{sec:amplification} gives the same asymptotic lower bound. The primitive-divisor theorem is still an existence input guaranteeing many nontrivial blocks. The computation does not have to identify the primitive prime in each block. \subsection{What a compact description certifies} A family description records $d,D,m,u$, the pairwise coprime blocks, their product $W$, and the height bound. The verifier checks the norm equation, divisibilities, coprimalities and \eqref{eq:blockextrema}. Proposition~\ref{prop:blockcube} then certifies its cardinality and disjointness symbolically. To obtain a specified pair, write its index in base three and apply \eqref{eq:blockcube}. Each such query requires a number of integer operations polynomial in the binary lengths of the stored data. There is also a polynomial-time search for these descriptions, once the seed data are supplied. More precisely, consider finitely many seeds $D_i=r_i^2-d_i\ge2$ and a certified identity \begin{equation}\label{eq:seedproduct} \prod_i D_i=t z_0^2, \end{equation} where $t\ge2$ is nonsquare. Let $S$ denote the total binary length of the seed data and let $T=\bl(N)$. One may try each odd initial primorial $b\le T$, construct its divisors by their known prime factors, form the blocks \eqref{eq:saturate} for each seed, and search the odd multiples $k$ of $b$ for which \eqref{eq:blockextrema} stays below $N$. The largest admissible $k$ for each seed is sufficient. Select among these trials a family with largest minimum block-cube cardinality. Only polynomially many ranks and divisors are tested: $b\le T$, and $m_k\ge\lambda^k/4$ with $\log\lambda>1/2$ bounds the relevant ranks by $O(T)$. Recurrences, Euclidean algorithms and integer comparisons involve numbers of polynomial binary length in $T+S$. Hence the search and verification cost is polynomial in $T+S$. A failed search only means that these candidates did not fit; it is not an impossibility certificate for other arithmetic families. A prescribed terminal interval can be enforced by checking its lower endpoint as well. For canonical prime-reconstruction seeds, the asymptotic primorial of Section~\ref{sec:amplification} is among these trials for large $K$. The search therefore retains that lower-bound scale. Preparing the canonical seeds themselves may require work polynomial in the \emph{numerical prime} $p$; the binary-time assertion here starts after the seed certificate is supplied. Similarly, a height $N=10^E$ has binary length of order $E$, not of order $\log E$. If intervals for the different seeds are made disjoint, choosing equally indexed pairs from their families and using \eqref{eq:seedproduct} gives direct certificates for $t$. Without such a separation, the minimum bound still follows by selecting a negative seed, but a collection of direct certificates with unit loads requires a separate overlap argument. No such composition is implicit in a compact description. Coprime factor refinement is classical; Bernstein's work \cite{Bernstein} gives a much more general algorithmic setting. The specialised saturation procedure above is included to make the arithmetic certificate and its complexity parameter explicit. Its value is access to a large family without factoring its large recurrence terms, not a faster asymptotic growth of $m_p(N)$. % Original source: 07_direct.tex \section{Direct prime certificates on a prescribed trace}\label{sec:direct} The regulator-free argument reconstructs $h(p)$ as a product of pivot signs. When $h(p)=-1$, it uses whichever pivot is negative; consequently the trace carrying both signs can depend on the source. A different construction keeps the trace fixed by $p$ and makes every pair read $h(p)$ directly. Its uniform prime range is smaller, but this geometric feature is not implied by Theorem~\ref{thm:main}. Define \begin{equation}\label{eq:dp} d_p=\begin{cases} -1,&p=2\text{ or }p\equiv1\pmod4,\\ -2,&p\equiv3\pmod8,\\ 2,&p\equiv7\pmod8. \end{cases} \end{equation} \begin{lemma}[A direct seed and its height]\label{lem:directseed} There are positive integers $m_0,u_0$ with $m_0^2-pu_0^2=d_p$ such that, on putting $a=|d_p|$ and \[ \lambda=\frac{m_0+u_0\sqrt p}{\sqrt a}, \] one has \begin{equation}\label{eq:regulatorbound} \lambda^2=\epsilon_p,\qquad \frac12<\log\lambda\le3\sqrt p\bigl(\log(4p)+2\bigr), \end{equation} where $\epsilon_p=X_p+Y_p\sqrt p$ is the least unit of norm one with positive integer coordinates. \end{lemma} \begin{proof} Existence of $\epsilon_p$ is the classical Pell theorem; see \cite{ConradPell}. For $p=2$, take $m_0=u_0=1$. For $p\equiv1\pmod4$, a norm-one solution has $X_p$ odd and $Y_p$ even. The consecutive coprime integers $(X_p-1)/2$ and $(X_p+1)/2$ have product $p(Y_p/2)^2$. The assignment in which the second factor is a square would give a smaller positive norm-one solution. Thus \[ m_0^2=(X_p-1)/2,\qquad u_0^2=(X_p+1)/(2p). \] For $p\equiv3\pmod4$, an odd $X_p$ would give either the same minimality contradiction or a norm-minus-one solution, impossible modulo $p$. Hence $X_p$ is even and $Y_p$ odd. The coprime factors $X_p-1$ and $X_p+1$ have product $pY_p^2$. Quadratic reciprocity gives \[ \begin{array}{c|cc} p\pmod8&m_0^2&u_0^2\\\hline 3&X_p-1&(X_p+1)/p\\ 7&X_p+1&(X_p-1)/p. \end{array} \] The excluded assignments would give respectively a norm $+2$ or $-2$ which is not a quadratic residue modulo $p$. These formulas prove the norm identity and $\lambda^2=\epsilon_p$. For completeness, the height estimate uses only an upper bound for an $L$-value. For the fundamental discriminant $\Delta\le4p$ of $\Q(\sqrt p)$, the analytic class number formula and quadratic zeta factorisation give \[ L(1,\chi_\Delta)=\frac{2h_KR_K}{\sqrt\Delta},\qquad R_K\le\frac{\sqrt\Delta}{2}(\log\Delta+2). \] The first identity is the real-quadratic specialisation of \cite[Theorems 19.12 and 19.15]{Sutherland}. The second uses $h_K\ge1$ and $L(1,\chi_\Delta)\le\log\Delta+2$, obtained by cutting the character series at $\Delta$ and summing the tail by parts with partial sums bounded by $\Delta$. If $\eta>1$ is a fundamental unit in the full ring of integers, then $\eta^6$ has norm one and lies in $\Z[\sqrt p]$. For $p\equiv1\pmod4$, the unit group of the ring modulo two has order one or three, so $\eta^3$ has integral $\sqrt p$-coordinates; squaring gives norm one. In the other cases a square suffices. Therefore $\log\epsilon_p\le6R_K$, which proves the upper bound in \eqref{eq:regulatorbound}. Finally $X_p\ge2$ gives $\epsilon_p\ge2+\sqrt3$ and the lower bound. No lower bound of Siegel type is used. \end{proof} For odd $k$, put \[ m_k+u_k\sqrt p=(m_0+u_0\sqrt p)\epsilon_p^{(k-1)/2}. \] With $\zeta=(m_0-u_0\sqrt p)/\sqrt a=(d_p/a)/\lambda$, the pair $(\lambda,\zeta)$ is a Lehmer pair: $(\lambda+\zeta)^2=4m_0^2/a$ is an integer, $\lambda\zeta=\pm1$, and their quotient is not a root of unity. The same recurrence as \eqref{eq:lehmerrecurrence} gives $u_k=u_0L_k$, and the same primitive-divisor argument yields a squarefree $W\mid u_k$, coprime to $p$, with \begin{equation}\label{eq:directreserve} \omega(W)\ge\tau(b)-15,\qquad \log W\le2(\log\lambda)\sigma(b) \end{equation} for every odd $b\mid k$. Here the excluded discriminant is $16m_0^2pu_0^2/a^2$, so the primitive divisors avoid $p$. Write \[ F_c(N)=\exp\!\left(\exp\!\left(c\frac{\log\log N}{\log\log\log N}\right)\right) \] for sufficiently large $N$. \begin{theorem}[Direct pairs, fixed and mobile targets]\label{thm:direct} Fix $\alpha<1$. For every fixed prime $p$ and $0N^\alpha$ and are at most \[ m_k+pu_kW\le3\sqrt p\,\lambda^kW=N^{\beta+o(1)}0, \end{equation} where $0\le a<1$ and $0\le b<1/2$. The observation from source $h$ is $Y_i=h(Q_i)\xi_i$; zero marks a known erasure. These variables are attached to labels once and for all. Re-querying the same label does not provide another independent sample. If $R$ distinct labels have the same square class $D$, they all have the true sign $h(D)$. Majority of their nonzero observations, with a tie declared a failure, has error probability at most \begin{equation}\label{eq:majority} \Prob\!\left(\sum_{j=1}^R\xi_j\le0\right) \le \exp(-\mu^2R/2). \end{equation} Here and below the event bounding failure does not depend on $h$. One may therefore couple \emph{all} sources to the same noise variables and obtain a simultaneous all-source guarantee on that event. For clarity, \eqref{eq:majority} follows from the elementary bounded-variable exponential estimate. If $Z\in[-1,1]$, the second derivative of $\log\E e^{tZ}$ is a variance under an exponential tilt, hence at most one. Integrating twice gives $\E e^{t(Z-\E Z)}\le e^{t^2/2}$. Apply this to the independent $\xi_j$, use Markov's inequality, and choose $t=-\mu$. This is the usual Hoeffding argument \cite{Hoeffding}; no distributional independence of prime signs is assumed. \subsection{Correct the pivots before multiplying} Let $C(p)$ be a square-class certificate for $p$ using $s_p$ pivots, with $s_p\le\lfloor\log_2p\rfloor$ as in \eqref{eq:prime-cert}. Repeat each pivot $R$ times by Section~\ref{sec:replication}. If all pivot majorities are correct, their product is $h(p)$. The union bound gives \begin{equation}\label{eq:targetnoise} \Prob(\text{failure at }p)\le s_p e^{-\mu^2R/2}. \end{equation} The height is at most $B_p^{2R-1}$, where $B_p=\max(3,p)$, and the number of distinct queried labels is $s_pR$. Thus \begin{equation}\label{eq:Rnoise} R\ge\frac{2}{\mu^2}\log\frac{s_p}{\delta},\qquad N\ge B_p^{2R-1} \end{equation} suffices for failure probability at most $\delta$. The alternative of forming every transversal product does not create $R^{s_p}$ independent observations. Algebraically, \[ \sum_{j_1,\ldots,j_{s_p}=1}^R\prod_{v=1}^{s_p}Y_{v,j_v} =\prod_{v=1}^{s_p}\left(\sum_{j=1}^RY_{v,j}\right). \] Moreover, a single transversal product has noise mean $\mu^{s_p}$, which can be much smaller than $\mu$. Pivot majorities keep the concentration parameter at $\mu$ and pay only a union bound over the pivots. \begin{theorem}[A requested prime and a simultaneous prefix]\label{thm:noiseprefix} Fix the channel \eqref{eq:noisechannel} and $A\ge1$. Put $L=\log N$. For all sufficiently large $N$, any separately requested prime \begin{equation}\label{eq:singlequeryrange} p\le\exp\!\left(\frac{\mu^2}{16(A+2)}\frac{L}{\log L}\right) \end{equation} can be recovered with failure probability at most $L^{-A}$ using $O_{a,b,A}(L)$ distinct readings of indices at most $N$. There is also a single family of queries recovering all prime signs $p\le P$, and hence all values $h(n)$ for $n\le P$, where \begin{equation}\label{eq:simulrange} P=\left\lfloor\exp\!\left(c\sqrt L\right)\right\rfloor, \qquad c=\frac{\mu}{4\sqrt{A+2}}. \end{equation} It uses $O_{a,b,A}(P)$ readings and has failure probability at most $P^{-A-1}$. Each assertion holds on an event of noise configurations common to every $h\in\M$. \end{theorem} \begin{proof} For the single target, choose \[ R=\left\lceil\frac2{\mu^2}\bigl(A\log L+\log s_p\bigr)\right\rceil. \] For large $N$, $\log s_p\le\log L$ and $R\le2(A+2)\mu^{-2}\log L$. Combining this with \eqref{eq:singlequeryrange} gives $(2R-1)\log B_p1/2$, \eqref{eq:amplifiedprefix} exceeds every prefix of the form $\exp(c\sqrt{\log N})$ with $c$ fixed. The elementary replication theorem remains useful for its direct, finite height formula. The following result preserves a different advantage: preparation polynomial in $\log N$ alone. None of these independent-noise guarantees allows a fixed positive proportion of adversarial errors. \subsection{A smaller prefix with polylogarithmic preparation} The direct Pell seeds of Section~\ref{sec:direct} give a complementary computational regime. From the seed for $p$, take \[ m_j+u_j\sqrt p=(m_0+u_0\sqrt p)\epsilon_p^j, \qquad 0\le j0$ such that, for all large $N$, the signs at all primes \begin{equation}\label{eq:polylogprefix} p\le P=c_{a,b,A}\frac{(\log N)^2}{(\log\log N)^4} \end{equation} are recovered with failure probability at most $(\log N)^{-A-1}$. The query count is $O_{a,b,A}(P)$, and the preparation and decoding time is polynomial in $\log N$, in the ordinary bit-operation model. \end{proposition} \begin{proof} Write $L=\log N$, $l=\log L$, and take \[ D_A=\left\lceil2(A+3)\mu^{-2}\right\rceil+1, \quad c_{a,b,A}=(36D_A)^{-2}, \quad R=\left\lceil2(A+3)\mu^{-2}l\right\rceil. \] For large $N$, $R\le D_Al$ and $\log(4p)+2\le3l$ throughout \eqref{eq:polylogprefix}. Therefore the exponent in \eqref{eq:directnoiseheight} is at most $L/2$. All readings occur at indices at most $\sqrt{2N}$. The total failure probability is at most \[ \pi(P)e^{-\mu^2R/2}\le L^2L^{-A-3}=L^{-A-1}. \] Since $\log P\asymp l$, the elementary prime-counting upper bound $\pi(P)\ll P/\log P$ shows that $\pi(P)R=O(P)$. Sieve the primes up to $P$, compute their Pell units by continued fractions, obtain the direct seeds from the formulas of Lemma~\ref{lem:directseed}, and generate the required $R$ terms by integer recurrence. Continued-fraction periods and integer lengths are polynomially bounded in the numerical $p$ and the output length; here both are polynomial in $\log N$. In particular, searching all integers up to the potentially enormous Pell solution is unnecessary. No factorisation of the observed quadratic values is required. Finally majority decoding uses the listed readings and integer counters. \end{proof} This construction also gives almost-sure eventual recovery for all $N$. To make the interpolation precise, prepare the queries at $T_k=2^{k+1}$ and use them for every $2^k\le N<2^{k+1}$. Their indices are at most $\sqrt{2T_k}\le2^k$ for large $k$, their prime range contains the range in \eqref{eq:polylogprefix}, and their failure probabilities are summable in $k$. When $b=0$, a non-erased repeated reading is exact. On the successful event, every multiplicative source compatible with the unerased data has the recovered small-prime signs. With flips, the majority result is instead a probabilistic recovery guarantee under the specified channel. Neither statement is resistance to an adversary who can target the query set. \subsection{The recovery regimes in one place} Table~\ref{tab:noisecosts} compares the four independent-noise guarantees. In its last row, $\delta$ is fixed in $(0,1)$; in every row the channel and confidence parameter are fixed. The constants $c_1,c_2,c_3>0$ are those in the corresponding results, and $L=\log N$. Query counts do not charge repeatedly for the same label. \begin{table}[htbp] \centering \small \setlength{\tabcolsep}{4pt} \renewcommand{\arraystretch}{1.24} \begin{tabular}{@{}>{\raggedright\arraybackslash}p{2.6cm}>{\raggedright\arraybackslash}p{3.7cm}>{\raggedright\arraybackslash}p{1.9cm}>{\raggedright\arraybackslash}p{1.5cm}>{\raggedright\arraybackslash}p{4.4cm}@{}} \toprule Method & Recovered targets & Failure at most & Distinct labels & Preparation and decoding\\ \midrule Direct Pell, Proposition~\ref{prop:polynoise} & All primes up to $P=c_1L^2/(\log L)^4$ & $L^{-A-1}$ & $O(P)$ & Polynomial in $\log N$\\ Replication, Theorem~\ref{thm:noiseprefix} & One requested prime $p\le\exp(c_2L/\log L)$ & $L^{-A}$ & $O(L)$ & Polynomial in numerical $p$ and $\log N$\\ Replication, Theorem~\ref{thm:noiseprefix} & All primes up to $P=\lfloor\exp(c_3\sqrt L)\rfloor$ & $P^{-A-1}$ & $O(P)$ & Polynomial in numerical $P$ and $\log N$\\ Amplified pairs, Corollary~\ref{cor:amplifiednoise} & All primes up to $P=\lfloor\exp(L^\delta)\rfloor$ & $P^{-A-1}$ & $O(P)$ & Polynomial in numerical $P$ and $\log N$\\ \bottomrule \end{tabular} \caption{Independent noise on readings of an arbitrary unchanged source. The single-target row is not a simultaneous guarantee over all primes in its range. All rows require sufficiently large $N$; their constants and thresholds are not numerical performance guarantees.}\label{tab:noisecosts} \end{table} The adversarial statement in Section~\ref{sec:replication} is different: $R=2t+s+1$ copies per pivot and $N\ge P^{4t+2s+1}$ recover a source prefix through $P$ despite any placement of at most $t$ wrong signs and $s$ erasures. It assumes a bounded absolute error budget, whereas Table~\ref{tab:noisecosts} assumes independent noise of fixed rates. \FloatBarrier % Original source: 09_information.tex \section{How much information remains hidden}\label{sec:information} Recovery of small prime signs does not imply identification of all prime signs appearing in the observations. A prime larger than $2N$ occurs in at most three labels, one on each trace. If those labels are erased, even revealing all smaller prime signs leaves that prime completely free. There are linearly many such large primes. \subsection{Exact fibres after revealing the small primes} For $N\ge5$, let \[ \mathcal T_N=\{q>2N:q\text{ prime and }q\mid Q_i\text{ for some }i\in I_N\}, \quad J_q=\{i\in I_N:q\mid Q_i\},\quad r_q=|J_q|. \] An observation divisible by $q>2N$ has the unique form \begin{equation}\label{eq:largegroups} Q_i=q a_i,\qquad a_i0,\ P^+(Q_d(n))>2N\} \ge \frac N2-O\!\left(\frac N{\log N}\right). \end{equation} In particular $|\mathcal T_N|$ satisfies the same lower bound. \end{lemma} \begin{proof} The logarithm of the product of the positive values of $Q_d$ is \[ \sum_{n\le N,\,Q_d(n)>0}\log Q_d(n)=2N\log N+O(N). \] For an odd prime $q\le2N$, its total valuation in this product is at most \[ \frac{\rho_d(q)N}{q-1}+O\!\left(\frac{\log N}{\log q}\right), \] where $\rho_d(q)\in\{0,2\}$ counts the roots of $Q_d$ modulo $q$. This follows by summing the root counts over $q^j\le N^2+2$; each root is simple and has one lift at each level. The prime two contributes $O(N)$ to the weighted logarithmic sum. The visible odd primes for each trace occupy two of the four odd residue classes modulo eight. The prime number theorem in these fixed progressions, followed by partial summation, gives \[ \sum_{q\le2N}\frac{\rho_d(q)\log q}{q-1}=\log N+O(1). \] The fixed-modulus form, including the remainder sufficient for this weighted sum, is recorded in \cite[Theorem 3.3 and the following discussion]{BardestaniFreiberg}; the fixed-progression prime number theorem is also stated in \cite[Eq.~27.12.8]{DLMF}. The rounding errors contribute $O(\pi(2N)\log N)=O(N)$. Thus factors at most $2N$ account for at most $N\log N+O(N)$ of the logarithmic mass. The remaining mass is at least $N\log N-O(N)$. Each index contributes at most $\log(N^2+2)$ to it, proving \eqref{eq:largecount}. A prime larger than $2N$ occurs at most once on a fixed trace, so the corresponding indices give distinct members of $\mathcal T_N$. \end{proof} \begin{theorem}[Exponential ambiguity under erasure]\label{thm:erasurefiber} Fix $0j/2)+\tfrac12\Prob(\Bin(j,b)=j/2). \] The Bayes error from $r$ readings is \begin{equation}\label{eq:bayesr} e_r(a,b)=\sum_{j=0}^r\binom rj(1-a)^ja^{r-j}b_j(b). \end{equation} In particular $b_0=1/2$, $b_1=b_2=b$, $b_3=3b^2-2b^3$, and \begin{equation}\label{eq:bayes3} e_3(a,b)=\frac{a^3}{2}+3a(1-a)b+(1-a)^3(3b^2-2b^3). \end{equation} More readings cannot increase the optimal Bayes error, so $e_{r_q}\ge e_3$. \begin{proposition}[Unrecoverable large-prime information]\label{prop:bayes} Write $K_N=|\mathcal T_N|$. Under this prior, the largest possible probability of recovering all $K_N$ signs is \begin{equation}\label{eq:jointsuccess} \prod_{q\in\mathcal T_N}(1-e_{r_q}(a,b))\le e^{-e_3(a,b)K_N}. \end{equation} The smallest expected number of wrong large-prime signs is $\sum_q e_{r_q}(a,b)\ge e_3(a,b)K_N$. These inequalities also obstruct any guarantee claimed uniformly over all deterministic sources, whenever $e_3(a,b)>0$. \end{proposition} \begin{proof} Conditionally on the data, the posterior factors across the disjoint groups, because both the prior and the noises do. The most likely complete assignment therefore chooses the most likely bit in each group. Averaging its posterior probability factors as well and gives the product in \eqref{eq:jointsuccess}. Expected Hamming loss is additive and minimised coordinatewise, giving the sum. Finally, a guarantee holding for every deterministic source would hold after averaging over the chosen prior. The prior bounds thus imply a worst-source obstruction for each decoder; they do not say that every single deterministic source is hard for every decoder. \end{proof} The small-prime recovery and the large-prime ambiguity occur in the same observation model. They are compatible because arithmetic replication supplies many independent noisy readings of selected small signs, whereas a large sign may have only one, two or three opportunities to be observed. % Original source: 10_boundaries.tex \section{The boundary between reconstruction and a statistical inverse}\label{sec:boundaries} The complete presentation answers which tables come from sources. Bounded-distance repair finds such a source near a received table. Replication and amplification force a growing number of disagreements whenever a specified prime sign changes. These are different tasks: a short presentation need not distribute its checks evenly over the coordinates, and a nearest source need not be the source that generated a corrupted observation. \subsection{Large prime signs can have bounded distance} \begin{proposition}\label{prop:fragile} For $N\ge3$ and a prime $NN^2+2$. Thus at most six readings are negative. For any fixed source $f$, the two sources $f$ and $f\beta_q$ disagree on at most six labels. Dividing those labels into two parts of size at most three produces a received word within three errors of both sources. Their signs at $q$ differ, so universal identification is impossible. \end{proof} Example~\ref{ex:ambiguous} shows that a single error can already suffice at a particular height. Neither this example nor Proposition~\ref{prop:fragile} establishes an optimal frontier for the subpolynomial prime ranges in Section~\ref{sec:noise}. \subsection{What the integer-centre construction alone can supply} \begin{proposition}[A limitation of one certificate family]\label{prop:integercentres} Consider all pairs obtained from integer centres $m^2-d=pu^2$ by the factorisation identity of Lemma~\ref{lem:cube}, for all $d\in\Dset$, keeping only pairs with both indices at most $N$. For every $\delta>0$, their number is $O_\delta(N^\delta)$, uniformly in $p$. \end{proposition} \begin{proof} Every retained centre has $m1$. Then \[ t+t^{-1}=\frac{2(m_1m_2-pu_1u_2)}{d} \] is an integer larger than two, hence at least three. Therefore $t\ge(3+\sqrt5)/2$. Since $10$. This last statement concerns the bound, not the unknown order of $m_p(N)$. In particular it does not show that $m_p(N)=o(N)$. A bound $m_p(N)\ge c_pN$ for every fixed prime and all large $N$ would imply the following qualitative inverse: if a fixed source is positive on all but $o(N)$ of the three traces, then it is identically one. Indeed any negative prime would contradict that bound. The reverse implication is not asserted, since the minimising source in $m_p(N)$ may vary with $N$. The appendices identify restrictions under which a linear conclusion is available, and isolate an exact large-prime elimination. Their hypotheses are not consequences of a small trace error. They therefore delimit, rather than close, the unrestricted inverse problem. In particular, preserving the observation of an arbitrary source throughout this article is essential: constructing a special source that encodes a message would solve a different recovery problem. \appendix % Original source: A_elimination.tex \section{Exact elimination and localisation of large factors}\label{app:elimination} The minimum $m_p(N)$ can be reduced to signs at primes at most $2N$, but shared large primes leave a nonzero cost. The reduction is useful precisely because it retains that cost instead of treating all large signs as independently adjustable observations. Assume $N\ge5$ and $p\le2N$. Let $S_N=\{i\in I_N:P^+(Q_i)\le2N\}$. For a completely multiplicative assignment $\kappa$ on the primes at most $2N$, define \[ A_N(\kappa)=\sum_{i\in S_N}\frac{1-\kappa(Q_i)}2, \qquad \phi_q(\kappa)=\frac{r_q-\left|\sum_{i\in J_q}\kappa(a_i)\right|}{2}, \] using the groups and cofactors in \eqref{eq:largegroups}. \begin{proposition}[The residual cost is exact]\label{prop:eliminate} One has \begin{equation}\label{eq:eliminate} m_p(N)=\min_{\kappa(p)=-1}\left(A_N(\kappa)+\sum_{q>2N}\phi_q(\kappa)\right). \end{equation} For a fixed source $h$ with restriction $\kappa$, the expression inside the minimum is a lower bound for $E_N(h)$, not necessarily its value. \end{proposition} \begin{proof} Once $\kappa$ is fixed, the cost of the group $J_q$ is \[ \sum_{i\in J_q}\frac{1-h(q)\kappa(a_i)}2. \] Minimising over the one sign $h(q)$ gives $\phi_q$. The groups are disjoint and all cofactors lie below $N/2$, so these minimisations are independent and are simultaneously attained by choosing the sign of each cofactor sum (arbitrarily in a tie). This proves equality after minimisation and the stated inequality for an unchanged source. \end{proof} If $u_i=\kappa(a_i)$, the three possibilities are \begin{equation}\label{eq:conflictcost} \phi_q=\begin{cases} 0,&r_q=1,\\ (1-u_1u_2)/2,&r_q=2,\\ (3-u_1u_2-u_1u_3-u_2u_3)/4,&r_q=3. \end{cases} \end{equation} Each shared group costs zero or one. For example, at $N=20$, the prime $41$ divides $9^2+1=2\cdot41$, $11^2+2=3\cdot41$ and $17^2-2=7\cdot41$. Its cost vanishes exactly when $\kappa(2),\kappa(3),\kappa(7)$ agree. These values remain multiplicative functions of small-prime signs; they are not independent signs assigned to three abstract vertices. A shared prime larger than $2N$ belongs to the class $1\pmod8$. Indeed, a prime in any of the other odd classes has roots for only one of the three quadratics, whereas $J_q$ contains at most one label of each trace. This fact locates the shared groups but does not make their energy expand. \begin{lemma}[Uniform counting with two fixed cofactors]\label{lem:normcount} Let $1\le a,b\le Y\le N$ and let $d,e\in\Dset$ be distinct. The number of positive solutions $n,m\le N$ of \begin{equation}\label{eq:cofactorequation} bn^2-am^2=bd-ae \end{equation} is $O_\epsilon(N^\epsilon)$ for every $\epsilon>0$, uniformly in all these parameters. \end{lemma} \begin{proof} Put $K=b(bd-ae)$ and $X=bn$. If $K=0$, the positive ratio $a/b=d/e$ is either $2$ or $1/2$; equation~\eqref{eq:cofactorequation} would make that ratio a rational square. Thus there is no solution. Suppose $K\ne0$. Then \[ X^2-abm^2=K,\qquad |K|\le4Y^2. \] If $ab$ is a square, factoring the left-hand side gives at most $2\tau(|K|)$ possibilities. Otherwise write $ab=D_0c^2$ with $D_0$ squarefree. Each solution yields an algebraic integer $\eta=bn+cm\sqrt{D_0}$ of norm $K$ in a real quadratic field. There are at most $\tau(|K|)$ integral ideals of norm $|K|$: for a rational prime occurring to exponent $v$, at most $v+1$ allocations between the primes above it are possible. Two positive generators of the same ideal and the same norm differ by a unit of norm one. If their ratio exceeds one, its trace is an integer at least three, so the ratio is at least $(3+\sqrt5)/2$. Meanwhile \[ (2NY)^{-1}\le\eta\le2NY, \] since both embeddings have absolute value at most $2NY$ and $|K|\ge1$. There are therefore $O(\log(2NY))$ such generators per ideal. The pair $(n,m)$ is determined by $\eta$. We obtain $O(\tau(|K|)\log(2NY))$, and the divisor bound $\tau(v)\ll_\delta v^\delta$ proves the assertion. The argument uses factorisation of ideals in a quadratic field, not an estimate for its regulator or class number. \end{proof} Let $J_N(R)$ be the number of primes $q>R$ appearing on at least two labels, where $2N\le R\le N^2+2$. Choosing two of their labels and writing \[ n^2-d=qa,\qquad m^2-e=qb \] gives \eqref{eq:cofactorequation}, with $d\ne e$ and $a,b\le(N^2+2)/R$. There are at most three unordered trace pairs. Lemma~\ref{lem:normcount} consequently gives \begin{equation}\label{eq:farshared} J_N(R)\ll_\epsilon N^\epsilon\left(\frac{N^2+2}{R}\right)^2. \end{equation} Define the truncated minimum by retaining only labels with $P^+(Q_i)\le R$: \[ m_p^{\le R}(N)=\min_{h(p)=-1}\sum_{\substack{i\in I_N\\P^+(Q_i)\le R}}\ind_{h(Q_i)=-1}. \] \begin{theorem}[Localisation of the minimum]\label{thm:localisemin} Uniformly for $p\le2N$ and $2N\le R\le N^2+2$, \begin{equation}\label{eq:localisemin} 0\le m_p(N)-m_p^{\le R}(N)\le J_N(R) \ll_\epsilon N^\epsilon\left(\frac{N^2+2}{R}\right)^2. \end{equation} In particular, for fixed $0<\delta<1/2$, \[ m_p(N)=m_p^{\le N^{3/2+\delta}}(N)+O_\epsilon(N^{1-2\delta+\epsilon}). \] \end{theorem} \begin{proof} The truncated version of \eqref{eq:eliminate} removes exactly the terms $\phi_q$ with $q>R$. Their sum is nonnegative and at most $J_N(R)$, since singleton groups cost zero and every shared group costs at most one. These bounds hold for each $\kappa$ before minimisation, so they hold for the difference of minima. Equation~\eqref{eq:farshared} finishes the proof. \end{proof} Choose $\epsilon<2\delta$ to make the displayed remainder $o(N)$. The concrete choice $R=N^{7/4}$ gives $O_\epsilon(N^{1/2+\epsilon})$. These are estimates on minima: a fixed source may have many negative readings on the removed singleton groups, even though their signs can be optimised freely in the minimisation. A related localisation holds for certificates with unit loads. If a certificate for $p$ meets a label containing $q>R$, it must meet another label of $J_q$, because the total $q$-valuation is even. It therefore meets the union of shared groups above $R$, which has at most $3J_N(R)$ labels. Summing the unit-load inequalities over those labels bounds the total weight of all such certificates by $3J_N(R)$. This does not construct a positive-density family; it only bounds the portion that could lie above the cutoff. % Original source: B_harmonic.tex \section{Linear separation under a local prime budget}\label{app:harmonic} The unrestricted minimum allows every other prime sign to depend on $N$. A useful controlled class only restricts negative primes below $N$, leaving all signs above $N$ arbitrary. Smooth values of a quadratic see no part of that upper tail. A direct antecedent is Ter\"av\"ainen's pretentious-case theorem~\cite[Theorem 2.9]{Teravainen}. For a fixed completely multiplicative function $g$ pretending to a Dirichlet character times $n^{it}$, an admissible pair $(F,g)$ and property~S of $F$, it bounds the limiting upper modulus of the mean of $g(F(n))$ strictly below one. For sign-valued $g$, this gives positive lower proportions of both signs. Admissibility is a hypothesis of that statement, not a consequence of pretentiousness alone. The transfer below instead keeps a uniform threshold over mobile families described by a local prime budget, with all signs above $N$ free. It uses the same smooth-value mechanism, but records the finite-head law and the cost of the remaining visible primes explicitly. \subsection{The smooth-value input and the finite local law} We use property~S from \cite[Definition 2.8 and Proposition 2.10]{Teravainen}. For each $d\in\Dset$ there is $\eta_d>0$ such that, for every \emph{fixed} modulus $W\ge1$ and residue $r$, \begin{equation}\label{eq:propertyS} \liminf_{N\to\infty}\frac1N \#\{n\le N:n\equiv r\pmod W,\ Q_d(n)>0,\ P^+(Q_d(n))\le n\} \ge\frac{\eta_d}{W}. \end{equation} The same $\eta_d$ works for all fixed $W,r$, but the threshold may depend on them. This is the published quadratic smooth-value input; no uniformity for moduli growing with $N$ is assumed here. We may decrease $\eta_d$ so that $\eta_d\le1$. For fixed $Y\ge2$, let $h_{\le Y}$ retain the signs of $h$ at primes at most $Y$ and equal one at all other primes. For odd $q$, let $\rho_d(q)$ be the number of roots of $Q_d$ modulo $q$. Set \begin{align} H_{d,h}(Y,N)&=\sum_{\substack{Y0$, all sufficiently large $N$ satisfy, for every source $h$ and every $d$, \begin{align} \frac{E_{d,N}(h)}N&\ge\eta_d\delta_{d,Y}(h)-2H_{d,h}(Y,N)-\epsilon,\label{eq:smoothlower}\\ \frac{E_{d,N}(h)}N&\le1-\eta_d(1-\delta_{d,Y}(h))+2H_{d,h}(Y,N)+\epsilon,\label{eq:smoothupper} \end{align} where $E_{d,N}(h)$ counts the negative readings of trace $d$. The threshold is independent of $h$, and no signs at primes above $N$ are restricted. \end{theorem} \begin{proof} Let $B_d(N)$ be the smooth set in \eqref{eq:propertyS}. Choose fixed valuation cutoffs at primes at most $Y$ so that their exceptional residue classes have total density at most a small $\tau>0$. Off these classes the sign of $h_{\le Y}(Q_d(n))$ is determined modulo a fixed product $W$ of prime powers. Its negative classes occupy at least the proportion $\delta_{d,Y}(h)-\tau$, and its positive classes at least $1-\delta_{d,Y}(h)-\tau$. Equation~\eqref{eq:propertyS}, summed over these classes, gives at least \[ N\bigl(\eta_d\delta_{d,Y}(h)-O(\tau)\bigr),\qquad N\bigl(\eta_d(1-\delta_{d,Y}(h))-O(\tau)\bigr) \] negative and positive smooth readings, respectively. One threshold suffices for all residues and all assignments at the finitely many primes at most $Y$. On $B_d(N)$ a disagreement between $h$ and $h_{\le Y}$ requires a negative prime $Y0. \] If $Y\ge p$, $h(p)=-1$ and $d\in\mathcal D_p$, then $\delta_{d,Y}(h)\ge a_p$: the other nonnegative local factors cannot increase the first moment beyond the one with only $p$ negative. \begin{corollary}[A linear bound with free upper tail]\label{cor:harmoniclinear} Under \eqref{eq:tight}, for each fixed prime $p$, \[ \liminf_{N\to\infty}\inf_{\substack{h\in\mathcal H_N\\h(p)=-1}} \frac{E_N(h)}N\ge\Gamma_p. \] In particular \eqref{eq:tight} holds if, for fixed $0<\sigma<1$ and $M<\infty$, \begin{equation}\label{eq:localbudget} \sum_{\substack{q\le N\\h(q)=-1}}q^{-\sigma}\le M \quad(h\in\mathcal H_N). \end{equation} If $h(2)=-1$, each of the two signs has lower asymptotic proportion at least $\eta_d/2$ on every trace, uniformly within such a family. \end{corollary} \begin{proof} Sum \eqref{eq:smoothlower} over $\mathcal D_p$, take the infimum and lower limit in $N$, then let $Y\to\infty$ through \eqref{eq:tight} and finally $\epsilon\to0$. Condition~\eqref{eq:localbudget} gives $H_h(Y,N)\le MY^{\sigma-1}$, proving tightness. For $h(2)=-1$, the local density is $1/2$ on every trace, so both \eqref{eq:smoothlower} and \eqref{eq:smoothupper} apply symmetrically. \end{proof} These are bounds for restricted families, not lower bounds for the unrestricted minimum. They nevertheless impose a condition on any hypothetical quasi-saturation. If $h_N(p)=-1$ and $E_N(h_N)=o(N)$, then, for every fixed $Y\ge\max(2,p)$ and $d\in\mathcal D_p$, \begin{equation}\label{eq:escape} \liminf_{N\to\infty}H_{d,h_N}(Y,N)\ge\eta_da_p/2. \end{equation} This follows directly from \eqref{eq:smoothlower}. In particular every budget in \eqref{eq:localbudget} must diverge: for $q>Y$, $q^{-\sigma}\ge Y^{1-\sigma}/q$; choose $Y$ first and then $N$. The mass required by \eqref{eq:escape} can be shared by the three traces through primes $1\pmod8$. The inequalities do not themselves rule out such a shared tail. % Original source: C_local_models.tex \section{A minimum under a cardinality constraint}\label{app:models} A small number of negative primes is different from a small harmonic budget. Here the negative primes may lie anywhere below the maximal observation height $N^2+2$. A uniform small-prime model, followed by an incidence bound for the remaining primes, determines the first-order minimum in this class. Let \[ k_N(h)=\#\{q\le N^2+2:q\text{ prime},\ h(q)=-1\}, \qquad m_{p,K}(N)=\min_{h(p)=-1,\ k_N(h)\le K}E_N(h). \] For $p$ fixed and $N$ large this class is nonempty when $K\ge1$. Put \begin{equation}\label{eq:gammap} \gamma_2=\frac32,\qquad \gamma_p=\frac{2|\mathcal D_p|}{p+1}\quad(p\text{ odd}). \end{equation} Thus $\gamma_p=6/(p+1)$ for $p\equiv1\pmod8$ and $2/(p+1)$ in the other odd classes. \begin{theorem}[Restricted minimum]\label{thm:cardinality} There are absolute constants $C,\delta_0>0$ such that, for each fixed prime $p$, all sufficiently large $N$ and every $1\le K\le N^{\delta_0}$, \begin{equation}\label{eq:cardinality} \left|\frac{m_{p,K}(N)}N-\gamma_p\right| \le C\left(\frac{\log(K+1)}{\log N}+\frac1{\sqrt{\log N}}\right). \end{equation} In particular $m_{p,K_N}(N)/N\to\gamma_p$ whenever $\log(K_N+1)=o(\log N)$ and $K_N\ge1$. \end{theorem} \subsection{The local distribution of three signs} Observe $n$ uniformly in $\{2,\ldots,N\}$, so all three values are positive. The two additional labels at $n=1$ change a total count by at most two. For nonempty $J\subseteq\Dset$, define \[ P_J(T)=\prod_{d\in J}(T^2-d),\qquad \rho_J(q)=\sum_{d\in J}\rho_d(q)\quad(q\text{ odd}). \] The roots of the factors are disjoint and simple at every odd prime. Only the differences $1,3,4$ between the constants could cause an overlap; at three, the two factors whose constants agree have no root. Define a law $\pi_{h,y}$ on $\{\pm1\}^3$ by multiplying independent local vectors over primes at most $y$. A positive prime contributes $(1,1,1)$. At an odd negative prime $q$, the local vector flips exactly coordinate $d$ with probability $\rho_d(q)/(q+1)$ and flips none with the remaining probability. If $h(2)=-1$, the factor at two is $(-,+,+)$ or $(+,-,-)$, each with probability $1/2$. These probabilities are nonnegative and sum to one: a prime with all three traces visible is at least seventeen, while all other odd primes see only one trace. The moment of the product of the coordinates in $J$ is \begin{equation}\label{eq:localmoment} M_J(h,y)=a_J(h)\prod_{\substack{3\le q\le y\\h(q)=-1}} \left(1-\frac{2\rho_J(q)}{q+1}\right), \end{equation} where $a_J(h)=1$ if $h(2)=1$, and otherwise \[ a_J(h)=\frac{(-1)^{\ind_{-1\in J}}+(-1)^{\ind_{-2\in J}+\ind_{2\in J}}}{2}. \] The empty moment is one. The law is a model for the observation at a random index; its independent prime factors are not a randomness assumption on $h$. \begin{proposition}[Uniform local-model comparison]\label{prop:kubilius} There are absolute $C_0,U_0>0$ such that, for $2\le y\le N$ and $u=\log N/\log y\ge U_0$, \begin{equation}\label{eq:kubilius} \sup_h\TV\left(\mathcal L_N\bigl((h_{\le y}(Q_d(n)))_{d\in\Dset}\bigr),\pi_{h,y}\right) \le C_0\left(\frac1u+\frac{(1+\log N)^{11}}{\sqrt N}\right). \end{equation} Here $\mathcal L_N$ refers to uniform $2\le n\le N$, and $\TV$ is the supremum over events, equivalently half the $\ell^1$ distance on this finite space. \end{proposition} \subsection{The sieve input and its application} We use the valuation comparison of Gorodetsky \cite[Theorem 2.3]{Gorodetsky}. We specify the form consumed in the present argument. Let $A$ be a positive integer-valued random variable of bounded support, let $\mathcal P$ be a finite set of primes at most $y$, and let $g$ be multiplicative on the semigroup $\langle\mathcal P\rangle$, with $g(1)=1$, $g(q)<1$, and $g(q^j)$ decreasing to zero. Its dimension condition is a bound, uniform in $m\in\langle\mathcal P\rangle$, \begin{equation}\label{eq:sievedimension} \prod_{a\le q\le b,\ q\in\mathcal P} \left(1-\frac{g(qm)}{g(m)}\right)^{-1} \le\left(\frac{\log b}{\log a}\right)^{\kappa} \exp(B/\log a),\qquad 2\le a\le b. \end{equation} All $g(m)$ in our application are positive. Let $G_q$ be independent with $\Prob(G_q\ge j)=g(q^j)$ and put $R=\prod_{q\in\mathcal P}q^{G_q}$. For $S/T\ge y$, the imported estimate bounds the total variation of $(v_q(A))_{q\in\mathcal P}$ from $(G_q)_{q\in\mathcal P}$ by a constant times $D_1+D_2$, where the terms used here have the form \begin{align} D_1&=\Prob(R>T)+\E\left[\ind_{R\le T}f\!\left(\frac{\log(S/R)}{\log y}\right)\right],\label{eq:sieveD1}\\ D_2&=\sum_{\substack{m\le S\\m\in\langle\mathcal P\rangle}} |\Prob(m\mid A)-g(m)| \left(2^{\omega(m)}+\prod_{q\in\mathcal P}\left(1+\frac{g(qm)}{g(m)}\right)\right).\label{eq:sieveD2} \end{align} Here $f(t)=\exp\{-t\log t+t\log_3\max(t,100)+C_*t\}$, with $\log_3$ denoting the threefold iterated natural logarithm. The constants depend on the fixed dimension data. We only apply this estimate when its argument tends into a range on which $f\le1$ and its tail supremum is $O(1/t)$. The proof of this sieve theorem is external; the substitutions and costs below are part of the present proof. \begin{proof}[Proof of Proposition~\ref{prop:kubilius}] Fix nonempty $J$ and a parity class. Let $A=P_J(n)$ with $n$ uniform on that class in $\{2,\ldots,N\}$, of cardinal $L_b\asymp N$. Its support is contained in $[1,(N^2+2)^3]$; this is the support-height parameter, distinct from the index length $N$. Take \[ \mathcal P=\{q\le y:q\text{ odd},\ \rho_J(q)>0\},\qquad g(q^j)=\rho_J(q)/q^j. \] By the Chinese remainder theorem, \begin{equation}\label{eq:distributionerror} |\Prob(m\mid A)-g(m)|\le\rho_J(m)/L_b, \qquad \rho_J(m)=\prod_{q\mid m}\rho_J(q)\le6^{\omega(m)}. \end{equation} The ratio in \eqref{eq:sievedimension} is $\rho_J(q)/q$ when $q\nmid m$ and $1/q$ otherwise. Mertens' estimate gives \eqref{eq:sievedimension} with $\kappa=6$ and an absolute $B$, uniformly over all seven $J$. Indeed the logarithms of the factors are at most $6/q+O(q^{-2})$ at the large primes; the finitely many primes at most eleven are absorbed into $B$. Take $S=N^{1/2}$ and $T=N^{1/4}$. For $u\ge4$, $S/T\ge y$. The model has \[ \E\log R=\sum_{q\in\mathcal P}\frac{\rho_J(q)\log q}{q-1}\ll\log y. \] On $R\le N^{1/8}$, the argument of $f$ is at least $3u/8$; on $R\le T$ it is at least $u/4$. Increase $U_0$ so that $f\le1$ on the latter range and $\sup_{t\ge3u/8}f(t)\ll1/u$. Markov's inequality gives $D_1\ll1/u$. The product in \eqref{eq:sieveD2} is at most $\prod_{q\le y}(1+6/q)\ll(1+\log y)^6$. Therefore \begin{align*} D_2&\ll\frac1N\sum_{m\le S}6^{\omega(m)} \bigl(2^{\omega(m)}+(1+\log y)^6\bigr)\\ &\ll\frac SN\bigl((1+\log S)^{11}+(1+\log y)^6(1+\log S)^5\bigr) \ll\frac{(1+\log N)^{11}}{\sqrt N}. \end{align*} We used $r^{\omega(m)}\le\tau_r(m)$ and $\sum_{m\le S}\tau_r(m)\le S(1+\log S)^{r-1}$, obtained by summing over products of $r$ positive integers. No estimate uniform in a growing polynomial degree is needed. Every assignment of small-prime signs is a bounded test of the valuation vector. Multiplying by the deterministic factor at two in the chosen parity class and averaging the two classes gives an error $O(D_1+D_2+1/N)$ in each of the seven moments \eqref{eq:localmoment}. Finite Fourier inversion on $\{\pm1\}^3$ proves \eqref{eq:kubilius}, uniformly in $h$. \end{proof} \subsection{Paying for the primes omitted from the model} If at most $K$ negative primes lie between $y>3$ and $N^2+2$, then \begin{equation}\label{eq:cardtail} |E_N(h)-E_N(h_{\le y})|\le6K(N/y+1). \end{equation} A changed reading requires one of these primes to divide a quadratic value; each such prime meets at most $2N/q+2$ labels on a given trace. Union over the primes and three traces proves the bound. \begin{proof}[Proof of Theorem~\ref{thm:cardinality}] Take $\delta_0<\min(1/4,1/(2U_0))$ and \[ y=(K+1)\exp\sqrt{\log N}. \] For $p$ fixed and $N$ large, $p\le y$ and $u\ge U_0$, uniformly for $K\le N^{\delta_0}$. Every singleton moment has nonnegative odd-prime factors. If $h(p)=-1$, its local negative probability is at least $1/2$ for $p=2$ and $2/(p+1)$ on each visible trace for odd $p$. Summing over the visible traces gives $\gamma_p$. Proposition~\ref{prop:kubilius} and \eqref{eq:cardtail} thus imply \[ \frac{E_N(h)}N\ge\gamma_p- O\!\left(\frac{\log(K+1)}{\log N}+\frac1{\sqrt{\log N}}\right). \] Indeed the additional normalised tail cost is at most $6e^{-\sqrt{\log N}}+6N^{\delta_0-1}$, and the sieve remainder is also absorbed. For the opposite inequality, use the source negative only at $p$. Simple-root lifting and the alternating sum of the conditions $p^j\mid Q_d(n)$ give $2N/(p+1)+O_p(\log N)$ negative labels on each visible trace when $p$ is odd. At two the total is $3N/2+O(1)$. This source belongs to every class $K\ge1$ and attains $\gamma_pN+O_p(\log N)$. The threshold may depend on $p$, as stated. \end{proof} Consequently, for each fixed $p$ there is $\delta_p>0$ such that $h(p)=-1$ and $k_N(h)\le N^{\delta_p}$ imply $E_N(h)\ge\gamma_pN/2$ for large $N$. A sequence with $h_N(p)=-1$ and $E_N(h_N)=o(N)$ must therefore have more than $N^{\delta_p}$ negative primes. The same conclusion holds when only primes appearing at odd valuation in the observations are counted: changing all inactive signs to positive does not alter a reading, and $p$ itself is active for large $N$. This restriction is not automatic in the free problem. It is also not equivalent to Appendix~\ref{app:harmonic}: a subpolynomial number of negative primes can have growing harmonic mass, whereas a local harmonic bound permits arbitrarily many negative primes above $N$. % Original source: D_mobile_characters.tex \section{Sources close to a moving quadratic character}\label{app:characters} The preceding cardinality bound measures distance from the constant-one source. Another structured class is close to a quadratic character whose conductor can grow. The ramified prime must be retained: deleting its multiples would lose a positive proportion of readings when the conductor is fixed. For a prime $\ell\ge5$, let $\chi_\ell$ be the Legendre character and, for $\epsilon\in\{\pm1\}$, define its nonvanishing completion by \[ g_{\ell,\epsilon}(m)=\epsilon^{v_\ell(m)} \chi_\ell\bigl(m/\ell^{v_\ell(m)}\bigr). \] For a source $h$, set $\epsilon=h(\ell)$ and $\eta=h g_{\ell,\epsilon}$, so $\eta(\ell)=1$. Count corrections by \[ D_{\ell,N}(h)=\#\{q\le N^2+2:q\text{ prime},\ q\ne\ell,\ h(q)\ne\chi_\ell(q)\}. \] \begin{theorem}[Mobile conductor, few corrections]\label{thm:characters} Fix $0<\tau<2$ and $K_N\ge0$ with $\log(K_N+1)=o(\log N)$. Uniformly over primes $5\le\ell\le N^{2-\tau}$ and sources with $D_{\ell,N}(h)\le K_N$, each trace contains at least $(1/2-o(1))N$ negative labels and $(2/5-o(1))N$ positive labels. If in addition $\ell\to\infty$, then every three-sign pattern has frequency $1/8+o(1)$ at a common uniform index $2\le n\le N$. \end{theorem} \subsection{The law at the conductor and sums in progressions} Choose $r$ uniformly modulo $\ell$. Form the vector $(\chi_\ell(Q_d(r)))_d$; if one coordinate is zero, replace it by a fair sign. Since $\ell\ge5$, the three polynomials are separable and do not share a root, so at most one replacement is needed. This defines a law $\nu_\ell$ on $\{\pm1\}^3$ whose moments are \[ c_I(\ell)=\frac1\ell\sum_{r\bmod\ell}\chi_\ell(P_I(r)), \qquad c_\varnothing=1. \] For a singleton $I=\{d\}$, $c_I=-1/\ell$: count the $\ell-1$ pairs of nonzero factors of $d$ using $(r-z)(r+z)=d$. For any nonempty $I$, the Weil bound gives $c_I\ll\ell^{-1/2}$, uniformly over the seven possibilities. Hence \begin{equation}\label{eq:conductoruniform} \TV(\nu_\ell,\operatorname{Unif}(\{\pm1\}^3))\ll\ell^{-1/2}. \end{equation} The mixed character-sum form used below is \cite[Lemma 3.1]{MSW}: for a squarefree polynomial of degree at most six and every additive frequency, the complete multiplicative-additive sum is $O(\sqrt\ell)$. The non-square condition is satisfied by each $P_I$ modulo $\ell$. This is a classical Weil estimate, not a new finite-field bound. \begin{lemma}[All ramified valuations retained]\label{lem:characterAP} Let $(M,\ell)=1$, $5\le\ell0$, choose $\delta(\tau)>0$ sufficiently small and replace $K_N$ by $N^{\delta(\tau)}$ above. The right-hand side of \eqref{eq:characterfull} is then bounded by a small constant uniformly in $\ell\le N^{2-\tau}$. Both signs occur at least $N/4$ times on every trace for large $N$. Therefore $E_N(h_N)=o(N)$ forces \[ \min_{\substack{5\le\ell\le N^{2-\tau}\\\ell\text{ prime}}}D_{\ell,N}(h_N)>N^{\delta(\tau)} \] eventually. Inactive corrections can again be omitted from this count. This conclusion does not say that an arbitrary quasi-saturation must be close to one of the character models. The conductor restriction, the cardinality of corrections, and the preservation of the ramified sign are all essential parts of the statement. \section*{Computational material and AI assistance} \addcontentsline{toc}{section}{Computational material and AI assistance} The \href{\SourceArchiveTarget}{companion source and verification archive}, distributed alongside this PDF, contains the LaTeX sources, frozen bibliography, finite verification programs, data and execution logs. Its \texttt{README.md} gives build and reproduction commands; the source concordance records the editions and precise forms of the external inputs. The programs check arithmetic identities, parity presentations, finite repair certificates, noise probabilities and compact families. They do not establish asymptotic estimates or the imported theorems. The proofs above can be read independently of the computational archive. GPT-6 Astra assisted mathematical exploration, calculations, drafting, bibliographical work, code, rechecking and editorial preparation. The author is responsible for the manuscript. No independent human specialist review, human replication or Lean formalisation of this article is claimed, nor does this declaration assert that a complete unaided human verification has taken place. Detailed provenance and the scope of each computational check are recorded in the archive. \begingroup \small \setlength{\bibsep}{4pt plus 1pt minus 1pt} \begin{thebibliography}{16} \providecommand{\natexlab}[1]{#1} \providecommand{\url}[1]{\texttt{#1}} \expandafter\ifx\csname urlstyle\endcsname\relax \providecommand{\doi}[1]{doi: #1}\else \providecommand{\doi}{doi: \begingroup \urlstyle{rm}\Url}\fi \bibitem[Bardestani and Freiberg(2013)]{BardestaniFreiberg} M.~Bardestani and T.~Freiberg. \newblock Mertens's theorem for splitting primes and more---a concise and adaptable proof of {Hardy}. \newblock arXiv:1309.7482v1, 2013. \newblock \url{https://arxiv.org/abs/1309.7482v1}. \newblock Theorem 3.3 and the following fixed-modulus error estimate. \bibitem[Bernstein(2005)]{Bernstein} D.~J. Bernstein. \newblock Factoring into coprimes in essentially linear time. \newblock \emph{Journal of Algorithms}, 54\penalty0 (1):\penalty0 1--30, 2005. \newblock \url{https://cr.yp.to/coprimes.html}. \newblock Context for coprime refinement; no complexity bound from this article is used. \bibitem[Bilu et~al.(2001)Bilu, Hanrot, and Voutier]{BHV} Y.~Bilu, G.~Hanrot, and P.~M. Voutier. \newblock Existence of primitive divisors of {Lucas} and {Lehmer} numbers. \newblock \emph{Journal f\"ur die reine und angewandte Mathematik}, 539:\penalty0 75--122, 2001. \newblock \doi{10.1515/crll.2001.080}. \newblock With an appendix by M. Mignotte. Definitions in Section 1, Theorem A (Carmichael--Ward), and Theorem 1.4. \bibitem[Borwein et~al.(2013)Borwein, Choi, and Ganguli]{BCG} P.~Borwein, S.~K.~K. Choi, and H.~Ganguli. \newblock Sign changes of the {Liouville} function on quadratics. \newblock \emph{Canadian Mathematical Bulletin}, 56\penalty0 (2):\penalty0 251--257, 2013. \newblock \doi{10.4153/CMB-2011-166-9}. \newblock \url{https://arxiv.org/abs/1109.3107v1}. \newblock Theorem 2.2 of arXiv:1109.3107v1. \bibitem[Conrad(n.d.)]{ConradPell} K.~Conrad. \newblock Pell's equation, {I}. \newblock Expository notes, n.d. \newblock \url{https://kconrad.math.uconn.edu/blurbs/ugradnumthy/pelleqn1.pdf}. \newblock Theorem 2.3 (Lagrange), and Sections 4--7. Accessed 27 September 2026. \bibitem[de~la Bret{\`e}che et~al.(2026)de~la Bret{\`e}che, Wang, and Xu]{dBWX} R.~de~la Bret{\`e}che, V.~Y. Wang, and M.~W. Xu. \newblock Random multiplicative functions and making squares from polynomial values. \newblock arXiv:2607.06398v1, 2026. \newblock \url{https://arxiv.org/abs/2607.06398v1}. \newblock Introduction and Sections 5--7; contextual comparison, not a proof input. \bibitem[Everest et~al.(2007)Everest, Stevens, Tamsett, and Ward]{ESTW} G.~Everest, S.~Stevens, D.~Tamsett, and T.~Ward. \newblock Primes generated by recurrence sequences. \newblock \emph{The American Mathematical Monthly}, 114\penalty0 (5):\penalty0 417--431, 2007. \newblock \doi{10.1080/00029890.2007.11920430}. \newblock \url{https://arxiv.org/abs/math/0412079v2}. \newblock Locators refer to arXiv:math/0412079v2: Lemma 4.1, Proposition 4.2 and Theorem 5.1. \bibitem[Gorodetsky(2026)]{Gorodetsky} O.~Gorodetsky. \newblock A {Kubilius} model for sieve-theoretic sequences. \newblock \emph{Analysis Mathematica}, 2026. \newblock \doi{10.1007/s10476-026-00178-w}. \newblock \url{https://arxiv.org/abs/2608.14190v1}. \newblock Published online 14 August 2026. The valuation-comparison locator is Theorem 2.3 of arXiv:2608.14190v1. \bibitem[Hamming(1950)]{Hamming} R.~W. Hamming. \newblock Error detecting and error correcting codes. \newblock \emph{Bell System Technical Journal}, 29\penalty0 (2):\penalty0 147--160, 1950. \newblock \doi{10.1002/j.1538-7305.1950.tb00463.x}. \bibitem[Hoeffding(1963)]{Hoeffding} W.~Hoeffding. \newblock Probability inequalities for sums of bounded random variables. \newblock \emph{Journal of the American Statistical Association}, 58\penalty0 (301):\penalty0 13--30, 1963. \newblock \doi{10.1080/01621459.1963.10500830}. \bibitem[M{\'e}rai et~al.(2024)M{\'e}rai, Shparlinski, and Winterhof]{MSW} L.~M{\'e}rai, I.~E. Shparlinski, and A.~Winterhof. \newblock Character sums over sparse elements of finite fields. \newblock \emph{Bulletin of the London Mathematical Society}, 56\penalty0 (4):\penalty0 1488--1510, 2024. \newblock \doi{10.1112/blms.13008}. \newblock \url{https://arxiv.org/abs/2211.08452v1}. \newblock The locator is Lemma 3.1 of arXiv:2211.08452v1, used only as a stated form of the classical mixed Weil bound. \bibitem[Mine(2025)]{Mine} M.~Mine. \newblock An upper bound for the number of smooth values of a polynomial and its applications. \newblock arXiv:2410.09558v2, 2025. \newblock \url{https://arxiv.org/abs/2410.09558v2}. \newblock Revised 8 October 2025. Section 1.3, Theorem 1.4 and Corollary 1.5; contextual comparison. \bibitem[{NIST}(n.d.)]{DLMF} {NIST}. \newblock Digital library of mathematical functions. \newblock Sections 27.9, 27.11 and 27.12, n.d. \newblock \url{https://dlmf.nist.gov/27}. \newblock Quadratic characters and fixed-modulus prime estimates, in particular Eq. 27.12.8. Accessed 28 September 2026. \bibitem[Srinivasan(2022)]{Srinivasan} A.~Srinivasan. \newblock Infinitely many sign changes of the {Liouville} function on {$x^2+d$}. \newblock \emph{Proceedings of the American Mathematical Society}, 150\penalty0 (9):\penalty0 3799--3809, 2022. \newblock \doi{10.1090/proc/15939}. \newblock \url{https://arxiv.org/abs/2104.15004v2}. \newblock Theorem 1.3 of arXiv:2104.15004v2. \bibitem[Sutherland(2017)]{Sutherland} A.~V. Sutherland. \newblock The analytic class number formula. \newblock MIT 18.785 Number Theory I, Lecture 19, 2017. \newblock \url{https://math.mit.edu/classes/18.785/2017fa/LectureNotes19.pdf}. \newblock Theorems 19.12 and 19.15, Fall 2017 lecture notes. \bibitem[Ter{\"a}v{\"a}inen(2024)]{Teravainen} J.~Ter{\"a}v{\"a}inen. \newblock On the {Liouville} function at polynomial arguments. \newblock \emph{American Journal of Mathematics}, 146\penalty0 (4):\penalty0 1115--1167, 2024. \newblock \doi{10.1353/ajm.2024.a932436}. \newblock \url{https://arxiv.org/abs/2010.07924v4}. \newblock Locators refer to arXiv:2010.07924v4: Definition 2.8, Theorem 2.9, Proposition 2.10 and Section 6. \end{thebibliography} \endgroup \end{document}