A COMBINATORIAL APPROACH TO HYPERHARMONIC NUMBERS

Arthur T. Benjamin

Department of Mathematics, Harvey Mudd College, Claremont, CA, USA

                          benjamin@math.hmc.edu

David Gaebler

Department of Mathematics, Harvey Mudd College, Claremont, CA, USA

                            dgaebler@hmc.edu

Robert Gaebler

Department of Mathematics, Harvey Mudd College, Claremont, CA, USA

                            rgaebler@hmc.edu

Received: 3/26/03, Accepted: 10/21/03, Published: 10/23/03

Abstract

Hyperharmonic numbers arise by taking repeated partial sums of harmonic numbers. These numbers can be expressed in terms of r-Stirling numbers, leading to combinatorial interpretations of many interesting identities.

1. Introduction

The harmonic numbers, defined by H_{n} = ∑_{k=1}^{n} \frac{1}{k} arise frequently in the solution to combinatorial problems and in the analysis of algorithms. It is well known [6] that

H_{n} = \frac{\left[{n+1 \atop 2}\right]}{n!}  (1)

where \left[{n \atop k}\right] denotes the (unsigned) Stirling number of the first kind, counting the permutations of n elements that are the product of k disjoint cycles. This allows harmonic number identities to be viewed combinatorially, as in [2].

The quantity H_{n} can be generalized many ways (see, for instance, [9]). The generalization we pursue, called hyperharmonic numbers by Conway and Guy [5], are obtained by taking repeated partial sums of the Harmonic numbers.

Formally, we define H_{n}^{r}, the hyperharmonic number of order r as follows.

Definition 1 Let H_{n}^{r} = 0 for r < 0 or n ≤ 0, H_{n}^{0} = \frac{1}{n} for n ≥ 1, and for r, n ≥ 1, let

H_{n}^{r} = ∑_{i=1}^{n} H_{i}^{r−1}.  (2)

INTEGERS: ELECTRONIC JOURNAL OF COMBINATORIAL NUMBER THEORY 3 (2003), #A15 2

Note that H_{n}^{1} is equal to the ordinary harmonic number H_{n}.

In [5], Conway and Guy express the hyperharmonic numbers in terms of ordinary harmonic numbers.

H_{n}^{r} = \binom{n + r − 1}{r − 1}(H_{n+r−1} − H_{r−1}).  (3)

The presence of the binomial coefficient suggests that a deeper combinatorial relationship exists. As we shall see, the hyperharmonic numbers satisfy several interesting identities like the ones below.

nH_{n}^{r} = \binom{n + r − 1}{r} + rH_{n−1}^{r+1}  (4)

\binom{m − 1}{r − 1}H_{n}^{m} = \binom{n + m − r}{n}H_{n+m−r}^{r} − \binom{n + m − 1}{n}H_{m−r}^{r} for 1 ≤ r ≤ m (5)

∑_{t=1}^{r} H_{n}^{t} = H_{n+1}^{r} − \frac{1}{n + 1}  (6)

H_{n}^{r} = ∑_{t=1}^{n} \binom{n + r − m − t − 1}{r − m − 1}H_{t}^{m}  for 0 ≤ m ≤ r − 1 (7)

H_{n}^{r} = ∑_{t=0}^{m} \binom{m}{t}H_{n+t−m}^{r−t}  for 0 ≤ m ≤ r (8)

H_{n}^{r} = ∑_{s=m}^{n} \binom{n + r − l − s}{r − l}H_{s}^{l−1} + ∑_{t=l}^{r} \binom{n + r − m − t}{n − m}H_{m−1}^{t}  (9)
for 1 ≤ l ≤ r and 1 ≤ m ≤ n.

A generating function for the hyperharmonic numbers is

\frac{− ln(1 − x)}{(1 − x)^{r}} = ∑_{i=1}^{∞} H_{i}^{r}x^{i}

