# Stirling numbers of the first kind

In mathematics, especially in combinatorics, Stirling numbers of the first kind arise in the study of permutations. In particular, the Stirling numbers of the first kind count permutations according to their number of cycles (counting fixed points as cycles of length one).

(The Stirling numbers of the first and second kind can be understood as inverses of one another when viewed as triangular matrices. This article is devoted to specifics of Stirling numbers of the first kind. Identities linking the two kinds appear in the article on Stirling numbers in general.)

## Definitions

The original definition of Stirling numbers of the first kind was algebraic. These numbers, usually written s(nk), are signed integers whose sign, positive or negative, depends on the parity of nk. Afterwards, the absolute values of these numbers, |s(nk)|, which are known as unsigned Stirling numbers of the first kind, were found to count permutations, so in combinatorics the (signed) Stirling numbers of the first kind, s(nk), are often defined as counting numbers multiplied by a sign factor. That is the approach taken on this page.

### Unsigned Stirling numbers of the first kind

s(4,2)=11

The unsigned Stirling numbers of the first kind are denoted in various ways by different authors. Common notations are ${\displaystyle c(n,k),}$ ${\displaystyle |s(n,k)|}$ and ${\displaystyle \left[{n \atop k}\right]}$. (The last is also common notation for the Gaussian coefficients.) They count the number of permutations of n elements with k disjoint cycles. For example, of the ${\displaystyle 3!=6}$ permutations of three elements, there is one permutation with three cycles (the identity permutation, given in one-line notation by ${\displaystyle 123}$ or in cycle notation by ${\displaystyle (1)(2)(3)}$), three permutations with two cycles (${\displaystyle 132=(1)(23)}$, ${\displaystyle 213=(3)(12)}$, and ${\displaystyle 321=(2)(13)}$) and two permutations with one cycle (${\displaystyle 312=(132)}$ and ${\displaystyle 231=(123)}$). Thus, ${\displaystyle \left[{3 \atop 3}\right]=1}$, ${\displaystyle \left[{3 \atop 2}\right]=3}$ and ${\displaystyle \left[{3 \atop 1}\right]=2}$.

As a second example, the image at right shows that ${\displaystyle \left[{4 \atop 2}\right]=11}$: the symmetric group on 4 objects has 3 permutations of the form

${\displaystyle (\bullet \bullet )(\bullet \bullet )}$—2 orbits, each of size 2,

and 8 permutations of the form

${\displaystyle (\bullet \bullet \bullet )(\bullet )}$—1 orbit of size 3 and 1 orbit of size 1.

The unsigned Stirling numbers also arise as coefficients of the rising factorial, i.e.,

${\displaystyle (x)^{(n)}=x(x+1)\cdots (x+n-1)=\sum _{k=0}^{n}\left[{n \atop k}\right]x^{k}}$.

Thus, for example, ${\displaystyle (x)^{(3)}=x(x+1)(x+2)=1\cdot x^{3}+3\cdot x^{2}+2\cdot x}$, which matches the computations in the preceding paragraph.

### Stirling numbers of the first kind

Stirling numbers of the first kind (sometimes with the qualifying adjective signed) are given by

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

They are the coefficients in the expansion

${\displaystyle (x)_{n}=\sum _{k=0}^{n}s(n,k)x^{k},}$

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

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

Note that

${\displaystyle \left[{n \atop k}\right]=\left|s(n,k)\right|.}$

## Recurrence relation

The unsigned Stirling numbers of the first kind can be calculated by the recurrence relation

${\displaystyle \left[{n+1 \atop k}\right]=n\left[{n \atop k}\right]+\left[{n \atop k-1}\right]}$

for ${\displaystyle k>0}$, with the initial conditions

${\displaystyle \left[{0 \atop 0}\right]=1\quad {\mbox{and}}\quad \left[{n \atop 0}\right]=\left[{0 \atop n}\right]=0}$

for n > 0.

It follows immediately that the (signed) Stirling numbers of the first kind satisfy the recurrence

${\displaystyle s(n+1,k)=-ns(n,k)+s(n,k-1)}$.

### Algebraic proof

We prove the recurrence relation using the definition of Stirling numbers in terms of rising factorials. Distributing the last term of the product, we have

${\displaystyle (x)^{(n+1)}=x(x+1)\cdots (x+n-1)(x+n)=n(x)^{(n)}+x(x)^{(n)}.}$

The coefficient of xk on the left-hand side of this equation is ${\displaystyle \left[{n+1 \atop k}\right]}$. The coefficient of xk in n(x)(n) is ${\displaystyle n\cdot \left[{n \atop k}\right]}$, while the coefficient of xk in x (x)(n) is ${\displaystyle \left[{n \atop k-1}\right]}$. Since the two sides are equal as polynomials, the coefficients of xk on both sides must be equal, and the result follows.

### Combinatorial proof

We prove the recurrence relation using the definition of Stirling numbers in terms of permutations with a given number of cycles (or equivalently, orbits).

Consider forming a permutation of n + 1 objects from a permutation of n objects by adding a distinguished object. There are exactly two ways in which this can be accomplished. We could do this by forming a singleton cycle, i.e., leaving the extra object alone. This increases the number of cycles by 1 and so accounts for the ${\displaystyle \left[{n \atop k-1}\right]}$ term in the recurrence formula. We could also insert the new object into one of the existing cycles. Consider an arbitrary permutation of n objects with k cycles, and label the objects a1, ..., an, so that the permutation is represented by

