Derangement counting formula (source code)

= Derangement counting formula
{title2=$!n=n!\sum_{k=0}^{n}\frac{(-1)^k}{k!}$}

<Inclusion-exclusion> applied to the events that a <permutation> fixes a specified point gives the displayed formula. There are $\binom nk$ choices of $k$ fixed points and $(n-k)!$ permutations fixing them. The probability that a uniformly chosen permutation is a <derangement> tends to $e^{-1}$.

// Target: analysis.bigb