The Art of Interface

Article 11 — Appendix A.21

n! — factorial

Category. Mathematics.

Abstract. Factorial: definition, properties, identities and table of values for some arguments.

Reference. This article is a part of Librow scientific formula calculator project.

See also. Factorial generalization — gamma function Γ.

Librow Calculator Pro

Limited offer

Professional Librow Calculatorvisit

for free

  • Bessel functions
  • gamma function
  • complex numbers
Download
7.4 MB for Windows

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. Identities

Next value identity

(n + 1)! = (n + 1) n!

There is a generalization of the factorial for real numbers — gamma function Γ — and

n! = Γ(n + 1)

3. 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. Support

Factorial n! is supported by free version of the Librow calculator.

Factorial of the complex number n!=z! (resolved into gamma function of the complex argument) is supported by professional version of the Librow calculator.

5. How to use

To calculate factorial of the number:

8!;

To calculate factorial of the current result:

To calculate factorial of the number n in memory:

mem[n]!;