# For n = 3, use BBSW Theorem 4.1, equation (23).
# The printed digits are heuristic; raise precision and check agreement
# when increasing the logarithmic moment order k.
import mpmath as mp
mp.mp.dps = 150 # decimal working digits
def W3(s):
a = 1 + s/2
return (mp.sqrt(3) * mp.power(3, s+1) * mp.gamma(a)**2
/ (2*mp.pi*mp.gamma(s+2))
* mp.hyper([a, a, a], [1, (s+3)/2], mp.mpf(1)/4))
k = 2 # vary k to compute another order
print(mp.nstr(mp.diff(W3, 0, k), 100))The three-term values are Taylor derivatives of the hypergeometric generating function in Borwein, Borwein, Straub and Wan. The four-term values integrate convergent local series for the radial density from Borwein, Straub, Wan and Zudilin. Computations at 150 and 220 decimal working digits agree by at least 148 decimal places relative to max(1, absolute value). The entries retain 100 significant digits. Arb controls finite arithmetic, but the series tails are not certified, so the precision claim is heuristic agreement, not a rigorous enclosure of the infinite computation.
Independent elliptic-density quadrature checks every three-term value to 115 decimal places. For four terms, the second-moment closed form is checked to 120 places and direct hypergeometric density evaluations check each series region to 115 places. Separate numerical integration checks all four-term moments to 40 places; that integration shares the density recurrence and checks the integration arithmetic. Known normalization, squared-radius and first-moment controls are run first. The attached method.md explains the algorithms, checks, limitations and a resolved sign discrepancy in a printed endpoint expansion. The attached checks.py reproduces the validation.