Prime Analysis: the Prime Phase and Chebyshev psi spectral program

Prime numbers look random, but their running count wobbles around a smooth curve in a way that has long been tied to the zeros of the Riemann zeta function. This project asked whether that wobble (the Chebyshev residual \(\psi(x)-x\)) carries a structure that can be recovered and used to predict where primes fall. It is a pile of research notes, slide decks, simulations and scripts. Its own README calls it a late, concluding collection of the prime-router studies; the ancestry runs from the AI-Research workspace to a Python prime router, to this program, to the Rust model. The model's ideas about prime addresses and zeta phases draw on it. It is not a proof of the Riemann hypothesis, and not evidence that the language model works.

flowchart LR
    A["Primes up to x"] --> B["Residual: psi of x minus x"]
    B --> C["Detrend, resample on a log grid"]
    C --> D["Hilbert transform: phase of the signal"]
    D --> E["Look for stable frequencies and compare with zeta zeros"]
    E --> F["Time-ordered 70/30 split: predict the held-out part"]
    E -.-> G["Idea the model draws on: prime log-phases and zeta zeros as fixed phases"]

The program's pipeline as its own notes describe it. The dashed arrow is a transfer of an idea, not a transfer of a result.

The question and the method

Let \(\psi(x)=\sum_{n\le x}\Lambda(n)\) be the Chebyshev function, where \(\Lambda\) is the von Mangoldt function. The explicit formula writes the residual as a sum over the non-trivial zeros \(\rho=\tfrac12+i\gamma\) of the zeta function:

\[\psi(x)-x \;=\; -\sum_{\rho}\frac{x^{\rho}}{\rho}\;+\;\text{small terms}.\]

Each zero contributes an oscillation whose frequency is set by \(\gamma\). The program treats the residual as a signal and asks whether those oscillations can be seen and extrapolated. The notes describe a fixed ("fingerprint-locked") pipeline: causal detrending (no use of future data), resampling on a uniform log grid, analytic phase through a Hilbert transform, and time-ordered 70% train / 30% test splits so that prediction is judged out of sample.

The program also developed a geometric side: the R4 Prime Router, Hopf-base sector discretization, and an H4 x H4 coupled field. Those briefings are one source of the model's prime-routing language.

What is in the project

FolderSizeWhat it holds
research/about 201 MBAbout 30 briefings and study guides in Markdown, two CSV tables, manuscripts, and theoretical-mathematics/ with six sub-collections (ramsey-divisor-study, prime-number-theory, formal-math-lean, golden-harmonics, geometric-routing-hopf, theoretical-physics-uor)
images/about 229 MBSlide exports, mind maps and diagrams (JPG and PNG)
photos/about 104 MBMostly the same images again under the same names
simulations/smallSix interactive HTML pages (router visualizer, 3D zeta explorer, dissertation simulator and others)

In total: 7,708 files, of which 2,644 are Python (about 1,390 are the program's own; 1,257 are vendored third-party packages such as numpy and numba under formal-math-lean/.vendor), 363 are LaTeX, and 3,167 are Markdown (research-archive/2026-10-19/files.sha256 in the store; counts from the folder inventory). Despite the name, simulations/ holds only the six HTML pages. Almost all of the Python is under research/theoretical-mathematics/.

Caution on provenance. Many of the Markdown briefings appear to be AI-generated study guides built from the owner's papers and slides. The collection also contains third-party papers, personal documents and a provisional patent filing. Those need a licensing and privacy review before any of them is committed; until then they stay in the store.

Duplicates to remove at import

  • The 185 Python files in formal-math-lean/ are byte-identical to the 185 in riemann-lean/ (measurement: byte comparison of the local copies, 19 October 2026). That folder holds no Lean files. Keep one copy, in riemann-lean.
  • photos/ repeats images/ by name for at least some files (for example one 4.9 MB dashboard image appears in both).
  • 1,799 of the 3,117 distinct file hashes in ai-research/ also appear here (measurement from files.sha256). The overlap includes folders with the same names (for example Ramsey and MUDBench material). Import by hash, not by path.

Where it stands

StatementKindEvidence
Peaks extracted from the residual beat phase-randomized surrogate signals (\(p\approx0.039\))reported claim, unverified: the cited note is a prose synthesis, not a run output, and the underlying run outputs were not inspected for this pageresearch/Spectral-Phase Dynamics in Prime Density Modeling_ A Synthesis of Research Outcomes and Validation Rigor.md
The peaks align with zeta zeros no better than with random frequencies of the same density (\(p\approx0.62\))reported claim, unverified (same note)same
A truncation to about 300 zeros restores the phase geometry of the signalsamesame
The residual's structure can predict primes out of samplehypothesis. This page cites no final held-out prediction resultsame
The Riemann hypothesis followsnot claimed. The project's own README says it is scoped researchresearch/prime-analysis/README.md
Relevance to the modelThe zeta-phase and prime-address ideas fed the prime/zeta codebook; the model's results are separatemechanism page

The second row matters for the model: the program's own controls found no special link between its spectral peaks and the zeta zeros beyond their density. The model uses zeta zeros as fixed phases, which does not depend on that link, but it should not be sold as one.

Where the originals are

The full project is preserved in the private Hugging Face dataset caseyallard/uor-r4-store under research-archive/2026-10-19/tars/prime-analysis.tar (566,219,264 bytes, 7,708 files, SHA-256 25747ed4345b510f85187d119db17cc5b2ee01f2f8f791f8a952d9a44970f36e). Every file inside is listed in files.sha256, and the tar is listed in tars.sha256. The project's own README names GitHub repositories and hosted pages under Casey-allard; no separate remote is recorded in the folder itself.

Source files brought into this folder

  • README.md and the Markdown briefings and specifications in research/ (the curated set; the rest stays in the store)
  • research/theoretical-mathematics/**/*.py and **/*.tex, except the 185 duplicates of riemann-lean and anything under .vendor/, output/ or external/ (vendored or regenerable third-party code, which is not committed before review)
  • simulations/*.html (six pages)

Stay in the store: images/, photos/, PDFs, DOCX files and the manuscripts under published-manuscripts/. The slide decks may later serve as figures for the documentation, subject to the licensing review.

Go deeper