${\displaystyle \displaystyle \underbrace {(a_{1}\ldots a_{j_{1}})(a_{j_{1}+1}\ldots a_{j_{2}})\ldots (a_{j_{k-1}+1}\ldots a_{n})} _{k\ \mathrm {cycles} }.}$

To form a new permutation of n + 1 objects and k cycles one must insert the new object into this array. There are n ways to perform this insertion, inserting the new object immediately following any of the n already present. This explains the ${\displaystyle n\left[{n \atop k}\right]}$ term of the recurrence relation. These two cases include all possibilities, so the recurrence relation follows.

## Table of values for small n and k

Below is a triangular array of unsigned values for the Stirling numbers of the first kind, similar in form to Pascal's triangle. These values are easy to generate using the recurrence relation in the previous section.

 n \ k 0 1 2 3 4 5 6 7 8 9 0 1 1 0 1 2 0 1 1 3 0 2 3 1 4 0 6 11 6 1 5 0 24 50 35 10 1 6 0 120 274 225 85 15 1 7 0 720 1764 1624 735 175 21 1 8 0 5040 13068 13132 6769 1960 322 28 1 9 0 40320 109584 118124 67284 22449 4536 546 36 1

## Identities involving Stirling numbers of the first kind

### Simple identities

Note that although

${\displaystyle \left[{0 \atop 0}\right]=1}$, we have ${\displaystyle \left[{n \atop 0}\right]=0}$ if n > 0

and

${\displaystyle \left[{0 \atop k}\right]=0}$ if k > 0, or more generally ${\displaystyle \left[{n \atop k}\right]=0}$ if k > n.

Also

${\displaystyle \left[{n \atop 1}\right]=(n-1)!,\quad \left[{n \atop n}\right]=1,\quad \left[{n \atop n-1}\right]={n \choose 2},}$

and

${\displaystyle \left[{n \atop n-2}\right]={\frac {1}{4}}(3n-1){n \choose 3}\quad {\mbox{ and }}\quad \left[{n \atop n-3}\right]={n \choose 2}{n \choose 4}.}$

Similar relationships involving the Stirling numbers hold for the Bernoulli polynomials. Many relations for the Stirling numbers shadow similar relations on the binomial coefficients. The study of these 'shadow relationships' is termed umbral calculus and culminates in the theory of Sheffer sequences. Generalizations of the Stirling numbers of both kinds to arbitrary complex-valued inputs may be extended through the relations of these triangles to the Stirling convolution polynomials.[1]

It is also notable that the sum of the Stirling numbers on any row is equal to the first non-zero entry on the next row:

${\displaystyle \sum _{k=0}^{n}\left[{n \atop k}\right]=n!=\left[{{n+1} \atop 1}\right]}$

#### Combinatorial proofs

These identities may be derived by enumerating permutations directly. For example, a permutation of n elements with n − 3 cycles must have one of the following forms:

• n − 6 fixed points and three two-cycles
• n − 5 fixed points, a three-cycle and a two-cycle, or
• n − 4 fixed points and a four-cycle.

The three types may be enumerated as follows:

• choose the six elements that go into the two-cycles, decompose them into two-cycles and take into account that the order of the cycles is not important:
${\displaystyle {n \choose 6}{6 \choose 2,2,2}{\frac {1}{6}}}$
• choose the five elements that go into the three-cycle and the two-cycle, choose the elements of the three-cycle and take into account that three elements generate two three-cycles:
${\displaystyle {n \choose 5}{5 \choose 3}\times 2}$
• choose the four elements of the four-cycle and take into account that four elements generate six four-cycles:
${\displaystyle {n \choose 4}\times 6.}$

Sum the three contributions to obtain

${\displaystyle {n \choose 6}{6 \choose 2,2,2}{\frac {1}{6}}+{n \choose 5}{5 \choose 3}\times 2+{n \choose 4}\times 6={n \choose 2}{n \choose 4}.}$

### Other relations

#### Expansions by harmonic numbers

Since we can generate the Stirling numbers of the first kind by elementary symmetric polynomials of the particular forms given by

${\displaystyle \left[{\begin{matrix}n\\k+1\end{matrix}}\right]=[x^{k}](x+1)(x+2)\cdots (x+n-1)=(n-1)!\cdot [x^{k}](x+1)\left({\frac {x}{2}}+1\right)\cdots \left({\frac {x}{n-1}}+1\right),}$

where ${\displaystyle X_{i}:=1/i}$, it follows from Newton's formulas that we can expand these Stirling numbers by weighted sums over the integer-order generalized harmonic numbers formed as the sequences of partial sums of the (divergent) Riemann zeta function, or alternately ${\displaystyle p}$-series, for positive integers ${\displaystyle p}$. Thus we have that several other relations involving the Stirling numbers of the first kind include the identities

${\displaystyle \left[{n \atop 2}\right]=(n-1)!\;H_{n-1},}$
${\displaystyle \left[{n \atop 3}\right]={\frac {1}{2}}(n-1)!\left[(H_{n-1})^{2}-H_{n-1}^{(2)}\right]}$
${\displaystyle \left[{n \atop 4}\right]={\frac {1}{3!}}(n-1)!\left[(H_{n-1})^{3}-3H_{n-1}H_{n-1}^{(2)}+2H_{n-1}^{(3)}\right],}$

