The Art of Mathematics

Help 6.28

fact — factorial

1. Definition

Factorial is defined as

0! ≡ 1;
n! ≡ 1×2×...×(n − 1) × n, for n = 1, 2, 3, ...

From definition follows, that factorial is defined only for non-negative integers, and its value is always positive integer. So, as function it is defined only at discrete points.

2. Combinatorics

Number of permutations — ordered k-size subsets of n-element set:

nPk = n! /(nk)!

Number of combinations — k-size subsets of n-element set:

nCk = n! / [k! (nk)!]

First dozen values

nn!
01
11
22
36
424
5120
6720
75040
840320
9362880
103628800
1139916800
12479001600
Table. 1. Factorial for some n.

4. How to use

To calculate factorial of the number:

fact(8);

To get factorial of the current result:

fact(rslt);

To get factorial of the number n in calculator memory:

fact(mem[n]);

5. Support

Factorial of the natural number and zero is supported in free version of the Librow calculator.

Factorial of the complex number — resolved into gamma function of the complex argument — is supported in professional version of the Librow calculator.