"""Triage arithmetic for job #1321 / route 24. No new tile computation. Every input is a published figure, cited in-line: m* : return #584 (recorded, unreviewed) K*, msc : research/history/staging/redteam-0830-doubling.js OUTPUT block, sha256 016ec750919a45d0c0d6455fe157ee10e73ba143090d268298f209cc29b2672a (+ the fifteenth step 19#->37#, quoted in #584 / route 24 prior art) Exact integer/Fraction arithmetic; stdout is the artifact. """ from fractions import Fraction as F def pi(n): return sum(1 for k in range(2, n + 1) if all(k % d for d in range(2, int(k ** .5) + 1))) def N(x): return pi(2 * x) - pi(x) # --- inputs --------------------------------------------------------------- mstar = {11: 6, 13: 9, 17: 12, 19: 15, 23: 18, 29: 20} # #584 # K* keyed by the step's s, from the OUTPUT block section C + the 15th step Kstar = {13: 8, 16: 17, 17: 13, 19: 13} msc_pub = {13: F('3.6364'), 17: F('4.2778'), 19: F('3.8000')} # OUTPUT D + 15th KN_fourteen = ['2.00','1.00','2.00','2.00','1.50','1.50','1.67', '2.00','2.00','2.50','2.67','2.50','3.40','3.25'] # OUTPUT C print("== 1. N(x) = pi(2x) - pi(x) ==") for x in sorted(mstar): print(f" x={x:3d} N={N(x)} m*={mstar[x]:3d} m*/N={float(F(mstar[x],N(x))):.4f}") print("\n== 2. reproduce #584's m*/N row (x = 13,17,19,23,29) ==") got = [round(float(F(mstar[x], N(x))), 2) for x in (13, 17, 19, 23, 29)] want = [3.00, 3.00, 3.75, 3.60, 3.33] print(f" computed {got}\n #584 {want} agree={got == want}") assert got == want, "m*/N does not reproduce #584" print("\n== 3. the factorisation msc(s)<4 <=> K*(s)+1 <= m*(s), vs published msc ==") for s in (13, 17, 19): pred = "< 4" if Kstar[s] + 1 <= mstar[s] else ">= 4" obs = "< 4" if msc_pub[s] < 4 else ">= 4" print(f" s={s:3d} K*+1={Kstar[s]+1:3d} m*={mstar[s]:3d} predict {pred:4s}" f" published msc={float(msc_pub[s]):.4f} -> {obs:4s} agree={pred == obs}") assert pred == obs print("\n== 4. sup K*/N over the fourteen enumerable steps ==") sup_KN = max(F(v) for v in KN_fourteen) print(f" K*/N list: {' '.join(KN_fourteen)}") print(f" sup = {float(sup_KN):.2f} (attained at 13#->31#, s=16, K*=17, N=5)") print(f" last four by s (16,17,19 decidable): 3.40, 3.25, and 3.25 at the 15th step") print("\n== 5. THE DECISIVE QUESTION: what does the proposed K*(23) experiment resolve? ==") x = 23 n23, m23 = N(x), mstar[x] kmax_ok = m23 - 1 # msc<4 <=> K*+1 <= m* <=> K* <= m*-1 print(f" T_23: m* = {m23}, N = {n23}, m*/N = {float(F(m23,n23)):.4f}") print(f" msc(23) < 4 <=> K*(23) + 1 <= {m23} <=> K*(23) <= {kmax_ok}") print(f" <=> K*(23)/N <= {float(F(kmax_ok,n23)):.4f}") print(f" observed sup K*/N so far = {float(sup_KN):.4f}") print(f" -> the success threshold {float(F(kmax_ok,n23)):.2f} EQUALS the historical sup {float(sup_KN):.2f}") print(f" -> msc(23) >= 4 requires K*(23) >= {m23}, i.e. K*/N >= {float(F(m23,n23)):.2f}: a NEW RECORD") print(f" (every one of the fourteen steps, and the fifteenth, sits at or below {float(sup_KN):.2f})") print("\n== 6. is the 'fall' in m*/N structural? ==") print(" m*/N falls toward the local increment ratio dm*/dN, not toward 0:") xs = [11, 13, 17, 19, 23, 29] for a, b in zip(xs, xs[1:]): dm, dn = mstar[b] - mstar[a], N(b) - N(a) r = f"{dm}/{dn} = {float(F(dm,dn)):.2f}" if dn else f"{dm}/0 (N flat)" print(f" x {a:3d}->{b:3d}: dm*={dm:+d} dN={dn:+d} dm*/dN = {r}") print(" Both m* and N are ~ c*pi(x) (PNT: pi(2x)-pi(x) ~ pi(x)), so m*/N tends to a") print(" CONSTANT, not to 0. The observed 3.75 -> 3.60 -> 3.33 is descent toward that") print(" constant from above, not evidence of unbounded decay.") print("\n m*/pi(x) and N/pi(x), the two ingredients separately:") for x in xs: print(f" x={x:3d} m*/pi = {float(F(mstar[x],pi(x))):.3f} N/pi = {float(F(N(x),pi(x))):.3f}") print("\n== 7. what a cheap m* extension would decide ==") print(" m*(T_31), m*(T_37) are tile-only (cheap, segmented); K*(23) is a fold walk (3.5 cpu-h).") print(" The route's own thesis is about m*/N. Only m* points test it.") print(" K*(23) tests the OTHER ratio, at a threshold that coincides with its historical sup.")