A Generalization of Stirling Numbers of the Second Kind via a Special Multiset

Martin Griffiths School of Education (Mathematics) University of Manchester Manchester M13 9PL United Kingdom

           martin.griffiths@manchester.ac.uk

István Mező

Department of Applied Mathematics and Probability Theory Faculty of Informatics University of Debrecen H-4010 Debrecen P. O. Box 12 Hungary

               mezo.istvan@inf.unideb.hu

Abstract

Stirling numbers of the second kind and Bell numbers are intimately linked through the roles they play in enumerating partitions of n-sets. In a previous article we studied a generalization of the Bell numbers that arose on analyzing partitions of a special multiset. It is only natural, therefore, next to examine the corresponding situation for Stirling numbers of the second kind. In this paper we derive generating functions, formulae and interesting properties of these numbers.

1 Introduction

In [6] we studied the enumeration of partitions of a particular family of multisets. Whereas all the n elements of a finite set are distinguishable, the elements of a multiset are allowed to possess multiplicities greater than 1. A multiset may therefore be regarded as a generalization of a set. Indeed, a set is a multiset in which each of the elements has multiplicity 1. The enumeration of partitions of the special multisets we considered gave rise to families of numbers that we termed generalized near-Bell numbers. In this follow-up paper we study the corresponding generalization of Stirling numbers of the second kind. In order to set the scene we first explain the relationship between the ordinary Bell numbers and Stirling numbers of the second kind.

The number of ways of partitioning a set of n labeled objects, {1, 2, …, n} say, into k non-empty disjoint parts is given by the Stirling number of the second kind S(n, k). On the other hand, the Bell number B_{n} enumerates all possible partitions of {1, 2, …, n}. From this it follows that

B_{n} = ∑_{k=1}^{n} S(n, k).  (1)

By way of an example, let us illustrate (1) for the case n = 4. Since {{1, 2, 3, 4}} gives the only way of partitioning {1, 2, 3, 4} into 1 part, we have S(4, 1) = 1. Similarly, from the list

{{1}, {2, 3, 4}},
{{2}, {1, 3, 4}},
{{3}, {1, 2, 4}},
{{4}, {1, 2, 3}},
{{1, 2}, {3, 4}},
{{1, 3}, {2, 4}},
{{1, 4}, {2, 3}},

we see that S(4, 2) = 7. Next,

{{1}, {2}, {3, 4}},
{{1}, {3}, {3, 4}},
{{1}, {4}, {2, 3}},
{{2}, {3}, {1, 4}},
{{2}, {4}, {1, 3}},
{{3}, {4}, {1, 2}}

gives S(4, 3) = 6. Finally, {{1}, {2}, {3}, {4}} is the only way that {1, 2, 3, 4} can be partitioned into 4 parts, so that S(4, 4) = 1. Thus

B_{4} = ∑_{k=1}^{4} S(4, k) = 1 + 7 + 6 + 1 = 15.

Tabulated values for B_{n}, S(n, 3) and S(n, 4) are given in Sloane’s On-line Encyclopedia of Integer Sequences [12] as sequences \underline{A000110}, \underline{A000392} and \underline{A000453} respectively, while \underline{A008277} gives the triangle of Stirling numbers of the second kind. These numbers have been studied extensively, and there are a number of well-known results associated with them (see [2], [4], [5] and [8], for example).

We consider here the problem of enumerating the partitions of a particular family of multisets into k non-empty disjoint parts, leading to a generalization of Stirling numbers of the second kind. Exponential generating functions are obtained for these numbers, which are in turn used to derived formulae. We then go on to calculate ordinary generating functions. These are utilized to obtain, via an alternative method to the one given in [6], the ordinary generating functions of the generalized near-Bell numbers. Finally, we generalize a wellknown identity involving Stirling numbers of the second kind.

2 Initial definitions and results

For the sake of convenience we restate here a number of definitions given originally in [6]. The formal definition of a multiset that follows is also to be found in [1] and [13]:

Definition 1. A multiset is a pair (A, m) where A is some set and m is a function m : A ↦ ℕ. The set A is called the set of underlying elements. For each a ∈ A the multiplicity of a is given by m(a). A multiset is called an n-multiset if ∑_{a∈A} m(a) = n for some n ∈ ℕ.

The easiest way of representing an n-multiset is as a set with (potentially) repeated elements. For example, {1, 2, 2, 2, 2, 2, 3, 4, 4} is a 9-multiset with elements 1, 2, 3 and 4 having multiplicities 1, 5, 1 and 2 respectively.

Definition 2. Let M(n, r) denote, for 0 ≤ r ≤ n, the n-multiset {1, 1, …, 1, 2, 3, …, n − r + 1}, where the element 1 appears with multiplicity r and the remaining n − r elements each appear with multiplicity 1.

Definition 3. Let n, k and r be non-negative integers. Then S_{r}(n, k) is defined to be the number of partitions of M(n, r) into k non-empty parts. We set S_{1}(0, 0) = 1 and S_{r}(n, k) = 0 when n < k or n < r.

In order to help clarify Definition 3, the following list provides a demonstration that S_{3}(5, 3) = 8:

{{1}, {1}, {1, 2, 3}},
{{1}, {2}, {1, 1, 3}},
{{1}, {3}, {1, 1, 2}},
{{2}, {3}, {1, 1, 1}},
{{1}, {1, 1}, {2, 3}},
{{1}, {1, 2}, {1, 3}},
{{2}, {1, 1}, {1, 3}},
{{3}, {1, 1}, {1, 2}}.

