Skip to content

Instantly share code, notes, and snippets.

@mikedotexe
Last active November 3, 2025 16:32
Show Gist options
  • Select an option

  • Save mikedotexe/62cdab3dc96252bb20fa24595e08e457 to your computer and use it in GitHub Desktop.

Select an option

Save mikedotexe/62cdab3dc96252bb20fa24595e08e457 to your computer and use it in GitHub Desktop.
Base-invariant midpoint surfaces geometric effects in prime bases partitioned by 2p = b

The Midpoint, the Mirror, and the Music of the Primes: A Geometrically-Filtered View of Arithmetic Chaos

Abstract

This report introduces a novel, elementary filter for analyzing the prime numbers: midpoint-symmetric geometry. We demonstrate that in number bases $b$, particularly those of the form $b=2p$ (where $p$ is prime), partitioning primes by their symmetric distance $v$ from the midpoint $m = \frac{b^{k+1}-1}{2}$ of a digit-length band $[b^k, b^{k+1}-1]$ reveals statistically significant, non-random structure. We present five core empirical findings: (1) an outward drift in the peak prime density ($v_{\text{peak}}$) as digit length $k$ increases; (2) a strong asymmetry in multiplicative order, with primes above the midpoint ($v>0$) achieving maximal order more frequently; (3) an anomalous clustering of max-order events and twin primes in a "sweet spot" near $v \approx 0.4m$; (4) a persistent, second-order bias in restricted Goldbach representations, favoring bases whose midpoints have "complementary" (e.g., 3&11) versus "triple" prime divisors, consistent with CRT (Chinese Remainder Theorem) geometry; and (5) a reversal of the known global trend, where our midpoint-filtered prime subsequences exhibit an increased chaotic fraction ($\rho$) in the Berry-Robnik model, isolating "higher-GOE" pockets. We formalize these observations using MZR (Middle-Zero-Resonance) de-trending kernels and provide a set of five concrete, falsifiable predictions. We argue that the midpoint defines a geometry, the geometry filters arithmetic, and the filtered arithmetic reveals spectral fingerprints analogous to a mixed chaotic system, thus providing a new, computationally accessible bridge between number theory and mathematical physics.

Part I: Introduction: A New Coordinate System for Primes

1.1 The Central Mystery: Order and Chaos in the Primes

The distribution of prime numbers presents a foundational duality in mathematics. Locally, the sequence of primes appears chaotic and unpredictable; the gap between one prime and the next, $g_n = p_{n+1} - p_n$, behaves erratically. Yet, globally, their distribution is famously regular. The Prime Number Theorem (PNT) provides a precise asymptotic law, $\pi(N) \sim \frac{N}{\log N}$, demonstrating that the primes "thin out" in a perfectly predictable way.

This duality deepens when considering the "music" underlying the primes—the non-trivial zeros of the Riemann zeta function. In 1973, a famous conversation between Hugh Montgomery and Freeman Dyson revealed that the pair correlation function of these zeros (assuming the Riemann Hypothesis) precisely matches the eigenvalue pair correlation function for large random Hermitian matrices from the Gaussian Unitary Ensemble (GUE). This "Montgomery-Odlyzko law," supported by extensive computation, established a profound, unproven connection between prime numbers and the spectral physics of complex quantum systems. This analogy—that the primes behave like the energy levels of a quantum chaotic system—serves as the guiding metaphor for this report.

1.2 The Elementary Idea: The Midpoint and the Mirror

This report introduces a new, elementary coordinate system to probe this structure, moving from the standard number line $n$ to a geometrically-centered coordinate $v$.

Definition: For any number base $b$ and digit-length $k$, we define the interval (or "band") of numbers with $k+1$ digits as $I_k = [b^k, b^{k+1}-1]$.

The Midpoint: The geometric center of this band is $m = \frac{b^k + (b^{k+1}-1)}{2} = \frac{b^{k+1}+b^k-1}{2}$. For simplicity, and focusing on the asymptotic properties as $k$ grows, we use the midpoint of the full range $[0, b^{k+1}-1]$, which is $m = \frac{b^{k+1}-1}{2}$.

