#!/usr/bin/env python3 """ test_333 -- THE COUNT OF TEN: WHICH MULTIPLIERS GIVE zeta(0) = 10 ON TT, AND A COUNTEREXAMPLE For MA Remark 6.1, after the referee read of 29 Oct 2026. The remark (and test_327 P5's docstring) said zeta(0) = 10 "for any lambda_n = n^p (1 + O(n^-2))". The referee: a correction a n^-3 contributes -2a/p, and a n^-1 contributes +8a/p, so the claim needs an expansion in EVEN powers of 1/n; test_327 P5's integer loop restated the claim rather than testing it. Z(s) = sum_{n>=3} 2(n^2 - 4) lambda_n^{-s}. For lambda_n = c n^p (1 + a n^-j), binomially, Z(s) = c^{-s} sum_k binom(-s, k) a^k 2[zeta_H(ps + jk - 2, 3) - 4 zeta_H(ps + jk, 3)], and binom(-s, k) ~ (-1)^k s/k as s -> 0, so a term survives at s = 0 only where a Hurwitz zeta has its pole: jk = 3 (first) or jk = 1 (second). For even j there is none. PRE-REGISTERED: P1 The continuation agrees with the direct sum at s = 2 and s = 3 for each lambda below (|a| n^-j < 1, n >= 3). P2 zeta(0) = 10 for lambda_n = n^3 + 7n = n^3(1 + 7 n^-2) and for lambda_n = 2 n^5 + n^3/2 = 2 n^5 (1 + n^-2/4): even powers. P3 zeta(0) = 10 + 8a/3 - 2a^3/9 for lambda_n = n^3 (1 + a/n) = n^3 + a n^2, at a = 1 (value 112/9) and a = -1/2 (value 10 - 4/3 + 1/36 = 313/36): an odd power changes the count. P4 zeta(0) = 10 - 2a/3 for lambda_n = n^3 (1 + a n^-3) = n^3 + a, at a = 2 (value 26/3). FIRST RUN, AND THE CHANGE (claims unchanged): P1, P3 and P4 failed numerically, P2 passed. binom(-s, k) was computed through mp.binomial, i.e. gamma functions near their poles, which loses about as many digits as -log10(s) at s = 1e-30 (the values agreed with the claims to ~1e-11 only); and the binomial series was truncated at K = 90, too short for lambda = n^3 + 7n, whose ratio at n = 3 is 7/9 (error 1e-10 at s = 2). Re-run with the rising factorial, binom(-s, k) = (-1)^k (s)_k / k!, which is exact at small s, and K = 400. SECOND RUN: P1 and P2 passed; P3 and P4 still agreed only to ~1e-11, because at 40 digits the pole term zeta_H(1 + p s0, 3) ~ 1/(p s0) ~ 3e29 carries only ~11 digits after the point. Re-run at 70 digits. BUNDLE EDIT (29 October): the archive's [M] labels were removed from the claims; nothing else changed. """ import sys import mpmath as mp mp.mp.dps = 70 FAILURES = [] def check(name, ok, detail=""): print(f" [{'PASS' if ok else 'FAIL'}] {name}" + (f" -- {detail}" if detail else "")) if not ok: FAILURES.append(name) def Z(s, c, p, a, j, K=400): hz = lambda x: mp.zeta(x, 3) tot = mp.mpf(0) for k in range(K): b = (-1) ** k * mp.rf(s, k) / mp.factorial(k) * mp.power(a, k) # binom(-s, k) a^k, exact at small s if b == 0: continue tot += b * 2 * (hz(p * s + j * k - 2) - 4 * hz(p * s + j * k)) return mp.power(c, -s) * tot def direct(s, lam): return mp.nsum(lambda n: 2 * (n * n - 4) * lam(n) ** (-s), [3, mp.inf]) CASES = { "n^3 + 7n": (1, 3, mp.mpf(7), 2, lambda n: n**3 + 7 * n), "2n^5 + n^3/2": (2, 5, mp.mpf(1) / 4, 2, lambda n: 2 * n**5 + n**3 / 2), "n^3 + n^2": (1, 3, mp.mpf(1), 1, lambda n: n**3 + n**2), "n^3 - n^2/2": (1, 3, mp.mpf(-1) / 2, 1, lambda n: n**3 - n**2 / 2), "n^3 + 2": (1, 3, mp.mpf(2), 3, lambda n: n**3 + 2), } print("P1 the continuation against direct sums") ok1, det1 = True, [] for nm, (c, p, a, j, lam) in CASES.items(): for s in (2, 3): d = abs(Z(mp.mpf(s), c, p, a, j) - direct(s, lam)) ok1 &= d < mp.mpf(10) ** -25 det1.append(nm) check("continuation = direct sum at s = 2, 3 for all five lambda", ok1, ", ".join(det1)) s0 = mp.mpf(10) ** -30 val = {nm: Z(s0, c, p, a, j) for nm, (c, p, a, j, _) in CASES.items()} print("P2 even powers: zeta(0) = 10") check("n^3 + 7n and 2n^5 + n^3/2 give 10", abs(val["n^3 + 7n"] - 10) < 1e-20 and abs(val["2n^5 + n^3/2"] - 10) < 1e-20, f"{mp.nstr(val['n^3 + 7n'], 15)}, {mp.nstr(val['2n^5 + n^3/2'], 15)}") print("P3 a first odd power changes the count") f3 = lambda a: 10 + mp.mpf(8) * a / 3 - 2 * a**3 / 9 check("n^3 + n^2 gives 112/9; n^3 - n^2/2 gives 313/36", abs(val["n^3 + n^2"] - mp.mpf(112) / 9) < 1e-20 and abs(val["n^3 - n^2/2"] - mp.mpf(313) / 36) < 1e-20 and abs(f3(mp.mpf(1)) - mp.mpf(112) / 9) < 1e-30 and abs(f3(mp.mpf(-1) / 2) - mp.mpf(313) / 36) < 1e-30, f"{mp.nstr(val['n^3 + n^2'], 15)}, {mp.nstr(val['n^3 - n^2/2'], 15)}") print("P4 a third odd power changes it too") check("n^3 + 2 gives 26/3", abs(val["n^3 + 2"] - mp.mpf(26) / 3) < 1e-20, f"{mp.nstr(val['n^3 + 2'], 15)}") print() print(f"test_333: {'ALL PASS' if not FAILURES else 'FAILURES: ' + ', '.join(FAILURES)}") sys.exit(1 if FAILURES else 0)