where Hn is the harmonic number ${\displaystyle H_{n}={\frac {1}{1}}+{\frac {1}{2}}+\ldots +{\frac {1}{n}}}$ and Hn(m) is the generalized harmonic number (or ${\displaystyle m}$-order harmonic number), ${\displaystyle H_{n}^{(m)}={\frac {1}{1^{m}}}+{\frac {1}{2^{m}}}+\ldots +{\frac {1}{n^{m}}}}$.[2]

These relations can be generalized to give

${\displaystyle {\frac {1}{(n-1)!}}\left[{\begin{matrix}n\\k+1\end{matrix}}\right]=\sum _{i_{1}=1}^{n-1}\sum _{i_{2}=i_{1}+1}^{n-1}\cdots \sum _{i_{k}=i_{k-1}+1}^{n-1}{\frac {1}{i_{1}i_{2}\cdots i_{k}}}={\frac {w(n,k)}{k!}}}$

where w(n, m) is defined recursively in terms of the generalized harmonic numbers by

${\displaystyle w(n,m)=\delta _{m,0}+\sum _{k=0}^{m-1}(1-m)_{k}H_{n-1}^{(k+1)}w(n,m-1-k).}$

(Here δ is the Kronecker delta function and ${\displaystyle (m)_{k}}$ is the Pochhammer symbol.)[3]

For fixed ${\displaystyle n\geq 0}$ these weighted harmonic number expansions are generated by the "exponential" generating function (see the non-exponential Bell polynomials and section 3 of [4])

${\displaystyle {\frac {1}{n!}}\left[{\begin{matrix}n+1\\k\end{matrix}}\right]=[x^{k}]\exp \left(\sum _{m\geq 1}{\frac {(-1)^{m-1}H_{n}^{(m)}}{m}}x^{m}\right).}$

More generally, sums related to these weighted harmonic number expansions of the Stirling numbers of the first kind are defined through the generalized "zeta series" transforms of generating functions defined in Schmidt's articles [5][6] by the sums

${\displaystyle \left\{{\begin{matrix}k+2\\j\end{matrix}}\right\}_{\ast }:={\frac {1}{j!}}\times \sum _{m=1}^{j}{\binom {j}{m}}{\frac {(-1)^{j-m}}{m^{k}}},}$

and

${\displaystyle \left\{{\begin{matrix}k+2\\j\end{matrix}}\right\}_{(\alpha ,\beta )^{\ast }}:={\frac {1}{j!}}\times \sum _{0\leq m\leq j}{\binom {j}{m}}{\frac {(-1)^{j-m}}{(\alpha m+\beta )^{k}}}}$,

where the closely related Stirling number special case of the last sum is given by [7]

${\displaystyle {\frac {1}{n!}}\left[{\begin{matrix}n+1\\2\end{matrix}}\right]=\left({\frac {1}{x}}-\sum _{k}{\binom {n}{k}}{\frac {(-1)^{k}}{x+k}}\right){\Biggr |}_{x=0}=\left({\frac {1}{x}}-{\frac {n!}{x(x+1)\cdots (x+n)}}\right){\Biggr |}_{x=0}=H_{n}.}$

We can also "invert" the relations for these Stirling numbers given in terms of the ${\displaystyle k}$-order harmonic numbers to write the integer-order generalized harmonic numbers in terms of weighted sums of terms involving the Stirling numbers of the first kind. For example, when ${\displaystyle k:=2,3}$ the factorial-scaled second-order and third-order harmonic numbers are given by

${\displaystyle (n!)^{2}\cdot H_{n}^{(2)}=\left[{\begin{matrix}n+1\\2\end{matrix}}\right]^{2}-2\left[{\begin{matrix}n+1\\1\end{matrix}}\right]\left[{\begin{matrix}n+1\\3\end{matrix}}\right]}$
${\displaystyle (n!)^{3}\cdot H_{n}^{(3)}=\left[{\begin{matrix}n+1\\2\end{matrix}}\right]^{3}-3\left[{\begin{matrix}n+1\\1\end{matrix}}\right]\left[{\begin{matrix}n+1\\2\end{matrix}}\right]\left[{\begin{matrix}n+1\\3\end{matrix}}\right]+3\left[{\begin{matrix}n+1\\1\end{matrix}}\right]^{2}\left[{\begin{matrix}n+1\\4\end{matrix}}\right].}$

We can invert the Bell polynomial generating function for the Stirling numbers expanded in terms of the ${\displaystyle m}$-order harmonic numbers to obtain more generally that for integers ${\displaystyle m\geq 2}$ we have

${\displaystyle (n!)^{m}\cdot H_{n}^{(m)}=-m\cdot \left[{\begin{matrix}n+1\\1\end{matrix}}\right]^{m}\times [x^{m}]\log \left(1+\sum _{k\geq 1}\left[{\begin{matrix}n+1\\k+1\end{matrix}}\right]{\frac {(-x)^{k}}{n!}}\right),}$

where ${\displaystyle \left[{\begin{matrix}n+1\\1\end{matrix}}\right]\equiv n!}$ for all ${\displaystyle n\geq 0}$.

#### Factorial-related sums

For all positive integer m and n we have that[8]

${\displaystyle (n+m)!=\sum _{k=0}^{n}\sum _{j=0}^{m}m^{\overline {n-k}}\left[{m \atop j}\right]{\binom {n}{k}}k!,}$

