// Audit of research/global-smooth-majorant.md sections 2-4. // Single-threaded, under a second, a few MB: my person offered no machine share, // so nothing here is parallel, persistent, or larger than a scratch array. const f = (x, n) => x.toFixed(n); console.log('=== 1. Section 4: the source epsilon_0 ==='); // "Choose the source epsilon_0 = 1/1200 < 1/600, its required alpha/[50 g (g + delta^{-1})]" // with X = x/2, Y = X, alpha = 1/2, delta = 1, g = 2. const alpha = 0.5, delta = 1, g = 2; const req = alpha / (50 * g * (g + 1 / delta)); console.log(' alpha/[50 g (g + 1/delta)] = 0.5/[50*2*3] = ' + f(req, 10) + ' 1/600 = ' + f(1 / 600, 10) + ' ' + (Math.abs(req - 1 / 600) < 1e-15 ? 'EXACT' : 'DIFF')); console.log(' chosen epsilon_0 = 1/1200 = ' + f(1 / 1200, 10) + ' strictly below the requirement: ' + (1 / 1200 < req ? 'yes, by a factor 2' : 'NO')); console.log('\n=== 2. Section 4: the two forms Q1(t) = t, Q2(t) = t - 2 ==='); // Res(t, t-2) for monic linear polys = difference of roots = 0 - 2. console.log(' both monic, both primitive, degrees 1 and 1 => g = deg(Q1 Q2) = 2 ' + (1 + 1 === g ? 'matches g = 2' : 'MISMATCH')); console.log(' Res(Q1,Q2) = (root1 - root2) = 0 - 2 = -2, |Res| = 2 matches "resultant has absolute value two"'); console.log('\n=== 3. Section 4: the corrected density is at most 2/(ab) ==='); // a|n and b|n-2 is solvable iff gcd(a,b)|2, and then the solution set is one class // mod lcm(a,b), so the density is 1/lcm(a,b) = gcd(a,b)/(ab). const gcd = (a, b) => b ? gcd(b, a % b) : a; let worst = 0, bad = 0, checked = 0; for (let a = 1; a <= 60; a++) for (let b = 1; b <= 60; b++) { const L = a * b / gcd(a, b); let cnt = 0; for (let n = 0; n < L; n++) if (n % a === 0 && ((n - 2) % b + b) % b === 0) cnt++; const dens = cnt / L, d = gcd(a, b); const solvable = (2 % d === 0); if (solvable !== (cnt > 0)) bad++; if (cnt > 0 && Math.abs(dens - d / (a * b)) > 1e-12) bad++; worst = Math.max(worst, dens * a * b); checked++; } console.log(' brute force over all a,b <= 60 (' + checked + ' pairs):'); console.log(' solvable exactly when gcd(a,b) | 2, and density = gcd(a,b)/(ab): ' + (bad === 0 ? 'CONFIRMED, 0 exceptions' : bad + ' EXCEPTIONS')); console.log(' max of density*(ab) = ' + worst + ' claim "always at most 2/(ab)": ' + (worst <= 2 + 1e-12 ? 'holds, and is attained' : 'FAILS')); console.log('\n=== 4. Section 4 (12): 2^{omega(a1)+omega(a2)} <= 2^{Omega(a1 a2)} ==='); // omega <= Omega pointwise and Omega is completely additive, so // omega(a1)+omega(a2) <= Omega(a1)+Omega(a2) = Omega(a1 a2). Check by brute force. const OM = n => { let c = 0; for (let p = 2; p * p <= n; p++) while (n % p === 0) { n /= p; c++; } return n > 1 ? c + 1 : c; }; const om = n => { let c = 0; for (let p = 2; p * p <= n; p++) if (n % p === 0) { c++; while (n % p === 0) n /= p; } return n > 1 ? c + 1 : c; }; let viol = 0; for (let a = 1; a <= 300; a++) for (let b = 1; b <= 300; b++) if (om(a) + om(b) > OM(a * b)) viol++; console.log(' all a,b <= 300: violations = ' + viol + ' ' + (viol === 0 ? 'inequality holds' : 'FAILS')); console.log('\n=== 5. Section 4: the counterexample killing the multiplicative shortcut ==='); // w_T(n) = 2^{omega(n)} * prod_{j<=min(3,omega)} ell_T(p_j), ell_T(p) = min(1, log p / T). const ell = (p, T) => Math.min(1, Math.log(p) / T); const primesOf = n => { const s = []; for (let p = 2; p * p <= n; p++) if (n % p === 0) { s.push(p); while (n % p === 0) n /= p; } if (n > 1) s.push(n); return s; }; const w = (n, T) => { if (n === 1) return 1; const P = primesOf(n); let v = Math.pow(2, P.length); for (let j = 0; j < Math.min(3, P.length); j++) v *= ell(P[j], T); return v; }; console.log(' w_T(210) vs w_T(30) w_T(7): ratio should be exactly 1/ell_T(7)'); for (const T of [1.0, Math.log(7) - 1e-9, Math.log(7) + 1e-9, 3, 10, 30]) { const lhs = w(210, T), rhs = w(30, T) * w(7, T); console.log(' T = ' + f(T, 6).padStart(9) + ' w(210) = ' + lhs.toExponential(4) + ' w(30)w(7) = ' + rhs.toExponential(4) + ' ratio = ' + f(lhs / rhs, 6) + ' 1/ell(7) = ' + f(1 / ell(7, T), 6) + ' ' + (lhs > rhs ? 'STRICT >' : 'not >')); } console.log(' => the inequality is strict exactly when ell_T(7) < 1, i.e. T > log 7 = ' + f(Math.log(7), 6) + '. The stated threshold is exact, not a sufficient condition.'); console.log('\n=== 6. Section 3 (8): a numeric probe of sum_{m<=x} w_T(m)/m << 1, T = log x ==='); // Not a proof and not asked for by the note; a finite probe of whether the claimed // boundedness is visible, against the undamped sum which grows like log^2 x. function probe(X) { // smallest-prime-factor sieve const spf = new Int32Array(X + 1); for (let i = 2; i <= X; i++) if (!spf[i]) for (let j = i; j <= X; j += i) if (!spf[j]) spf[j] = i; const T = Math.log(X); let S = 1, U = 1; // m = 1 term for (let m = 2; m <= X; m++) { let n = m, cnt = 0, prod = 1, k = 0; while (n > 1) { const p = spf[n]; while (n % p === 0) n /= p; cnt++; if (k < 3) { prod *= Math.min(1, Math.log(p) / T); k++; } } S += Math.pow(2, cnt) * prod / m; U += Math.pow(2, cnt) / m; } return { T, S, U }; } console.log(' x T=log x sum w_T(m)/m undamped sum 2^omega/m ratio to log^2 x'); for (const X of [1e4, 1e5, 1e6, 4e6]) { const r = probe(X); console.log(' ' + X.toExponential(0).padEnd(9) + f(r.T, 5).padStart(7) + f(r.S, 6).padStart(15) + f(r.U, 4).padStart(22) + f(r.U / (r.T * r.T), 6).padStart(18)); } console.log(' the damped sum is flat while the undamped one tracks log^2 x:'); console.log(' consistent with (8). MEASURED on a finite range, not a proof of the O(1).');