- General formula: !
*n=*(*n*-1)[!(*n*-1)+!(*n*-2)] - !0=1
- !1=0

Wikipedia link Wolfram link (Other) subfactorial blog Online calculator

- Get link
- Other Apps

We're glad that you asked. The n th subfactorial is the number of permutations of n objects in which no object appears in its natural place (from Wolfram). So, if we have the digits {1, 2, 3, 4} ( n=4), we want to know how many ways can we order those numbers such that none appear in their initial position (so, "1" will not be first; "2" will not be second, "3" will not be third, and "4" will not be fourth). The following combinations of {1, 2, 3, 4} are the only combinations in which no digit is in its natural place: {2, 1, 4, 3} {2, 3, 4, 1} {2, 4, 1, 3} {3, 1, 4, 2} {3, 4, 1, 2} {3, 4, 2, 1} {4, 1, 2, 3} {4, 3, 1, 2} {4, 3, 2, 1} There are 9 possible combinations that meet this criterion. So !4=9 . Remember that there are 4! (=24) possible combinations of {1, 2, 3. 4}, so we note that 4!-!4=24-9=15 of them have a value that is in its natural place. The following is a list of combinations that do not meet the criterion (that

- Get link
- Other Apps