How can i find a formula for the total number of 2-regular graphs that can be formed within a complete graph? Just to restate my question I am looking to mathematically represent the number of 2-regular graphs that can be formed within a complete graph with n number of nodes.
My question is based off of the telephone numbers, which are numbers representing the amount of connections between people in a telephone system. Telephone numbers are similar in the sense that they represent the number of 1-regular graphs that can be formed within a complete graph with n number of nodes. 
I am currently trying to find a recurrence formula and a summation formula to represent the pattern that I am investigating, but seeing as I am new to the field of graph theory this is proving quite difficult. 
The problem that I am running in to is how to mathematically describe the fact that if n>=6, more than one 2-regular graphs can be formed within the complete graph. Any help in pointing me in the correct direction would be much appreciated.
 A: I am assuming from the analogy with telephone numbers that you're looking at a labeled graph, where all the vertices are distinct. In that case, we might write down a recurrence for these, as follows. (The procedure is very similar to finding a recurrence for the Stirling numbers of either kind.)
Let $a_n$ denote the number of $2$-regular spanning subgraphs of $K_n$. In a $2$-regular spanning subgraph of $K_{n+1}$, we have two possibilities:


*

*The $(n+1)^{\text{th}}$ vertex is in a component of size $3$. In this case, there are $\binom n2$ ways to choose the other vertices in that component. If we delete the component of size $3$, we are left with a $2$-regular spanning subgraph of $K_{n-2}$, of which there are $a_{n-2}$.

*The $(n+1)^{\text{th}}$ vertex is in a component of size $4$ or more. In that case, deleting that vertex and joining its neighbors by a new edge would create a $2$-regular spanning subgraph of $K_n$. We could have obtained each such subgraph in $n$ different ways, because there are $n$ different places where we could have removed the $(n+1)^{\text{th}}$ vertex.


Putting these together, we get the recurrence $$a_{n+1} = \binom n2 a_{n-2} + n a_n.$$
Finding the first few entries of this sequence, which are $$0, 0, 1, 3, 12, 70, 465, \dots,$$ and looking them up in the OEIS, we get sequence A001205, which lists some other identities (but no closed form), as well as an exponential generating function.