where ${\displaystyle a^{\overline {b}}=a(a+1)\cdots (a+b-1)}$ is the Pochhammer symbol. This formula is a dual of Spivey's result for the Bell numbers.

We also have the following factorial-related sums involving the Stirling numbers of the first kind where ${\displaystyle [{\mathtt {cond}}]}$ denotes Iverson's convention:[9]

{\displaystyle {\begin{aligned}n^{\underline {n-m}}[n\geq m]&=\sum _{k}\left[{\begin{matrix}n+1\\k+1\end{matrix}}\right]\left\{{\begin{matrix}k\\m\end{matrix}}\right\}(-1)^{m-k}\\{\binom {n}{m}}(n-1)^{\underline {n-m}}&=\sum _{k}\left[{\begin{matrix}n\\k\end{matrix}}\right]\left\{{\begin{matrix}k\\m\end{matrix}}\right\}\\{\binom {n}{m}}&=\sum _{k}\left\{{\begin{matrix}n+1\\k+1\end{matrix}}\right\}\left[{\begin{matrix}k\\m\end{matrix}}\right](-1)^{m-k}\\\left[{\begin{matrix}n+1\\m+1\end{matrix}}\right]&=\sum _{0\leq k\leq n}\left[{\begin{matrix}k\\m\end{matrix}}\right]n^{\underline {n-k}}.\end{aligned}}}

#### Inversion relations and the Stirling transform

For any pair of sequences, ${\displaystyle \{f_{n}\}}$ and ${\displaystyle \{g_{n}\}}$, related by a finite sum Stirling number formula given by

${\displaystyle g_{n}=\sum _{k=1}^{n}\left\{{\begin{matrix}n\\k\end{matrix}}\right\}f_{k},}$

for all integers ${\displaystyle n\geq 0}$, we have a corresponding inversion formula for ${\displaystyle f_{n}}$ given by

${\displaystyle f_{n}=\sum _{k=1}^{n}\left[{\begin{matrix}n\\k\end{matrix}}\right](-1)^{n-k}g_{k}.}$

These inversion relations between the two sequences translate into functional equations between the sequence exponential generating functions given by the Stirling (generating function) transform as

${\displaystyle {\widehat {G}}(z)={\widehat {F}}\left(e^{z}-1\right)}$

and

${\displaystyle {\widehat {F}}(z)={\widehat {G}}\left(\log(1+z)\right).}$

The differential operators ${\displaystyle D=d/dx}$ and ${\displaystyle \vartheta =zD}$ are related by the following formulas for all integers ${\displaystyle n\geq 0}$:[10]

${\displaystyle \vartheta ^{n}=\sum _{k}S(n,k)z^{k}d^{k}}$
${\displaystyle z^{n}D^{n}=\sum _{k}s(n,k)\vartheta ^{k}}$

Another pair of "inversion" relations involving the Stirling numbers relate the forward differences and the ordinary ${\displaystyle n^{th}}$ derivatives of a function, ${\displaystyle f(x)}$, which is analytic for all ${\displaystyle x}$ by the formulas [11]

${\displaystyle {\frac {1}{k!}}{\frac {d^{k}}{dx^{k}}}f(x)=\sum _{n=k}^{\infty }{\frac {s(n,k)}{n!}}\Delta ^{n}f(x)}$
${\displaystyle {\frac {1}{k!}}\Delta ^{k}f(x)=\sum _{n=k}^{\infty }{\frac {S(n,k)}{n!}}{\frac {d^{n}}{dx^{n}}}f(x).}$

#### Congruences

As in Wilf's Generatingfunctionology, a purely generating-function-based approach towards enumerating the Stirling numbers of the first kind is used to establish the following two special case congruence results modulo the integers ${\displaystyle 2}$ and ${\displaystyle 3}$:

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\m\end{matrix}}\right]&\equiv {\binom {\lfloor n/2\rfloor }{m-\lceil n/2\rceil }}=[x^{m}]\left(x^{\lceil n/2\rceil }(x+1)^{\lfloor n/2\rfloor }\right)&&{\pmod {2}},\end{aligned}}}
{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\m\end{matrix}}\right]&\equiv [x^{m}]\left(x^{\lceil n/3\rceil }(x+1)^{\lceil (n-1)/3\rceil }(x+2)^{\lfloor n/3\rfloor }\right)&&{\pmod {3}}\\&\equiv \sum _{k=0}^{m}{\binom {\lceil (n-1)/3\rceil }{k}}{\binom {\lfloor n/3\rfloor }{m-k-\lceil n/3\rceil }}\times 2^{\lceil n/3\rceil +\lfloor n/3\rfloor -(m-k)}&&{\pmod {3}}.\end{aligned}}}