since − ln(1−x) = ∑ \frac{x^{n}}{n}, and multiplying by \frac{1}{(1−x)^{r}} has the effect of taking partial sums r times. This generating function is equivalent by (3) to an identity in [7]. Although many of the identities in this paper can be proved using algebraic methods, we shall prove all of these by simple combinatorial arguments.

2. Basic properties of hyperharmonic numbers

There are two different ways to approach the hyperharmonic numbers combinatorially. One is to investigate the numerator of the unreduced fraction, i.e., n!H_{n}^{r}. This approach will be followed in the next section. The other is to write H_{n}^{r} as the sum of fractions \frac{1}{t}, where t ranges from 1 to n, and ask how many times each fraction appears in this sum. The answer is given by the following theorem.

Theorem 1

H_{n}^{r} = ∑_{t=1}^{n} \binom{n + r − t − 1}{r − 1}\frac{1}{t}.

Proof. Given a particular t, where 1 ≤ t ≤ n, we claim that the fraction \frac{1}{t} is counted exactly \binom{n+r−t−1}{r−1} times. To see this, consider the weighted directed graph with vertex set V = {(x, y)|x ≥ 1, y ≥ 0} and the arcs leaving (x, y) enter vertices (x′, y + 1), where x′ ≥ x. We give each vertex (x, y) a weight of H_{x}^{y}. Hence for all t ≥ 1, (t, 0) has weight \frac{1}{t} and for x, y ≥ 1, (x, y) has weight ∑_{x′≤x} H_{x′}^{y−1}, which is the sum of the weights of the vertices that point to (x, y).

Thus the fraction \frac{1}{t} appears in H_{n}^{r} for every path from (t, 0) to (n, r), i.e., for every sequence t ≤ x_{1} ≤ ⋯ ≤ x_{r−1} ≤ n. This is the same as the number of size r − 1 multisubsets of {t, …, n}, which equals

(\binom{n − t + 1}{r − 1}) = \binom{n + r − t − 1}{r − 1}

as desired, where (\binom{n}{k}) = \binom{n+k−1}{k} is the number of size k multisubsets of an n-element set. □

More generally, for 0 ≤ m ≤ r − 1, by counting all paths from (t, m) to (n, r), we see that for 1 ≤ t ≤ n, H_{t}^{m} is contributed (\binom{n−t+1}{r−1−m}) = \binom{n+r−t−m−1}{r−m−1} times, and Identity (7) follows. Similar path counting arguments can also be used to establish equations (6), (8) and (9), but we shall provide other combinatorial proofs of these in Section 4.

We now begin our discussion of the combinatorial nature of the numerator of H_{n,r}. We can write H_{n}^{r} as a (typically non-reduced) fraction of the form

H_{n}^{r} = \frac{a_{n,r}}{n!} .  (10)

Thus a_{0,r} = 0 and for n ≥ 1, a_{n,0} = (n − 1)! . For n, r ≥ 1,

H_{n}^{r} = ∑_{i=1}^{n} H_{i}^{r−1} = H_{n−1}^{r} + H_{n}^{r−1}

⟹ \frac{a_{n,r}}{n!} = \frac{a_{n−1,r}}{(n − 1)!} + \frac{a_{n,r−1}}{n!}
⟹ a_{n,r} = n a_{n−1,r} + a_{n,r−1}  (11)

We shall use this recurrence and initial condition to prove a generalization of equation (1).

3. r-Stirling numbers

The r-Stirling numbers, which are similar to the weighted Stirling numbers of Carlitz [4] and are a special case of the generalized Stirling numbers of Hsu and Shiue [8], can be defined combinatorially in terms of restricted permutations. Broder [3] gives the following combinatorial definition, which we will use throughout this paper:

Definition 2 \left[{n \atop k}\right]_{r} is the number of permutations of the set \{1, 2, …, n\} having k disjoint, non-empty cycles, in which the elements 1 through r are restricted to appear in different cycles.

