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
def dual_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))
w=[ZZ(0)]*N
for m in range(1,N+1):w[N//m-1]+=moebius(m)
w[0]-=1
cuts=sorted({QQ(a)/k for k in range(1,N+1) for a in range(k+1)})
total=R(0)
for left,right in zip(cuts,cuts[1:]):
mid=(left+right)/2
c=1-sum(w[k-1]*(k*mid).floor() for k in range(1,N+1))
total+=c*c*(R(1+right).psi()-R(1+left).psi())
start=max(left,QQ(1)/N)
if right>start:total+=c*c*(1/R(start)-1/R(right))
return total/N
# Every N=1,...,30 is stored; this function also accepts larger positive N.
dual_error(30)
Computed from exact integer weights and finite cotangent sums with Arb real balls at 461 working bits. All inexact values retain at least 446 bits of relative accuracy, with radii below $2.35\times10^{-136}$, sufficient for 100 significant digits. The first entry is the exact integer 1 because $D_1=0$. No rounded companion values are inputs.
A separate 720-bit calculation integrates the entire residual as a periodic step function after $t=1/(Nx)$, using exact rational breakpoints and digamma differences for the infinite tail. All 30 norms agree, with independent radii below $9.43\times10^{-215}$. An explicit series remainder independently checks the tail at $N=1,2,3,4,30$. The checker tests four small closed forms and rejects deliberately incorrect values, wide balls, NaN and two altered formulas. Coefficient cancellation and the displayed program are checked throughout the prefix. The generator, executable checks, derivations and numerical evidence are attached.