It might initially seem a little unclear as to why we would want to consider M(n, r) when r = 0. However, the reason that we do indeed allow for this possibility is that in the forthcoming analysis we occasionally have cause to consider partitions of {2, 3, …, n + 1}, in which there are no 1s. It is in fact clear that S_{0}(n, k) = S_{1}(n, k).

The equivalent interpretations of the generalized near-Bell numbers provided in [6] may be adapted to cater for the generalized Stirling numbers of the second kind given by Definition 3, as follows:

1. Consider a group of n people containing exactly one subgroup of identical r-tuplets. Then S_{r}(n, k) enumerates the different ways in which these n people can be assigned to k indistinguishable tables, with the requirement that there is at least one person sitting at each table (assuming that we are unable to distinguish between the r-tuplets).

2. Let N = p_{1}^{r}p_{2}p_{3} ⋯ p_{n−r+1}, where p_{1}, p_{2}, p_{3}, …, p_{n−r+1} are distinct primes. Then, disregarding the order of the factors, S_{r}(n, k) gives the number of ways in which N can be expressed as a product of k positive integers, all of which are at least 2.

3. A committee consists of n people, m of which have a specific role (treasurer, secretary, and so on). The remaining n − m members have no designated role. In this scenario S_{n−m}(n, k) enumerates the ways in which the committee can be arranged into k unspecified working parties, where the people in any particular working party are distinguished only by their roles in the committee.

Note that S_{n}(n, k) gives the number of ways of expressing n ∈ ℕ as a sum of k positive integers (disregarding the order in which these integers are written), often denoted by p_{k}(n). For example, S_{7}(7, 3) = 4 since 7 may be expressed as

1 + 1 + 5, 1 + 2 + 4, 1 + 3 + 3 or 2 + 2 + 3.

The triangle for p_{k}(n) appears as sequence \underline{A008284} in [12].

The generating function for the number of partitions of n into at most m parts is given in [7] as

F_{m}(x) = \frac{1}{(1 − x) (1 − x^{2}) ⋯ (1 − x^{m})}.

The generating function for p_{k}(n) is thus given by

F_{k}(x) − F_{k−1}(x) = \frac{x^{k}}{(1 − x) (1 − x^{2}) ⋯ (1 − x^{k})},

and the number S_{n}(n, k) is equal to the coefficient of x^{n} in the series expansion of this expression. The rth row of the table for S_{r}(n, k) (see Section 7) is therefore very easy to obtain. We show in Theorem 4 how the rest of the entries for each of these tables may be calculated.

Before considering the general case, let us look at a well-known result concerning Stirling numbers of second kind S_{1}(n, k). We have, as is shown by Branson [2] and Cameron [3], the recurrence relation

S_{1}(n, k) = kS_{1}(n − 1, k) + S_{1}(n − 1, k − 1).

The idea is very simple. If we add the singleton part {n} to any partition of {1, 2, …, n − 1} into k − 1 parts then we obtain a partition of {1, 2, …, n} into k parts. Also, given any partition of {1, 2, …, n − 1} into k parts we may, by inserting the element n into one these parts, obtain a partition of {1, 2, …, n} into k parts. Thus each partition of {1, 2, …, n−1} into k parts gives rise to k partitions of {1, 2, …, n} into k parts. Furthermore, each of the partitions of {1, 2, …, n} into k parts will eventually arise by way of the above processes, and the resultant partitions are all distinct.

Things are not quite so straightforward when enumerating the generalized Stirling numbers of the second kind. It is not true in general that S_{r}(n, k) = kS_{r}(n−1, k)+S_{r}(n−1, k−1) since the potential for repeated parts causes the right hand side (in particular the term kS_{r}(n − 1, k)) to overcount the partitions. The generalized Stirling numbers of the second kind satisfy an extended recurrence relation, as is shown below.

Theorem 4. For n > r,

S_{r}(n, k) = kS_{r}(n − 1, k) + S_{r}(n − 1, k − 1) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} S_{r−ji}(n − 1 − ji, k − j),

where

(i) By definition, S_{1}(0, 0) = 1 and S_{r}(n, k) = 0 when n < k or n < r.

(ii) S_{0}(n, k) = S_{1}(n, k).

(iii) Entry m of row r in the triangle for S_{r}(n, k) is given by the number of m-part partitions of n, p_{m}(n).

Proof. Let q_{i} denote the multiset {1, 1, …, 1} containing exactly i 1s. Next, let N(m_{i} = j) and N(m_{i} ≥ j) denote the number of the partitions enumerated by S_{r}(n − 1, k) possessing exactly j copies of q_{i} and at least j copies of q_{i} respectively, noting here that

N(m_{i} ≥ j) = S_{r−ji}(n − 1 − ji, k − j).

We need to keep track of by how much the term kS_{r}(n − 1, k) overcounts the partitions because of the repeated parts q_{1}, q_{2}, . . .. Let us first concern ourselves with the overcounting caused solely by the presence of the parts q_{i} for some fixed i ∈ ℕ. If a partition enumerated by S_{r}(n − 1, k) has exactly j copies of q_{i} then, on appending the element n to each of these parts, we will obtain j − 1 redundant partitions. Now, with s = ⌊\frac{r}{i}⌋, we sum these over all partitions to give

(s − 1)N(m_{i} = s) + (s − 2)N(m_{i} = s − 1) + … + N(m_{i} = 2)

= (s − 1)N(m_{i} = s)

+ (s − 2) (N(m_{i} ≥ s − 1) − N(m_{i} ≥ s))
⋮
+ (N(m_{i} ≥ 2) − N(m_{i} ≥ 3))

