In this video we look at a variant of the usual generating function called the exponential generating function. It sometimes encodes information about a sequence in a better way than the usual one. We look at some examples, and in particular, how it can be used to count the number of derangements of a finite set.