% 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]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern,microtype} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage[a4paper,margin=25mm,headheight=15pt]{geometry} \usepackage{booktabs,array,longtable,enumitem,fancyhdr,xurl,xcolor} \usepackage[colorlinks=true,allcolors=blue!45!black]{hyperref} \hypersetup{pdftitle={Cubic-residue quadruplets: elliptic formulas and arithmetic fluctuations},pdfauthor={Brice Pouly}} \pagestyle{fancy}\fancyhf{} \fancyhead[L]{\small Cubic-residue quadruplets} \fancyhead[R]{} \fancyfoot[C]{\thepage}\renewcommand{\headrulewidth}{0.3pt} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition}\newtheorem{definition}[theorem]{Definition} \newtheorem{remark}[theorem]{Remark} \newcommand{\Fp}{\mathbb F_p} \newcommand{\Q}{\mathbb Q} \newcommand{\Z}{\mathbb Z} \newcommand{\E}{\mathbb E} \newcommand{\Pcal}{\mathcal P} \newcommand{\Sym}{\operatorname{Sym}} \newcommand{\Rea}{\operatorname{Re}} \newcommand{\Nm}{\operatorname{N}} \newcommand{\ind}{\mathbf1} \newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}} \title{Cubic-residue quadruplets:\\ elliptic formulas and arithmetic fluctuations} \author{Brice Pouly\thanks{Prepared with artificial-intelligence assistance; see the declaration at the end.}} \date{12 October 2026} \hypersetup{pdfsubject={Publication edition v1.0; 12 October 2026}} \usepackage{bookmark} \begin{document} \maketitle \begin{abstract} Let $A_p$ count the monochromatic consecutive four-windows of a nontrivial cubic character modulo a prime $p\equiv1\pmod3$, with zero excluded and overlapping windows counted separately. We give an exact formula for $A_p$ in terms of fixed elliptic traces and a finite boundary correction. Its complex-multiplication terms are related cubic twists. This produces two arithmetic fluctuation regimes: the first four moments of $(27A_p-p)/\sqrt p$ tend to $(0,44,0,4224)$ when three is a cube and to $(0,17,0,738)$ otherwise. Over all admissible primes they tend to $(0,26,0,1900)$. The proof combines a four-position identity following from Greene's hypergeometric formalism and Lennon's trace formula with symmetric-power automorphy, cyclic base change and a finite collection of Rankin--Selberg prime number theorems; it uses no GRH. A direct geometric proof exposes the phases and exceptional points, with the genus-two and isogeny constructions of Freeman--Satoh and Guillevic--Vergnaud explicitly credited. Point-order and Hasse certificates verify numerical examples without enumerating their billion-position character words. The conclusions concern fixed pattern length and four moments; no complete limiting distribution, constant-order centring of the raw count, or law for logarithmic-length maxima is proved. \end{abstract} \noindent\textbf{Keywords.} Cubic characters; Jacobi sums; elliptic curves; isogenies; complex multiplication; moments over primes; Rankin--Selberg functions; exact certificates. \section{The observable and the two main results} The number $A_p$ of monochromatic cubic four-windows has leading scale $p/27$, but its fluctuations depend on a small arithmetic condition. After normalization by $\sqrt p$, the limiting variance is $44$ when three is a cube modulo $p$, and $17$ otherwise. The cause is not a change in the number of colours: two complex-multiplication traces in the exact count are related twists, and their relation depends on the cubic class of three. We count all overlapping consecutive windows of length four on the ordinary positions $1,\ldots,p-1$. This observable differs from maximal-run starts and from a quadratic four-window count. Questions about consecutive power residues and prescribed character patterns have a long history, including Lehmer--Lehmer~\cite{lehmer}, the computational theorem on cubic triples of Lehmer--Lehmer--Mills--Selfridge~\cite{lehmermachine}, and Graham's result on first occurrences of quadruples~\cite{graham}. Our observable counts all monochromatic four-windows in one period. The four-position identity used to compute it is a corollary of Greene~\cite{greene} and Lennon~\cite{lennon}, with an explicit fractional linear substitution given below. The associated genus-two family and isogeny were studied by Freeman--Satoh~\cite{freemansatoh} and Guillevic--Vergnaud~\cite{guillevicvergnaud}; the latter contains the short Weierstrass model used here. The contributions developed here are the assembled exact count with its boundary corrections, its certified evaluations, and the first four prime-averaged moments of that count. We retain a direct geometric proof to expose the phase and contributions at infinity; we do not claim a new general character-sum or isogeny identity. \paragraph{Scope and relation to the atlas and certificates.} The published atlas~\cite{atlas} studies a complete finite population of power-residue runs below $2^{32}$, selected algebraic windows and separate sampled ternary diagnostics. These finite computations provide context for questions about arithmetic structure. The exact formula and the moment arguments below are self-contained apart from their cited mathematical inputs. Rabung certificates and recurrence-closed bounds~\cite{bounds} use finite run maxima and boundary conditions. Here the observable is instead a count of fixed four-windows, and its averaging population consists of primes. The finite atlas diagnostics and the prime-averaged moments below concern different populations. No theorem about logarithmic-length maxima or new van der Waerden bound is inferred from the four moments. When needed, $W(r,k)$ denotes $r$ colours and progression length $k$; the ordinary window convention is fixed explicitly below. \subsection{Windows, characters, and the prime population} Throughout, $p>3$ is prime, $p\equiv1\pmod3$, and $\chi$ is a nontrivial cubic character of $\Fp^\times$. Write $\omega^2+\omega+1=0$ and regard its values as $1,\omega,\omega^2$. Extend $\chi$ by $\chi(0)=0$. Because $3\mid(p-1)/2$, we have $\chi(-1)=1$. Conjugating $\chi$ does not change any equality of colours. Define the cubic four-window count by \begin{equation}\label{eq:count} A_p=\#\{1\le x\le p-4: \chi(x)=\chi(x+1)=\chi(x+2)=\chi(x+3)\}. \end{equation} All three nonzero colours are included. The four entries are consecutive integer residues, and overlapping windows are counted separately. This is a window statistic, not a count of maximal runs. The character order is part of its definition: a cubic four-window count is not reconstructed by relabelling a quadratic four-window count. Put \begin{equation}\label{eq:correction} I_2(p)=\ind_{\chi(2)=1},\qquad I_{23}(p)=\ind_{\chi(2)=\chi(3)=1},\qquad b_p=26+18I_2(p)+18I_{23}(p). \end{equation} Thus $b_p\in\{26,44,62\}$. We use both normalizations \begin{equation}\label{eq:DY} D_p=\frac{27A_p-p+b_p}{\sqrt p}, \qquad Y_p=\frac{27A_p-p}{\sqrt p}. \end{equation} The first retains the exact finite boundary correction; the second is the more immediate fluctuation around $p/27$. Our population of varying primes is \[ \Pcal(X)=\{p\text{ prime}:X\le p<2X,\ p\equiv1\pmod3\}. \] Let $\Pcal_0(X)$ consist of its primes for which three is a cube, and let $\Pcal_*(X)$ be the complement. Each average below is uniform on the stated finite set and is divided by that set's own cardinality. There is no additional random origin in a character word, or additional random choice of the orientation of $\chi$. \subsection{An exact elliptic formula} For an elliptic curve $E/\Fp$ write $t_E(p)=p+1-\#E(\Fp)$. Consider the fixed rational curves \begin{align} E_1&:y^2=x^3-99x+414,\nonumber\\ E_2&:y^2=x^3-21x+37,\label{eq:noncm}\\ E_3&:y^2=x^3-2835x+58158,\nonumber \end{align} and the three curves with complex multiplication \begin{equation}\label{eq:cmcurves} C_0:y^2=x^3-27,\quad C_1:y^2=x^3-243,\quad C_2:y^2=x^3-2187. \end{equation} All six have good reduction for $p>3$. Write $t_i=t_{E_i}$, $c_j=t_{C_j}$, and $\beta_p=\chi(3)+\overline{\chi(3)}\in\{2,-1\}$. \begin{theorem}[Exact four-window formula]\label{thm:exact} For every admissible prime, \begin{equation}\label{eq:exact} 27A_p=p-b_p-2c_0(p)-2c_1(p) -2t_1(p)-2t_2(p)-\beta_p t_3(p). \end{equation} Equivalently, if $J_p=J(\chi,\chi)$, \begin{align} 27A_p={}&p-b_p+ 4\Rea\{J_p(\overline{\chi(2)}+\overline{\chi(6)})\} \nonumber\\[-2pt] &-2t_1(p)-2t_2(p)-\beta_p t_3(p). \label{eq:jacobi-form} \end{align} The CM traces satisfy \begin{equation}\label{eq:twistrelations} \begin{cases} c_0=c_1=c_2,& \chi(3)=1,\\ c_0+c_1+c_2=0,& \chi(3)\ne1. \end{cases} \end{equation} \end{theorem} Sections~\ref{sec:fourpositions}--\ref{sec:CM} prove these formulas. The finite corrections in \eqref{eq:exact} matter for an exact count: the character expansion on all of $\Fp$ is not the desired count until the four excluded residues have been removed. \subsection{Four moments over primes} \begin{theorem}[Moments over the actual primes]\label{thm:moments} As $X\to\infty$, the relative cardinalities of $\Pcal_0(X)$ and $\Pcal_*(X)$ inside $\Pcal(X)$ tend to $1/3$ and $2/3$. For $r=1,2,3,4$, the limits of the averages of $D_p^r$ are \[ \begin{array}{c|rrrr} \text{population}&r=1&r=2&r=3&r=4\\ \hline \Pcal_0(X)&0&44&0&4224\\ \Pcal_*(X)&0&17&0&738\\ \Pcal(X)&0&26&0&1900 \end{array} \] The same statements hold with $Y_p$ in place of $D_p$. \end{theorem} The constants can be read from the trace combination before the analytic proof. Write $x_i=t_i/\sqrt p$ and $v_j=c_j/\sqrt p$. Equations \eqref{eq:exact} and \eqref{eq:twistrelations} give \[ D_p=\begin{cases} -4v_0-2x_1-2x_2-2x_3,&\chi(3)=1,\\ 2v_2-2x_1-2x_2+x_3,&\chi(3)\ne1. \end{cases} \] The low-degree averaging rule proved below assigns second moment $2$ to the CM coordinate and $1$ to each non-CM coordinate, with vanishing mixed terms in the required range. Thus \[ 44=4^2\cdot2+2^2+2^2+2^2,\qquad 17=2^2\cdot2+2^2+2^2+1. \] Proving this averaging rule under the finite cubic conditioning is the analytic task. It provides the needed mixed moments through total degree four and does not posit an independent joint law in every degree. The analytic proof in Sections~\ref{sec:qualification}--\ref{sec:moments} uses fixed automorphic objects. It establishes the mixed moments needed up to total degree four, without postulating complete joint equidistribution of the six curves. The displayed limits have $o(1)$ errors; we do not extract a numerical error bound applicable near $2^{32}$. \section{A four-position identity from Greene and Lennon}\label{sec:fourpositions} \subsection{The phase and the elliptic curve} Take distinct $a,b,c,d\in\Fp$ and set \begin{equation}\label{eq:parameters} \rho=\frac{c-d}{a-b},\qquad A=\frac{4(ab+cd)-2(a+b)(c+d)}{(a-b)(c-d)}. \end{equation} Define \begin{equation}\label{eq:EA} E_A:Y^2=X^3-(6A+15)X+(A^2+14A+22),\qquad t_A(p)=p+1-\#E_A(\Fp). \end{equation} The identities \[ A-2=\frac{4(a-d)(b-c)}{(a-b)(c-d)},\qquad A+2=\frac{4(a-c)(b-d)}{(a-b)(c-d)} \] give $A\ne\pm2$. Direct substitution in the Weierstrass discriminant gives \begin{equation}\label{eq:disc} \Delta(E_A)=-432(A-2)^3(A+2)\ne0. \end{equation} Thus none of the curves occurring in the identity is singular. \begin{corollary}[Four-position correlation; Greene--Lennon]\label{thm:fourpositions} With the conventions above, \begin{equation}\label{eq:fouridentity} 1+\sum_{z\in\Fp} \chi((z+a)(z+b)(z+c)^2(z+d)^2) =-\overline{\chi(\rho)}\,t_A(p). \end{equation} Moreover $t_A(p)=t_{-A}(p)$. If $\beta_p(u)=\chi(u)+\overline{\chi(u)}$, the conjugate pair of sums is therefore \begin{equation}\label{eq:pair} S_e(p)+S_{-e}(p)=-2-\beta_p(\rho)t_A(p). \end{equation} \end{corollary} The explicit phase is part of the formula. Isomorphism over an algebraic closure alone would not recover it. \subsection{The hypergeometric derivation and its normalization} Extend the trivial character $\varepsilon$ by $\varepsilon(0)=0$, as in Greene. Put \[ s=\frac{2-A}{4} =\frac{(a-d)(c-b)}{(a-b)(c-d)},\qquad u=\frac{a-b}{a-d}\frac{z+d}{z+b}. \] The distinct-position assumption gives $s\ne0,1$. This projective change of variable sends $-d,-a,-c,-b$ to $0,1,1/s,\infty$, and \[ \frac{(z+a)(z+b)}{(z+c)(z+d)} =\rho^{-1}\frac{1-u}{u(1-su)}. \] Define Greene's normalized function, here specialized to cubic characters, by its character sum: \begin{equation}\label{eq:greene} F(s)={}_2F_1\!\left(\begin{matrix}\chi,&\overline\chi\\&\varepsilon\end{matrix};s\right)_p =\frac1p\sum_{u\in\Fp} \overline\chi(u)\chi(1-u)\overline\chi(1-su). \end{equation} This is Definition 3.5 of~\cite[p.~82]{greene}, since $\chi(-1)=1$ and $\varepsilon(s)=1$. The poles and zeros contribute zero; the source point $z=\infty$ contributes one. Therefore the left side of \eqref{eq:fouridentity} is $\overline\chi(\rho)\,pF(s)$, including its cubic phase and the extra one. In \eqref{eq:EA} the substitution $X=x+3$, $Y=y-3x+A-2$ gives \[ y^2-6xy+2(A-2)y=x^3. \] Lennon's Theorem 1.1~\cite{lennon}, with $a_1=-6$, $a_3=2(A-2)$, and $27a_3/a_1^3=s$, gives $t_A(p)=-pF(s)$. A residue value of $A$ can be lifted to an integer; $p>3$ and $A\ne\pm2$ give the required good reduction and $p\nmid a_1$. This also covers $A=0$. Greene's transformation~\cite[Theorem 4.4(i), p.~88]{greene} specializes to $F(s)=F(1-s)$, so $t_A=t_{-A}$. Conjugation gives \eqref{eq:pair}. This proves the corollary using the published identities. \subsection{Direct geometric proof: a degree-two rational map} Let $R(z)=(z+a)(z+b)/((z+c)(z+d))$. Its character equals that of the polynomial in \eqref{eq:fouridentity} wherever the quotient is defined, because the two differ by a cube. Its poles contribute zero, while $R(\infty)=1$. If $S_e$ denotes the affine polynomial sum, the character sum on this projective source is $S_e+1$. For $v\in\Fp$, the homogeneous equation $R(z)=v$ has $1+\lambda(D(v))$ distinct rational roots, where $\lambda$ is the quadratic character and \[ D(v)=(c-d)^2v^2+ [4(ab+cd)-2(a+b)(c+d)]v+(a-b)^2. \] This root count includes infinity when the affine leading coefficient vanishes. The equation is never identically zero: its numerator and denominator have four distinct roots. Since $\sum_v\chi(v)=0$, changing variables by $w=\rho v$ gives \begin{equation}\label{eq:mixed} S_e+1=\overline{\chi(\rho)}B_A,\qquad B_A=\sum_{w\in\Fp}\chi(w)\lambda(w^2+Aw+1). \end{equation} Inversion $w\mapsto w^{-1}$, with the zero term treated separately, shows that $B_A=\overline{B_A}$. Since it belongs to $\Z[\omega]$, it is an integer. We will identify it with $-t_A$. \subsection{The genus-two curve and its elliptic quotients} Let $C_A$ be the smooth completion of $y^2=x^6+Ax^3+1$. The polynomial is squarefree because $A^2\ne4$, and the leading coefficient gives two rational points at infinity. This is the $b=1$ specialization of the family in Freeman--Satoh~\cite[Proposition 4.2]{freemansatoh}. The short model \eqref{eq:EA} and its degree-three isogeny also appear in Guillevic--Vergnaud~\cite[Section 3.1, p.~241]{guillevicvergnaud}. We give the maps and an elementary point count for this specialization. The number of cube roots of $w$ is $1+\chi(w)+\overline{\chi(w)}$, including the value one at zero. Using $\sum_w\lambda(w^2+Aw+1)=-1$ gives \[ \sum_x\lambda(x^6+Ax^3+1)=-1+2B_A,\qquad \#C_A(\Fp)=p+1+2B_A. \] Thus its genus-two trace, defined as $p+1-\#C_A(\Fp)$, is $-2B_A$. The two quotient curves are \[ E_+:v^2=(u+2)(u^3-3u+A),\qquad E_-:v^2=(u-2)(u^3-3u+A). \] On suitable affine opens the maps are $u=x+x^{-1}$ and $v=y(x\pm1)/x^2$. We keep track of the traces by an elementary count, rather than requiring a decomposition theorem for the Jacobian. For each $u$, \begin{equation}\label{eq:fibers} \sum_{\substack{x\ne0\\x+x^{-1}=u}}\lambda(x) =\lambda(u+2)+\lambda(u-2). \end{equation} Indeed, away from $u=\pm2$, the two roots have the same quadratic character, and $(x\pm1)^2/x=u\pm2$. A nonsplit fibre has zero on both sides in aggregate. At $u=\pm2$ the formula is checked with the single root $x=\pm1$. Now $x^6+Ax^3+1=x^3(u^3-3u+A)$ for $x\ne0$. Equation~\eqref{eq:fibers}, the term $x=0$, and the two infinities on each quartic yield \begin{equation}\label{eq:trace-split} t(C_A)=t(E_+)+t(E_-). \end{equation} The substitutions \[ w=(u+2)^{-1},\quad v'=vw^2,\quad X=(A-2)w+3,\quad Y=(A-2)v' \] transform $E_+$ to \eqref{eq:EA}. Birational maps between their smooth projective completions preserve the point count, including the points outside this open. The change $u\mapsto-u$ identifies $E_-$ with the corresponding quartic for $-A$, hence with $E_{-A}$. \subsection{The degree-three isogeny and the square twist} The point $Q=(3,A-2)$ on $E_A$ has order exactly three. Its tangent has slope $-3$, and the group law gives $2Q=-Q$. With $h=X-3$, put \[ T=-12(A-2),\qquad V=4(A-2)^2,\qquad r(X)=X+\frac{T}{h}+\frac{V}{h^2}. \] The map $(X,Y)\mapsto(r(X),r'(X)Y)$ is the V\'elu isogeny with kernel $\{O,Q,-Q\}$, whose target is \begin{equation}\label{eq:velu-target} Y^2=X^3+(54A-135)X-27A^2+378A-594. \end{equation} The rational identity defining this map can also be verified directly over $\Z[A,X]$ after multiplication by $h^6$; the supplied verifier does this formal calculation. Since $p>3$ the isogeny is separable and extends across its kernel to the smooth projective curves. The target coefficients are those of the quadratic twist of $E_{-A}$ by $-3$: they are nine times its linear coefficient and $-27$ times its constant coefficient. A primitive cubic root $\zeta\in\Fp$ satisfies $(2\zeta+1)^2=-3$. Consequently this twist is isomorphic to $E_{-A}$ over $\Fp$. Curves isogenous over a finite field have the same trace. For this direction, an isogeny commutes with Frobenius minus the identity; taking degrees and cancelling its degree proves equality of the degrees of Frobenius minus the identity, which are the point counts. We have proved $t(E_+)=t(E_-)=t_A(p)$. Combining this with \eqref{eq:trace-split} gives $-2B_A=2t_A(p)$. Equation~\eqref{eq:mixed} proves \eqref{eq:fouridentity}, and conjugation proves \eqref{eq:pair}. This completes the direct proof of Corollary~\ref{thm:fourpositions}. The two elliptic quotients need not be isomorphic to each other; their equality of traces here follows from the isogeny and the square twist. \section{Derivation of the consecutive quadruplet formula} \subsection{The pair and triple sectors} Away from the four zeros, the equality indicator has the expansion \begin{equation}\label{eq:expansion} 27\,\ind_{\chi(z)=\cdots=\chi(z+3)} =\sum_{\substack{e\in\{0,1,2\}^4\\\sum e_i=0\ (3)}} \prod_{i:e_i\ne0}\chi(z+i)^{e_i}. \end{equation} An empty product is one. This convention for zero exponents is retained at the excluded residues when the polynomial expansion is summed over $\Fp$. There are 27 terms: the constant, 12 of support two, eight of support three, and six of support four. Every support-two sum is $-1$. For example, the quotient $(z+a)/(z+b)$ parametrizes $\Fp\setminus\{1\}$ as $z$ runs away from its pole, and has the same cubic character as $(z+a)(z+b)^2$. Its full sum is therefore $-1$. For distinct $i3$. Together with the constant and pair sectors, the complete sum over $\Fp$ has main term $p-26$. We must remove $z=-r$, $r=0,1,2,3$. Terms with an active exponent at $r$ are already zero. The remaining terms sum to nine if the other three values are equal, and to zero otherwise. At $r=0,3$ the equality condition is $\chi(2)=\chi(3)=1$; at $r=1,2$ it is $\chi(2)=1$, using $\chi(-1)=1$. Thus the exclusions subtract exactly $18I_2+18I_{23}$, including their share of the constant term. The remaining residues are precisely $z=1,\ldots,p-4$, and \eqref{eq:jacobi-form} follows. This calculation accounts for all zero terms and avoids an error of four from treating the full field as the nonzero interval. \section{Complex multiplication and the exact conditional form}\label{sec:CM} \subsection{Fermat curves and Jacobi traces} For $a\in\Fp^\times$, the smooth projective Fermat cubic $u^3+v^3=aw^3$ has three rational points at infinity. Counting cube fibres in the affine chart gives \begin{equation}\label{eq:fermat-count} \#F_a(\Fp)=p+1+ J_p\overline{\chi(a)}+\overline{J_p}\chi(a). \end{equation} Indeed the two mixed character terms each equal $-1$; the remaining nonconstant pair is the two Jacobi terms. The affine count is $p-2$ plus that pair, and the three infinities add three. This proves the sign in \eqref{eq:fermat-count} directly. On $u+v\ne0$, the change \[ X=\frac{12a}{u+v},\qquad Y=\frac{36a(u-v)}{u+v} \] gives $Y^2=X^3-432a^2$. Conversely $u+v=12a/X$ and $u-v=Y/(3X)$. These birational maps identify the smooth projective curves, so the exceptional points do not alter the point count. For $a=2,6,18$, scaling $(X,Y)=(4x,8y)$ gives the three curves in \eqref{eq:cmcurves}. Hence \begin{equation}\label{eq:cm-jacobi} c_j(p)=-2\Rea\{J_p\overline{\chi(2\cdot3^j)}\}, \qquad j=0,1,2. \end{equation} Substitution proves \eqref{eq:exact}. If $\eta=\chi(3)$ is one, the three traces coincide. Otherwise $1+\eta+\eta^2=0$ proves their zero sum. This also proves \eqref{eq:twistrelations}. \subsection{Two arithmetic fluctuation regimes} Put $x_i=t_i/\sqrt p$ and $v_j=c_j/\sqrt p$. Equations~\eqref{eq:exact} and \eqref{eq:twistrelations} give \begin{equation}\label{eq:conditional} D_p= \begin{cases} -4v_0-2x_1-2x_2-2x_3,&3\text{ a cube},\\ 2v_2-2x_1-2x_2+x_3,&3\text{ not a cube}. \end{cases} \end{equation} Hasse gives $|v_j|,|x_i|\le2$. Thus $|D_p|\le20$ in the first class and $|D_p|\le14$ in the second. Since $|D_p-Y_p|\le62/\sqrt X$ on $[X,2X)$, the limits of every fixed moment agree for these two normalizations whenever either limit is established. The two CM terms in the original exact formula are related twists. Treating them as independent would give the wrong second and fourth moments. Their dependence also persists when their unconditional covariance happens to vanish. \section{Arithmetic qualification of the non-CM factors}\label{sec:qualification} \subsection{Non-CM and good reduction} The $j$-invariants of $E_1,E_2,E_3$ are, respectively, $-35937/4$, $790272$, and $-3472875/4$. The first and third are not algebraic integers, which already excludes complex multiplication for them. A uniform alternative for all three curves uses two good ordinary reductions with different Frobenius fields: \begin{center} \begin{tabular}{c rr l rr l} \toprule Curve&$p$&$t_p$&Frobenius field&$p$&$t_p$&Frobenius field\\ \midrule $E_1$&5&$-3$&$\Q(\sqrt{-11})$&7&$-4$&$\Q(\sqrt{-3})$\\ $E_2$&5&3&$\Q(\sqrt{-11})$&7&$-1$&$\Q(\sqrt{-3})$\\ $E_3$&7&$-1$&$\Q(\sqrt{-3})$&19&5&$\Q(\sqrt{-51})$\\ \bottomrule \end{tabular} \end{center} In each entry $p\nmid t_p$, so the reduction is ordinary. The specialization of endomorphisms is injective at good reduction~\cite{sutherland21}. For an ordinary reduction, the geometric endomorphism algebra is the imaginary quadratic field $\Q(\sqrt{t_p^2-4p})$~\cite{sutherland13}. This remains the same on finite extensions: the two Frobenius roots have different $p$-adic valuations, so their ratio is not a root of unity and no power of Frobenius becomes rational. A characteristic-zero CM field would therefore inject into each of the two different fields in its row, which is impossible. The Weierstrass discriminants are $-2^{14}3^6$, $2^4 3^4$, and $-2^{14}3^{11}$. Thus all primes under consideration are good. The trace witnesses and these elementary invariants are recomputed in the finite verifier. \subsection{Symmetric powers and quadratic base change} Let $\pi_i$ denote the unitary-normalized modular representation attached to $E_i/\Q$. Its central character is trivial and it is self-contragredient. Modularity and Newton--Thorne's Theorem A~\cite{newtonthorne} provide cuspidal $\Sym^m\pi_i$ on $\mathrm{GL}_{m+1}/\Q$ for $1\le m\le4$. Set $K=\Q(\omega)$. The cyclic base-change criterion recalled in~\cite[Proposition 2.3.1(5), p.~54]{ramakrishnan} says that a cuspidal representation remains cuspidal in this quadratic extension unless it has the corresponding quadratic self-twist. This exceptional self-twist is excluded by a single inert prime for each curve and every needed $m$. Define $B_0=1$, $B_1=t$, and $B_m=tB_{m-1}-pB_{m-2}$. The normalized symmetric-power trace is $B_m/p^{m/2}$. At the following inert primes, none is zero: \begin{center} \begin{tabular}{c r rrrr} \toprule Curve&$p$&$B_1$&$B_2$&$B_3$&$B_4$\\ \midrule $E_1$&5&$-3$&4&3&$-29$\\ $E_2$&5&3&4&$-3$&$-29$\\ $E_3$&11&$-6$&25&$-84$&229\\ \bottomrule \end{tabular} \end{center} A self-twist by the quadratic character of $K/\Q$ would negate each such trace, forcing it to be zero. Write $\Pi_i$ for the base change of $\pi_i$ to $K$. The representations $\Sym^m\Pi_i$ are consequently cuspidal, unitary, and self-contragredient, with trivial central character. In particular $\Pi_i$ is nondihedral, because a dihedral $\mathrm{GL}_2$ representation has a noncuspidal symmetric square. \subsection{Twist exclusions and the tensor products} At either place of $K$ above the split prime 31 the traces are \begin{equation}\label{eq:31} (t_1,t_2,t_3)=(-4,5,-7). \end{equation} If two $\Pi_i$ were character twists of each other, their trivial central characters would force the twisting character to have square one. Both local representations are unramified at 31, so that character is unramified there and the absolute values of their traces would agree. The three distinct values in \eqref{eq:31} exclude this. Ramakrishnan's tensor-product theorem~\cite[Theorem M]{ramakrishnan} therefore gives cuspidal, self-contragredient $\Pi_i\boxtimes\Pi_j$ on $\mathrm{GL}_4/K$ for $i\ne j$. Here we use both nondihedrality and the twist exclusion. The normalized symmetric-square traces at 31 are \begin{equation}\label{eq:sym2-31} -15/31,\qquad-6/31,\qquad18/31. \end{equation} Their absolute values are also distinct. In the moment proof all Hecke twists are unramified at 31 and unitary. Consequently \eqref{eq:31} and \eqref{eq:sym2-31} exclude the equal-rank collisions even after an arbitrary imaginary power of the norm is included: such a twist still multiplies a trace at 31 by a number of modulus one. This local argument deals with the norm twists appearing in the prime number theorem as well as the finite cubic characters. We do not infer independence just from different equations or different $j$-invariants. \section{A twisted averaging lemma through degree four}\label{sec:analytic} \subsection{The CM Hecke character and the finite prescription} CM Hecke theory~\cite[Theorem 3.6 in arXiv v1]{chenshen} associates to $C_0$ a unitary Hecke character $\gamma$ of $K$ with nonzero angular infinity type. At a good prime ideal $\mathfrak p$, its normalized trace is $\gamma(\mathfrak p)+\gamma(\mathfrak p)^{-1}$. The field $K(\sqrt[3]{3})/K$ is cyclic of degree three. Indeed the valuation of three at the place above three is two, not a multiple of three. Let $\eta$ denote its nontrivial cubic Hecke character. At a degree-one place it records the cubic class of three, with conjugation coherent with the character orientation. The three CM twists may be labelled so that \begin{equation}\label{eq:gamma} \begin{split} v_0&=\gamma+\gamma^{-1},\\ v_1&=\gamma\eta^{-1}+\gamma^{-1}\eta,\\ v_2&=\gamma\eta+\gamma^{-1}\eta^{-1}. \end{split} \end{equation} Indeed, if $v^3=3$, the maps $(x,y)\mapsto(v^{2j}x,v^{3j}y)$ identify $C_0$ with $C_j$ over $K(v)$ for $j=1,2$. Their descent characters are the two nontrivial powers of $\eta$, giving \eqref{eq:gamma} after choosing an orientation. Conditioning the CM angle on a finite Galois class is an established method; see Fité--Sutherland~\cite[Propositions 3.6 and 3.10]{fitesutherland}. The particular six-curve observable still requires the mixed products below. Reversing the reciprocity convention conjugates both characters and leaves the class-conditioned moments unchanged. Their conductors have support only above two and three, so all twists here are unramified at 31. At any good place of $K$ with residue cardinality $q$, let $x_i$ be the trace of $E_i$ divided by $\sqrt q$. Define $P_0(x)=1$, $P_1(x)=x$, $P_m(x)=xP_{m-1}(x)-P_{m-2}(x)$. Then $P_m(x_i)$ is the local trace of $\Sym^m\Pi_i$. \begin{lemma}[Fixed-object twisted averages]\label{lem:averages} For $h\in\Z$, $u\in\{0,1,2\}$, and nonnegative $m_1,m_2,m_3$ with $|h|+m_1+m_2+m_3\le4$, the average over good prime ideals $\mathfrak p$ of $K$ with $X\le\Nm\mathfrak p<2X$ of \begin{equation}\label{eq:monomial} \gamma(\mathfrak p)^h\eta(\mathfrak p)^u \prod_{i=1}^3P_{m_i}(x_i(\mathfrak p)) \end{equation} tends to zero unless $h=m_1=m_2=m_3=u=0$. In that constant case the average is one. \end{lemma} \subsection{The finite list of analytic products} Let $\theta=\gamma^h\eta^u$. Gillespie--Ji's Theorem 1.1 in arXiv v1~\cite{gillespieji} applies over the fixed Galois field $K$ to two unitary cuspidal factors when at least one is self-contragredient. Its possible main term comes from equivalence of the factors up to an imaginary norm twist. We use the contragredient on the second factor when converting the notation to a product of the desired local traces. The required products are exhausted by the following list. The regrouping of the degree pattern $(2,1,1)$ into ranks $(3,4)$ uses the same tensor-product strategy as Ramakrishnan~\cite[Theorem 4.2.1, pp.~93--94]{ramakrishnan}; the finite enumeration below checks its applicability to our specific moment expansion, rather than introducing that strategy. The indices $i,j,l$ are distinct whenever they occur together. \begin{center}\small \begin{tabular}{P{20mm}P{40mm}P{78mm}} \toprule Positive $m_i$&Allowed pattern&Factors for the prime number theorem\\ \midrule None&$\theta$ alone&$\theta$ and the trivial $\mathrm{GL}_1$ character\\ One&$1\le m_i\le4$&$\Sym^{m_i}\Pi_i$ and $\theta$\\ Two&$m_i+m_j\le4$&$\Sym^{m_i}\Pi_i$ and $\Sym^{m_j}\Pi_j\otimes\theta$\\ Three&$(1,1,1)$, $|h|\le1$& $\Pi_1\boxtimes\Pi_2$ and $\Pi_3\otimes\theta$\\ Three&Permutation of $(2,1,1)$, $h=0$& $\Sym^2\Pi_i$ and $(\Pi_j\boxtimes\Pi_l)\otimes\eta^u$\\ \bottomrule \end{tabular} \end{center} Every listed first factor, except for the first row where the trivial factor can be used, is cuspidal and self-contragredient by Section~\ref{sec:qualification}. If the two ranks differ, equivalence is impossible. The two three-index rows have ranks $(4,2)$ and $(3,4)$, respectively. In the two-index row the only equal-rank patterns are $(1,1)$ and $(2,2)$. Equations~\eqref{eq:31} and \eqref{eq:sym2-31} exclude both after every twist under consideration, including the imaginary norm twist. The one-index row has ranks $m_i+1$ and one. In the first row $\theta$ can equal an imaginary norm power only when $h=0$, by its angular infinity type. Then its order-three part is nontrivial unless $u=0$. In the constant case the usual prime ideal theorem provides the main term. Thus every nonconstant case has no main term. \subsection{Prime powers, ramified places, and unweighted averages} The cited theorem initially controls coefficients of a logarithmic derivative, with norm logarithms as weights. We spell out the passage to prime ideals used here. At every good place, normalized elliptic eigenvalues have modulus one. Symmetric powers and the two-factor tensor products retain that property; the Hecke characters are also unitary. Their traces at prime powers are therefore bounded by a constant depending only on the fixed ranks. The contribution from powers of order at least two up to norm $2X$ is $O(\sqrt X(\log X)^2)$. There are finitely many bad places. Their factors here come from the local parameters of elliptic curves and CM characters, followed by the same fixed tensor and symmetric-power operations. In unitary normalization their local parameters in the Euler factors have modulus at most one. More explicitly, an elliptic unitary Weil--Deligne parameter is tempered: its special blocks have the form $U\otimes\operatorname{Sp}(r)$ with unitary $U$. On inertia invariants in the kernel of monodromy, the eigenvalues from such a block have modulus $q^{-(r-1)/2}\le1$. The fixed symmetric powers and tensor products here decompose into blocks of this same form; the unitary CM characters have $r=1$. Thus this bound applies to the actual ramified Rankin--Selberg Euler factors, not just to the good places. Their higher-power contribution is consequently $O(\log X)$ after summing over the fixed bad places. Equivalently these factors may be removed before applying the prime number theorem and their finite Euler corrections restored afterwards. The nonconstant logarithmically weighted sum is $o(X)$; the constant sum is $X+o(X)$. Partial summation on $[X,2X)$ removes the logarithmic weight and gives $o(X/\log X)$ in the nonconstant cases, against $X/\log X+o(X/\log X)$ for the prime count. This proves Lemma~\ref{lem:averages}. We have paid for prime powers directly using known tempered parameters. No general Ramanujan conjecture, Hypothesis H, or growing-conductor uniformity is being imported from a more general statement. \section{Conditioning and the integer moment calculations}\label{sec:moments} \subsection{From prime ideals to rational primes} Prime ideals of residue degree at least two and norm at most $2X$ lie over rational primes at most $\sqrt{2X}$. There are $O(\sqrt X)$ of them in this quadratic field. All observables needed here are bounded, so their contribution is negligible in the prime ideal averages. Each split rational prime $p\equiv1\pmod3$ has exactly two conjugate degree-one places of norm $p$. The actual count, the trace combination $D_p$, and the events $\eta=1$ and $\eta\ne1$ are invariant under conjugation. Averaging them over the two places is therefore exactly the rational-prime average in Theorem~\ref{thm:moments}. The class indicators are \begin{equation}\label{eq:indicators} \ind_{\eta=1}=\frac{1+\eta+\eta^2}{3},\qquad \ind_{\eta\ne1}=\frac{2-\eta-\eta^2}{3}. \end{equation} Lemma~\ref{lem:averages} gives relative densities $1/3$ and $2/3$. Dividing the corresponding weighted averages by those densities gives the class-conditioned moments, not moments divided by the total population. \subsection{The mixed functional only through degree four} For nonnegative $r_0,r_1,r_2,r_3$ of total degree at most four, the conditional averages of $v_0^{r_0}\prod_i x_i^{r_i}$ in the cube class, and of $v_2^{r_0}\prod_i x_i^{r_i}$ in the noncube class, factor as \begin{equation}\label{eq:functional} M_{\rm CM}(r_0)\prod_{i=1}^3M_{\rm ST}(r_i). \end{equation} Here, for orders zero through four, \[ M_{\rm CM}=(1,0,2,0,6),\qquad M_{\rm ST}=(1,0,1,0,2). \] To prove this formula, expand \eqref{eq:gamma} in powers of $\gamma$ and $\eta$, use \[ x^2=P_2(x)+1,\quad x^3=P_3(x)+2P_1(x),\quad x^4=P_4(x)+3P_2(x)+2, \] and multiply by \eqref{eq:indicators}. Every nonconstant term vanishes by Lemma~\ref{lem:averages}. The surviving constant coefficients are $\binom{2r}{r}$ for a CM even power $2r$ and the Catalan number $\binom{2r}{r}/(r+1)$ for each non-CM factor. Odd powers have no constant coefficient. The factors of $\eta$ in $v_2$ cancel in its constant term, so the same functional applies in the noncube class. This factorization is proved only in the degree range just specified. It does not assert that the four variables have an independent joint law in all degrees. \subsection{Second and fourth moments} In the cube class, \eqref{eq:conditional} has coefficient vector $(-4,-2,-2,-2)$. The CM contribution has variance $16\cdot2=32$, and the other three have variance four each. Thus the variance is 44. In the noncube class, the coefficient vector is $(2,-2,-2,1)$: its variance is $4\cdot2+4+4+1=17$. The first and third moments vanish by \eqref{eq:functional}. Only the single-variable fourth powers and products of two squares survive in the fourth moment. They give \begin{align*} 4224&=4^4\cdot6+3\cdot2^4\cdot2 +6\{3(32\cdot4)+3(4\cdot4)\},\\ 738&=2^4\cdot6+(2^4+2^4+1)\cdot2 +6\{8\cdot9+(4\cdot4+4\cdot1+4\cdot1)\}. \end{align*} Finally \[ \frac{44+2\cdot17}{3}=26,\qquad \frac{4224+2\cdot738}{3}=1900. \] The uniform bounds following \eqref{eq:conditional} justify replacing $D_p$ by $Y_p$. This completes the proof of Theorem~\ref{thm:moments}. For the unmultiplied fluctuation $(A_p-p/27)/\sqrt p$, the second and fourth moments are $26/729$ and $1900/531441$. \subsection{The covariance of the original CM pair} The same lemma applied to \eqref{eq:gamma} gives \[ \lim\E\left[ \begin{pmatrix}v_0^2&v_0v_1\\v_0v_1&v_1^2\end{pmatrix} \,\middle|\,3\text{ a cube}\right] =\begin{pmatrix}2&2\\2&2\end{pmatrix}, \] and in the noncube class the matrix is $\left(\begin{smallmatrix}2&-1\\-1&2\end{smallmatrix}\right)$. The unconditional covariance is zero, although the exact twist relations remain. The arithmetic contrast concerns the cubic class of \emph{three}. Replacing this stratum by the cube/noncube class of \emph{two} would change the prime-averaging question. \section{Exact certificates and reproducibility}\label{sec:certificates} \subsection{Point orders determine the trace} For a nonsingular short Weierstrass curve over $\Fp$, a trace certificate contains a point $P$, its claimed order $r$ with complete prime factorization, and a claimed group order $N$. The verifier checks \[ [r]P=O,\qquad [r/q]P\ne O \quad\text{for each prime }q\mid r, \] and \begin{equation}\label{eq:hasse-certificate} r>2\lfloor2\sqrt p\rfloor,\qquad |N-p-1|\le\lfloor2\sqrt p\rfloor,\qquad r\mid N. \end{equation} The scalar checks and the complete prime factorization prove the exact point order. Lagrange then makes $r$ a divisor of the true group order. Hasse puts that order in an integer interval of width $2\lfloor2\sqrt p\rfloor