More recent results providing Jacobi-type J-fractions that generate the single factorial function and generalized factorial-related products lead to other new congruence results for the Stirling numbers of the first kind.[12] For example, working modulo ${\displaystyle 2}$ we can prove that

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\1\end{matrix}}\right]&\equiv {\frac {2^{n}}{4}}[n\geq 2]+[n=1]&&{\pmod {2}}\\\left[{\begin{matrix}n\\2\end{matrix}}\right]&\equiv {\frac {3\cdot 2^{n}}{16}}(n-1)[n\geq 3]+[n=2]&&{\pmod {2}}\\\left[{\begin{matrix}n\\3\end{matrix}}\right]&\equiv 2^{n-7}(9n-20)(n-1)[n\geq 4]+[n=3]&&{\pmod {2}}\\\left[{\begin{matrix}n\\4\end{matrix}}\right]&\equiv 2^{n-9}(3n-10)(3n-7)(n-1)[n\geq 5]+[n=4]&&{\pmod {2}}\\\left[{\begin{matrix}n\\5\end{matrix}}\right]&\equiv 2^{n-13}(27n^{3}-279n^{2}+934n-1008)(n-1)[n\geq 6]+[n=5]&&{\pmod {2}}\\\left[{\begin{matrix}n\\6\end{matrix}}\right]&\equiv {\frac {2^{n-15}}{5}}(9n^{2}-71n+120)(3n-14)(3n-11)(n-1)[n\geq 7]+[n=6]&&{\pmod {2}},\end{aligned}}}

and working modulo ${\displaystyle 3}$ we can similarly prove that

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\1\end{matrix}}\right]&\equiv \sum \limits _{j=\pm 1}{\frac {1}{36}}\left(9-5j{\sqrt {3}}\right)\times \left(3+j{\sqrt {3}}\right)^{n}[n\geq 2]+[n=1]&&{\pmod {3}}\\\left[{\begin{matrix}n\\2\end{matrix}}\right]&\equiv \sum \limits _{j=\pm 1}{\frac {1}{216}}\left((44n-41)-(25n-24)\cdot j{\sqrt {3}}\right)\times \left(3+j{\sqrt {3}}\right)^{n}[n\geq 3]+[n=2]&&{\pmod {3}}\\\left[{\begin{matrix}n\\3\end{matrix}}\right]&\equiv \sum \limits _{j=\pm 1}{\frac {1}{15552}}\left((1299n^{2}-3837n+2412)-(745n^{2}-2217n+1418)\cdot j{\sqrt {3}}\right)\times \left(3+j{\sqrt {3}}\right)^{n}[n\geq 4]+[n=3]&&{\pmod {3}}\\\left[{\begin{matrix}n\\4\end{matrix}}\right]&\equiv \sum \limits _{j=\pm 1}{\frac {1}{179936}}{\bigl (}(6409n^{3}-383778n^{2}+70901n-37092)-(3690n^{3}-22374n^{2}+41088n-21708)\cdot j{\sqrt {3}}{\bigr )}\times \left(3+j{\sqrt {3}}\right)^{n}[n\geq 5]+[n=4]&&{\pmod {3}}.\end{aligned}}}

More generally, for fixed integers ${\displaystyle h\geq 3}$ if we define the ordered roots

