Definitions

# Stirling number

In mathematics, Stirling numbers arise in a variety of 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 the 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 large S (Abramowitz and Stegun use an uppercase S and a blackletter S respectively). They are:

$s\left(n,k\right)text\left\{ \left(signed\right)\right\},$

$c\left(n,k\right)=left\left[\left\{n atop k\right\}right\right]=|s\left(n,k\right)|text\left\{ \left(unsigned\right)\right\},$

$S\left(n,k\right)= S_n^\left\{\left(k\right)\right\} =$
left{begin{matrix} n k end{matrix}right}.,

The notation of using brackets and braces, in analogy to the binomial coefficients, was introduced in 1935 by Jovan Karamata and promoted later by Donald Knuth; it is referred to as Karamata notation. 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

Unsigned Stirling numbers of the first kind

$c\left(n,k\right)=left\left[\left\{n atop k\right\}right\right]=|s\left(n,k\right)|=\left(-1\right)^\left\{n-k\right\} s\left(n,k\right)$

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

Stirling numbers of the first kind (without the qualifying adjective unsigned) are the coefficients in the expansion

$\left(x\right)_\left\{\left(n\right)\right\} = sum_\left\{k=1\right\}^n s\left(n,k\right) x^k.$

where $\left(x\right)_\left\{\left(n\right)\right\}$ is the falling factorial

$\left(x\right)_\left\{\left(n\right)\right\}=x\left(x-1\right)\left(x-2\right)cdots\left(x-n+1\right).$

See the main article Stirling numbers of the first kind for additional information.

## Stirling numbers of the second kind

Stirling numbers of the second kind S(nk) (with a capital "S") count the number of ways to partition a set of n elements into k nonempty subsets. The sum

$B_n=sum_\left\{k=1\right\}^n S\left(n,k\right)$

is the nth Bell number. If we let

$\left(x\right)_n=x\left(x-1\right)\left(x-2\right)cdots\left(x-n+1\right)$

(in particular, (x)0 = 1 because it is an empty product) be the falling factorial, we can characterize the Stirling numbers of the second kind by

$sum_\left\{k=0\right\}^n S\left(n,k\right)\left(x\right)_k=x^n.$

(Confusingly, the notation that combinatorialists use for falling factorials coincides with the notation used in special functions for rising factorials; see Pochhammer symbol.)

''See the main article Stirling numbers of the second kind for additional information.

## Inversion relationships

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

$sum_\left\{n=0\right\}^\left\{max\left\{j,k\right\}\right\} \left(-1\right)^\left\{n-k\right\} left\left[\left\{natop j\right\}right\right] left\left\{\left\{katop n\right\}right\right\} = delta_\left\{jk\right\}$

and

$sum_\left\{n=0\right\}^\left\{max\left\{j,k\right\}\right\} \left(-1\right)^\left\{n-k\right\} left\left\{\left\{natop j\right\}right\right\} left\left[\left\{katop n\right\}right\right] = delta_\left\{jk\right\}$

where $delta_\left\{jk\right\}$ is the Kronecker delta. These two relationships may be understood to be matrix inverses. That is, let $s$ be the lower triangular matrix of Stirling numbers of first kind, so that it has matrix elements

$\left[s\right]_\left\{nk\right\}=s\left(n,k\right)=\left(-1\right)^\left\{n-k\right\} left\left[\left\{natop k\right\}right\right]$

Then, the inverse of this matrix is $S$, the lower triangular matrix of Stirling numbers of second kind. Symbolically, one writes

$s^\left\{-1\right\} = S$

where the matrix elements of $S$ are

$\left[S\right]_\left\{nk\right\}=S\left(n,k\right)=left\left\{\left\{natop k\right\}right\right\}.$

Note that although $s$ and $S$ are infinite, this works for finite matrices by only considering Stirling numbers up to some number $N$.

## Symmetric formulae

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

$left\left[\left\{natop k\right\}right\right] = \left(-1\right)^\left\{n-k\right\} sum_\left\{j=0\right\}^\left\{n-k\right\} \left(-1\right)^j \left\{n-1+j choose n-k+j\right\} \left\{2n-k choose n-k-j\right\} left\left\{\left\{n-k+jatop j\right\}right\right\}$

and

$left\left\{\left\{natop k\right\}right\right\} = \left(-1\right)^\left\{n-k\right\} sum_\left\{j=0\right\}^\left\{n-k\right\} \left(-1\right)^j \left\{n-1+j choose n-k+j\right\} \left\{2n-k choose n-k-j\right\} left\left[\left\{n-k+jatop j\right\}right\right].$