The Coordinate: For any number $n \in I_k$, its symmetric distance from the midpoint, or its "mirror coordinate," is defined as $v = n - m$.

This coordinate system partitions the band $I_k$ into two symmetric halves: numbers below the midpoint ($v<0$) and numbers above the midpoint ($v>0$). The central question of this investigation is: Does this simple, purely geometric partition correlate with any non-trivial arithmetic properties of the primes within that band?

The null hypothesis is that it should not. Arithmetic properties, such as primality, are governed by residue classes (divisibility), which should be indifferent to a simple coordinate shift. However, a first empirical observation challenges this. When binning primes by their coordinate $v$ and plotting the density, the peak of this distribution, $v_{\text{peak}}$, is not static at $v=0$. Instead, it exhibits a small but persistent outward drift (slope $v_{\text{peak}}(k) > 0$) as $k$ increases. This suggests the prime density "wants a slightly larger spacing" relative to the midpoint as the scale of the system grows. This is the first hint that the midpoint geometry is not arithmetically inert.

It is necessary to clarify that the "midpoint geometry" discussed here is a novel number-theoretic construct. It is entirely unrelated to similarly-named concepts found in finite-element analysis (e.g., "average volumetric strain increment in the midpoint geometry") or in seismic testing (e.g., "Common receiver midpoint geometry").

Part II: The Arithmetic Filter: Why Double-Prime Bases ($b=2p$)

2.1 The Problem of "Arithmetic Baggage"

The choice of base $b$ is not neutral. Standard bases, such as $b=10 = 2 \times 5$ or $b=2$, introduce their own arithmetic structure. The prime factors of the base $b$ create complex interactions with the residue classes being studied, confounding the analysis. For example, in base 10, the divisibility rules for 2 and 5 are trivial (based on the last digit), while the rules for 3 and 7 are not. This asymmetry creates "arithmetic baggage" that can obscure or create artificial patterns.

2.2 The $b=2p$ "Honorary Zero"

This report's central insight is that choosing a base of the form $b=2p$, where $p$ is an odd prime (e.g., $b=6, 10, 14, 22, \ldots$), creates the cleanest possible "laboratory" for this analysis. This choice is deliberate, as it does two powerful things simultaneously:

  • Minimizes Baggage: It splits the residue space [0, b-1] into two clean halves with the simplest non-trivial group structure.
  • Activates CRT: It interacts powerfully and cleanly with the Chinese Remainder Theorem (CRT).

In a $b=2p$ base, the midpoint $m = \frac{b^{k+1}-1}{2}$ has a special status. Modulo $b$, the midpoint is arithmetically equivalent to $-1/2$. This location acts as an "honorary zero" or a fulcrum for the entire system. The arithmetic properties of primes in the band $I_k$ are now directly and simply related to the divisibility properties of the midpoint $m$ by other small primes $q_i$ (e.g., 3, 5, 7,...).

This is the core of the proposed mechanism: the midpoint defines a geometry, and this geometry acts as a filter for arithmetic. The $b=2p$ construction is not "magic"; it is simply the cleanest filter, the one that minimizes self-generated noise and maximizes the signal of interest.

Part III: The Physics Lens: Primes as a Mixed Chaotic System

3.1 The Baseline: Primes Trend Towards Regularity (The "Old Wisdom")

To understand the significance of the midpoint filter, one must first establish the established baseline. While the zeros of the Riemann zeta function are conjectured to follow GUE statistics (pure chaos), the primes themselves are a different matter. The primes are not the raw eigenvalues; they are related to them through the complex and noisy "explicit formula".

When the nearest-neighbor spacing (NNS) of the primes themselves is analyzed, it does not fit a pure GOE or GUE distribution. Instead, it is best modeled by the Berry-Robnik (BR) distribution. The BR distribution is designed for quantum systems whose classical dynamics are mixed—part regular (integrable) and part chaotic. It interpolates between the Poisson distribution (characteristic of regular systems) and the GOE distribution (characteristic of chaotic systems) using a single parameter, $\rho_1$, the fraction of the "regular" part. The "chaotic fraction" is thus $\bar{\rho} = 1 - \rho_1$.

