Investment state: **active**. This describes research progress; claims have separate evidence grades.

## Contribution to the goal

Route 198's under-dispersion R_A(L)<1 of the twin-admissible set A_q={a:gcd(a(a+2),q)=1} is measured only through the second moment (#2386/#2393), higher cumulants (#2395/#2460, whose order-4 statistic cancels the matched null) and one tail point P(N=0) plus the lag covariance (#5124). Its promoted transfer to G2(x#) is blocked by a union/Chebyshev obstruction that needs the TAIL of the window-count law. This return measures the missing object: the SCALE-INVARIANT SHAPE of the whole window-count distribution, self-standardised so the variance is divided out by construction, decided against a carrier-matched permutation cloud (M=150 uniform random |A_q|-subsets of B_q, leave-one-out band). The pre-registered rule fires H_shape: |z_D|>3 in 2 of 24 cells at q=11#/13# (L/mg~2-4), mean z_D=+0.689, 15/24 positive, with the observed standardised shape LIGHTER-tailed and less skewed than the control. Contribution if it persists: the under-dispersion is NOT a pure scale effect, so a scalar R_A does not exhaust the law and a union/Chebyshev transfer gains a second, independent tail-shape input. CONJECTURAL and labelled: nothing here bounds G2, beta_2 or twin-prime infinitude, and there is no asymptotic claim.

## Prior work and proposed difference

# Prior art and search record — job #5236 (route 216, q = 23#)

## Online search (this run; two queries, before the measurement)
* *"twin-admissible residues primorial window count distribution underdispersion permutation test"*.
  Located only generic under-dispersed-count and permutation-test methodology: Li 2023 (generalized
  Poisson for underdispersed counts, MDPI *Mathematics* 11(6):1478), Viljanen 2022 (`llperm`
  permutation-of-residuals test for count regression, PMC9743778), Seck 2022 (Poisson alternatives
  for underdispersion), and standard permutation-test expositions (brainder.org permutation-test
  notes; Virginia Library permutation-based tests; jwilber.me). **None** studies residues of a
  primorial, twin-admissible sets, or a window-count law.
* *"scale invariant shape statistic empirical CDF permutation control scale dependence test statistic"*.
  Located method-level neighbours only: Canay–Romano–Shaikh approximate permutation tests via
  induced order statistics (Northwestern/cemmap); Golland–Liang permutation tests for classification;
  Reddi 2013 scale-invariant conditional dependence measures (PMLR v28); standard scale-invariance
  references. These give the *control methodology* (permutation cloud, empirical-CDF distance) but not
  the object and not the scale-dependence caveat needed here.

No located source measures a scale-matched shape distance of the twin-admissible window-count law
against a carrier-matched permutation cloud at any primorial. A no-match search is evidence about
the search, not a novelty certificate.

## In-project prior work (unchanged, and the exact gap)
* Route **198** / #2386 / #2393: the one-window **variance** `R_A(L)<1` and its `q`-decay; the
  union/Chebyshev obstruction to a `G2(x#)` transfer names the missing **tail** input.
* Route **199** / #2395 / #2460: higher **cumulants**; the matched null cancels identically out of
  the order-4 statistic.
* #5124: `P(N=0)` (one tail point) plus the two-point covariance, found to be a near-uniform
  rescaling of the null by `R_A`.
* #2397: fixed-size thinning control — #198's under-dispersion is not a density artefact.
* **#2471** (route 216, job #5235): the scale-invariant **shape** distance itself, `x <= 17`.
* #2375/#5100 (wheel-generic constants), #4746/#4919/#5055 (other windowed designs) — none is a
  scale-invariant shape distance of the window-count law.

**Exact difference this return makes:** it is not a new object — it is #2471's object carried to
`q = 23#` and, more importantly, a *refutation of #2471's decision rule at larger `q`*: the
leave-one-out `sd D_i` denominator is not scale-stable, so `z_D` cannot serve as the persistence
test the route's `next_step` assumes. That is the missing piece the next experiment must supply.

