# Deriving the formula for derangements: $\text{Round}\left[\frac{n!}{e}\right]$ [duplicate]

I saw on wikipedia that a formula for derangements is

$\text{Round}\left[\frac{n!}{e}\right]$

However, how did they arrive at this elegant formula?

Does it have to do with $!n=n! \sum _{k=0}^n \frac{(-1)^k}{k!}$

## marked as duplicate by user85798, colormegone, Claude Leibovici, WimC, NamasteApr 20 '14 at 11:23

• $\displaystyle \sum_{k=0}^{2n+1}\dfrac{(-1)^k}{k!}< e^{-1}=\sum_{k=0}^\infty \dfrac{(-1)^k}{k!}<\sum_{k=0}^{2n}\dfrac{(-1)^k}{k!}$ Therefor, we have that identity. – hxthanh Apr 20 '14 at 6:38