${\displaystyle \left(\omega _{h,i}\right)_{i=1}^{h-1}:=\left\{\omega _{j}:\sum _{i=0}^{h-1}{\binom {h-1}{i}}{\frac {h!}{(i+1)!}}(-\omega _{j})^{i}=0,\ 1\leq j

then we may expand congruences for these Stirling numbers defined as the coefficients

${\displaystyle \left[{\begin{matrix}n\\m\end{matrix}}\right]=[R^{m}]R(R+1)\cdots (R+n-1),}$

in the following form where the functions, ${\displaystyle p_{h,i}^{[m]}(n)}$, denote fixed polynomials of degree ${\displaystyle m}$ in ${\displaystyle n}$ for each ${\displaystyle h}$, ${\displaystyle m}$, and ${\displaystyle i}$:

${\displaystyle \left[{\begin{matrix}n\\m\end{matrix}}\right]=\left(\sum _{i=0}^{h-1}p_{h,i}^{[m]}(n)\times \omega _{h,i}^{n}\right)[n>m]+[n=m]\qquad {\pmod {h}},}$

Section 6.2 of the reference cited above provides more explicit expansions related to these congruences for the ${\displaystyle r}$-order harmonic numbers and for the generalized factorial products, ${\displaystyle p_{n}(\alpha ,R):=R(R+\alpha )\cdots (R+(n-1)\alpha )}$. In the previous examples, the notation ${\displaystyle [{\mathtt {cond}}]}$ denotes Iverson's convention.

### Generating functions

A variety of identities may be derived by manipulating the generating function:

${\displaystyle H(z,u)=(1+z)^{u}=\sum _{n=0}^{\infty }{u \choose n}z^{n}=\sum _{n=0}^{\infty }{\frac {z^{n}}{n!}}\sum _{k=0}^{n}s(n,k)u^{k}=\sum _{k=0}^{\infty }u^{k}\sum _{n=k}^{\infty }{\frac {z^{n}}{n!}}s(n,k).}$

Using the equality

${\displaystyle (1+z)^{u}=e^{u\log(1+z)}=\sum _{k=0}^{\infty }(\log(1+z))^{k}{\frac {u^{k}}{k!}},}$

it follows that

${\displaystyle \sum _{n=k}^{\infty }(-1)^{n-k}\left[{n \atop k}\right]{\frac {z^{n}}{n!}}={\frac {\left(\log(1+z)\right)^{k}}{k!}}.}$

(This identity is valid for formal power series, and the sum converges in the complex plane for |z| < 1.) Other identities arise by exchanging the order of summation, taking derivatives, making substitutions for z or u, etc. For example, we may derive[13]:

${\displaystyle (1-z)^{-u}=\sum _{k=0}^{\infty }u^{k}\sum _{n=k}^{\infty }{\frac {z^{n}}{n!}}\left[{n \atop k}\right]=e^{u\log(1/(1-z))}}$

and

${\displaystyle {\frac {\log ^{m}(1+z)}{1+z}}=m!\sum _{k=0}^{\infty }{\frac {s(k+1,m+1)\,z^{k}}{k!}},\qquad m=1,2,3,\ldots \quad |z|<1}$

or

${\displaystyle \sum _{n=i}^{\infty }{\frac {\left[{n \atop i}\right]}{n\,(n!)}}=\zeta (i+1),\qquad i=1,2,3,\ldots }$

and

${\displaystyle \sum _{n=i}^{\infty }{\frac {\left[{n \atop i}\right]}{n\,(v)_{n}}}=\zeta (i+1,v),\qquad i=1,2,3,\ldots \quad \Re (v)>0}$

where ${\displaystyle \zeta (k)}$ and ${\displaystyle \zeta (k,v)}$ are the Riemann zeta function and the Hurwitz zeta function respectively, and even evaluate this integral

${\displaystyle \int _{0}^{1}{\frac {\log ^{z}(1-x)}{x^{k}}}\,dx={\frac {(-1)^{z}\Gamma (z+1)}{(k-1)!}}\sum _{r=1}^{k-1}s(k-1,r)\sum _{m=0}^{r}{\binom {r}{m}}(k-2)^{r-m}\zeta (z+1-m),\qquad \Re (z)>k-1,\quad k=3,4,5,\ldots }$

where ${\displaystyle \Gamma (z)}$ is the Gamma function.

### Asymptotics

The next estimate given in terms of the Euler gamma constant applies uniformly for ${\displaystyle 1\leq k\leq n}$ as ${\displaystyle n\longrightarrow \infty }$:[14]

${\displaystyle \left[{\begin{matrix}n+1\\k+1\end{matrix}}\right]\sim {\frac {n!}{k!}}\left(\gamma +\ln n\right)^{k},\ {\text{ uniformly for }}k=o(\ln n).}$

For fixed ${\displaystyle n}$ we have the following estimate as ${\displaystyle k\longrightarrow \infty }$:

${\displaystyle \left[{\begin{matrix}n+k\\k\end{matrix}}\right]\sim {\frac {k^{2n}}{2^{n}n!}}.}$

We can also apply the saddle point asymptotic methods from Temme's article [15] to obtain other estimates for the Stirling numbers of the first kind. These estimates are more involved and complicated to state. Nonetheless, we provide an example. In particular, we define the log gamma function, ${\displaystyle \phi (x)}$, whose higher-order derivatives are given in terms of polygamma functions as

{\displaystyle {\begin{aligned}\phi (x)&=\ln \left[(1+1)(x+2)\cdots (x+n)\right]-m\ln x\\&=\ln \Gamma (x+n+1)-\ln \Gamma (x+1)-m\ln x\\\phi ^{\prime }(x)&=\psi (x+n+1)-\psi (x+1)-m/x,\end{aligned}}}

where we consider the (unique) saddle point ${\displaystyle x_{0}}$ of the function to be the solution of ${\displaystyle \phi ^{\prime }(x)=0}$ when ${\displaystyle 1\leq m\leq n}$. Then for ${\displaystyle t_{0}=m/(n-m)}$ and the constants

${\displaystyle B=\phi (x_{0})-n\ln(1+t_{0})+m\ln t_{0}}$
${\displaystyle g(t_{0})={\frac {1}{x_{0}}}{\sqrt {\frac {m(n-m)}{n\phi ^{\prime \prime }(x_{0})}}},}$

we have the following asymptotic estimate as ${\displaystyle n\longrightarrow \infty }$:

${\displaystyle \left[{\begin{matrix}n+1\\m+1\end{matrix}}\right]\sim e^{B}g(t_{0}){\binom {n}{m}}.}$

### Finite sums

Since permutations are partitioned by number of cycles, one has

${\displaystyle \sum _{k=0}^{n}\left[{n \atop k}\right]=n!}$

The identity

${\displaystyle \sum _{p=k}^{n}{\left[{n \atop p}\right]{\binom {p}{k}}}=\left[{n+1 \atop k+1}\right]}$

can be proved by the techniques on the page Stirling numbers and exponential generating functions.

The table in section 6.1 of Concrete Mathematics provides a plethora of generalized forms of finite sums involving the Stirling numbers. Several particular finite sums relevant to this article include

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\m\end{matrix}}\right]&=\sum _{k}\left[{\begin{matrix}n+1\\k+1\end{matrix}}\right]{\binom {k}{m}}(-1)^{m-k}\\\left[{\begin{matrix}n+1\\m+1\end{matrix}}\right]&=\sum _{k=0}^{n}\left[{\begin{matrix}k\\m\end{matrix}}\right]{\frac {n!}{k!}}\\\left[{\begin{matrix}m+n+1\\m\end{matrix}}\right]&=\sum _{k=0}^{m}(n+k)\left[{\begin{matrix}n+k\\k\end{matrix}}\right]\\\left[{\begin{matrix}n\\l+m\end{matrix}}\right]{\binom {l+m}{l}}&=\sum _{k}\left[{\begin{matrix}k\\l\end{matrix}}\right]\left[{\begin{matrix}n-k\\m\end{matrix}}\right]{\binom {n}{k}}.\end{aligned}}}

Other finite sum identities involving the signed Stirling numbers of the first kind found, for example, in the NIST Handbook of Mathematical Functions (Section 26.8) include the following sums:[16]

{\displaystyle {\begin{aligned}{\binom {k}{h}}s(n,k)&=\sum _{j=k-h}^{n-h}{\binom {n}{j}}s(n-j,h)s(j,k-h)\\s(n+1,k+1)&=n!\times \sum _{j=k}^{n}{\frac {(-1)^{n-j}}{j!}}s(j,k)\\s(n,n-k)&=\sum _{j=0}^{k}(-1)^{j}{\binom {n-1+j}{k+j}}{\binom {n+k}{k-j}}S(k+j,j)\\s(n,k)&=\sum _{j=k}^{n}s(n+1,j+1)n^{j-k}.\end{aligned}}}

Additionally, if we define the second-order Eulerian numbers by the triangular recurrence relation [17]

${\displaystyle E_{2}(n,k)=(k+1)E_{2}(n-1,k)+(2n-1-k)E_{2}(n-1,k-1)+\delta _{n,0}\delta _{k,0},}$

we arrive at the following identity related to the form of the Stirling convolution polynomials which can be employed to generalize both Stirling number triangles to arbitrary real, or complex-valued, values of the input ${\displaystyle x}$:

${\displaystyle \left[{\begin{matrix}x\\x-n\end{matrix}}\right]=\sum _{k}E_{2}(n,k){\binom {x+k}{2n}}.}$

Particular expansions of the previous identity lead to the following identities expanding the Stirling numbers of the first kind for the first few small values of ${\displaystyle n:=1,2,3}$:

{\displaystyle {\begin{aligned}\left[{\begin{matrix}x\\x-1\end{matrix}}\right]&={\binom {x}{2}}\\\left[{\begin{matrix}x\\x-2\end{matrix}}\right]&={\binom {x}{4}}+2{\binom {x+1}{4}}\\\left[{\begin{matrix}x\\x-3\end{matrix}}\right]&={\binom {x}{6}}+8{\binom {x+1}{6}}+6{\binom {x+2}{6}}.\end{aligned}}}

Software tools for working with finite sums involving Stirling numbers and Eulerian numbers are provided by the RISC Stirling.m package utilities in Mathematica. Other software packages for guessing formulas for sequences (and polynomial sequence sums) involving Stirling numbers and other special triangles is available for both Mathematica and Sage here and here, respectively.[18]

### Explicit formula

The Stirling number s(n,n-p) can be found from the formula[19]

{\displaystyle {\begin{aligned}s(n,n-p)&={\frac {1}{(n-p-1)!}}\sum _{0\leq k_{1},\ldots ,k_{p}:\sum _{2}^{p}mk_{m}=p}(-1)^{K}{\frac {(n+K-1)!}{k_{2}!\cdots k_{p}!~1!^{k_{1}}2!^{k_{2}}3!^{k_{3}}\cdots p!^{k_{p}}}},\end{aligned}}}

where ${\displaystyle K=k_{2}+\cdots +k_{p}.}$ The sum is a sum over all partitions of p.

