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

93 Views Asked by At

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!}$