import numberdb.sage as numberdb
from sage.rings.rational_field import QQ
def triangle_vertices(n):
if n == 1:
return QQ(1)
return 2*sum(QQ(1)/k for k in range(1,n))
def parallelogram_vertices(n):
if n == 1:
return QQ(1)
s=sum((1-QQ(1)/2**k)/k for k in range(1,n+1))
return QQ(8)/3*(s-QQ(1)/(n*2**n))
print(triangle_vertices(4), parallelogram_vertices(4))
import numberdb.sage as numberdb
from sage.rings.complex_arb import ComplexBallField
from sage.rings.rational_field import QQ
def ellipse_vertices(n, digits=100):
if n == 1:
return QQ(1)
C=ComplexBallField(numberdb.bits(digits,losing=80))
pi=C.pi()
def integrand(u,analytic):
t=pi*u
return t.sin()**4*(u-t.sin()*t.cos()/pi)**(n-2)
return (C(8*n*(n-1))/3*C.integral(integrand,0,1)).real()
print(ellipse_vertices(4))
The 34 triangle and parallelogram values use exact rational arithmetic. The 17 ellipse values use Arb's certified integration of an entire trigonometric integrand, with 80 guard bits beyond 100 significant digits. The maximum measured absolute radius is less than $1.34\times10^{-121}$. Every enclosure is required to be finite and to have relative radius below $10^{-110}$.
Independent exact integration of hull-edge probabilities reproduces every rational entry. For triangles this integrates over the three pairs of boundary edges. For squares it separates the four adjacent and two opposite pairs. The controls are the known three-point expectation $3$ and the four-point expectations $11/3$ and $133/36$.
A separate signed-area integral from printed page 15 of [5], combined with Efron's identity, checks each ellipse value at 130 and 170 decimal digits. The mean area fraction $35/(48\pi^2)$ for three disk points is tested first as a normalization control. The two quadratures agree within $10^{-125}$, and they agree with the Arb values within $10^{-115}$. The expected-edge integral also passes its three-point control $3$ and the four-point closed form $4-35/(12\pi^2)$. Numerical quadrature supplies agreement checks; the Arb enclosures justify the stored digits.
The attached checks compare all 51 entries read back from the database with the independent computations, test all 51 Efron relations to the hull-volume ratios, test the three four-point relations to the convex-position probabilities, and check $3<e_K(n)<n$ for every stored entry.