= (s − 1)S_{r−si}(n − 1 − si, k − s) + (s − 2) (S_{r−(s−1)i}(n − 1 − (s − 1)i, k − (s − 1)) − S_{r−si}(n − 1 − si, k − s))

⋮
+ (S_{r−2i}(n − 1 − 2i, k − 2) − S_{r−3i}(n − 1 − 3i, k − 3))

= ∑_{j=2}^{s} S_{r−ji}(n − 1 − ji, k − j).

This is summed over all possible values of i to obtain the stated result.

We illustrate the idea behind the proof of Theorem 4 with some examples. Suppose that we want to evaluate S_{7}(15, 9), the number of ways of partitioning the multiset M(15, 7) = {1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9} into 9 parts. We might start out with a partition of M(14, 7) = {1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8} into 8 parts such as

{{1, 1, 3}, {2}, {1, 5, 8}, {1}, {6}, {4}, {1, 1, 1}, {7}}

and then add the singleton part {9} to give

{{1, 1, 3}, {2}, {1, 5, 8}, {1}, {6}, {4}, {1, 1, 1}, {7}, {9}},

one of the partitions enumerated by S_{7}(15, 9). It is clear that if we continue in this manner we will obtain precisely S_{7}(14, 8) of the partitions enumerated by S_{7}(15, 9).

To produce a new partition of M(15, 7) into 9 parts we could insert a 9 into one of the already-existing parts of the following partition of M(14, 7) into 9 parts:

{{1}, {1}, {1}, {1, 1}, {7}, {1, 2, 5, 8}, {1, 3}, {4}, {6}}

Note, however, that the repeated copies of q_{1} mean that this process does not give rise to 9 distinct partitions. There will in fact be 2 redundant partitions in this case. The number of partitions of M(14, 7) into 9 parts that contain at least 3 copies of q_{1} is given by S_{4}(11, 6). Similarly, inserting a 9 into an already existing part of

{{1}, {1}, {1}, {1, 1}, {1, 1}, {2, 3, 7}, {5}, {6}, {4, 8}}

produces 2 + 1 = 3 redundant partitions. The double sum

\begin{matrix}⌊ & \frac{7}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{7}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} S_{7−ji}(15 − 1 − ji, 9 − j) = ∑_{i=1}^{3} \begin{matrix}⌊ & \frac{7}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} S_{7−ji}(14 − ji, 9 − j)

counts all such redundant partitions, and this is subtracted from 9S_{7}(14, 9) + S_{7}(14, 8) in order to obtain S_{7}(15, 9).

Before moving on to consider their generating functions, we give two simple results concerning these generalized Stirling numbers of the second kind.

Theorem 5. Let m ∈ ℕ and r = 2^{m} − 1. Then, for n ≥ r,

S_{r}(n, 2) = 2^{n−r+m−1} − 1.

Proof. We do not initially impose any restrictions on r. From Theorem 4 we have, for n > r,

S_{r}(n, 2) = 2S_{r}(n − 1, 2) + S_{r}(n − 1, 1) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} S_{r−ji}(n − 1 − ji, 2 − j).

On noting that S_{r}(n, k) = 0 when k < 0, the above simplifies to

S_{r}(n, 2) = 2S_{r}(n − 1, 2) + S_{r}(n − 1, 1) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} S_{r−2i}(n − 1 − 2i, 0).  (2)

Then, remembering that S_{0}(0, 0) = S_{1}(0, 0) and that n > r by assumption, we see that

\begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} S_{r−2i}(n − 1 − 2i, 0) = 1

if, and only if, r is even and n = r + 1. In all other cases this sum is equal to 0. Thus, from (2), we have

S_{r}(n, 2) = 2S_{r}(n − 1, 2) + 1 unless r is even and n = r + 1.  (3)

Indeed, this pattern may be observed in the second columns of the tables in Section 7. Now suppose that r = 2^{m} − 1 for some m ∈ ℕ. Then, as is easily verified,

S_{r}(r, 2) = 2^{m−1} − 1.

We may use (3) and induction to show that

S_{r}(n, 2) = 2^{n−r+m−1} − 1

for n ≥ r, thereby completing the proof of the theorem.

The above result is rather specialized, concerning just the second column of some of the tables of generalized Stirling numbers of the second kind. We now state, without proof, a more general result concerning the diagonals of these tables. For j, l, m ∈ ℕ

S_{2j}(m + 2j − 1, m + j − 1) = S_{2j+l}(m + 2j − 1 + l, m + j − 1 + l).

3 Exponential generating functions

Definition 6. The shifted exponential generating function H_{r,k}(x) for the sequence of column k of the number triangle S_{r}(n, k) is, for r ≥ 2, defined by

H_{r,k}(x) = ∑_{n=0}^{∞} \frac{S_{r}(n + s, k)}{n!}x^{n},

where s is a function of both r and k given by s(r, k) = max{r, k}.

It is well known (see [2] and [3], for example) that the exponential generating function for the sequence of column k of the ordinary Stirling number triangle S_{1}(n, k) is given by

\frac{1}{k!} (e^{x} − 1)^{k} .

We show below how to calculate recursively the exponential generating function for the kth column of the number triangle S_{r}(n, k). We shall find it expedient to obtain, in the order given, the sequence of functions H_{2,1}(x), H_{2,2}(x), H_{2,3}(x), H_{2,4}(x), … and then the sequence H_{3,1}(x), H_{3,2}(x), H_{3,3}(x), H_{3,4}(x), …, and so on. Theorem 4 will be used in order to carry out these calculations.

