Spectral moments of regular graphs in terms of subgraph counts

We give equations that relate the spectral moments of a regular graph G to the numbers of certain subgraphs that occur within G. The equations are derived by using generating functions to count certain closed walks in G. The subgraphs that determine the i-th spectral moment are precisely the connected graphs of minimum degree 2 that are induced by at least one closed walk of length i.