back to table · edit · history · where entries came from · files · download
635 bytes, as of the version from 2026-11-01 11:37 (current). Recorded here, not run.
from functools import lru_cache
from mpmath import mp
mp.dps = 50
@lru_cache(maxsize=None)
def bessel(t):
return mp.besseli(0, t), mp.besselk(0, t)
def B(n, a, r):
def integrand(t):
if not t:
return mp.mpf(0)
i, k = bessel(t)
return i**a * k**(n-a) * t**r
return mp.quad(integrand, [0, 1, 4, 16, 64, mp.inf])
def V(n):
if n not in (5, 6, 8):
raise ValueError('The defined factor counts are 5, 6, 8')
def C(a):
return B(n, a, 3) - (2*B(n, a, 5) if n == 8 else 0)
return B(n, 0, 1)*C(2) - B(n, 2, 1)*C(0)
for n in (5, 6, 8):
print(n, mp.nstr(V(n), 30))