combinatorics

what

a.k.a. the derangement number

: How many ways to arrange the objects, excluding any permutation where an object is in its original position.

formula

as sum

where is the combination.

as recursion

transformation between formulas