Skip to content

brian-naughton/primespec

Repository files navigation

PrimeSpec

Spectral decomposition of wheel-corrected prime residuals into rational major-arc structure and Riemann-zero frequencies.

A reproducible computational instrument for testing whether anything structured remains in the distribution of primes after the known sources of apparent structure — density decay, modular sieving, polynomial tracks, projection artefacts — have been removed.

The project began as Quantum Banding: the seductive visual intuition that Ulam-spiral "bands" might encode hidden order, perhaps even physics. That intuition is the origin story; the instrument is what it became. The romantic hypotheses died cleanly — which is evidence the rig has teeth.

We are not looking for patterns in white noise. We are testing whether the apparent noise left after known arithmetic structure has been removed is truly noise.

The project originates from the seed discussion in ChatGPT Seed discussion 1.rtf, which distilled the Ulam-spiral "banding" intuition into a single formal object:

A_N(k, α; M) = Σ_{n ≤ N}  (P(n) − E_M(n)) · e^{2πi k n α}

where P(n) is the prime indicator, E_M(n) is the wheel-corrected expected prime density (conditional on n mod M for a primorial modulus M), and α is an irrational rotation. The central question:

Does the corrected prime residual field exhibit phase-coherent spectral excess under irrational rotational embeddings, relative to strict null models?

Architecture

PROTOCOL_FROZEN.md          Phase-1 analysis protocol (frozen before any confirmatory run)
PROTOCOL_2.md               Phase-2 out-of-sample protocol (committed before execution)
AMENDMENTS.md               All corrections to frozen documents, with provenance
REPRODUCIBILITY.md          Environment, determinism, order of evidence, replication levels
primespec/
    sieve.py                Prime sieve, prime counting, von Mangoldt function
    residual.py             Wheel-corrected expectation E_M and residual field R_M
    spectra.py              Exact spectral sums, FFT spectrum scan, log-domain spectrum
    nulls.py                Analytic null distribution + Monte Carlo wheel-Cramér model
    diagnostics.py          Rational attribution with phase-sensitive Vinogradov prediction
experiments/
    exp1_preregistered.py   Confirmatory test: 4 irrational α × 64 modes, Bonferroni
    exp2_fft_scan.py        Full-spectrum FFT scan + rational-aliasing attribution
    exp3_wheel_ladder.py    Correction ladder: does excess decay as the wheel grows?
    exp4_zeta_zeros.py      Exploratory: log-domain spectrum vs Riemann zeta zeros
    exp5_137_probe.py       Exploratory: 137 / fine-structure-constant negative control
    exp6_out_of_sample.py   Out-of-sample confirmation at N = 10⁸, forward predictions
tools/
    independent_check.py    Pure-Python cross-implementation verification (no shared code)
tests/
    test_core.py            Sanity tests against known number-theoretic facts
technical_note/
    TECHNICAL_NOTE.md       Concise paper-shaped account
results/                    Figures, CSV/JSON outputs, and RESULTS.md write-up

The ladder

Following the seed discussion, the project is structured as a ladder:

definition → computational conjecture → null-model test → attribution → escalation → interpretation

Three outcomes are all considered successes:

  1. Everything disappears → the Ulam illusion is fully decomposed.
  2. Residuals survive briefly, then vanish → a finding about finite-scale spectral artefacts.
  3. A residual survives strict null models and attribution → a candidate phenomenon worth real analytic attention.

Running

See REPRODUCIBILITY.md. Findings are written to results/RESULTS.md.

Status

Public research release candidate. The computational rig, protocols and findings are open for inspection and independent reproduction. A versioned archival release (v0.1.0) and Zenodo DOI will follow after the initial public audit; until then the default branch is a working copy, not the citable object.

PrimeSpec is an open computational instrument for testing spectral structure in corrected prime fields. At N = 10⁷, and out of sample at N = 10⁸, the experiments recover a rational comb generated by primes omitted from a finite correction wheel and the known zeta-zero spectrum in logarithmic frequency. No unexplained residual survived the prospectively specified confirmatory tests. The code, protocols, amendments, numerical outputs and failed expectations are published for independent reproduction and extension. This is a rediscovery instrument, not a claim of new structure in the primes.

About

A reproducible spectral decomposition of wheel-corrected prime residuals into rational major-arc structure and Riemann-zero frequencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors