TITLE: Moments of the trace of orthogonal matrices
QUESTION [18 upvotes]: Let $O_n$ be the (real) orthogonal group of $n$ by $n$ matrices.
I am interested in the following sequence which showed up in a calculation I was doing
$$a_k = \int_{O_n} (\text{Tr } X)^k dX$$
where the integral is taken with respect to the normalized Haar measure on $O_n.$  I noticed some work of Dianconis et al. covers a more general set of moments, but essentially the formulas I saw only seem to hold for small $k.$ For the case of $O_2$ the sequence looks like $a_{2k} = \frac{1}{2}\binom{2k}{k},$ which can be calculated by hand since $O_2$ has some special structure.
I was hoping  there would be some general known formula (since, if I recall correctly, this calculates the multiplicity the trivial representation in a tensor power the standard representation of $O_n$), or that it might be in the OEIS, but I don't know exactly what to look for, and don't know enough small terms to search.

REPLY [7 votes]: I am writing more than a year after the question was posted, only to spell out some more details regarding the calculation implicit in the solution presented by Suvrit, and to clarify the dependence on $n$ in that solution.
Write $[{\rm Tr}(AX)]^{2k}=p_{1^{2k}}(AX)$, using power sum symmetric functions. Next, expand into Schur functions, $p_{1^{2k}}(AX)=\sum_{\lambda\vdash 2k}d_\lambda s_\lambda(AX)$. Notice that in this expansion we must have $\ell(\lambda)\le n$, otherwise the Schur function is identically zero.
Now use the definition of zonal polynomials (average of irreducible characters of $U(n)$ over the subgroup $O(n)$),
$$ \int_{O(n)}s_\lambda(AX)dX=\frac{Z_\tau(AA^T)}{Z_\tau(1^n)},$$ which holds if $\lambda=2\tau$ (the integral vanishes otherwise) to get
$$ \int_{O(N)}[{\rm Tr}(X)]^{2k}dX=\sum_{\tau\vdash k}d_{2\tau}, $$ with the condition $\ell(\tau)\le n$ (which is the only dependence of the answer on $n$).