# Agent Report — The PSD Decomposes: Residue Is 2x Bluer, Magnitude Shapes the Spectrum

**Date**: 2026-04-20 03:30
**Piano**: 39
**Tension explored**: TWO_CHANNEL_DECOMPOSITION (0.85) + PSD_BLUE_NOISE (0.8)

## Claim Under Test

> PSD_BLUE_NOISE found a two-component structure (Poisson floor + anti-correlated dip) and a 2x amplitude gap between the 1/k ACF model and the PSD. TWO_CHANNEL_DECOMPOSITION found two independent anti-correlation channels (residue + magnitude). If these channels are spectrally independent, Wiener-Khinchin predicts S_total(f) = S_res(f) + S_mag(f) — and the two-component PSD structure should decompose into the two channels.

## Question

Does the power spectral density of prime gaps decompose into two independent channel PSDs with distinct spectral slopes? Does this decomposition explain the two-component structure and the amplitude mismatch found in PSD_BLUE_NOISE?

## Experiment Design

- **Method**: Additive decomposition gap_i = trans_mean(type_i) + mag_residual_i. The transition-mean component carries residue structure (Z/6Z class transitions), the magnitude residual carries within-class ordering.
- **Data**: 2,000,000 primes (up to 32.5M)
- **PSD**: Welch method, nperseg=4096, Hann window
- **Null baseline**: 20 shuffled surrogates per channel (preserve distribution, destroy order)
- **Scale test**: 3 equal bands (small/medium/large primes)

## Results

### 1. PSD Additivity

| Metric | Value |
|--------|-------|
| Mean relative error S_full vs S_trans+S_mag | 0.44% |
| Max relative error | 2.24% |
| Pearson(S_full, S_sum) | 0.998 |

The PSD decomposes with sub-percent accuracy. The channels are spectrally independent.

### 2. Spectral Slopes

| Channel | Slope | z vs shuffle | R2 |
|---------|-------|--------------|----|
| Full gaps | +0.077 | 57.2 | 0.77 |
| Trans (residue) | +0.160 | 107.0 | 0.72 |
| Magnitude | +0.074 | 69.9 | 0.75 |
| Trans + Mag | +0.075 | — | 0.76 |

The residue channel is **2.16x bluer** (slope +0.160 vs +0.074). Both are massively significant vs shuffle (white noise slope ~0).

### 3. Low-Frequency Suppression

| Channel | S(low)/S(high) | Interpretation |
|---------|----------------|----------------|
| Full | 0.804 | Blue noise dip |
| Trans (residue) | 0.680 | Deeper dip (32% suppression) |
| Magnitude | 0.810 | Shallower dip (19% suppression) |

The residue channel carries proportionally more of the low-f suppression.

### 4. Channel Fractions of Total PSD

| Frequency range | Trans fraction | Magnitude fraction |
|-----------------|----------------|--------------------|
| Low-f (0.005-0.05) | 1.12% | 99.32% |
| High-f (0.3-0.48) | 1.33% | 98.56% |

Magnitude dominates at all frequencies. Trans fraction *decreases* at low-f (opposite of naive expectation) because magnitude has even more variance to contribute.

### 5. Scale Dependence

| Band | ln(p) | Slope full | Slope trans | Slope mag | Frac trans |
|------|-------|------------|-------------|-----------|------------|
| Small | 15.4 | +0.085 | +0.164 | +0.081 | 1.42% |
| Medium | 16.6 | +0.076 | +0.157 | +0.074 | 1.15% |
| Large | 17.1 | +0.070 | +0.156 | +0.068 | 1.06% |

Both slopes decrease (approaching white noise = Poisson). Trans slope is more stable (+0.164 to +0.156, delta=5%) while magnitude decays faster (+0.081 to +0.068, delta=16%). The residue channel is **structurally constrained** — its spectral shape persists where magnitude fades. Consistent with universality finding (residue is algebraic, magnitude is number-theoretic).

Frac_trans decreases with scale: residue channel fades relative to magnitude. Consistent with "residue dies first" (Poisson at 10^14.9 vs 10^17.6).

## Key Findings

1. **The PSD decomposes additively into two channels** (0.44% error, r=0.998). Wiener-Khinchin confirmed: spectral independence follows from temporal independence (cross-corr=0.000).

2. **The two channels have different spectral colors.** Residue: slope +0.160 (strong blue). Magnitude: slope +0.074 (weak blue). The residue channel is 2.16x bluer — it suppresses low frequencies twice as strongly.

3. **The PSD_BLUE_NOISE two-component structure IS the two channels.** The "Poisson floor" is the magnitude channel (99% of power, weakly blue). The extra low-f dip beyond what a single 1/k model predicts comes from the steeper residue channel layered on top.

4. **The 1/k model amplitude gap is explained.** A single-slope model fitting the mixture of two slopes (+0.160 and +0.074) underestimates total power at mid-frequencies and overestimates at extremes. The 2x amplitude discrepancy noted in PSD_BLUE_NOISE is the cost of fitting a two-component spectrum with one component.

5. **Residue spectral slope is structurally stable.** It barely changes with prime scale (5% drift) while magnitude fades faster (16% drift). This is consistent with the universality finding: residue anti-correlation is algebraic (Z/6Z Markov), so its spectral shape is determined by transition probabilities, not by prime spacing details.

## Verdict

**CONFIRMED + CONSTRAINT on TWO_CHANNEL_DECOMPOSITION + PSD_BLUE_NOISE**

The two-channel decomposition extends from the ACF domain to the spectral domain. The channels are spectrally independent (additivity holds to <0.5%). The blue-noise signature of prime gaps is a two-component mixture with distinct slopes. The PSD_BLUE_NOISE amplitude gap is a mixing artifact, not a model failure.

**Constraint**: the residue channel carries <1.5% of total spectral power despite being 2x bluer. Its structural influence on the PSD shape is detectable (z=107) but energetically negligible. The blue noise of prime gaps is overwhelmingly shaped by the magnitude channel.

## Consecutio

The residue PSD slope (+0.16) is determined by Z/6Z transition probabilities. This should be derivable analytically from the 2-state Markov chain (states: 1 mod 6, 5 mod 6, with known transition matrix). If the predicted slope matches 0.160, the residue channel PSD is fully algebraic — no number theory needed. The magnitude slope (+0.074) then becomes the sole carrier of prime-specific spectral information.

## Files

- Script: `tools/exp_two_channel_psd.py` (reusable with --n_primes, --nperseg)
- Data: `tools/data/exp_two_channel_psd.json`
- Report: `tools/data/reports/agent_20260420_0330.md`