Note that \left[{n \atop k}\right]_{0} and \left[{n \atop k}\right]_{1} are both equal to the ordinary Stirling number \left[{n \atop k}\right].

For convenience, we let T_{n,k,r} denote the set of permutations of {1, 2, …, n} into k cycles, in which the elements 1 through r appear in different cycles. Thus \left[{n \atop k}\right]_{r} is the number of permutations in T_{n,k,r}. We can think of \left[{n \atop k}\right]_{r} as counting the number of permutations with r “restricted” and n−r “free” elements. If a cycle contains a restricted element, we call it a restricted cycle; otherwise we call it a free cycle.

We shall adopt the standard permutation notation of writing the smallest element in a cycle at the beginning of that cycle, and listing the cycles in ascending order according to their smallest elements. For example, (1 5 3 7)(2)(4 9 8)(6) is in standard permutation notation, while (1 5 3 7)(2)(6)(4 9 8) and (1 5 3 7)(2)(9 8 4)(6) are not.

Generating functions for the r-Stirling numbers are presented in [3]:

∑_{k=r}^{n} \left[{n \atop k}\right]_{r}x^{k} = x^{r} ∏_{i=r}^{n−1}(x + i).

∑_{n=k}^{∞} \left[{n + r \atop k + r}\right]_{r} \frac{x^{n}}{n!} = \frac{1}{k!} (\frac{1}{1 − x})^{r} [ln (\frac{1}{1 − x})]^{k} .

∑_{0≤k≤n} \left[{n + r \atop k + r}\right]_{r} \frac{x^{n}}{n!} t^{k} = (\frac{1}{1 − x})^{r+t} .

By definition, we have \left[{0 \atop 0}\right]_{r} = 1 and for n > 0, \left[{n \atop k}\right]_{r} = 0 for k < r or k > n. Notice that for 1 ≤ r ≤ n

\left[{n \atop r}\right]_{r} = \frac{(n − 1)!}{(r − 1)!}  (12)

since we are counting permutations of the form (1 ⋯)(2 ⋯) ⋯ (r ⋯). The elements r+1 through n may be entered one at a time. Each element r+1 ≤ i ≤ n can be placed to the right of any of the i − 1 elements already in place, so there are r(r + 1) ⋯ (n − 1) = \frac{(n−1)!}{(r−1)!} such permutations. Notice that r-Stirling numbers also satisfy the traditional Stirling recurrence: for 0 ≤ r ≤ k ≤ n,

\left[{n + 1 \atop k}\right]_{r} = \left[{n \atop k − 1}\right]_{r} + n\left[{n \atop k}\right]_{r}  (13)

which may be proved by conditioning on whether or not element n + 1 is alone in its cycle.

Another useful identity we shall rely on is:

Identity 1 For r ≥ 1,

\left[{n + r \atop k}\right]_{r} = n\left[{n + r − 1 \atop k}\right]_{r} + \left[{n + r − 1 \atop k − 1}\right]_{r−1}.

This may be proved by conditioning on whether there are any free elements in the first cycle. If so, then choose one of the n free elements to appear immediately after 1; the other elements can be arranged \left[{n+r−1 \atop k}\right]_{r} ways. Otherwise, element 1 is alone, and elements 2 through n+r can be arranged \left[{n+r−1 \atop k−1}\right]_{r−1} ways. This brings us to the following theorem.

Theorem 2

H_{n}^{r} = \frac{\left[{n+r \atop r+1}\right]r}{n!} .

Proof 1. Let A_{n,r} = \left[{n+r \atop r+1}\right]_{r}. Hence A_{0,r} = \left[{r \atop r+1}\right]_{r} = 0 = a_{0,r} and for n ≥ 1, A_{n,0} = \left[{n \atop 1}\right]_{0} = (n − 1)! = a_{0,r}. For n, r ≥ 1, Identity 1 implies A_{n,r} = nA_{n−1,r} + A_{n,r−1} just like in equation (11). Since A_{n,r} and a_{n,r} satisfy the same initial conditions and the same recurrence, then by equation (10) we have \left[{n+r \atop r+1}\right]_{r} = A_{n,r} = a_{n,r} = n!H_{n}^{r}, as desired. □

