Maths encyclopedia and lessons  
Search

Mathematics Encyclopedia and Lessons

 
     
 

Lessons

Popular
Subjects

algebra
arithmetic
calculus
equations
geometry
differential equations
trigonometry
number theory
probability theory
more
 

References

applied mathematics
mathematical games
mathematicians
more
 
 

Subfactorial

The subfactorial function is used to calculate the number of permutations of a set of n objects in which none of the elements occur in their natural place, whereas the factorial function calculates the total number of permutations of the set. In practical terms, subfactorial is the number of ways of putting n letters into n envelopes (one in each envelope) with none in its correct envelope.

It can be calculated using the inclusion-exclusion principle.

!n \equiv n! \sum_{k=0}^n \frac {(-1)^k}{k!}

Subfactorials can also be calculated in the following way:

!n \equiv \left [ \frac {n!}{e} \right ]

where [x] denotes the nearest integer function .

The first few values of the function are:

!1 = 0
!2 = 1
!3 = 2
!4 = 9
!5 = 44
!6 = 265
!7 = 1,854
!8 = 14,833
!9 = 133,496
!10 = 1,334,961
!11 = 14,684,570
!12 = 176,214,841
!13 = 2,290,792,932
!14 = 32,071,101,049

The number 148,349 has the surprising and unique property that it is equal to the sum of the subfactorials of its digits:

148,349 = !1 + !4 + !8 + !3 + !4 + !9

Subfactorial is sometimes permitted in the Four fours mathematical game where !4 being 9 is helpful.

01-04-2007 01:18:14
The contents of this article are licensed from Wikipedia.org
under the GNU Free Documentation License. How to see transparent copy