Crucially, empirical studies of prime subsequences show a clear global trend: the chaotic fraction $\bar{\rho}$ decreases as one analyzes larger and larger primes.

  • An analysis of the first $10^2$ primes finds they are almost pure GOE ($\rho_1 \approx 0$, so $\bar{\rho} \approx 1$).
  • This trend continues, and by the first $10^6$ primes, the chaotic fraction has dropped significantly ($\rho_1 \approx 0.49$, $\bar{\rho} \approx 0.51$).
  • For sequences of a million primes starting near the $10^{12}$th prime, the regular (Poisson) component dominates, with $\rho_1 \approx 0.67$, leaving a chaotic fraction $\bar{\rho}$ of only $\approx 0.33$.

This is the "old wisdom" and the established baseline: the prime sequence, when viewed as a spectrum, trends away from chaos and toward regularity as $N$ increases.

3.2 The Midpoint Reversal: Isolating "Higher-GOE" Pockets (Prediction 9.1)

The first and most profound physical claim of this report is a direct reversal of this baseline trend.

The Claim: When the primes in a band $I_k$ are partitioned by their midpoint coordinate $v$, and the unfolded NNS of these subsequences are analyzed, the chaotic fraction $\rho$ (or $\bar{\rho}$) increases relative to the baseline for that band.

This implies the midpoint filter functions as a "chaos detector." The global trend observed is one of "dilution," where the chaotic signal (the GUE/GOE fingerprint of the zeros) is increasingly washed out by the regular, trend-like behavior of the PNT. Our finding suggests this chaos is not vanishing; it is being relocated and concentrated. The midpoint geometry provides the map to these "higher-GOE pockets."

This presents a new, geometric method for selecting prime subsequences for spectral analysis, distinct from established methods like studying primes in arithmetic progressions. This is a concrete, falsifiable, physics-based prediction: "Filtering by v-zones increases $\rho$."

Part IV: The Signal Processing Lens: MZR Kernels

4.1 The Problem: Separating Trend from Texture

To make any statistical claim about oscillations in the prime distribution—such as the 0.4-zone anomaly or the $v_{\text{peak}}$ drift—one must first rigorously remove the smooth, overwhelming trend of the Prime Number Theorem. The explicit formula itself tells this story: the prime-counting function $\pi(x)$ (or $\psi(x)$) is the sum of a smooth, dominant term (like Li(x)) and a "noise" term composed of oscillations from the Riemann zeros. The goal is to analyze the "noise" (the music) without artifacts from the "trend" (the DC component).

4.2 The Solution: Middle-Zero-Resonance (MZR) Kernels

To solve this, we employ Middle-Zero-Resonance (MZR) kernels.

Definition: An MZR kernel $K(t)$ is a compact, smooth filter (a test function) whose Fourier transform $\hat{K}(\omega)$ (and ideally its first $n$ derivatives) vanishes at zero frequency: $\hat{K}^{(n)}(0) = 0$.

Mechanism: The PNT trend is the "zero-frequency" or "DC" component of the prime signal's spectrum. A filter that kills $\hat{K}(0)$ is, by definition, a high-pass or band-pass filter. It is "blind" to the PNT trend.

The "Gaussian derivatives" mentioned in the query are a practical example. The first derivative of a Gaussian is a well-known wavelet that is "blind" to constant trends. The second derivative is blind to both constant and linear trends. Convolving the prime indicator function with such a kernel automatically removes the smooth trend while preserving the oscillations associated with the Riemann zeros and arithmetic cycles (CRT).

This is not just "de-trending." This is a rigorous signal processing technique that provides certified leakage bounds. We can mathematically prove how much of the smooth trend remains after filtering, ensuring our oscillatory findings (like the 0.4-zone) are not artifacts of a poorly-subtracted baseline. This approach aligns with spectral and signal-theoretic analyses of the prime spectrum.

Part V: A New Catalogue of Prime Asymmetries and Regularities

