I need a (numerically) evaluable function for the number $N\_{n,k}$ of endofunctions $f: [n] \rightarrow [n]$ without fixed points that have exactly $k$ two-cycles, where $[n] := \{1,\dotsc,n\}$. In formal terms, what is
$$N\_{n,k} := \lvert \{ f:[n]\rightarrow [n] \mid \forall a: f(a) \neq a \land \lvert\{ a \in [n] \mid f^2(a) = a\}\rvert = 2k\ \}\rvert? $$
I have found a few sources on this, but have trouble to transfer the results to this specific question. An explicit formula would be greatly appreciated, while a proof or indication of a proof would be as well, though less importantly so.



Number of endofunctions in [n] without fixed points with exactly k two-cycles
First choose your 2-cycles, for a factor of $\binom{n}{2k}(2k-1)!!$. (Note that we require the convention that $(-1)!! = 1$). Then count functions $g: [n-2k] \to [n]$ with no fixed points or 2-cycles. There are $\binom{n-2k}{2j}(2j-1)!! (n-1)^{n-2k-2j}$ functions with no fixed points and at least $j$ 2-cycles, so an inclusion-exclusion gets $$\binom{n}{2k}(2k-1)!! \sum\_{j \ge 0} (-1)^j \binom{n-2k}{2j}(2j-1)!! (n-1)^{n-2k-2j}$$


Alternatively we can just start the whole thing as an inclusion-exclusion from $j = k$, but then the Möbius function adds a binomial coefficient:


$$\sum\_{j \ge k} (-1)^{j-k} \binom{j}{k} \binom{n}{2j}(2j-1)!! (n-1)^{n-2j}$$


