r"""Job #1327, part 2: split route 24's affordable ratio m*/N into an ARRANGEMENT factor and a CENSUS factor, and use the split to pre-register the x = 31 outcome. m*(T_x) / N(x) = lambda(x) * [ Ghat(x) / (gbar(x) * N(x)) ] \________/ \_______________________/ arrangement census-only, computable with no tile lambda is this return's statistic (measured in lambda1327.py, and shown there NOT to be a function of the gap multiset). The bracket needs only Ghat (the published ladder), the tile census D = |T_x| and N(x) = pi(2x) - pi(x): all retained, all available far past any tile that can be held. Inputs, all published, cited in the report: Ghat : exact G2 ladder (redteam-0830-doubling.js / exact-g2-ladder.js) D : tile censuses from the same OUTPUT block (13#->31# census 6226553025 = D(31)) m* : return #584, reproduced from scratch in lambda1327.py at every level No randomness, exact integer/rational arithmetic where the quantity is exact. """ 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) # D(x) = prod_{p<=x} (p - |{0,-2} mod p|) = 1 * 1 * 3 * 5 * 9 * 11 * 15 * 17 * 21 * 27 * 29 ... def tile_census_and_period(x): D, P = 1, 1 for p in range(2, x + 1): if all(p % d for d in range(2, int(p**.5) + 1)): D *= p - (1 if p == 2 else 2); P *= p return D, P GHAT = {7: 30, 11: 42, 13: 66, 17: 108, 19: 150, 23: 204, 29: 258, 31: 348} # exact ladder MSTAR = {13: 9, 17: 12, 19: 15, 23: 18, 29: 20} # #584, reproduced here print(" x D=|T_x| Ghat gbar Ghat/gbar N census=Ghat/(gbar*N)" " lambda m*/N") cens = {} for x in (13, 17, 19, 23, 29, 31): D, P = tile_census_and_period(x) gbar = F(P, D) c = F(GHAT[x], 1) / gbar / N(x) cens[x] = float(c) if x in MSTAR: lam = MSTAR[x] * float(gbar) / GHAT[x] print(f" {x:3d} {D:12d} {GHAT[x]:8d} {float(gbar):8.3f} {GHAT[x]/float(gbar):10.4f}" f" {N(x):3d} {float(c):18.4f} {lam:9.4f} {MSTAR[x]/N(x):8.4f}") else: print(f" {x:3d} {D:12d} {GHAT[x]:8d} {float(gbar):8.3f} {GHAT[x]/float(gbar):10.4f}" f" {N(x):3d} {float(c):18.4f} -- -- <- no tile held here") print("\nCheck the identity m*/N = lambda * census at every level where m* is known:") for x in MSTAR: D, P = tile_census_and_period(x) lam = MSTAR[x] * float(F(P, D)) / GHAT[x] lhs, rhs = MSTAR[x] / N(x), lam * cens[x] print(f" x={x:3d} m*/N={lhs:.6f} lambda*census={rhs:.6f} agree=" f"{abs(lhs-rhs) < 1e-9}") assert abs(lhs - rhs) < 1e-9 print("\nWhich factor is driving route 24's falling m*/N?") print(" x lambda census m*/N") for x in (13, 17, 19, 23, 29): D, P = tile_census_and_period(x) lam = MSTAR[x] * float(F(P, D)) / GHAT[x] print(f" {x:3d} {lam:8.4f} {cens[x]:8.4f} {MSTAR[x]/N(x):7.4f}") print(" -> over x = 19..29 the census factor is FLAT (1.4640, 1.4544, 1.4270) while lambda") print(" falls (2.5615, 2.4754, 2.3358). The fall in m*/N is an ARRANGEMENT effect,") print(" and arrangement is exactly what the permutation control shows the census") print(" cannot supply.") print(f"\nPRE-REGISTERED for x = 31 (no tile held; census factor = {cens[31]:.4f}):") print(f" m*(T_31)/N(31) = lambda(31) * {cens[31]:.4f}, N(31) = {N(31)}") print(f" The census factor RISES at 31 ({cens[29]:.4f} -> {cens[31]:.4f}), so it now pushes") print(f" m*/N UP. Route 24's thesis (the affordable ratio keeps falling through") print(f" sup K*/N = 3.40) therefore requires lambda(31) to fall enough to overcome it:") for target, name in ((3.40, "sup K*/N, the paid comparator"), (3.3333, "m*/N at x=29")): print(f" m*/N < {target:.4f} ({name}) <=> lambda(31) < {target/cens[31]:.4f}" f" <=> m*(T_31) < {target*N(31):.2f}, i.e. m*(T_31) <= {int(target*N(31))}") print(f" lambda(29) = {MSTAR[29]*float(F(*tile_census_and_period(29)[::-1]))/GHAT[29]:.4f}" f" [so a flat lambda gives m*/N = {2.3358*cens[31]:.4f}, ABOVE 3.40]") print(" Committed prediction: m*(T_31) = 22 or 23 (lambda 2.05-2.14), giving m*/N") print(" 3.14-3.29 -- the fall continues. FALSIFIED if m*(T_31) >= 24.") # ---------------------------------------------------------------- part 3: external calibration # Kourbatov, "Maximal gaps between prime k-tuples: a statistical approach" (arXiv:1301.2242) # and "Predicting maximal gaps in sets of primes" (arXiv:1901.03785) give, for maximal gaps # between the initial primes of an admissible k-tuple pattern, # G_c(x) ~ (x / pi_c(x)) * (log pi_c(x) + O_k(1)) # i.e. MAXIMAL GAP / MEAN GAP ~ log(count) + O(1). Ghat/gbar is exactly that ratio for the # twin tile, with the tile's own slot count D in place of pi_c(x). Test the shape here. import math print("\nPart 3 -- is Ghat/gbar the Kourbatov ratio? (maximal gap / mean gap ~ c*log(count))") print(" x D Ghat/gbar log D (Ghat/gbar)/log D") for x in (7, 11, 13, 17, 19, 23, 29, 31): D, P = tile_census_and_period(x) gbar = F(P, D); r = GHAT[x] / float(gbar); lg = math.log(D) print(f" {x:3d} {D:12d} {r:12.4f} {lg:9.3f} {r/lg:16.4f}") print(" -> for x = 13..31 the last column sits in 0.445-0.479, a 7 percent band while Ghat/gbar") print(" itself grows 3.3x. The tile reproduces the c*log(count) SHAPE that Kourbatov's") print(" trend formula asserts for the arithmetic k-tuple gaps. That makes the census") print(" factor of part 2 externally owned in shape, not new here; what this return") print(" claims new is lambda, and that lambda is not a function of the gap multiset.")