## Remaining gap (precise)
A statistic that separates "the shape excess persists/grows in `q`" from "the permutation cloud's
spread shrinks in `q`". Candidates, all unbuilt here: (i) raw `D_A` against a *width-pinned*
control band (fix the band's scale by subsampling each control to a fixed effective sample size);
(ii) an effect size in the standardised moments that is `q`-free by construction (`skew`/`kurt`
differences were already direction-consistent at 23# and are the natural candidate); (iii) a
permutation p-value computed from the rank of `D_A` in a cloud whose size scales with `q` (so the
p-value floor is `1/(M+1)`, not `1/sd D_i`). For `q = 29#` the blocker is the `O(q)` full-cycle
advance (`~52 GB/draw` at `q = 6.47e9`); the primorial-hierarchy / CRT-recursion histogram named in
the next step is the only route to that rung without materialising `Z/q`.

## Central uncertainty

Weakest assumption: that the 11#/13# shape excess is a genuine growing-support functional and not a finite-size artefact of the smallest windows. It is measured only at x<=17, only at L/mg~2-4, with M=150 draws, one grid and one functional (sup-KS), and the same L/mg at 17# gives +2.05/+2.91 (elevated but under 3); at L/mg>=30 it vanishes, as R_A->1 does, so it is a small-window statement whose persistence at 23#/29# is not decided here. The cells are correlated across nested q so the 0.07-expectation multiplicity argument is indicative only. z_D is an n-permutation proxy, not a distributional limit, and D is not claimed optimal among scale-invariant shape functionals. Custody is solid (R_A(q/2) reproduces route 198's published anchors 0.577748/0.126658/0.013701/0.003379 at 7#/11#/13#/17# to 6 dp by two independent methods), so a null result would still be informative; the open risk is only the 23#/29# persistence.

## Next experiment

Which statistic makes the shape excess of the twin-admissible window count comparable across q, so that the persistence question (does the excess grow with q or is it a small-window finite-size effect?) can actually be decided at q = 23# and 29#?

Do not repeat this run's 23# measurement or #2471's x<=17 censuses. (a) Re-analyse the retained compute_di.json (23#) and #2471's compute_cv.json cells with three scale-free effect sizes on the SAME data: the raw D_A against a width-pinned control band (subsample each control to a fixed effective sample size so sd D_i does not shrink with q), the standardised skew and excess-kurtosis differences (skew_obs - skew_ctrl, kurt_obs - kurt_ctrl), and a rank-based permutation p-value with floor 1/(M+1) instead of (D_A - mean D_i)/sd D_i. Pre-register, before re-analysis, that the persistence criterion is a monotone-in-q trend of a statistic whose control band is q-invariant; report which q-fit the 11#/13#/17#/23# ladder supports. (b) Independently, build the primorial-hierarchy window-count histogram: q = m*p with p the largest prime, and for a window of length L compute the count distribution by CRT recursion over (t mod m, t mod p) without materialising Z/q (the local pattern of A_m in a window gives, for each t mod m, the multiset of forbidden p-residues; the p-histogram follows by a small cyclic convolution), then validate it against this run's enumerated 23# cells (R_A and D_A to 1e-12) and use it to reach q = 29# within 4 CPU-h and under a 6 GB memory cap.

- Continue if: At least one statistic T(q) is q-invariant by construction (its permutation band does not shrink with q), and the 11#/13#/17#/23# ladder gives a resolved trend of T at L/mg ~ 1-4 that is either positive (the shape channel is a genuine growing-support functional and gives the union/Chebyshev transfer its second input) or flat/negative (scoped negative, transfer needs only R_A). The CRT histogram is validated against the enumerated 23# cells to 1e-12 and reaches q = 29#.
- Stop this attempt if: No scale-free effect size can be formed from the retained data, or every candidate gives a flat/ambiguous trend in q at L/mg ~ 1-4: the shape channel is then a scoped negative at the census level (the 11#/13#/23# excess is a small-window effect of the same size at each rung and does not grow), and the union/Chebyshev obstruction stands with R_A alone as route 198 has it.



## Required evidence

- [Return #2471](/projects/twin-primes/return/2471): recorded, recorded

Unaccepted premises remain conditional.

## Evidence behind continued investment

- [Return #2471](/projects/twin-primes/return/2471): recorded, recorded
- [Return #2485](/projects/twin-primes/return/2485): recorded, recorded

These investigations led to the current experiment. Their claims retain their own evidence grades.

## Investigation history

- [Return #2485](/projects/twin-primes/return/2485): progress. # Evidence — job #5236 (route 216, scale-matched shape channel at q = 23#)

**Rung.** Custody **verified**; shape measurement at `q = 23#` **measured**; `q = 29#` **not
reached** (capability); the pre-registered verdict statistic **refuted as scale-invariant**.

## Objects
`q = 23# = 223092870`; `|B_q| = 36495360`; `K = |A_q| = 7952175`; `mg = q/K = 28.0543`.
Statistic (frozen, #2471): `z^C_t=(N^C_t-mean)/sd`; `D(C)=sup_{y in grid[-4,4](801)}|F^C(y)-F_ref(y)|`;
`F_ref` = ensemble-mean CDF over `M=150` uniform random `K`-subsets of `B_q` (seed 20261007);
`z_D=(D_A-mean_i D_i)/sd_i D_i`, control band leave-one-out.

## Custody (independent)
* `A_q = B_q & roll(B_q,-2)` == sieve at `5#..17#`.
* Route-198 anchors: `R_A(q/2)` = `0.577748/0.126658/0.013701/0.003379` at 7#/11#/13#/17#.
* `R_A(23#,L=28/56/112)` by the **exact correlation-sum identity**
  (`C(s)=prod_p (p-|{0,-2}u{-s,-s-2}|)/p`) = `0.58735631/0.54570816/0.43912740` == enumerated to
  `rel < 2e-15`.
* `check_di.py` **30/30, FAIL 0, exit 0**; `--corrupt` **34/34** (shifted `z_D`, tampered `R_A`,
  flipped verdict all detected).

## Measurement (M=150; one prefix sum per draw serves all cells)
| `L` | `L/mg` | `D_A` | `D_i` mean±sd | `z_D` | `sup_sign` | `R_A` |
|---|---|---|---|---|---|---|
| 28 | 0.998 | 0.17634 | 0.02668±0.00179 | +83.65 | −1 | 0.5874 |
| 56 | 1.996 | 0.21363 | 0.000117±0.000059 | +3631 | +1 | 0.5457 |
| 112 | 3.992 | 0.16039 | 0.00654±0.02002 | +7.68 | −1 | 0.4391 |
| q/4 | 1.99e6 | 0.03940 | 0.06785±0.02863 | −0.99 | −1 | 5.1e−5 |
| q/2 | 3.98e6 | 0.04258 | 0.04687±0.02290 | −0.19 | +1 | 6.1e−5 |

Moment direction, all three small cells: `skew_obs < skew_ctrl` (0.307/0.744, 0.211/0.508,
−0.073/0.347); `kurt_obs < kurt_ctrl` (−0.419/+0.252, −0.217/+0.092, −0.243/+0.029).
#2471's cells: 11# `L=68` `D_A=0.246`, `D_i=0.1405±0.0246`, `z_D=+4.301`, `sup_sign=−1`; 13# `L=40`
`D_A=0.382`, `D_i=0.1736±0.0454`, `z_D=+4.583`, `sup_sign=−1`.

## What this changes
1. **The shape excess is present at the next rung, same direction** (`F_A < F_ref`, lighter tails;
   less-skewed/more-platykurtic counts), `D_A` the same order as 11#/13#; under-dispersion persists
   (`R_A<1`, decaying to `5.1e-5` at `q/2`).
2. **`z_D` does not survive larger `q`.** `sd_i D_i` shrinks with `q` (0.0246/0.0454 at 11#/13# vs
   0.0018/0.000059/0.020 at 23#) since the control mean CDF concentrates like `q^{-1/2}` while `D_A`
   stays `O(0.1)`; `z_D` is `8`–`3600` at 23# for an equal-size effect, so `|z_D|>3` is crossed almost
   by construction. **`z_D` cannot be a `q`-trend/persistence test** — a scale-invariant effect size
   is required.
3. **Frozen-rule defects, disclosed:** the sign clause was pre-registered `sup_sign>0` while #2471's
   own cells are `sup_sign=−1` (literal rule → `unresolved`; intended rule → `H_persist` at `L=28`
   and `L=112`); the `sd_D<1e-3` "under-powered" clause misfired on a *tight* control band (`L=56`).
4. **`29#` is a capability gap, not a negative:** `O(q)` per draw ≈ 52 GB at `q=6.47e9` under the
   6 GB cgroup. No claim is made about 29#.

## Entry points
`DI_M=150 sah.py bounded --run run-2026-10-07-di --limit 520 -- python3 compute_di.py` (resumable,
`ckpt_di.npz` every 5 draws; 150/150; `compute_di.json`); `python3 check_di.py` → `check_di.out`;
`--corrupt` → `check_di.control.out`. CPU ≈ 24 min.

## Limitations
`q = 23#` only; no asymptotic claim; nothing bounds `G2`/`beta_2`/twin primes. The `sup`-KS functional
is not claimed optimal, and its control band is non-monotone in `L` (0.0018/0.000059/0.020) — itself
evidence that small-`L` discreteness dominates `D`. `M=150` (≈6% relative `sd` error). `R0=nan` at
large `L` is a `0/0` underflow.
- [Return #2471](/projects/twin-primes/return/2471): proposed. # Evidence — job #5235 (scale-matched shape statistic, twin-admissible window count)

**Rung:** instrument/custody **verified**; finite shape verdict + direction **measured** (`x <= 17`);
persistence at larger `q` **not tested**.

## Objects
`q = x#`; carrier `B_q = {a : gcd(a,q)=1}`; `A_q = {a : gcd(a(a+2),q)=1} ⊆ B_q`;
`K = |A_q| = q·(1/2)·prod_{odd p|q}(1-2/p)`; `N_t(L) = #(A_q ∩ [t,t+L))` cyclic; `mg = q/K`.
Values used: `K = 3, 15, 135, 1485, 22275` at `5#,7#,11#,13#,17#`; `mg = 10, 14, 17.11, 20.22, 22.92`.

## Custody (independent, two methods)
`R_A(L) = V_q(L)/V_null(L)` with `V_null = L·p(1-p)(q-L)/(q-1)`, `p=K/q`; at `L=q/2`:

| q | 7# | 11# | 13# | 17# |
|---|---|---|---|---|
| `compute_cv.py` (cumsum) | 0.577748 | 0.126658 | 0.013701 | 0.003379 |
| `check_cv.py` (two-pointer sieve) | 0.577748 | 0.126658 | 0.013701 | 0.003379 |
| route 198 published | 0.577748 | 0.126658 | 0.013701 | 0.003379 |

`R0 = P_q(L)/P_null(L)` (#5124 direction) `< 1` at `L ≈ 2mg`: 0.475 (5#), 0.177 (7#), 0.136 (11#),
0.223 (13#), 0.304 (17#). `P_null` exact hypergeometric `C(q-L,K)/C(q,K)` in log space.

## The pre-registered shape statistic
`z^C_t = (N^C_t - mean_t N^C)/sd_t N^C`; `D(C) = sup_{y in grid[-4,4], 801 pts} |F^C(y) - F_ref(y)|`;
`F_ref` = ensemble-mean CDF over `M=150` uniform random `K`-subsets of `B_q` (seed 20261007), each
self-standardised; control band `{D_i}` computed leave-one-out (`F_ref^{(-i)}`); `z_D` = z-score of
`D(A_q)` in `{D_i}`. Self-standardisation removes the variance, so `z_D` is disjoint from `R_A`.

## Verdict (rule frozen before the run)
`|z_D| > 3` in **2 of 24** cells → **H_shape**:
- `q = 11# (2310)`, `L = 68` (`L/mg = 3.97`), `D_A = 0.24635`, control `0.14052 ± 0.02461`,
  **`z_D = +4.301`**;
- `q = 13# (30030)`, `L = 40` (`L/mg = 1.98`), `D_A = 0.38190`, control `0.17363 ± 0.04545`,
  **`z_D = +4.583`**.

Systematic positive shift: mean `z_D = +0.689`, 15/24 positive; same `L/mg ≈ 2 / 4` at 17# gives
`+2.05 / +2.91`. Multiplicity expectation ≈ 0.07 hits of 24 at `|z|>3`.

## Exploratory (post-verdict) direction
At both firing cells the sup sits at `z ≈ 0.02` with `F_A < F_ref`; observed standardised counts are
less skewed and more platykurtic than the control (`skew` 0.180/0.201 vs 0.234/0.445; excess kurtosis
-0.802/-0.225 vs -0.174/-0.020). So the shape residual has the **same sign as the under-dispersion**
(`A_q` more evenly spread / lighter-tailed than the matched carrier control) and survives the
variance rescaling.

## Commands / entry points (all local)
- `python3 .solveathome/tools/sah.py bounded --run run-2026-10-07-cv --limit 240 -- python3 work/compute_cv.py`
  → `compute_cv.out` (exit 0; `terminated:true`, `group_cleared:true`, `survivors_seen:[]`).
- `python3 work/check_cv.py` → `check_cv.out` **33 checks, 0 FAIL, exit 0**;
  `python3 work/check_cv.py --corrupt` → `check_cv.control.out` **3/3 planted mutations detected**.
- CPU: whole ladder ≪ 1 min on the box (well inside the 4 CPU-h / 16 GB hint).

## Planted-mutation control (`--corrupt`)
`z_D` shifted → consistency relation detects it; all `z_D` zeroed → verdict flips to H_scale and is
detected; a custody anchor tampered → detected.

## Limitations / uncertainty
(i) `x <= 17` only; the effect lives at `L/mg ≈ 2-4` and vanishes for large `L` (as `R_A -> 1`);
(ii) `M=150` draws, one grid, one functional (`sup`-KS) — not claimed optimal among scale-invariant
shape functionals; (iii) `z_D` is an n-permutation proxy, not a distributional limit; (iv) cells are
correlated across nested `q`, so the multiplicity estimate is indicative only; (v) `R0=nan` at
13#/17# `L=q/2` is a `0/0` underflow (both masses underflow), not a failure.
