Stirling number

In mathematics, Stirling numbers arise in a variety of analytic and combinatorial problems. They are named after James Stirling, who introduced them in the 18th century. Two different sets of numbers bear this name: the Stirling numbers of the first kind and the Stirling numbers of the second kind. Additionally, Lah numbers are sometimes referred to as Stirling numbers of the third kind. Each kind is detailed in its respective article, this one serving as a description of relations between them.
A common property of all three kinds is that they describe coefficients relating three different sequences of polynomials that frequently arise in combinatorics. Moreover, all three can be defined as the number of partitions of "n" elements into "k" non-empty subsets, with different ways of counting orderings within each subset.
Notation.
Several different notations for Stirling numbers are in use. Common notations are:
for ordinary (signed) Stirling numbers of the first kind,
for unsigned Stirling numbers of the first kind,
which count the number of permutations of "n" elements with "k" disjoint cycles, and
for Stirling numbers of the second kind, which count the number of ways to partition a set of "n" elements into "k" nonempty subsets.
For example, the sum formula_4 is the number of all permutations, while the sum formula_5 is the "n"th Bell number.
Abramowitz and Stegun use an uppercase S and a blackletter S, respectively, for the first and second kinds of Stirling number. The notation of brackets and braces, in analogy to binomial coefficients, was introduced in 1935 by Jovan Karamata and promoted later by Donald Knuth. (The bracket notation conflicts with a common notation for Gaussian coefficients.) The mathematical motivation for this type of notation, as well as additional Stirling number formulae, may be found on the page for Stirling numbers and exponential generating functions.
Expansions of falling and rising factorials.
Stirling numbers express coefficients in expansions of falling and rising factorials (also known as the Pochhammer symbol) as polynomials.
That is, the falling factorial, defined as formula_6, is a polynomial in "x" of degree "n" whose expansion is
with (signed) Stirling numbers of the first kind as coefficients.
Note that ("x")0 = 1 because it is an empty product. Combinatorialists also sometimes use the notation formula_8 for the falling factorial, and formula_9 for the rising factorial. (Confusingly, the Pochhammer symbol that many use for "falling" factorials is used in special functions for "rising" factorials.)
Similarly, the rising factorial, defined as formula_10, is a polynomial in "x" of degree "n" whose expansion is
with unsigned Stirling numbers of the first kind as coefficients.
One of these expansions can be derived from the other by observing that formula_12.
Stirling numbers of the second kind express the reverse relations:
and
As change of basis coefficients.
Considering the set of polynomials in the (indeterminate) variable "x" as a vector space,
each of the three sequences
is a basis.
That is, every polynomial in "x" can be written as a sum formula_16 for some unique coefficients formula_17 (similarly for the other two bases).
The above relations then express the change of basis between them, as summarized in the following commutative diagram:
The coefficients for the two bottom changes are described by the Lah numbers below.
Since coefficients in any basis are unique, one can define Stirling numbers this way, as the coefficients expressing polynomials of one basis in terms of another, that is, the unique numbers relating formula_18 with falling and rising factorials as above.
Falling factorials define, up to scaling, the same polynomials as binomial coefficients: formula_19. The changes between the standard basis formula_20 and the basis formula_21 are thus described by similar formulas:
As inverse matrices.
The Stirling numbers of the first and second kinds can be considered inverses of one another:
and
where formula_26 is the Kronecker delta. These two relationships may be understood to be matrix inverse relationships. That is, let "s" be the lower triangular matrix of Stirling numbers of the first kind, whose matrix elements
formula_27
The inverse of this matrix is "S", the lower triangular matrix of Stirling numbers of the second kind, whose entries are formula_28 Symbolically, this is written
Although "s" and "S" are infinite, so calculating a product entry involves an infinite sum, the matrix multiplications work because these matrices are lower triangular, so only a finite number of terms in the sum are nonzero.
Example.
Expressing a polynomial in the basis of falling factorials is useful for calculating sums of the polynomial evaluated at consecutive integers.
Indeed, the sum of a falling factorial is simply expressed as another falling factorial (for "k"≠−1)
This is analogous to the integral formula_31, though the sum should be over integers "i" strictly less than "n".
For example, the sum of fourth powers of integers up to "n" (this time with "n" included), is:
Here the Stirling numbers can be computed from their definition as the number of partitions of 4 elements into "k" non-empty unlabeled subsets.
In contrast, the sum formula_33 in the standard basis is given by Faulhaber's formula, which in general is more complex.
Lah numbers.
The Lah numbers formula_34 are sometimes called Stirling numbers of the third kind.
By convention, formula_35 and formula_36 if formula_37 or formula_38.
These numbers are coefficients expressing falling factorials in terms of rising factorials and vice versa:
As above, this means they express the change of basis between the bases formula_41 and formula_42, completing the diagram.
In particular, one formula is the inverse of the other, thus:
Similarly, composing for example the change of basis from formula_44 to formula_18 with the change of basis from formula_18 to formula_47 gives the change of basis directly from formula_44 to formula_47:
In terms of matrices, if formula_51 denotes the matrix with entries formula_52 and formula_53 denotes the matrix with entries formula_54, then one is the inverse of the other: formula_55.
Similarly, composing the matrix of unsigned Stirling numbers of the first kind with the matrix of Stirling numbers of the second kind gives the Lah numbers: formula_56.
The numbers formula_57 can be defined as the number of partitions of "n" elements into "k" non-empty unlabeled subsets, each of which is unordered, cyclically ordered, or linearly ordered, respectively. In particular, this implies the following inequalities:
Symmetric formulae.
Abramowitz and Stegun give the following symmetric formulae that relate the Stirling numbers of the first and second kind.
and
Stirling numbers with negative integral values.
The Stirling numbers can be extended to negative integral values, but not all authors do so in the same way. Regardless of the approach taken, it is worth noting that Stirling numbers of first and second kind are connected by the relations:
when "n" and "k" are nonnegative integers. So we have following table for formula_62:
Donald Knuth defined the more general Stirling numbers by extending a recurrence relation to all integers. In this approach, formula_63 and formula_64 are zero if "n" is negative and "k" is nonnegative, or if "n" is nonnegative and "k" is negative, and so we have, for "any" integers "n" and "k",
On the other hand, for positive integers "n" and "k", David Branson defined formula_66, formula_67, 
formula_68,
For example, formula_69. This leads to the following table of values of formula_70.
In this case formula_71 where formula_72 is a Bell number, and so one may define the negative Bell numbers by formula_73. For example, this produces formula_74.