import numberdb.sage as numberdb
from sage.rings.rational_field import QQ
from sage.rings.integer_ring import ZZ
from sage.rings.real_arb import RealBallField
from sage.arith.misc import moebius
from math import gcd
from functools import lru_cache
def vasyunin_error(N, digits=100):
N=ZZ(N)
if N<1:raise ValueError('N must be positive')
if N==1:return ZZ(1)
R=RealBallField(numberdb.bits(digits, losing=128))
C=(2*R.pi()).log()-R.euler_constant()
@lru_cache(None)
def v(p,q):
return sum((R(QQ((m*p)%q)/q)*(R.pi()*R(QQ(m)/q)).cot()
for m in range(1,q)),R(0))
def gram(j,k):
d=gcd(j,k);p=j//d;q=k//d;x=R(QQ(p)/q)
return ((1-x)*x.log()+(1+x)*C-R.pi()*(v(p,q)+v(q,p))/q)/(2*j)
w=[QQ(moebius(n)) for n in range(1,N+1)]
w[0]-=sum((w[n-1]/n for n in range(1,N+1)),QQ(0))
return (1+2*sum(w[n-1]*(R(n).log()+1-R.euler_constant())/n
for n in range(1,N+1))
+sum(w[j-1]*w[k-1]*gram(j,k)
for j in range(1,N+1) for k in range(1,N+1)))
vasyunin_error(30)
Computed with Arb real balls at 461 working bits from exact rational Möbius weights and finite cotangent sums at exact rational arguments. All inexact entries retain at least 443 bits of relative accuracy, with radii below $8.20\times10^{-136}$, sufficient for 100 significant digits. The first entry is the exact integer 1 because $V_1=0$. No rounded companion values are inputs.
A separate 720-bit calculation integrates the piecewise quadratic fractional-part product against the trigamma kernel. It evaluates 16 terms analytically, then sums powers 0 through 125 with an explicit alternating-series remainder bound. All 465 symmetric Gram entries and all 30 norms agree; the independent norm radii are below $5.88\times10^{-151}$. Whole-residual integrals also agree for $N=1,2,3,4,6$. Known-answer, deliberately incorrect, wide-ball and NaN controls test the checker. Exact exterior cancellation, nonsquarefree repetitions, the expanded correction identity, and lower bounds from independently solved least-squares systems hold throughout the computed prefix. The displayed program agrees on all 30 entries. The generator, checks, derivation and numerical evidence are attached.