As will be seen, each of the generating functions is obtained by solving a differential equation. The reason for using the shifted exponential generating functions in the manner described above is to keep the solutions of these equations relatively straightforward. The shifts ensure that, for r ≥ 2, the first non-zero coefficient of each generating function appears at position zero (i.e. the constant term in each of these shifted power series is non-zero), as becomes clear on considering the tables in Section 7.

Theorem 7.

H_{2,2}(x) = \frac{1}{2} (3e^{2x} − 2e^{x} + 1) .

Proof. In order to calculate H_{2,2}(x) we use Theorem 4 to obtain the recurrence relation

S_{2}(n, k) = kS_{2}(n − 1, k) + S_{2}(n − 1, k − 1) − S_{0}(n − 3, k − 2).

Setting k = 2 and replacing n with n + 3 gives

S_{2}(n + 3, 2) = 2S_{2}(n + 2, 2) + S_{2}(n + 2, 1) − S_{0}(n, 0).

Therefore

∑_{n=0}^{∞} \frac{S_{2}(n + 3, 2)}{n!}x^{n} = 2 ∑_{n=0}^{∞} \frac{S_{2}(n + 2, 2)}{n!}x^{n} + ∑_{n=0}^{∞} \frac{S_{2}(n + 2, 1)}{n!}x^{n} − ∑_{n=0}^{∞} \frac{S_{0}(n, 0)}{n!}x^{n},

from which we obtain

H′_{2,2}(x) − 2H_{2,2}(x) = H_{2,1}(x) − 1

= e^{x} − 1, noting that H_{2,1}(x) = e^{x} and that, by definition, S_{0}(0, 0) = S_{1}(0, 0) = 1.

We now solve this first order linear differential equation. The first step is to multiply both sides by the integrating factor e^{−2x} (see [11], for example) to obtain

\frac{d}{dx} (e^{−2x}H_{2,2}(x)) = e^{−x} − e^{−2x}.

This in turn gives

H_{2,2}(x) = −e^{x} + \frac{1}{2} + ce^{2x}.

Finally, in order to find the constant c, we set x = 0 and note that S_{2}(2, 2) = 1. From this it is found that c = \frac{3}{2}, and thus

H_{2,2}(x) = \frac{1}{2} (3e^{2x} − 2e^{x} + 1) .

At this point we merely outline the process of obtaining further exponential generating functions. In order to calculate H_{2,3}(x), Theorem 4 is used once more. We have

S_{2}(n + 4, 3) = 3S_{2}(n + 3, 3) + S_{2}(n + 3, 2) − S_{0}(n + 1, 1),

which leads to the differential equation

H′_{2,3}(x) − 3H_{2,3}(x) = H_{2,2}(x) − H_{0,1}(x)

= \frac{d}{dx} (H_{2,2}(x)) − \frac{d}{dx} (H_{0,1}(x))

= \frac{d}{dx} (\frac{1}{2} (3e^{2x} − 2e^{x} + 1)) − \frac{d}{dx} (e^{x} − 1)

= 3e^{2x} − 2e^{x}.

Solving this, noting that S_{2}(3, 3) = 1, gives

H_{2,3}(x) = 3e^{3x} − 3e^{2x} + e^{x}.

Similarly,

H_{2,4}(x) = \frac{1}{3} (20e^{4x} − 27e^{3x} + 12e^{2x} − 2e^{x}) ,

H_{2,5}(x) = \frac{1}{24} (375e^{5x} − 640e^{4x} + 378e^{3x} − 96e^{2x} + 7e^{x}) ,

and so on. The first few generating functions for r = 3 are given by

H_{3,1}(x) = e^{x},

H_{3,2}(x) = 2e^{2x} − e^{x},

H_{3,3}(x) = \frac{1}{3} (5e^{3x} − 6e^{2x} + 3e^{x} + 1) ,

H_{3,4}(x) = \frac{1}{3} (10e^{4x} − 15e^{3x} + 9e^{2x} − e^{x}) .

¿From the generating functions above we may obtain the following formulae:

S_{2}(n, 2) = \frac{1}{2} (3 · 2^{n−2} − 2) = 3 · 2^{n−3} − 1,

S_{2}(n, 3) = 3^{n−2} − 3 · 2^{n−3} + 1,

S_{2}(n, 4) = \frac{1}{3} (5 · 4^{n−3} − 3^{n−1} + 3 · 2^{n−2} − 2) ,

S_{2}(n, 5) = \frac{1}{24} (3 · 5^{n−2} − 10 · 4^{n−2} + 14 · 3^{n−2} − 3 · 2^{n} + 7)

for n ≥ 3, n ≥ 3, n ≥ 4 and n ≥ 5 respectively, and then

S_{3}(n, 2) = 2^{n−2} − 1,

S_{3}(n, 3) = \frac{1}{3} (5 · 3^{n−3} − 3 · 2^{n−2} + 3) ,

S_{3}(n, 4) = \frac{1}{3} (10 · 4^{n−4} − 5 · 3^{n−3} + 9 · 2^{n−4} − 1) ,

for n ≥ 3, n ≥ 4 and n ≥ 4 respectively, noting that the appearance of the ‘+1’ in the generating functions for both S_{2}(n, 2) and S_{3}(n, 3) means that their formulae above are not valid for n = 2 and n = 3 respectively.

The sequence for S_{2}(n, 2) appears as \underline{A083329} in [12] for n ≥ 3. Furthermore, the sequences for S_{2}(n, 3), S_{2}(n, 4), S_{2}(n, 5), S_{3}(n, 2), S_{3}(n, 3), S_{3}(n, 4) are given by \underline{A168583}, \underline{A168584}, \underline{A168585}, \underline{A168604}, \underline{A168605}, and \underline{A168606}, respectively. It is also worth mentioning here that an important property of the ordinary Stirling number triangle S_{1}(n, k), namely its exponential convolution property, is no longer present for r > 1; see [10].

