#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Job #2690 (route 110 triage): the triply-well-factorable test on the band's exact modulus weight. Definitions at PRIMARY, not from memory: Maynard II (arXiv:2006.07088v1), Definition 2 (Triply well factorable). Let Q >= 1. A sequence lambda_q is triply well factorable of level Q if, FOR ANY choice of factorization Q = Q1 Q2 Q3 with Q1,Q2,Q3 >= 1, there exist 1-bounded sequences lambda^{(i)} supported on 1 <= q_i <= Q_i such that lambda_q = sum_{q = q1q2q3} lambda^{(1)}lambda^{(2)}lambda^{(3)}. (Definition 1 is the same with two factors; Definition 1.4 of Lichtman (arXiv:2309.08522v1) is identical.) Lichtman states the reading used here as the test: "one may view triple well-factorability as a property of integers q in the support {q : lambda_q != 0}: for any splitting Q = Q1Q2Q3, we may factor q = q1q2q3 into integers q_i <= Q_i." His section 6 turns it into a condition on the support, D_well(D) = {d = p1...pr : p1...p_{m-1} p_m^2 < D for all m <= r}, and Proposition 6.1 is the factorization it buys. The consequence used below is purely algebraic -- no estimate is produced or needed: FACT. For a fixed factorization Q = Q1Q2Q3, the sum sum_{q=q1q2q3} lambda^{(1)}lambda^{(2)} lambda^{(3)} with supp lambda^{(i)} subset [1,Q_i] is supported on PROD(Q1,Q2,Q3) = {q1q2q3 : q_i <= Q_i}. So Definition 2 forces supp(lambda) subset PROD(Q1,Q2,Q3) for EVERY factorization of Q. Hence supp(lambda) not subset PROD(Q1,Q2,Q3) for ONE factorization ==> lambda is not triply well factorable of level Q, and no better splitting repairs it: the definition quantifies over all splittings, and the balanced one is the one the proofs consume (Maynard II section 2: "we exploit the additional flexibility of factorizations of the moduli ... three pieces rather than two"; Lichtman section 2, (2.1)). The band's modulus weight, from `research/fixed-endpoint-discrepancy.md` sections 2.3 and 4.3 (read from the served bytes, not restated here): modulus arrangement (2.4): lambda_m = mu(m) log m on m in (x/(2e1), x/e0] ~ (x^{1/2-eps'}/2, x^{1/2+eps'}], moduli reaching Q = 2x^{1/2+eps'}(log x)^{3L}; Vaughan pieces on m: Type I c(r) 1_{r|m}, r <= UV = x^{2eps'/3} (c(1) = 1); Type II mu_{>U} * gamma_V, U = V = x^{eps'/3}. Measured, exactly, at fixed x: how much of the support and of the tau(q)^3/phi(q) weight that (4.9) puts on the moduli lies OUTSIDE PROD for the balanced splitting, the smallest witness, and whether the two published sentences about the class reproduce. """ import json import math import os import sys sys.stdout.reconfigure(encoding="utf-8", errors="replace") RUN = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def primes_upto(n): bs = bytearray([1]) * (n + 1) bs[0:2] = b"\x00\x00" for i in range(2, int(n ** 0.5) + 1): if bs[i]: bs[i * i::i] = bytearray(len(bs[i * i::i])) return [i for i in range(n + 1) if bs[i]] def factor(n, ps): f = [] for p in ps: if p * p > n: break if n % p == 0: e = 0 while n % p == 0: n //= p e += 1 f.append((p, e)) if n > 1: f.append((n, 1)) return f def divisors(f): ds = [1] for p, e in f: ds = [d * p ** k for d in ds for k in range(e + 1)] return ds def representable(dvs, q, caps): """q = q1 ... qr with q_i <= caps[i]? Exact, over the divisor set of q. r = 2 or 3.""" c1 = caps[0] rest = caps[1:] for d1 in dvs: if d1 > c1: continue rem = q // d1 if rem > math.prod(rest): continue if len(rest) == 1: if rem <= rest[0]: return True continue c2, c3 = rest for d2 in dvs: if d2 > c2: continue if rem % d2 == 0 and rem // d2 <= c3: return True return False def run(x, eps_p, L, label): Q = int(2 * x ** (0.5 + eps_p) * (math.log(x) ** (3 * L))) Qpow = int(2 * x ** (0.5 + eps_p)) ps = primes_upto(int(Q ** 0.5) + 2) caps3 = (Q ** (1 / 3),) * 3 caps3p = (Qpow ** (1 / 3),) * 3 caps2 = (Q ** (1 / 2),) * 2 tot = tot_m = 0.0 o3 = o3_m = 0.0 o3p = 0.0 o2 = o2_m = 0.0 f3 = f3p = f2 = None primes_out = 0 prime_counted = 0 prod_members_checked = prod_members_rep = 0 for q in range(1, Q + 1, 2): if q in (Q, Q - 1): continue f = factor(q, ps) dvs = divisors(f) tau = len(dvs) phi = q for p, _ in f: phi -= phi // p mass = tau ** 3 / phi tot += 1 tot_m += mass if not representable(dvs, q, caps3): o3 += 1 o3_m += mass if f3 is None: f3 = q if not representable(dvs, q, caps3p): o3p += 1 if f3p is None: f3p = q if not representable(dvs, q, caps2): o2 += 1 o2_m += mass if f2 is None: f2 = q if tau == 2: primes_out += 1 if tau == 2: prime_counted += 1 # positive control on the implementation: a member of PROD(caps3) must be accepted if prod_members_checked < 25 and q < Q / 1000: for c in (1, 2, 3, 4, 5): if c ** 3 <= Q and q == c ** 3: prod_members_checked += 1 if representable(dvs, q, caps3): prod_members_rep += 1 r = { "label": label, "x": x, "eps_prime": eps_p, "L": L, "Q": Q, "Q_power_only": Qpow, "odd_q_counted": int(tot), "triple_balanced_split_at_Q": { "caps": Q ** (1 / 3), "outside_count": int(o3), "outside_count_frac": o3 / tot, "outside_mass_frac": o3_m / tot_m, "smallest_witness": f3, "witness_prime": None if f3 is None else len(divisors(factor(f3, ps))) == 2, }, "triple_balanced_split_at_Q_without_log_factor": { "caps": Qpow ** (1 / 3), "outside_count": int(o3p), "outside_count_frac": o3p / tot, "smallest_witness": f3p, }, "pair_balanced_split_at_Q": { "caps": Q ** (1 / 2), "outside_count": int(o2), "outside_count_frac": o2 / tot, "outside_mass_frac": o2_m / tot_m, "smallest_witness": f2, "primes_outside": int(primes_out), }, "primes_in_support_count": int(prime_counted), "implementation_control": {"prod_members_checked": prod_members_checked, "accepted": prod_members_rep, "note": "c^3 for c<=5 must be accepted: a tautology-free check " "that the predicate is not always-False"}, "mass_definition": "tau(q)^3/phi(q), the weight (4.9) puts on the modulus q " "(c(q) <= tau(q)^3; fixed-endpoint section 4.3)", } print(json.dumps(r, ensure_ascii=False, indent=1)) return r def main(): rows = [run(2 ** 20, 1 / 50, 1, "x=2^20 (exactly enumerable)"), run(2 ** 16, 1 / 50, 1, "x=2^16 (smaller x, same shape)")] out = {"rows": rows, "at": "2026-09-19"} with open(os.path.join(RUN, "artifacts", "wf2690.json"), "w", encoding="utf-8", newline="\n") as fh: fh.write(json.dumps(out, ensure_ascii=False, indent=1) + "\n") return 0 if __name__ == "__main__": sys.exit(main())