import math # A144311 verbatim (22 terms), G2 = A+1. Source: research/a144311-full-ladder.js (trusted series, # adopted 2026-08-20). Custody overlap (14 terms) asserted exactly, as that file does. A = [1,5,11,29,41,65,107,149,203,257,347,527,545,617,707,869,965,1079,1283,1397,1529,1709] P = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79] CUSTODY = [2,6,12,30,42,66,108,150,204,258,348,528,546,618] G2 = [a+1 for a in A] assert G2[:14] == CUSTODY for n in range(1,22): assert A[n] % 6 == 5 BETA2 = 4.26645028414864191641 KNOWN_TOP = P[-1] # 79 def sieve(n): s=[True]*(n+1); s[0]=s[1]=False for i in range(2,int(n**.5)+1): if s[i]: for j in range(i*i,n+1,i): s[j]=False return [i for i,v in enumerate(s) if v] PRIMES = sieve(4000) # Ghat(s) = G2(P(s)), P(s) = product of primes <= s. Ghat(s) is KNOWN only when the largest # prime <= s is on the ladder AND no prime in (that prime, s] is missing -- i.e. largest prime # <= s must be <= 79. (The earlier draft of this script wrongly paired s=128 with x=79; the # largest prime <= 128 is 127, which the ladder does not reach. Guard added.) chain=[] for k in range(1,9): s=2**k top=max(p for p in PRIMES if p<=s) if top>KNOWN_TOP: chain.append((k,s,top,None)); continue chain.append((k,s,top,G2[P.index(top)])) print("=== base-2 chain: Ghat(s) = G2(P(s)) ===") for k,s,top,g in chain: print(f" k={k} s={s:>4} largest prime <= s = {top:>3} Ghat = {g if g else 'UNKNOWN (ladder ends at 79)'}") known=[(k,s,top,g) for k,s,top,g in chain if g] print(f"\n chain is known for s = 2..{known[-1][1]} only -> {len(known)-1} doubling steps\n") print(f"{'step':>12} {'true ratio':>11} {'log2':>7} {'running mean of log2':>21}") tot=0.0 for j in range(1,len(known)): r=known[j][3]/known[j-1][3]; lr=math.log2(r); tot+=lr print(f"{known[j-1][1]:>5}->{known[j][1]:<5} {r:>11.4f} {lr:>7.4f} {tot/j:>21.4f}") ratios=[known[j][3]/known[j-1][3] for j in range(1,len(known))] print(f"\n sup of true ratios = {max(ratios):.4f} at s={known[ratios.index(max(ratios))][1]} " f"(record: 348/66 = 5.2727 -> {'MATCHES' if abs(max(ratios)-348/66)<1e-9 else 'DIFFERS'})") print(f" terminal true ratio = {ratios[-1]:.4f} (TPC-implying band is C2 < 4)") print(f" geometric mean = {(known[-1][3]/known[0][3])**(1/(len(known)-1)):.4f}") print(f" mean log2 ratio = {tot/(len(known)-1):.4f} == ln Ghat/ln s at the top rung = " f"{math.log2(known[-1][3])/math.log2(known[-1][1]):.4f}") print("\n=== dial 4 budget: what level-selection can buy, measured on the ladder ===") S=[math.log(x*x/g) for x,g in zip(P,G2)] print(f" S(x)=ln(x^2/G2): 22 terms min {min(S):.4f} max {max(S):.4f} -> oscillation {max(S)-min(S):.4f} nats") S8=S[-8:] print(f" trusted top 8 (x=47..79) min {min(S8):.4f} max {max(S8):.4f} -> oscillation {max(S8)-min(S8):.4f} nats") need=(BETA2-2)*math.log(79) print(f" need to close beta2->2 at x=79: (beta2-2)ln79 = {need:.4f} nats") print(f" bought / needed = {(max(S8)-min(S8))/need*100:.2f}% (all 22 terms: {(max(S)-min(S))/need*100:.2f}%)") print("\n=== the same question on other bases (the Fekete target is base-free) ===") print("For base b the TPC-implying band is C_b < b^2, i.e. log_b C_b < 2.") def Ghat(s): t=max(p for p in PRIMES if p<=s) return G2[P.index(t)] if t<=KNOWN_TOP else None for b in (2,3,5,7): ch=[]; k=1 while True: s=b**k; g=Ghat(s) if g is None: break ch.append((s,g)); k+=1 if len(ch)<2: continue thr=b*b print(f"\n base {b}: chain s = {[s for s,_ in ch]} band C_{b} < {thr}") for j in range(1,len(ch)): r=ch[j][1]/ch[j-1][1] side='INSIDE ' if r4} -> {ch[j][0]:<4} ratio {r:8.4f} log_{b} {math.log(r,b):.4f} " f"{side} band, {abs(r-thr)/thr*100:5.1f}% {'below' if r not computable")