A permutation of distinct, ordered items in which none of the items is in its original ordered position is known as a derangement. If some, but not necessarily all, of the items are not in their original ordered positions, the configuration can be referred to as a partial derangement (Evans et al. 2002, p. 385).
Among the possible permutations of distinct items, examine the number of these permutations in which exactly items are in their original ordered positions. Then
(1)
| |||
(2)
| |||
(3)
|
where is a binomial coefficient and is the subfactorial
Here is a table of the number of partial derangements for , 1, ..., 8:
(4)
|
(OEIS A098825).