The unsigned Stirling numbers of the first kind count the number of permutations of [n] with k cycles. A permutation is a set of cycles, and hence the set P {\displaystyle {\mathcal {P}}\,} of permutations is given by
where the singleton U {\displaystyle {\mathcal {U}}} marks cycles. This decomposition is examined in some detail on the page on the statistics of random permutations.
Translating to generating functions we obtain the mixed generating function of the unsigned Stirling numbers of the first kind:
Now the signed Stirling numbers of the first kind are obtained from the unsigned ones through the relation
Hence the generating function H ( z , u ) {\displaystyle H(z,u)} of these numbers is
A variety of identities may be derived by manipulating this generating function:
In particular, the order of summation may be exchanged, and derivatives taken, and then z or u may be fixed.
A simple sum is for n ≥ 2 {\displaystyle n\geq 2}
This formula holds because the exponential generating function of the sum is
Some infinite sums include
where | z | < 1 {\displaystyle |z|<1} (the singularity nearest to z = 0 {\displaystyle z=0} of log ( 1 + z ) {\displaystyle \log(1+z)} is at z = − 1. {\displaystyle z=-1.} )
This relation holds because
These numbers count the number of partitions of [n] into k nonempty subsets. First consider the total number of partitions, i.e. Bn where
i.e. the Bell numbers. The Flajolet–Sedgewick fundamental theorem applies (labelled case). The set B {\displaystyle {\mathcal {B}}\,} of partitions into non-empty subsets is given by ("set of non-empty sets of singletons")
This decomposition is entirely analogous to the construction of the set P {\displaystyle {\mathcal {P}}\,} of permutations from cycles, which is given by
and yields the Stirling numbers of the first kind. Hence the name "Stirling numbers of the second kind."
The decomposition is equivalent to the EGF
Differentiate to obtain
which implies that
by convolution of exponential generating functions and because differentiating an EGF drops the first coefficient and shifts Bn+1 to z n/n!.
The EGF of the Stirling numbers of the second kind is obtained by marking every subset that goes into the partition with the term U {\displaystyle {\mathcal {U}}\,} , giving
Translating to generating functions, we obtain
This EGF yields the formula for the Stirling numbers of the second kind:
or
which simplifies to