  In [arXiv:2107.01437], the authors studied the mean-square of certain sums of
the divisor function $d_k(f)$ over the function field $\mathbb{F}_q[T]$ in the
limit as $q \to \infty$ and related these sums to integrals over the ensemble
of symplectic matrices, along similar lines as previous work of Keating,
Rodgers, Roditty-Gershon and Rudnick [arXiv:1504.07804] for unitary matrices.
We present an analogous problem yielding an integral over the ensemble of
orthogonal matrices and pursue a more detailed study of both the symplectic and
orthogonal matrix integrals, relating them to symmetric function theory. The
function field results lead to conjectures concerning analogous questions over
number fields.