It is also possible to combinatorially prove Theorem 2 without relying on a recurrence. We first prove the following general identity, similar to one proved in [3].

Identity 2 For 0 ≤ m ≤ r ≤ n and 0 ≤ l ≤ k − r,

\binom{k − r}{l}\left[{n + r \atop k}\right]_{r} = ∑_{t=k−r−l}^{n−l} \binom{n}{t}\left[{t + r − m \atop k − m − l}\right]_{r−m}\left[{n + m − t \atop m + l}\right]_{m}

Proof. The left side counts permutations of T_{n+r,k,r} where the first m cycles and l free cycles are colored red, and the other cycles colored green. On the right, we condition on the number t of free elements in green cycles. There are \binom{n}{t} ways to choose the free elements, \left[{t+r−m \atop k−m−l}\right]_{r−m} ways to arrange them in k − (m + l) green cycles, then \left[{n+m−t \atop l+m}\right]_{m} ways to arrange the other (n + r) − (r − m + t) elements among the m + l red cycles. □

Proof 2 of Theorem 2. As a special case of Identity 2 with l = 0, m = r, and k = r + 1, we have

\left[{n + r \atop r + 1}\right]_{r} = ∑_{t=1}^{n} \frac{n!}{t!(n − t)!} · (t − 1)! · \frac{(n + r − t − 1)!}{(r − 1)!} = ∑_{t=1}^{n} \binom{n + r − t − 1}{r − 1}\frac{n!}{t} = n!H_{n}^{r}

by Theorem 1. □

4. r-Stirling identities

Theorem 2 expresses H_{n}^{r} in terms of r-Stirling numbers. This allows us to give combinatorial proofs of hyperharmonic identities by proving the equivalent r-Stirling identities. This will be the focus of the rest of our paper.

We make use of the following lemma:

Lemma 1 For r + 1 ≤ t ≤ n + r, the number of permutations in T_{n+r,r+1,r} with t as the smallest element in the right cycle is \frac{(n+r−1)!}{(r−1)!(t−1)}.

Proof 1. First place elements 1 through t − 1 in the restricted cycles. There are \left[{t−1 \atop r}\right]_{r} = \frac{(t−2)!}{(r−1)!} ways to do this. Next, place element t at the beginning of the right cycle. Finally, place each of the elements t+1 through n+r one at a time. Each element can be placed to the right of any element already placed, so there are t·(t+1)·(t+2) ⋯ (n+r−1) = \frac{(n+r−1)!}{(t−1)!} ways to place them. Altogether, then, the number of permutations is

\frac{(t − 2)!}{(r − 1)!} · \frac{(n + r − 1)!}{(t − 1)!} = \frac{(n + r − 1)!}{(r − 1)!(t − 1)}.

□

Proof 2. Alternatively, we could list the numbers 1 through n + r in any order with the provision that 1 is first and the numbers 1 through r must be in increasing order. There are \binom{n+r−1}{r−1} ways to place the elements 1 through r in our list, then n! ways to order the numbers r + 1 through n + r in the remaining positions. We then convert our list to a restricted permutation by starting a new cycle at each of 1, 2, …, r, t. Element t has equal probability of having any position among elements 2, 3, …, t, so its probability of being last among them is \frac{1}{t−1}. Thus the probability that we have a valid permutation is \frac{1}{t−1}. The number of permutations in T_{n+r,r+1,r} with t as the smallest element in the right cycle, then, is

\binom{n + r − 1}{r − 1}n!\frac{1}{t − 1} = \frac{(n + r − 1)!}{(r − 1)!(t − 1)}.

□

Now we are ready to prove equation (3).

