TITLE: Why is $!0 = 1$?
QUESTION [6 upvotes]: The subfactorial function is defined as: 
$$!n = n!\sum_{i=0}^n\dfrac {(-1)^i} {i!}$$
I was curious and wanted to find out what $!0$ came out to be.
Since I couldn't use it in the sum above, I used a different method by figuring out $!1$ first and using $!n = !(n-1)n-1$.  
It turned out, that if you plugged in $0$ for this, you got $2$.
This seemed odd, so I used a reverse equation, $!n = \dfrac {!(n+1) +1} {(n+1)}$ and plugged in $2$ for $!0$ and it turned out correct.
This still seemed very odd, so I checked it on Wolfram Alpha, which say that $!0 = 1$  
So what did I do wrong? And how exactly does $!0$ turn out to be $1$?

REPLY [3 votes]: Using the definition you provided:$$
!1 = 1! \sum_{i=0}^1\frac{(-1)^i}{i!} = 1 \left(\frac{1}{1} + \frac{-1}{1}\right) = 0
$$Then putting this in the other recursive equation you gave:$$
!1 = !(1-1)(1) - 1 \implies 0 = !0 - 1 \implies !0 = 1
$$
Considering the definition provided on Wikipedia:

In combinatorial mathematics, a derangement is a permutation of the elements of a set, such that no element appears in its original position.

It's clear that the empty set has no elements to put into their previous position, likewise a set with only one element will always have to put that element in the first position.