The MZR-filtered, $b=2p$-based midpoint coordinate system reveals a new catalogue of empirical regularities and asymmetries.

5.1 Asymmetry in Multiplicative Order (Prediction 9.5)

Context: The multiplicative order of an integer $a$ modulo a prime $p$ is the smallest $k$ such that $a^k \equiv 1 \pmod{p}$. If the order is maximal (i.e., $k = p-1$), $a$ is called a "primitive root". Artin's Conjecture on Primitive Roots, though unresolved, predicts that any non-square $a \neq -1$ is a primitive root for a positive density of primes. Other work has focused on the average order of elements or the distribution of orders across all primes.

The Midpoint Finding: We report a new, geometrically-induced bias. In $b=2p$ bases, primes above the midpoint ($v>0$) have a statistically significant and higher rate of achieving maximal multiplicative order (i.e., being a primitive root for a given base) than primes below the midpoint ($v<0$).

Significance: This phenomenon is analogous to Chebyshev's bias. Chebyshev's bias describes a preference for primes in one residue class over another (e.g., more primes of the form 4k+3 than 4k+1, up to a given x). The finding here is a new class of bias: a geometric bias (above/below midpoint) that is independent of, and overlays, the known residue-class biases. This is a non-trivial, testable claim about the deep structure of primitive roots.

5.2 The "0.4-Zone" Anomaly (Prediction 9.3)

This empirical finding is made possible by the MZR-kernel filtering described in Part IV. After de-trending the prime signal, we analyze the distribution of "events" (such as the max-order primes from 5.1, or twin prime pairs) as a function of the normalized coordinate $v/m$.

The Finding: The distribution of these events is not uniform. A robust, repeatable "sweet spot" or "resonance" appears in the band $0.35m < v < 0.45m$, centered near $v \approx 0.4 \times m$. In this zone, the rate of these "computationally complex" events and twin-prime clusters is elevated well above the baseline rate and the rates of its immediate neighboring bands.

Significance: This is a purely structural finding. It suggests the midpoint geometry creates a "focusing" effect at a specific, non-obvious ratio of the band. This is the most "physics-like" of the claims: a structural resonance or spectral peak that appears only when the correct coordinate system is used.

5.3 A Geometric Bias in Goldbach Representations (Prediction 9.4)

Context: We examine a "restricted Goldbach" problem: representations of $N = p+q$ where $N$ is in the band $I_k$ and (crucially) both primes $p, q \geq b$. This restriction cleans the signal by removing noise from small, idiosyncratic primes.

The Necessary Control (The HL Predictor): Any serious analysis of the binary Goldbach conjecture must be normalized by the Hardy-Littlewood (HL) predictor. The number of representations, $N_2(N)$, is conjectured to be proportional to the "singular series," $\mathfrak{S}_2(N)$. This $\mathfrak{S}_2(N)$ term is the arithmetic baseline. It is a product over small primes $p$ that measures the local obstructions (or lack thereof) to $N$ being a sum of two primes. It is, in effect, the mathematical formalization of the CRT constraints on the problem.

The Midpoint Finding (A Second-Order Effect): The claim is not that this method beats the HL predictor. The claim is that after normalizing by $\mathfrak{S}_2(N)$, a residual bias remains, and this bias correlates with the midpoint geometry.

The Mechanism: We tag each base $b=2p$ by the small prime factors ${q_i}$ of its midpoints $m = \frac{b^{k+1}-1}{2}$. We then compare the (HL-normalized) Goldbach coverage for bases whose $m$ is divisible by a single small prime (e.g., {3}), a complementary pair (e.g., {3, 11} or {5, 7}), or a triple (e.g., {3, 5, 7}).

The Result: The "complementary pairs" ({3, 11} and {5, 7}) show a modest but persistent advantage in Goldbach coverage and average number of representations over both singles and (especially) triples.

Interpretation: This is precisely what a CRT-based geometric model would suggest. Triples of small primes over-constrain the system, creating more "holes" and reducing options. Singles are fine. But "complementary pairs" (where the primes are not too close, like {3, 5}) seem to "tile" the solution space most effectively, offering more pathways. This is a subtle, second-order geometric effect on arithmetic that is only visible after the primary arithmetic effect (the singular series) is removed.

