# Stirling number

In mathematics, Stirling numbers arise in a variety of analytic and combinatorics 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.

## Notation

Several different notations for Stirling numbers are in use. Stirling numbers of the first kind are written with a small s, and those of the second kind with a capital S. Stirling numbers of the second kind are never negative, but those of the first kind can be negative; hence, there are notations for the "unsigned Stirling numbers of the first kind", which are Stirling numbers without their signs. Common notations are:

for ordinary (signed) Stirling numbers of the first kind,

for unsigned Stirling numbers of the first kind, and

for Stirling numbers of the second kind.

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.[1]) 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.

## Stirling numbers of the first kind

The Stirling numbers of the first kind are the coefficients in the expansion

where (a Pochhammer symbol) denotes the falling factorial,

Note that (x)0 = 1 because it is an empty product. Combinatorialists also sometimes use the notation for the falling factorial, and for the rising factorial.[2]

(Confusingly, the Pochhammer symbol that many use for falling factorials is used in special functions for rising factorials.)

The unsigned Stirling numbers of the first kind,

(with a lower-case "s"), count the number of permutations of n elements with k disjoint cycles.

A few of the Stirling numbers of the first kind are illustrated by the table below, starting with row 0, column 0:

where

## Stirling numbers of the second kind

Stirling numbers of the second kind count the number of ways to partition a set of n elements into k nonempty subsets. They are denoted by or .[3] The sum

is the nth Bell number.

Using falling factorials, we can characterize the Stirling numbers of the second kind by the identity

## Lah numbers

Main article: Lah numbers

The Lah numbers are sometimes called Stirling numbers of the third kind. For example, see Jozsef Sándor and Borislav Crstici, Handbook of Number Theory II, Volume 2.

## Inversion relationships

The Stirling numbers of the first and second kinds can be considered inverses of one another:

and

where 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 The inverse of this matrix is S, the lower triangular matrix of Stirling numbers of the second kind, whose entries are 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.

A generalization of the inversion relationship gives the link with the Lah numbers

with the conventions and if .

## Symmetric formulae

Abramowitz and Stegun give the following symmetric formulae that relate the Stirling numbers of the first and second kind.[4]

and