4 Ordinary generating functions

Definition 8. The ordinary generating function \overline{H}_{r,k}(x) for column k of the number triangle S_{r}(n, k) is given by

\overline{H}_{r,k}(x) = ∑_{n=0}^{∞} S_{r}(n, k)x^{n}.

It is well known that

\overline{H}_{1,k}(x) = \frac{x^{k}}{(1 − x)(1 − 2x)(1 − 3x) ⋯ (1 − kx)}  (4)

(see [2], for example). We now obtain \overline{H}_{2,2}(x) and subsequently go on to give general results for \overline{H}_{2,k}(x), \overline{H}_{3,k}(x) and \overline{H}_{4,k}(x).

Theorem 9.

\overline{H}_{2,2}(x) = \frac{x^{2}(1 − x + x^{2})}{(1 − x)(1 − 2x)}.

Proof. Using Theorem 4, remembering that it is not valid for n ≤ r, we obtain

∑_{n=3}^{∞} S_{2}(n, 2)x^{n} = 2 ∑_{n=3}^{∞} S_{2}(n − 1, 2)x^{n} + ∑_{n=3}^{∞} S_{2}(n − 1, 1)x^{n} − ∑_{n=3}^{∞} S_{0}(n − 3, 0)x^{n},

which simplifies somewhat to

\overline{H}_{2,2}(x) − x^{2} = 2 ∑_{n=2}^{∞} S_{2}(n, 2)x^{n+1} + ∑_{n=2}^{∞} S_{2}(n, 1)x^{n+1} − x^{3}
= 2x\overline{H}_{2,2}(x) + x\overline{H}_{1,2}(x) − x^{3}.  (5)

Then, since

\overline{H}_{2,1}(x) = \frac{x^{2}}{1 − x},  (6)

we have, on rearranging (5), that

\overline{H}_{2,2}(x) = \frac{x^{2}(1 − x + x^{2})}{(1 − x)(1 − 2x)},

as required.

Similarly, setting k = 3 in Theorem 4 and using the result of Theorem 9 leads to the result

\overline{H}_{2,3}(x) = \frac{x^{3}(1 − 2x + 3x^{2})}{(1 − x)(1 − 2x)(1 − 3x)}.

More generally, it can be shown by induction that

\overline{H}_{2,k}(x) = \frac{x^{k} (2 − 2(k − 1)x + k(k − 1)x^{2})}{2(1 − x)(1 − 2x) ⋯ (1 − kx)}  (7)

for k ≥ 2.

Next, it is clear that

\overline{H}_{3,1}(x) = \frac{x^{3}}{1 − x}.  (8)

On using this in conjunction with

∑_{n=4}^{∞}S_{3}(n, 2)x^{n}

= 2 ∑_{n=4}^{∞} S_{3}(n − 1, 2)x^{n} + ∑_{n=4}^{∞} S_{3}(n − 1, 1)x^{n} − ∑_{n=4}^{∞} S_{1}(n − 3, 0)x^{n} − ∑_{n=4}^{∞} S_{0}(n − 4, −1)x^{n}

obtained via Theorem 4, gives

\overline{H}_{3,2}(x) = \frac{x^{3}}{(1 − x)(1 − 2x)}.  (9)

Then, for k ≥ 3, we have the general result

\overline{H}_{3,k}(x) = \frac{x^{k} (6 − 12(k − 1)x + 3(k − 1)(3k − 2)x^{2} − 2k(k − 1)(k − 2)x^{3})}{6(1 − x)(1 − 2x) ⋯ (1 − kx)}.  (10)

Even more generally, \overline{H}_{r,k}(x) will, for fixed r, have the form

\overline{H}_{r,k}(x) = \frac{x^{k} (f_{0,r}(k) + f_{1,r}(k)x + f_{2,r}(k)x^{2} + … + f_{r,r}(k)x^{r})}{(1 − x)(1 − 2x) ⋯ (1 − kx)}

for k ≥ r, where f_{m,r} is some polynomial of degree m with rational coefficients, with the notation highlighting the fact that these polynomials depend on r. Considering the case r = 4, for example, gives

f_{0,4}(k) = 1,

f_{1,4}(k) = −3k + 4,

f_{2,4}(k) = \frac{1}{2}(k − 1)(7k − 12),

f_{3,4}(k) = −\frac{1}{6}(k − 2)(11k^{2} − 26k + 9),

f_{4,4}(k) = \frac{k}{8}(k − 1)(3k^{2} − 15k + 22).

Finally, we show how to obtain, via an alternative method to the one given in [6], the ordinary generating functions of the generalized near-Bell numbers.

Definition 10. We define B_{n,r} to be the total number of partitions of M(n, r), where B_{0,0} = B_{0,1} = 1 and B_{n,r} = 0 when r > n. In particular, both B_{n,0} and B_{n,1} give the Bell numbers.

Definition 11. The ordinary generating function G_{r}(x) of the sequence of row sums of the number triangle S_{r}(n, k) is given by

G_{r}(x) = ∑_{n=0}^{∞} B_{n,r}x^{n}.

The ordinary generating function for the Bell numbers is given by

G_{1}(x) = ∑_{k=0}^{∞} \frac{x^{k}}{(1 − x)(1 − 2x) ⋯ (1 − kx)},

where, for k = 0, the expression under the sum is defined to be 1 (see [2], for example). This result does in fact follow from (1) and (4). In Theorem 12 of [6] we obtained the ordinary generating function for B_{n,2} in the following form:

