# Agent Report — Prime Gaps Are Weakly Blue Noise: PSD Reveals Two-Component Structure
**Date**: 2026-04-09 03:30
**Piano**: 39
**Tension explored**: ACF_1K_LAW (consecutio: power spectral density)

## Claim Under Test
> If acf(k) ~ -A/k (ACF_1K_LAW), then by Wiener-Khinchin the PSD must follow
> S(f) = sigma^2 + 2A * ln|2 sin(pi f)|. This predicts a logarithmic dip at
> low frequencies — "anti-1/f" noise, opposite of pink noise.

## Question
Does the measured power spectral density of prime gaps match the shape predicted
by the 1/k autocorrelation law? If not, what does the actual shape reveal?

## Experiment Design
- **Metric**: Power spectral density via Welch method (nperseg=4096)
- **Scope**: 500,000 primes (up to p = 7,368,787), 499,999 gaps
- **Null baseline**: 20 shuffled-gap surrogates (same distribution, destroyed order)
- **Theory**: S(f) = sigma^2 + 2A * ln|2sin(pi f)| with A=0.0289 (weighted fit from acf)
- **Additional**: check for Z/6Z spectral peaks at f=1/6, 1/3

## Results

### Autocorrelation fit
| Parameter | Value |
|-----------|-------|
| A (weighted fit) | 0.0289 |
| A (lag-1 only) | 0.0392 |
| R^2 of 1/k fit to acf | 0.653 |

### PSD vs Shuffle by frequency band
| Band | f range | z-score | ratio (prime/shuffle) |
|------|---------|---------|----------------------|
| Very-low | 0.005-0.05 | **-2.95** | 0.818 |
| Low | 0.05-0.15 | -0.90 | 0.944 |
| Mid | 0.15-0.35 | +0.31 | 1.019 |
| High | 0.35-0.49 | +0.92 | 1.056 |

### Dip ratio S(0.01)/S(0.48)
| Source | Ratio |
|--------|-------|
| Prime gaps | **0.718** |
| Shuffled gaps | 0.994 |

### PSD vs Theory (shape)
| Metric | Value |
|--------|-------|
| Correlation with ln|2sin(pi f)| | 0.734 |
| Spectral slope (log-log, f=0.005-0.1) | **+0.111** |
| Theory amplitude ratio | ~2x (theory underpredicts by 2x) |

### Z/6Z spectral structure
| Frequency | z-score | Interpretation |
|-----------|---------|----------------|
| f=1/6 | -0.52 | No signal |
| f=1/3 | -0.08 | No signal |
| f=1/2 (Nyquist) | +1.01 | Mild excess (lag-1 anti-corr) |

## Key Findings

1. **Low-frequency suppression is real and significant (z=-2.95).** Prime gaps have
   28% less power at very low frequencies than shuffled gaps. The dip ratio
   (0.718 vs 0.994) quantifies this: order matters, and it suppresses slow modes.
   This is the spectral fingerprint of long-range anti-correlation.

2. **The spectrum is weakly blue (slope = +0.111).** Not white (0), not pink (-1),
   not 1/f. Prime gaps live in a new spectral class: slightly blue noise with
   logarithmic low-frequency suppression. Power increases with frequency.

3. **The 1/k model captures the shape (r=0.73) but not the amplitude.** The measured
   PSD is ~2x the theoretical prediction across all bands. This means the 1/k
   autocorrelation accounts for about half the total variance. The other half is
   a broadband (white-like) floor — the Poisson-like component.

4. **No Z/6Z spectral peaks.** The modular confinement of gaps to {2,4} mod 6 does
   NOT produce spectral lines at f=1/6 or f=1/3. The arithmetic structure is
   invisible in the power spectrum — it manifests only in the gap values, not in
   their sequential correlations.

5. **Two-component decomposition:** S(f) = S_white + S_anti, where S_white is flat
   (Poisson floor) and S_anti ~ A*ln|2sin(pi f)| (anti-correlated dip).
   The crossover where anti-correlation dominates is f ~ 0.05 (period ~ 20 gaps).

## Verdict
**CONSTRAINT + NEW**

- **CONSTRAINT on ACF_1K_LAW**: the 1/k model captures the spectral shape (r=0.73)
  but misses amplitude by 2x. The R^2 of the 1/k fit to acf is 0.65, not 0.998
  as reported with the previous method (the discrepancy is methodological: the
  previous fit used log-log regression which compresses deviations; the weighted
  least-squares fit gives R^2=0.65).

- **NEW**: prime gaps are weakly blue noise (spectral slope +0.11), with
  significant low-frequency suppression (z=-3.0, dip ratio 0.72), no Z/6Z
  spectral peaks, and a two-component structure (Poisson floor + anti-correlated dip).

## Consecutio
The two-component structure connects directly to POISSON_CONVERGENCE: the primes
are a mixture of Poisson (white floor) and anti-correlated (blue dip), with the
anti-correlated component predicted to shrink at larger scales (the dip shallows).
The crossover frequency f_c ~ 0.05 should shift to lower frequencies at larger
primes — testable prediction.

The R^2 discrepancy (0.998 log-log vs 0.65 weighted) needs resolution: which
is the correct characterization of the 1/k law? The log-log fit compresses
deviations at small acf values; the weighted fit treats all lags equally.

## Files
- Script: `tools/exp_psd_prime_gaps.py`
- Data: `tools/data/psd_prime_gaps_results.json`
- Report: `tools/data/reports/agent_20260409_0330.md`