Another exact nested sum expansion for these Stirling numbers is computed by elementary symmetric polynomials corresponding to the coefficients in ${\displaystyle x}$ of a product of the form ${\displaystyle (1+c_{1}x)\cdots (1+c_{n-1}x)}$. In particular, we see that

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\k+1\end{matrix}}\right]&=[x^{k}](x+1)(x+2)\cdots (x+n-1)=(n-1)!\cdot [x^{k}](x+1)\left({\frac {x}{2}}+1\right)\cdots \left({\frac {x}{n-1}}+1\right)\\&=\sum _{1\leq i_{1}<\cdots

Newton's identities combined with the above expansions may be used to give an alternate proof of the weighted expansions involving the generalized harmonic numbers already noted above.

## Generalizations

There are many notions of generalized Stirling numbers that may be defined (depending on application) in a number of differing combinatorial contexts. In so much as the Stirling numbers of the first kind correspond to the coefficients of the distinct polynomial expansions of the single factorial function, ${\displaystyle n!=n(n-1)(n-2)\cdots 2\cdot 1}$, we may extend this notion to define triangular recurrence relations for more general classes of products.

In particular, for any fixed arithmetic function ${\displaystyle f:\mathbb {N} \rightarrow \mathbb {C} }$ and symbolic parameters ${\displaystyle x,t}$, related generalized factorial products of the form

${\displaystyle (x)_{n,f,t}:=\prod _{k=1}^{n-1}\left(x+{\frac {f(k)}{t^{k}}}\right)}$

may be studied from the point of view of the classes of generalized Stirling numbers of the first kind defined by the following coefficients of the powers of ${\displaystyle x}$ in the expansions of ${\displaystyle (x)_{n,f,t}}$ and then by the next corresponding triangular recurrence relation:

{\displaystyle {\begin{aligned}\left[{\begin{matrix}n\\k\end{matrix}}\right]_{f,t}&=[x^{k-1}](x)_{n,f,t}\\&=f(n-1)t^{1-n}\left[{\begin{matrix}n-1\\k\end{matrix}}\right]_{f,t}+\left[{\begin{matrix}n-1\\k-1\end{matrix}}\right]_{f,t}+\delta _{n,0}\delta _{k,0}.\end{aligned}}}

These coefficients satisfy a number of analogous properties to those for the Stirling numbers of the first kind as well as recurrence relations and functional equations related to the f-harmonic numbers, ${\displaystyle F_{n}^{(r)}(t):=\sum _{k\leq n}t^{k}/f(k)^{r}}$.[20]

One special case of these bracketed coefficients corresponding to ${\displaystyle t\equiv 1}$ allows us to expand the multiple factorial, or multifactorial functions as polynomials in ${\displaystyle n}$ (see generalizations of the double factorial).[21]

The Stirling numbers of both kinds, the binomial coefficients, and the first and second-order Eulerian numbers are all defined by special cases of a triangular super-recurrence of the form

${\displaystyle \left|{\begin{matrix}n\\k\end{matrix}}\right|=(\alpha n+\beta k+\gamma )\left|{\begin{matrix}n-1\\k\end{matrix}}\right|+(\alpha ^{\prime }n+\beta ^{\prime }k+\gamma ^{\prime })\left|{\begin{matrix}n-1\\k-1\end{matrix}}\right|+\delta _{n,0}\delta _{k,0},}$

for integers ${\displaystyle n,k\geq 0}$ and where ${\displaystyle \left|{\begin{matrix}n\\k\end{matrix}}\right|\equiv 0}$ whenever ${\displaystyle n<0}$ or ${\displaystyle k<0}$. In this sense, the form of the Stirling numbers of the first kind may also be generalized by this parameterized super-recurrence for fixed scalars ${\displaystyle \alpha ,\beta ,\gamma ,\alpha ^{\prime },\beta ^{\prime },\gamma ^{\prime }}$ (not all zero).

## References

1. ^ See section 6.2 and 6.5 of Concrete Mathematics.
2. ^ See sections 6.3 and 6.4 of Concrete Mathematics for properties and section 2.6 for more finite sums involving the first-order harmonic numbers.
3. ^ Adamchik, V. (1996). "On Stirling numbers and Euler sums" (PDF).
4. ^ Flajolet and Sedgewick (1995). "Mellin transforms and asymptotics: Finite differences and Rice's integrals". Theoretical Computer Science. 144: 101–124.
5. ^ Schmidt, M. D. (30 Oct 2016). "Zeta Series Generating Function Transformations Related to Polylogarithm Functions and the k-Order Harmonic Numbers".
6. ^
7. ^ See section 6.4 of Concrete Mathematics and also refer to D. Connon's summary article on properties of the Bell polynomials and other forms of the generalized harmonic numbers, ${\displaystyle H_{n}^{(m)}(x):=\sum _{0\leq k.
8. ^ Mező, István (2012). "The dual of Spivey's Bell number formula". Journal of Integer Sequences. 15.
9. ^ See Table 265 (Section 6.1) of the Concrete Mathematics reference.
10. ^ Concrete Mathematics exercise 13 of section 6. Note that this formula immediately implies the first positive-order Stirling number transformation given in the main article on generating function transformations.
11. ^ Oliver, et. al. (2010). NIST Handbook of Mathematical Functions. (Section 26.8)
12. ^ Schmidt, M. D. (2017). "Jacobi-Type Continued Fractions for the Ordinary Generating Functions of Generalized Factorial Functions". J. Integer Seq. 20 (3).
13. ^ Ia. V. Blagouchine (2016). "Two series expansions for the logarithm of the gamma function involving Stirling numbers and containing only rational coefficients for certain arguments related to π−1". Journal of Mathematical Analysis and Applications. 442 (2): 404–434. arXiv
14. ^ These estimates are found in Section 26.8 of the NIST Handbook of Mathematical Functions.
15. ^ Temme, N. M. "Asymptotic Estimates of Stirling Numbers" (PDF).
16. ^ The first identity below follows as a special case of the Bell polynomial identity found in section 4.1.8 of S. Roman's The Umbral Calculus where ${\displaystyle s(n,k)=B_{n,k}\left(0!,-1!,2!,-3!,\ldots \right)}$, though several other related formulas for the Stirling numbers defined in this manner are derived similarly.
17. ^ A table of the second-order Eulerian numbers and a synopsis of their properties is found in section 6.2 of Concrete Mathematics. For example, we have that ${\displaystyle \sum _{k}E_{2}(n,k)=(2n-1)(2n-3)\cdots (1)={\frac {(2n)^{\underline {n}}}{2^{n}}}}$. These numbers also have the following combinatorial interpretation: If we form all permutations of the multiset ${\displaystyle \{1,1,2,2,\ldots ,n,n\}}$ with the property that all numbers between the two occurences of ${\displaystyle m}$ are greater than ${\displaystyle m}$ for ${\displaystyle 1\leq m\leq n}$, then ${\displaystyle E_{2}(n,k)}$ is the number of such permutations that have ${\displaystyle k}$ ascents.
18. ^ Schmidt, M. D. (2014 and 2016). "A Computer Algebra Package for Polynomial Sequence Recognition". Check date values in: |date= (help)
19. ^ J. Malenfant, "Finite, Closed-form Expressions for the Partition Function and for Euler, Bernoulli, and Stirling Numbers"
20. ^
21. ^ Schmidt, Maxie D. (2010). "Generalized j-Factorial Functions, Polynomials, and Applications". J. Integer Seq. 13.