G_{2}(x) = ∑_{k=1}^{∞} ∑_{m=0}^{k} \frac{x^{k+1}(1 − mx)}{(1 − x)(1 − 2x) ⋯ (1 − kx)},

which can be simplified to

G_{2}(x) = ∑_{k=1}^{∞} \frac{x^{k+1}(k + 1)(2 − kx)}{2(1 − x)(1 − 2x) ⋯ (1 − kx)}.

(It is worth noting here that, for the sake of mathematical convenience, shifted ordinary generating functions were utilized in [6], and, as a consequence, the function given there had the factor x^{k−1} in the numerator as opposed to x^{k+1} as above.) This can be given in an alternative form on using (6), (7) and the fact that

B_{n,r} = ∑_{k=1}^{n} S_{r}(n, k).

We have

G_{2}(x) = \frac{x^{2}}{1 − x} + ∑_{k=2}^{∞} \frac{x^{k} (2 − 2(k − 1)x + k(k − 1)x^{2})}{2(1 − x)(1 − 2x) ⋯ (1 − kx)}.

Similarly, using (8), (9) and (10), we obtain

G_{3}(x) =\frac{x^{3}}{1 − x} + \frac{x^{3}}{(1 − x)(1 − 2x)}

+ ∑_{k=3}^{∞} \frac{x^{k} (6 − 12(k − 1)x + 3(k − 1)(3k − 2)x^{2} − 2k(k − 1)(k − 2)x^{3})}{6(1 − x)(1 − 2x) ⋯ (1 − kx)}.

As was pointed out in the Introduction, the Bell numbers appear in [12] as \underline{A000110}. The sequences for B_{n,2} (known as the near-Bell numbers), B_{n,3} and B_{n,4} are given by \underline{A035098}, \underline{A169587}, and \underline{A169588}, respectively. Another thing worth noting here is that there does actually exist an algorithm to produce all partitions of multisets; see [9].

5 A generalization of a well-known identity

Our next goal is to find, for our generalized Stirling numbers of the second kind, the corresponding version of the following well-known identity (see [4] and [5], for example):

k^{n} = ∑_{m=1}^{k} \binom{k}{m}m!S(n, m).  (11)

In order to pave the way for a generalization, it is worth providing a combinatorial explanation of this identity.

We note first that k^{n} counts all possible functions of the form

f : {1, …, n} → {1, …, k}.

Let us now enumerate these functions in a different way. We start by choosing some nonempty subset A of {1, …, k} such that |A| = m. The number of functions with image set A is m!S(n, m). To see this, note that any surjective mapping,

f_{1} : {1, …, n} → A

say, induces a partition of {1, …, n} into exactly m parts, and that the m possible images can be permuted amongst themselves in m! ways. There are of course \binom{k}{m} distinct subsets of {1, …, k} containing exactly m elements. Then, on summing over m, it can be seen that we have enumerated all possible functions, as required.

Let us extend this idea to multisets. We are now interested in the number of possible multi-valued functions of the form

g : M(n, r) → {1, …, k}.

By way of an illustrative example, we shall obtain the number of mappings from M(8, 5) = {1^{5}, 2, 3, 4} to {1, 2, …, 7}. For any particular mapping, the images of the five 1s may be regarded as a monotone word of length 5 constructed from the elements of {1, 2, …, 7}. There are \binom{7+5−1}{5} = \binom{11}{5} such words (see [1] or [3], for example). The other three elements from M(8, 5) get mapped regularly, showing that there are \binom{11}{5} · 7^{3} possible multi-valued functions. This method of enumeration generalizes to give

\binom{k + r − 1}{r}k^{n−r}  (12)

as the number of possible multi-valued functions from M(n, r) to {1, …, k}. Note that this is in fact a generalized expression for the left-hand side of (11).

Let us now calculate the number of multi-valued functions on M(n, r) that have image set A, where A is as above. Note that this is not in general equal to m!S_{r}(n, m). Indeed, in looking for a generalized version of the right-hand side (11), it needs to be borne in mind that not every permutation of every m-partition will give rise to a new map. This is because any parts of the same cardinality containing only 1s may be permuted without any effect on our map. For example, the 5-partition of M(12, 6) given by

{1}, {1}, {1, 3, 4, 7}, {1, 1, 1, 6}, {2, 5}

will not, on interchanging the order of the first two parts, give a new map. From this it can be seen that m!S_{r}(n, m) overcounts the number of surjective multi-valued functions from M(n, r) to A. The following theorem gives the correct enumeration.

Theorem 12. The number of surjective multi-valued functions from M(n, r) to {1, 2, …, m} is, for n ≥ r, given by T_{r}(n, m) where

\frac{T_{r}(n, m)}{m!} = S_{r}(n, m) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} \frac{j − 1}{j!}S_{r−ji}(n − ji, m − j).

Proof. We adopt here similar notation to that used in the proof of Theorem 4; the one exception being that now N(m_{i} = j) and N(m_{i} ≥ j) are associated with S_{r}(n, m) rather than S_{r}(n − 1, m). Note that

m!S_{r}(n, m) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} m!N(m_{i} = j)  (13)

enumerates all the ordered m-partitions of M(n, m) for which each of the m parts is distinct, while

\begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} \frac{m!}{j!}N(m_{i} = j)  (14)

counts the remaining ordered m-partitions.

We have, for fixed i,

\begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} N(m_{i} = j) = N(m_{i} = s) + N(m_{i} = s − 1) + ⋯ + N(m_{i} = 2)
= N(m_{i} ≥ 2)
= S_{r−2i}(n − 2i, m − 2),  (15)

