import numberdb.sage as numberdb
from sage.rings.integer_ring import ZZ
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
R = PolynomialRing(ZZ, names=('x', 'c', 'q'))
x, c, q = R.gens()
def H(n):
if n < 0:
raise ValueError('n must be nonnegative')
previous, current = R(1), (1-c)*x
if n == 0:
return previous
for j in range(1, n):
previous, current = current, (1-c*q**j)*x*current-c*q**(j-1)*previous
return current
H(5) # The stored prefix is n=0,...,5; any nonnegative n is valid.
The generator uses exact integer-polynomial arithmetic and the denominator-cleared recurrence. All six complete coefficient vectors were compared with a separate implementation of the finite sum in Kim and Stanton, Theorem 4.9. Known initial values and deliberately changed coefficients, signs, family, normalization, enumeration and inexact inputs test the checker.
Exact Chebyshev specializations, finite continuant determinants, first-q-Bessel formal series and classical scaling limits provide supplementary checks. The methods share the cited mathematical conventions; these computations do not constitute an independent review verdict. Reproducible source, selected-argument justification, actual results, dependency versions and the matching archived skill manifest are attached.