Proof 1. Since every permutation in T_{n+r,r+1,r} must have some smallest element t in its right cycle, with r + 1 ≤ t ≤ n + r, then by Theorem 2 we have

H_{n}^{r} = \frac{1}{n!}\left[{n + r \atop r + 1}\right]_{r} = \frac{1}{n!} ∑_{t=r+1}^{n+r} \frac{(n + r − 1)!}{(r − 1)!(t − 1)} = \binom{n + r − 1}{r − 1}(H_{n+r−1} − H_{r−1}).

□

Proof 2. By Theorem 2, (3) is transformed into the following r-Stirling identity:

\left[{n + r \atop 2}\right] = (r − 1)!\left[{n + r \atop r + 1}\right]_{r} + \frac{(n + r − 1)!}{(r − 1)!}\left[{r \atop 2}\right],

which is just a special case of the following identity with r = 1 and k = 2. □

Identity 3 For 0 ≤ r ≤ m ≤ n,

\left[{n \atop k}\right]_{r} = ∑_{t=r}^{k} \left[{m \atop t}\right]_{r}\left[{n \atop k + m − t}\right]_{m}.

Proof. The left side counts the permutations in T_{n,k,r}. On the right, we condition on the number t of cycles that contain the elements 1 through m, where r ≤ t ≤ k. We can build such a permutation in two steps. First we arrange elements 1 through n into k + m − t cycles so that elements 1 through m are all in separate cycles. Next, we reduce this to k cycles by converting the first m cycles into t cycles by treating the m cycles as elements, where the first r cycles are restricted to stay separate from each other. For example, if r = 3 and m = 5, then to create the permutation (1 5 8)(2)(3 7 4 6), we would first create the permutation (1)(2)(3 7)(4 6)(5 8), and then arrange and combine the first 5 cycles, keeping 1 through 3 in separate cycles. There are \left[{n \atop k+m−t}\right]_{m} ways to accomplish the first step and \left[{m \atop t}\right]_{r} for the second. Thus, for a given t there are \left[{m \atop t}\right]_{r}\left[{n \atop k+m−t}\right]_{m} permutations. Summing over t, we have the desired result. □

We note that hyperharmonic identities (3) and (4) are special cases of equation (5), which by Theorem 2, is equivalent to

Identity 4 For 0 ≤ r ≤ m ≤ n,

\left[{n \atop r + 1}\right]_{r} = \left[{n \atop m + 1}\right]_{m}\left[{m \atop r}\right]_{r} + \left[{m \atop r + 1}\right]_{r}\left[{n \atop m}\right]_{m}.

Proof. This is a special case of Identity 3, with k = r + 1. We just condition on whether elements 1 through m are in restricted cycles. □

Next we prove equation (6), which is equivalent to the following identity when k =r+1.

Identity 5

\left[{n + r \atop k}\right]_{r} = \left[{n \atop k − r}\right] + n ∑_{t=1}^{r} \left[{n + r − t \atop k − t + 1}\right]_{r−t+1}.

Proof. The left side counts the permutations in T_{n+r,k,r}. On the right, we condition on whether there are any free elements in restricted cycles. There are \left[{n \atop k−r}\right] permutations with no free elements in restricted cycles. Otherwise, condition on the number t of the first cycle with a free element. There are n ways to choose the free element m to immediately follow restricted element t. Next, there are \left[{n+r−t \atop k−t+1}\right]_{r−t+1} ways to place elements 1 through t − 1 in their own cycles, and the other elements except m into all the cycles except the first t − 1. Finally, we insert element m immediately to the right of t. □

Using Theorem 2, equation (7) becomes the following r-Stirling identity:

Identity 6 For 0 ≤ m ≤ r,

\left[{n + r \atop k}\right]_{r} = ∑_{s=k−r}^{n} \binom{n}{s}\left[{s + r − m \atop k − m}\right]_{r−m}\left[{n + m − s \atop m}\right]_{m}.

Proof. This is just a special case of Identity 2 with l = 0. We condition on the number s of free elements that do not appear in cycles 1 through m, where 0 ≤ m ≤ r. □

Equation (8) is equivalent to the following r-Stirling identity when k = r + 1:

Identity 7 For 0 ≤ m ≤ r,

\left[{n + r \atop k}\right]_{r} = ∑_{t=0}^{m} \binom{m}{t}\frac{n!}{(n + t − m)!}\left[{n + r − m \atop k − t}\right]_{r−t}.

Proof. We color the first m cycles blue, and condition on the number t of blue cycles that have only one element. There are \binom{m}{t} ways to choose these cycles and place the restricted elements in them. Next we choose but do not place the leftmost free element to go in each of the other blue cycles; this can be done in \binom{n}{m−t} ways. Now we can arrange the remaining n + r − m elements in the k − t allowed cycles in \left[{n+r−m \atop k−t}\right]_{r−t} ways. Finally, there are (m − t)! ways to place the m − t chosen free elements, each to the right of a restricted element. □

Finally, equation (9), is equivalent to the following r-Stirling identity.

Identity 8 For 1 ≤ d ≤ r and 1 ≤ c ≤ n,

\left[{n + r \atop k}\right]_{r} = ∑_{i=0}^{d−1} c\binom{n}{c}\left[{c + i \atop i + 1}\right]_{i+1}\left[{n + r − c − i \atop k − i}\right]_{r−i} +∑_{j=0}^{c−1} \binom{n}{j}\left[{d + j \atop d}\right]_{d}\left[{n + r − d − j \atop k − d}\right]_{r−d}.

Proof. The left side counts the permutations in T_{n+r,k,r}. The right side conditions on whether there are at least c free elements in the first d restricted cycles. If there are, then condition on i, the last restricted cycle with fewer than c free elements before or in it (if there are at least c free elements in the first cycle, then i = 0). There are \binom{n}{c} ways to choose which c free elements are listed first in the permutation. Since at least one free element is in cycle i + 1, there are c ways to choose which is the first free element of that cycle. Then there are \left[{c+i \atop i+1}\right]_{i+1} ways to place the other c − 1 of the c first free elements. Finally, we can place the remaining n − c free elements, but not in the first i cycles and not in cycle i + 1 before any elements already placed. There are \left[{n+r−c−i \atop k−i}\right]_{r−i} ways to place them.

If instead there are fewer than c free elements in the first d cycles, then condition on the number j of free elements in the first d cycles. There are \binom{n}{j} ways to choose these j elements, \left[{d+j \atop d}\right]_{d} ways to place them, and \left[{n+r−d−j \atop k−d}\right]_{r−d} ways to place the remaining free elements in the other k − d cycles. □

References

[1] M. Aigner, Combinatorial Theory, Ch. 3 (Springer, New York, 1979) 98–99.

[2] A.T. Benjamin, G.O. Preston, and J.J. Quinn, A Stirling Encounter with Harmonic Numbers, Math. Mag. 75 (2002), 95–103.

[3] A.Z. Broder, The r-Stirling Numbers, Disc. Math. 49 (1984) 241–259.

[4] L. Carlitz, Weighted Stirling Numbers of the First and Second Kind–1, Fib. Quart. 18 (1980) 147–162.

[5] J.H. Conway and R.K. Guy, The Book of Numbers, Copernicus, 1996.

[6] Ronald L. Graham, Donald E. Knuth, and Oren Patashnik, Concrete Mathematics, Addison Wesley, 1993.

[7] D.H. Greene and D.E. Knuth, Mathematics for the Analysis of Algorithms, Birkhauser, Boston, 1981.

[8] L. Hsu and P. Shiue, A Unified Approach to Generalized Stirling Numbers, Adv. Appl. Math. 20 (1998) 366–384.

[9] J.M. Santmyer, A Stirling Like Sequence of Rational Numbers, Disc. Math. 171 (1997) 229–235.