while

\begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} \frac{1}{j!}N(m_{i} = j) = \frac{1}{s!}N(m_{i} = s) + \frac{1}{(s − 1)!}N(m_{i} = s − 1) + … + \frac{1}{2!}N(m_{i} = 2)

= \frac{1}{s!}N(m_{i} = s) + \frac{1}{(s − 1)!}N(m_{i} ≥ s − 1) − \frac{1}{(s − 1)!}N(m_{i} ≥ s)

+ … + \frac{1}{2!}N(m_{i} ≥ 2) − \frac{1}{2!}N(m_{i} ≥ 3)

= \frac{1 − s}{s!}N(m_{i} ≥ s) + \frac{1 − (s − 1)}{(s − 1)!}N(m_{i} ≥ s − 1)

+ … + \frac{1 − 3}{3!}N(m_{i} ≥ 3) + \frac{1}{2!}N(m_{i} ≥ 2)

= ∑_{j=3}^{s} \frac{1 − j}{j!} S_{r−ji}(n − ji, m − j) + \frac{1}{2}S_{r−2i}(n − 2i, m − 2).  (16)

Then, noting that there is a one-to-one correspondence between the surjective multivalued functions from M(n, r) to {1, 2, …, m} and the ordered m-partitions of M(n, r), results (13), (14), (15) and (16) are sufficient to prove the theorem.

Corollary 13.

\binom{k + r − 1}{r}k^{n−r} = ∑_{m=1}^{k} \binom{k}{m}m! (S_{r}(n, m) − \begin{matrix}⌊ & \frac{r}{2} & ⌋ \\ ∑ \\ i=1 \end{matrix} \begin{matrix}⌊ & \frac{r}{i} & ⌋ \\ ∑ \\ j=2 \end{matrix} \frac{j − 1}{j!}S_{r−ji}(n − ji, m − j)) .

Proof. This follows immediately from (12) and Theorem 12.

The triangles T_{r}(n, m), r = 1, 2, 3, 4, appear in [12] as \underline{A019538}, \underline{A172106}, \underline{A172107}, and \underline{A172108}, respectively.

6 A connection to ordered partitions

Since

\binom{k + r − 1}{r}k^{n−r} = ∑_{m=1}^{k} \binom{k}{m}T_{r}(n, m),

the binomial inversion formula may be used to obtain

T_{r}(n, m) = ∑_{l=1}^{m} \binom{m}{l}\binom{l + r − 1}{r}(−1)^{m−l}l^{n−r}.

Summing this over m gives the number of ordered partitions T_{r}(n) of M(n, r):

T_{r}(n) = ∑_{m=1}^{n} T_{r}(n, m)

= ∑_{m=1}^{n} ∑_{l=1}^{m} \binom{m}{l}\binom{l + r − 1}{r}(−1)^{m−l}l^{n−r}.

On setting r = 1 we obtain the Fubini or ordered Bell numbers; see \underline{A000670} in [12]. Furthermore, T_{r}(n), r = 1, 2, 3, appear as \underline{A172109}, \underline{A172110}, and \underline{A172111}, respectively.

7 Tables

n S_{1}(n, 1) S_{1}(n, 2) S_{1}(n, 3) S_{1}(n, 4) S_{1}(n, 5) S_{1}(n, 6) S_{1}(n, 7) S_{1}(n, 8)
1  1
2  1  1
3  1  3  1
4  1  7  6  1
5  1  15  25  10  1
6  1  31  90  65  15  1
7  1  63  301  350  140  21  1
8  1  127  966  1701  1050  266  28  1

Table 1: Stirling numbers of the second kind, S_{1}(n, k).

n S_{2}(n, 1) S_{2}(n, 2) S_{2}(n, 3) S_{2}(n, 4) S_{2}(n, 5) S_{2}(n, 6) S_{2}(n, 7) S_{2}(n, 8)

1

2  1  1
3  1  2  1
4  1  5  4  1
5  1  11  16  7  1
6  1  23  58  41  11  1
7  1  47  196  215  90  16  1
8  1  95  634  1041  640  176  22  1

Table 2: The number of partitions of M(n, 2) into k non-empty parts, S_{2}(n, k).

n S_{3}(n, 1) S_{3}(n, 2) S_{3}(n, 3) S_{3}(n, 4) S_{3}(n, 5) S_{3}(n, 6) S_{3}(n, 7) S_{3}(n, 8)

1 2

3  1  1  1
4  1  3  2  1
5  1  7  8  4  1
6  1  15  30  20  7  1
7  1  31  104  102  46  11  1
8  1  63  342  496  300  96  16  1

Table 3: The number of partitions of M(n, 3) into k non-empty parts, S_{3}(n, k).

n S_{4}(n, 1) S_{4}(n, 2) S_{4}(n, 3) S_{4}(n, 4) S_{4}(n, 5) S_{4}(n, 6) S_{4}(n, 7) S_{4}(n, 8)

1 2 3

4  1  2  1  1
5  1  4  4  2  1
6  1  9  14  9  4  1
7  1  19  49  43  21  7  1
8  1  39  164  206  123  47  11  1

Table 4: The number of partitions of M(n, 4) into k non-empty parts, S_{4}(n, k).

n S_{5}(n, 1) S_{5}(n, 2) S_{5}(n, 3) S_{5}(n, 4) S_{5}(n, 5) S_{5}(n, 6) S_{5}(n, 7) S_{5}(n, 8)

1 2 3 4

5  1  2  2  1  1
6  1  5  6  4  2  1
7  1  11  21  17  9  4  1
8  1  23  72  78  47  21  7  1

Table 5: The number of partitions of M(n, 5) into k non-empty parts, S_{5}(n, k).

n T_{1}(n, 1) T_{1}(n, 2) T_{1}(n, 3) T_{1}(n, 4) T_{1}(n, 5) T_{1}(n, 6) T_{1}(n, 7) T_{1}(n, 8)
1  1
2  1  2
3  1  6  6
4  1  14  36  24
5  1  30  150  240  120
6  1  62  540  1560  1800  720
7  1  126  1806  8400  16800 15120  5040
8  1  254  5796  40824 126000 191520 141120 40320

Table 6: The number of ordered partitions of M(n, 1) into m non-empty parts, T_{1}(n, m).

n T_{2}(n, 1) T_{2}(n, 2) T_{2}(n, 3) T_{2}(n, 4) T_{2}(n, 5) T_{2}(n, 6) T_{2}(n, 7) T_{2}(n, 8)

1

2  1  1
3  1  4  3
4  1  10  21  12
5  1  22  93  132  60
6  1  46  345  900  960  360
7  1  94  1173  4980  9300  7920  2520
8  1  190  3801  24612 71400 103320 73080 20160

Table 7: The number of ordered partitions of M(n, 2) into m non-empty parts, T_{2}(n, m).

n T_{3}(n, 1) T_{3}(n, 2) T_{3}(n, 3) T_{3}(n, 4) T_{3}(n, 5) T_{3}(n, 6) T_{3}(n, 7) T_{3}(n, 8)

1 2

3  1  2  1
4  1  6  9  4
5  1  14  45  52  20
6  1  30  177  388  360  120
7  1  62  621  2260  3740  2880  840
8  1  126  2049  11524 30000 39720 26040  6720

Table 8: The number of ordered partitions of M(n, 3) into m non-empty parts, T_{3}(n, m).

n T_{4}(n, 1) T_{4}(n, 2) T_{4}(n, 3) T_{4}(n, 4) T_{4}(n, 5) T_{4}(n, 6) T_{4}(n, 7) T_{4}(n, 8)

1 2 3

4  1  3  3  1
5  1  8  18  16  5
6  1  18  78  136  105  30
7  1  38  288  856  1205  810  210
8  1  78  978  4576  10305 12090  7140  168

Table 9: The number of ordered partitions of M(n, 4) into m non-empty parts, T_{4}(n, m).

n T_{5}(n, 1) T_{5}(n, 2) T_{5}(n, 3) T_{5}(n, 4) T_{5}(n, 5) T_{5}(n, 6) T_{5}(n, 7) T_{5}(n, 8)

1 2 3 4

5  1  4  6  4  1
6  1  10  30  40  25  6
7  1  22  120  280  325  186  42
8  1  46  426  1600  3025  3066  1596  336

Table 10: The number of ordered partitions of M(n, 5) into m non-empty parts, T_{5}(n, m).

n T_{1}(n) T_{2}(n) T_{3}(n) T_{4}(n) T_{5}(n)
1  1
2  3  2
3  13  8  4
4  75  44  20  8
5 541  308  132  48  16
6 4683 2612 1076 368 112
7 47293 25988 10404 3408 976
8 545835 296564 116180 36848 10096

Table 11: The number of ordered partitions of M(n, r), T_{r}(n).

References

[1] M. Aigner, Combinatorial Theory, Springer, 1979.

[2] D. Branson, Stirling numbers and Bell numbers: their role in combinatorics and probability, Mathematical Scientist 25 (2000), 1–31.

[3] P. J. Cameron, Combinatorics: Topics, Techniques, Algorithms, Cambridge University Press, 1994.

[4] C. A. Charalambides, Enumerative Combinatorics, Chapman & Hall, 2002.

[5] R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Second Edition, Addison-Wesley, 1998.

[6] M. Griffiths, Generalized near-Bell numbers, J. Integer Sequences, 12 (2009), Article 09.5.7.

[7] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, 2008.

[8] D. E. Knuth, The Art of Computer Programming, Volume 1, Addison-Wesley, 1968, pp. 65–67.

[9] D. E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 3, Addison-Wesley, 2009, pp. 74–77.

[10] D. E. Knuth, Convolution polynomials, Mathematica Journal, 4 (1992), pp. 67–78.

[11] H. Neill and D. Quadling, Further Pure 2 & 3, Cambridge University Press, 2005.

[12] N. J. A. Sloane, The On-Line Encyclopedia of Integer Sequences, 2009.

www.research.att.com/∼njas/sequences/

[13] Wikipedia contributors, Multiset, 2009, http://en.wikipedia.org/wiki/Multiset.

2000 Mathematics Subject Classification: Primary 05A15; Secondary 05A18, 11B37, 11B73.

Keywords: Stirling numbers of the second kind, Bell numbers, generating functions, multisets, partitions, recurrence relations.

(Concerned with sequences \underline{A000110}, \underline{A000392}, \underline{A000453}, \underline{A000670}, \underline{A008277}, \underline{A008284}, \underline{A019538}, \underline{A035098}, \underline{A083329}, \underline{A168583}, \underline{A168584}, \underline{A168585}, \underline{A168604}, \underline{A168605}, \underline{A168606}, \underline{A169587}, \underline{A169588}, \underline{A172106}, \underline{A172107}, \underline{A172108}, \underline{A172109}, \underline{A172110}, and \underline{A172111}.)

Received August 7 2009; revised versions received October 8 2009; January 31 2010. Published in Journal of Integer Sequences, January 31 2010.

Return to Journal of Integer Sequences home page.