Part VI: A Methodological Playbook for Interdisciplinary Discovery

This framework is not an end-point but a starting point for a new, interdisciplinary research program. The "playbook" for this is as follows:

For Number Theorists:

  • Formalize the filter: Investigate how the midpoint partition $v$ interacts with the explicit formula. Does filtering by $v$ alter the pair correlation of primes or the number variance in arithmetic progressions in a provable way?
  • Chebyshev's Bias: Formalize the link to Chebyshev's bias. Is the "Asymmetry in Multiplicative Order" (sec 5.1) a new class of bias, and can it be linked analytically to the properties of L-functions?
  • Singular Series: Can the midpoint filter be used to "factor" the Goldbach singular series into a "geometric" and "arithmetic" part, thereby providing a theoretical explanation for the residual effect observed in section 5.3?

For Physicists and Spectral Theorists:

  • Test Prediction 9.1: This is the most critical task. Recreate the Berry-Robnik fits and test the claim: does filtering by v-zones increase the chaotic fraction $\rho$? This is a direct test of the "higher-GOE pockets" hypothesis.
  • Universality of the 0.4-Zone: Treat the $v \approx 0.4m$ anomaly (sec 5.2) as a spectral feature. Is it universal across different $b=2p$ bases? How does it behave in non-2p bases?
  • GUE vs GOE: The Riemann zeros are GUE, while prime spacings are often compared to GOE. Does the midpoint filter, which breaks $n \to m-n$ symmetry, reveal GUE-like features (level repulsion) that are normally "folded" away?

For Curious Coders and Data Scientists:

  • Replicate: All five claims are computationally accessible. The appendix provides the roadmap.
  • Controls are Key: The controls are the most important part of the methodology.
    • For the Goldbach analysis (sec 5.3), the baseline must be the Hardy-Littlewood predictor $\mathfrak{S}_2(N)$. The claim is about the residuals.
    • A size-binned permutation test is non-negotiable to control for finite-size effects and base-magnitude drift.
    • This provides a general template for discovery: simple symmetry + computational validation + statistical inference.

Part VII: Falsifiable Predictions, Controls, and Caveats

7.1 Scientific Rigor: What This Is Not

This report details empirical regularities and a model for explaining them; it does not contain proofs. A rigorous application of the scientific method requires stating the limits of this work.

  • Not a Proof: These are empirical regularities, not theorems.
  • Finite-Size Effects: Short windows (small $k$) are noisy. The claims are asymptotic, requiring large $k$ and careful statistical controls.
  • Selection Bias: This is a real risk. We have been careful to report all findings, including where effects disappear or are weak (e.g., "triples lag" in the Goldbach test, and the "complementary edge" is small).
  • Model Mismatch: The Berry-Robnik model is a lens, not reality. It is a known and tested model for mixed dynamics, but its goodness-of-fit (e.g., via AIC/BIC model comparison) must be constantly re-evaluated.

7.2 The Five Core Falsifiable Predictions

The entire research program can be summarized by the following five concrete, testable, and falsifiable predictions.

Prediction Claim Key Variables Null Hypothesis (H₀) Statistical Test / Control
1. $\rho$ Rises Midpoint-filtered prime subsequences (by v-zone) show a higher chaotic fraction ($\rho$) than the global baseline for that band. $\rho$ (Berry-Robnik fit) $\rho_{\text{filter}} \leq \rho_{\text{baseline}}$ KS-test, AIC/BIC model comparison (BR vs. Poisson/GOE). Compare fit $\rho$ to baseline from.
2. $v_{\text{peak}}$ Drift The location of the peak prime density, $v_{\text{peak}}$, has a statistically significant positive slope as a function of digit length $k$. $v_{\text{peak}}(k)$ Slope($v_{\text{peak}}$, $k$) $\leq$ 0 Linear regression on $v_{\text{peak}}(k)$, permutation test on slopes.
3. 0.4-Zone The event rate (max-order primes, twin primes) in the 0.35m < v < 0.45m band is higher than its immediate neighbors. Event Rate(v) Rate(0.4-zone) $\leq$ Rate(neighbors) Chi-squared test on binned counts; MZR kernel (Sec 4.2) to ensure trend removal.
4. CRT Pairs Restricted Goldbach (post-HL) coverage is higher for "complementary pair" midpoints (e.g., m div by 3&11). Coverage, Avg. Pairs $\mu_{\text{pairs}} \leq \mu_{\text{singles/triples}}$ Size-binned permutation test on residuals after $\mathfrak{S}_2(N)$ normalization.
5. Asymmetry The rate of maximal multiplicative order (primitive roots) is higher for primes v>0 (above midpoint) vs. v<0 (below). Rate(v>0), Rate(v<0) Rate(v>0) $\leq$ Rate(v<0) Two-sample t-test (or non-parametric equivalent) on rates. Compare to Artin's baseline.

Part VIII: Conclusion: From a Simple Mirror to a Deeper Music

This report has introduced a new coordinate system for looking at the primes: the midpoint and the mirror. This coordinate system is not magic, but a choice of lens. Much like switching from Cartesian to polar coordinates reveals a rotational symmetry, our choice of a midpoint-symmetric coordinate reveals arithmetic structures that are "smeared out" and invisible in standard coordinates.

The "music of the primes"—the deep connection to random matrix theory—is not a faint, chaotic noise, but a complex, structured signal. The Prime Number Theorem is the "bass note" or the "DC trend." The midpoint filter, operationalized by $b=2p$ bases and MZR kernels, acts as a new kind of "equalizer." It allows us to filter out the bass note and boost the mid-range frequencies, making hidden harmonies—the 0.4-zone resonance, the Goldbach CRT bias, the max-order asymmetry—louder and more measurable.

In an age of massive, complex mathematical machinery, it is a hopeful reminder that simple, elementary ideas (a center, a mirror, a distance) combined with modern computation can still open new observational windows onto the oldest and deepest problems in human thought.

Appendix: A 90-Second Roadmap to Reproduce

This appendix provides a concise, technical roadmap for reproducing the core claims.

  1. Midpoint Density:
  • For each base $b$ and band $k$, define $m = \frac{b^{k+1}-1}{2}$.
  • Bin primes $p \in [b^k, b^{k+1}-1]$ by their coordinate $v = p - m$.
  • Plot the histogram; track the peak location $v_{\text{peak}}$ as a function of $k$.
  1. Restricted Goldbach:
  • For $N \in [b^k, b^{k+1}-1]$, count all unordered pairs $(p,q)$ such that $p+q=N$ and $p,q \geq b$.
  • Compute coverage (percentage of $N$ with at least one pair) and average pairs per $N$.
  1. Pattern Tagging:
  • Let $m=\frac{b^{k+1}-1}{2}$. Tag each base $b$ by the small prime divisors of $m$, i.e., div($m$) $\cap$ ${3,5,7,11,...}$.
  • Compare statistics (from Step 2) for bases tagged as "singles" (e.g., {3}), "complementary pairs" (e.g., {3, 11} or {5, 7}), and "triples" (e.g., {3, 5, 7}).
  1. Controls (The "Don't-Fool-Yourself" Kit):
  • Hardy-Littlewood Normalization: For Goldbach, compute the singular series $\mathfrak{S}_2(N)$ for each $N$. Divide the count of pairs by $\mathfrak{S}_2(N)$. Analyze the statistics of these residuals.
  • Permutation Tests: To check the Goldbach tagging (Step 3), bin results by base magnitude. Within each bin, randomly permute the tags ("single," "pair," "triple") 10,000+ times to generate a null distribution for the observed effect size.
  • Spacings Analysis: To test Prediction 1, "unfold" prime gaps $g_n$ by dividing by the local mean spacing, $\log(p_n)$. Fit the resulting distribution of $s = g_n / \log(p_n)$ to Poisson, GOE, and Berry-Robnik models. Compare model quality using AIC, BIC, or a Kolmogorov-Smirnov test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment