Example 1
Let $G$ be the Monster group and let $\rho_0,\rho_1,\rho_2\ldots$ be its irreducible representations ordered by dimension. Then
$$\mathrm{dim}\left(V_{-1}\right)q^{-1}+\sum_{k=1}^{\infty}\mathrm{dim}\left(V_k\right)q^k=j(\tau)-744,\qquad q=e^{2\pi i \tau},$$
where $j(\tau)$ denotes the $j$-function and $V_{-1}=\rho_0$, $V_1=\rho_1\oplus\rho_0$, $V_2=\rho_2\oplus\rho_1\oplus\rho_0$,
$V_3=\rho_3\oplus\rho_2\oplus\rho_1\oplus\rho_1\oplus\rho_0\oplus\rho_0$ etc.
There are many other examples of this type (e.g. McKay-Thompson series) and very far-reaching generalizations known under the general name of Monstrous Moonshine.
Example 2
Another example is the character of the generic Verma module of the Virasoro algebra
$$[L_m,L_n]=(m-n)L_{m+n}+\frac{c}{12}m(m^2-1)\delta_{m+n,0}.$$
Such module $M(c,\Delta)$ is generated by the action of $L_{n<0}$ on the highest weight state $|\Delta\rangle$ annihilated by all $L_{n>0}$ and satisfying $L_0|\Delta\rangle=\Delta|\Delta\rangle$. The states $L_{-n_k}\ldots L_{-n_1}|\Delta\rangle$ of the module are naturally labeled by partitions. Now the character is
\begin{align}
\chi(c,\Delta|q)=\mathrm{Tr}\,q^{L_0-c/24}=\frac{q^{\Delta+(1-c)/24}}{\eta(\tau)},\qquad q=e^{2\pi i\tau},
\end{align}
where $\eta(\tau)$ is the Dedekind eta function arising from the sum over these partitions.