# Download the attached generate.py into the current directory.
from generate import spectral_polynomial
spectral_polynomial(4)
Computed by exact arithmetic in $\mathbb Q[h,m]$, using tridiagonal characteristic polynomials of the finite invariant Lamé solution spaces. Every coefficient is an integer. No approximate eigenvalues enter the construction.
Each polynomial agrees coefficient by coefficient with the independently transcribed Weierstrass spectral factors in [1], Table 3, after the Jacobi energy conversion. The checker first reproduces the known factorizations at orders 1 and 2. It also checks degree, leading coefficient, integrality, the free-particle degeneration, the complementary-parameter identity and the lemniscatic central root. The attached checks are repeated on the values read back from the draft.