# Derangements and Contour Integrals?

1. Mar 5, 2013

### Mandelbroth

I did a proof a few days ago (for the sake of enjoyment) and my teacher thought it was interesting, though he seemed unsure of my result.

Consider a set of n distinct objects, P. If $n \in \mathbb{Z}_+ \cup \left\{0\right\}$, then the cardinality, q, of the set of all derangements of P is given by
$\displaystyle q = \frac{n!}{2\pi i}\oint_{\gamma}\Gamma(z)dz$,​
where $z=a+bi$ and $\gamma$ is given by the parametric equations $a = (\frac{n}{2}+\frac{1}{\alpha})cos(t)-\frac{n}{2}$ and $b = (\frac{n}{2}+\frac{1}{\alpha})sin(t)$ for some arbitrary $\alpha > 1$. Note that the case of n=0 is almost by convention, much like 0!=1.

My proof used the transitive property of equality (the formula for derangements and for the sum of the residues of the gamma function are the same). Is there a more fundamental reason why they happen to be the same?