# 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))
