A Ramanujan sequence that refines the Cayley formula for trees

Jiang Zeng Département de Mathématique, Université Louis Pasteur, 7, rue René Descartes, 67084 Strasbourg Cédex, France

October 22, 1996

Abstract

A further combinatorial study of Entries 16 and 17 in Chapter 3 of Ramanujan’s second notebook [1] leads to a refinement of Cayley’s formula for counting trees and generalizes the recent results derived by Shor [12], and Dumont and Ramamonjisoa [4]. Our approach also yields a new proof of Clarke’s extension of Cayley’s formula [3].

1 Introduction

In his edition of Ramanujan’s notebook [1, 2] Berndt made the following remarks:

“Although no combinatorial problems are mentioned in Chapter 3, much of the content of this chapter belongs under the umbrella of combinatorial analysis. […] Entries 16 and 17 do not seem to have been expanded upon in the literature and would appear to be a basis for further fruitful research.”

In the years following the publication of Berndt’s work several authors have made arithmatical and combinatorial studies of a sequence in Entry 17 [7, 8, 4]. However nothing seems to be done yet regarding Entry 16. It’s the purpose of this paper to show that the aforementioned sequence is actually a special case of another one in Entry 16 and give a combinatorial interpretation of the latter sequence.

In [11], for intergers k, r ≥ 0, Ramanujan defined a sequence ψ_{k}(r, x) by

∑_{k=0}^{+∞} \frac{(x + k)^{r+k}e^{−u(x+k)}u^{k}}{k!} = ∑_{k=1}^{r+1} \frac{ψ_{k}(r, x)}{(1 − u)^{r+k}} ,  (1)

and gave the following recurrence :

ψ_{k}(r + 1, x) = (x − 1)ψ_{k}(r, x − 1) + ψ_{k−1}(r + 1, x) − ψ_{k−1}(r + 1, x − 1). (2)

Berndt et al [1, 2] have found the following simpler recurrence:

ψ_{k}(r, x) = (x − r − k + 1)ψ_{k}(r − 1, x) + (r + k − 2)ψ_{k−1}(r − 1, x), (3)

where k ∈ [r + 1] := {1, 2, …, r + 1}, ψ_{1}(0, x) = 1 and ψ_{k}(r, x) = 0 if k ∉ [r + 1]. Making the substitution Q_{n, k}(x) = ψ_{k+1}(n − 1, x + n) in the above recurrence yields

Q_{n, k}(x) = (x + n − 1)Q_{n−1, k}(x) + (n + k − 2)Q_{n−1, k−1}(x),  (4)

where Q_{1, 0}(x) = 1 and Q_{n, k}(x) = 0 if k ≥ n or k < 0. The first terms of this sequence are given in Table 1.

k\n 1 2  3  4  5
0 1 1 + x 2 + 3x + x^{2} 6 + 11x + 6x^{2} + x^{3} 24 + 50x + 35x^{2} + 10x^{3} + x^{4}
1  1  4 + 3x  18 + 22x + 6x^{2}  96 + 150x + 70x^{2} + 10x^{3}
2  3  25 + 15x  190 + 195x + 45x^{2}
3  15  210 + 105x
4  105
∑k 1 2 + x (3 + x)^{2}  (4 + x)^{3}  (5 + x)^{4}
Table 1: Q_{n, k}(x) for 0 ≤ k < n ≤ 5.

The sequence Q_{n, k}(x) has the advantage of providing a common algebraic set-up for recent combinatorial results obtained by Shor [12] on the one hand, and Dumont and Ramamonjisoa [4] on the other hand. As will be shown, Shor [12] found a combinatorial interpretation of the value of the polynomial Q_{n, k}(x) at x = 1, while Dumont and Ramamonjisoa [4] made a combinatorial study of the sequences Q_{n, k}(−1), Q_{n, k}(0) and Q_{n, k}(1).

In section 2 we shall give two combinatorial interpretations of Q_{n, k}(x) and as an application we derive a new proof of Clarke’s extension of Caylay’s formula. In section 3 we show how to derive (1) from Lambert’s formula (11) and compute the generating function of Q_{n, k}(x). In section 4 we derive the results of Shor [12] and Dumont-Ramamonjisoa [4] by specializing Q_{n, k}(x). We end this paper with some further remarks and open questions.

2 Combinatorial interpretations

A labeled tree on [n] := {1, 2, …, n} is a connected graph without cycles on [n]. It’s well-known (see [10]) that the number of labeled trees on [n + 1] is (n + 1)^{n−1}. A rooted labeled tree is a labeled tree with a distinguished vertex. Note respectively T_{n} and T_{n}(→ ·) the set of labeled trees and rooted labeled trees on [n].

Given a tree T ∈ T_{n}(→ ·) and two nodes j, k of T, we say that k belongs to the descendance of j if the path from the root to k passes through j. In particular, each node is the descendant of itself. If k is a descendant of j and e = (j, k) an edge of T, we say that k is a child of j, and j and k are respectively the father node and the child node of e. An edge e = (j, k) of T is propre if all the descendants of the child node k are large than the j, otherwise it is impropre. The degree of a node x in a rooted tree T is the number of children of x. Note deg_{T} (x) the degree of x and β(x) the smallest descendant of x.

Throughout this paper we shall take the convention that an unrooted labeled tree is rooted at the smallest node. Then we can generalize the above notions to unrooted labeled trees. Note respectively T_{n, k} and T_{n, k}(→ ·) the set of labeled trees and rooted labeled trees on [n] with k impropre edges. Applying the same argument used by Shor [12] or Dumont-Ramamonjisoa [4] we can prove the following more general result.

Proposition 1 There holds

Q_{n, k}(x) = ∑_{T ∈T_{n+1, k}} x^{deg_{T} (1)−1}.  (5)

Proof: We shall prove formula (5) by showing that the right-hand side satisfies recurrence (4). Formula (5) is obviously true for n = 1. Suppose that (5) is true for n = m − 1. We define a surjection φ from T_{m+1, k} to T_{m, k} ∪ T_{m, k−1} as follows. For any T ∈ T_{m+1, k}, if m + 1 is a leaf, delete it to obtain a tree T′ ∈ T_{m, k}; otherwise replace m + 1 by the child node x which has the largest β(x) among all children of m+1 and contract the edge joining m + 1 and x to obtain a tree T′ ∈ T_{m, k−1}. Now let us consider the inverse of φ. To recover a tree T ∈ T_{m+1, k} we can proceed in two different ways :

• start from a tree T′ ∈ T_{m, k} and add a node m + 1 as a leaf in m ways. Clearly this will not creat any improper edges but increase the degree of 1 by one if m + 1 is joined directly to 1. Hence the generating function for T_{m+1, k} such that m + 1 is a leaf is equal to (x + m − 1)Q_{m−1, k}(x).

• strart from a tree T′ ∈ T_{m, k−1} and add m + 1 as an interior node: pick any node x ≠ 1 of T′, replace x by m+1 and join x to m+1 by an edge, make all proper children of x in T′ to be children of x in T, it remains to partition the improper children of x in T′, say x_{1}, x_{2}, …, x_{b} such that β(x_{1}) < β(x_{2}) < ⋯ < β(x_{b}), then it’s easy to see that the only possible partition is to make x_{1}, …, x_{a} to be the children of m + 1 and x_{a+1}, …, x_{b} to be the children of x, where 0 ≤ a ≤ b. That means there are b + 1 possibilities to partition the improper children of x. Hence there are m + k − 2 total such preimages. Moreover this operation will increase one improper edge between m + 1 and x, but not the degree of 1. Hence the generating function for T_{m+1, k} with m + 1 being an interior node is equal to (m + k − 2)Q_{m−1, k−1}(x).

Summarizing the above two cases yields the desired recurrence.

The following result shows that Q_{n, k}(x) is actually a polynomial of (x+1) with non negative integer coefficients.

Proposition 2 There holds

Q_{n, k}(x) = ∑_{T ∈T_{n, k}(→·)}(x + 1)^{deg_{T} (1)}.  (6)

Proof: As in the proof of proposition 1 we show that the right-hand side of (6) satisfies the recurrence (4). We define a similar surjection φ from T_{m+1, k}(→ ·) to T_{m, k}(→ ·)∪T_{m, k−1}(→ ·) as follows. For any T ∈ T_{m+1, k}(→ ·), if m + 1 is a leaf (then m + 1 cannot be a root), delete it to obtain a tree T′ ∈ T_{m, k}(→ ·); otherwise replace m + 1 by the child node x which has the largest β(x) among all children of m + 1 and contract the edge joining m + 1 and x to obtain a tree T′ ∈ T_{m, k−1}(→ ·), where if m + 1 had been a root, we take x as the root of T′, otherwise T′ has the same root as that of T. Since the rest of the proof is similar to that of proposition 1 we omit it.

Remark: Propositions 1 and 2 can also be derived respectively from (18) and (23) by applying the combinatorial theory of generating functions (see [5, 6, 4]). It would be interesting to find a direct derivation of proposition 2 from proposition 1.

The first polynomials of Q_{n, k}(x − 1) are listed in Table 2.

k\n 1 2  3  4  5
0 1 x  x + x^{2} 2x + 3x^{2} + x^{3} 6x + 11x^{2} + 6x^{3} + x^{4}
1  1  1 + 3x 2 + 10x + 6x^{2} 6 + 40x + 40x^{2} + 10x^{3}
2  3  10 + 15x  40 + 105x + 45x^{2}
3  15  105 + 105x
4  105
∑k 1 1 + x (2 + x)^{2} (3 + x)^{3}  (4 + x)^{4}
Table 2: Q_{n, k}(x − 1) for 0 ≤ k < n ≤ 5.

Corollary 3 For integer n ≥ 1 we have

Q_{n}(x) := ∑_{k=0}^{n−1} Q_{n, k}(x) = (x + n)^{n−1}.  (7)

Proof: Given a tree T ∈ T_{n} we can root T by picking any of the n nodes. Hence it is clear that

∑_{T ∈T_{n}(→·)} x^{deg_{T} (1)} = (x + n − 1) ∑_{T ∈T_{n}} x^{deg_{T} (1)−1}.  (8)

Replacing x by x + 1 and applying propositions 1 and 2 we obtain

Q_{n}(x) = (x + n)Q_{n−1}(x + 1).

Since Q_{1}(x) = 1 iterating the above recurrence yields then (7).

Corollary 4 The number of labeled trees on [n + 1] such that the node 1 has degree l is equal to

\binom{n − 1}{l − 1}n^{n−l},  l = 1, 2, …, n.  (9)

Proof: Applying corollary 3 we get

∑_{T ∈T_{n+1}} x^{deg_{T} (1)−1} = (x + n)^{n−1} = ∑_{l=0}^{n} \binom{n − 1}{l − 1}n^{n−l}x^{l−1}.

Extracting the coefficients of x^{l−1} yields the desired formula.

Remark: The above corollary was first proved by Clarke [3], although it’s equivalent [10, p. 25] to another result of Cayley, that is, the number of forets with n labelled nodes that consist of k trees such that k specified nodes belong to distinct trees is equal to kn^{n−k−1}.

3 Generating functions

We shall give several formulae for the generating functions of Q_{n, k}(x). In contrast to the treatment in [2], all the series in this section are formal power series. The following result was already known to Lambert and Euler in the 18th century (see [2, p. 72]), but the simple proof that we propose below seems new. Lemma 5 Let u ∈ C[[t]] be the solution of t = ue^{−u}. Then

u = ∑_{n≥1} n^{n−1} \frac{t^{n}}{n!},  (10)
\frac{e^{xu}}{1 − u} = ∑_{n≥0}(x + n)^{n} \frac{t^{n}}{n!},  (11)
\frac{e^{xu} − 1}{x} = ∑_{n≥1}(x + n)^{n−1} \frac{t^{n}}{n!}.  (12)

Proof: Note that (10) is the special case x = 0 of (12). Dividing the two sides of (11) by e^{xu} and equating the coefficient of u^{m}/m! (m ≥ 0) yields

m! = ∑_{i=0}^{m}(−1)^{m−i}\binom{m}{i}(x + i)^{m}.  (13)

Hence it suffices to prove (13). Let x ∉ [m] and consider the applications φ : [m] ⟶ [m] ∪ {x} such that φ([m]) = [m]. Clearly there are m! such applications. On the other hand, if we weight each application φ : [m] ⟶ [m] ∪ {x} by x^{|φ^{−1}(x)|}, then the enumerator of the applications such that |φ([m]) ∩ [m]| ≤ i (0 ≤ i ≤ m) is \binom{m}{i}(x + i)^{m}. Hence by the principle of inclusion-exclusion we get (13). Since dt/du = (1 − u)e^{−u} we obtain (12) by integrating (11) with respect to t and then replacing x by x + 1.

Lemma 6 Let n ≥ 1 be integer. Then

(\frac{e^{u}}{1 − u} \frac{∂}{∂u})^{n} (\frac{e^{xu} − 1}{x}) = ∑_{k=0}^{n−1} \frac{Q_{n, k}(x)}{(1 − u)^{n+k}} e^{(x+n)u}.

Proof: By induction on n and using (4).

The following result is equivalent to (1), which is the starting point of Ramanujan for the sequence ψ_{k}(r, x). Here we show how to derive it from Lambert’s formula.

Proposition 7 Let n ≥ 1 be integer. Then

∑_{k=0}^{n−1} \frac{Q_{n, k}(x)}{(1 − u)^{n+k}} = ∑_{k=0}^{∞} \frac{(x + n + k)^{n+k−1}e^{−u(x+n+k)}u^{k}}{k!} .  (14)

Proof: Let t = ue^{−u}, then \frac{du}{dt} = \frac{e^{u}}{1−u}. Deriving n times the both sides of (12) with respect to t we get

(\frac{e^{u}}{1 − u} \frac{∂}{∂u})^{n} (\frac{e^{xu} − 1}{x}) = ∑_{k=0}^{∞}(x + n + k)^{n+k−1} \frac{t^{k}}{k!}.

Replacing t by ue^{−u} we deduce (14) from lemma 6.

Remark: If u = 0 the formula (14) reduces to (5).

Define the generating function

Y (t, u) = ∑_{n≥1} ∑_{k=0}^{n−1} \frac{Q_{n, k}(x)}{(1 − u)^{k}} \frac{t^{n}}{n!}.  (15)

Proposition 8 We have

Y (t, u) = ∑_{n≥1} \frac{(x + n)^{n−1}e^{−u(x+n)}}{n!} [(u + (1 − u)t)^{n} − u^{n}] .  (16)

Proof: It follows from the above proposition that

Y (t, u) = ∑_{n≥1} \frac{(1 − u)^{n}t^{n}}{n!} ∑_{k≥0} \frac{(x + n + k)^{n+k−1}e^{−u(x+n+k)}u^{k}}{k!}

= ∑_{l≥1} \frac{(x + l)^{l−1}e^{−u(x+l)}}{l!} ∑_{k=0}^{l−1} \binom{l}{k} [(1 − u)t]^{l−k} u^{k}.

Replacing l by n and applying the binomial formula to the interior summation in the last line we deduce the desired formula.

The following result gives a generalization of Lambert’s formula (12). We shall give two proofs of this generalization.

Proposition 9 Let y ∈ C[[t, u]] be the solution of the equation

(1 − u)t = ye^{−y} + u(e^{−y} − 1).  (17)

Then

Y (t, u) = \frac{e^{xy} − 1}{x}.  (18)

First proof: Write (17) as

e^{−u}[u + (1 − u)t] = (y + u)e^{−(y+u)}.  (19)

Since the left-hand side of (19) is a series of u and t without constant, by applying (12) of Lemma 3, we obtain

\frac{e^{x(y+u)} − 1}{x} = ∑_{n≥1}(x + n)^{n−1} \frac{e^{−nu}[u + (1 − u)t]^{n}}{n!} ,

which can be rewritten as

\frac{e^{xy} − 1}{x} = −\frac{e^{xu} − 1}{x}e^{−xu} + ∑_{n≥1}(x + n)^{n−1} \frac{e^{−(x+n)u}[u + (1 − u)t]^{n}}{n!} . (20)

Now, by (12) we have

\frac{e^{xu} − 1}{x} = ∑_{n≥1}(x + n)^{n−1} \frac{(ue^{−u})^{n}}{n!} .

Substituting the above formula in the left-hand side of (20) we get the lefthand side of (16).

Second proof: Let a = \frac{1}{1−u}, then the equation (17) can be written as

t = aye^{−y} + (a − 1)(e^{−y} − 1).  (21)

Equivalently y is the solution of the differential equation:

y′ = \frac{e^{y}}{1 − ay} ,  y(0) = 0.  (22)

Denote by Z(t, u) the right-hand side of (18). Then Z is characterized by the differential equation

Z′ = \frac{e^{(x+1)y}}{1 − ay} ,  Z(0, u) = 0.  (23)

Define A = \frac{1}{1−ay} and S = e^{y}. Then A and S are characterized by

A′ = aA^{3}S, A(0) = 1;  (24)
S′ = AS^{2}, S(0) = 1.  (25)

Note that Z′ = AS^{x+1} and Z′′ = (x + 1 + aA)A^{2}S^{x+2}. It’s routine to show by induction that for n ≥ 1,

Z^{(n)} = A^{n}S^{x+n} ∑_{k=0}^{n−1} Q_{n, k}(x)(aA)^{k}.  (26)

It follows then Z(t, u) = Y (t, u) by comparing with (15).

4 Three specializations

Set Q_{0, 0}(1) = 1 and define the following three sequences :

a(n, k) = Q_{n+1, k}(−1), n ≥ k ≥ 1;  (27)
b(n, k) = Q_{n, k}(0), n > k ≥ 0;  (28)
c(n, k) = Q_{n−1, k}(1), n > k ≥ 0.  (29)

It then follows from (4) that

a(n, k) = (n − 1)a(n − 1, k) + (n + k − 1)a(n − 1, k − 1), (30)
b(n, k) = (n − 1)b(n − 1, k) + (n + k − 2)b(n − 1, k − 1), (31)
c(n, k) = (n − 1)c(n − 1, k) + (n + k − 3)c(n − 1, k − 1), (32)

with a(0, 0) = b(1, 0) = c(1, 0) = 1. The following result is du to Ramanujan [2] and Dumont-Ramamonjisoa [4] relating to Entry 17 of [2].

Corollary 10 The three sequences a(n, k), b(n, k) and c(n, k) satisfy

∑_{k=1}^{n} a(n, k) = n^{n}, ∑_{k=0}^{n−1} b(n, k) = n^{n−1}, ∑_{k=0}^{n−1} c(n, k) = n^{n−2}. (33)

Moreover, if y is defined as in (21), then

y = ∑_{n≥1} (∑_{k=0}^{n−1} b(n, k)a^{k}) \frac{t^{n}}{n!},  (34)

1 − e^{−y} = ∑_{n≥0} (∑_{k=0}^{n} a(n, k)a^{k}) \frac{t^{n+1}}{(n + 1)!},  (35)

e^{y} = 1 + ∑_{n≥1} (∑_{k=0}^{n−1} c(n + 1, k)a^{k}) \frac{t^{n}}{n!}.  (36)

Proof: Formulae (33) follow from corollary 3. In proposition 9 substituting \frac{1}{1−u} by a we then obtain formulae (34)-(36) respectively by setting x = 0, x = −1 and x = 1.

By propositions 1 and 2 we obtain immediately the following combinatorial interpretations for the three sequences.

Corollary 11 For n > j ≥ 0 we have

a(n, k) = |{T ∈ T_{n+1, k}(→ ·) : deg_{T} (1) = 0}|,  (37)
b(n, k) = |T_{n, k}(→ ·)|,  (38)
c(n, k) = |T_{n, k}|.  (39)

The combinatorial interpretations (38) and (39) are respectively due to Shor [12] and Dumont-Ramamonjisoa [4]. In [4] Dumont and Ramamonjisoa also give a combinatorial interpretation for a(n, k) in terms of functions from [n] to [n]. To see the connexion of the latter interpretation and (37) we first note that any tree T ∈ T_{n+1, k}(→ ·) such that deg_{T} (1) = 0 can be identified with a tree T′ ∈ T_{n, k}(→ ·) with a single distinguished vertex by cutting the node 1 and rescaling any other node i to i − 1 for 2 ≤ i ≤ n + 1. Therefore it remains to find an adequate bijection between the set of all functions from [n] to [n] and the set of all rooted labeled trees on n vertices with a single distinguished vertex or vertebrates. We note that such a bijection has been found independently by Labelle [9] and Goulden-Jackson [6, p. 179-180].

5 Further remarks and open questions

From combinatorial point of view there are also some less obvious recurrences of Q_{n, k}(x). For example, the formula (2) of Ramanujan states, in terms of Q_{n, k}(x), that

Q_{n, k}(x) = (x + n − 1)Q_{n−1, k}(x) + Q_{n, k−1}(x) − Q_{n, k−1}(x − 1).  (40)

Comparing with (4) this is equivalent to the following:

Q_{n, k}(x) = Q_{n, k}(x − 1) + (n + k − 1)Q_{n−1, k}(x).  (41)

Now comparing the last formula with (4) and replacing x by x + 1 we deduce another formula for Q_{n, k}(x) given in [12] :

Q_{n, k}(x) = (x − k + 1)Q_{n−1, k}(x + 1) + (n + k − 2)Q_{n−1, k−1}(x + 1). (42)

We can of course verify the above identities by induction on n using (4). It would be interesting to find a combinatorial explanation of these recurrences.

References

[1] B. C. Berndt, R.J. Evens and B.M. Wilson: Chapiter 3 of Ramanujan’s Second Notebooks, Adv. in Math., 49(1983), 123–169.

[2] B. C. Berndt: Ramanujan’s Second Notebooks, Part I, chap. 3: Combinatorial analysis and series inversions, Springer-Verlag, 1985.

[3] L.C. Clarke: On Cayley’s formula for counting trees, J. London Math. Soc., 33 (1958), 471–474.

[4] D. Dumont et A. Ramamonjisoa: Grammaire de Ramanujan et Arbres de Cayley, The Electronic J. Combinatorics, 3(2) (1996), #R17.

[5] D. Foata: La série génératrice exponentielle dans les problèmes d’énumération, Presses Universitaires de Montréal, 1974.

[6] I. Goulden and D. Jackson: Combinatorial Enumeration, John Wiley, New York, 1983.

[7] F. T. Howard: Explicit formulas for numbers of Ramanujan, Fibonacci Quartly 24(2) (1986), 168-175.

[8] F. T. Howard and E. K. Hayashi: Congruences for numbers of Ramanujan, Fibonacci Quartly 27(1) (1989), 61-69.

[9] G. Labelle: Une nouvelle démonstration combinatoire des formules d’inversion de Lagrange, Adv. Math., 42(1981), 217-247.

[10] J. W. Moon: Counting Labelled Trees: A Survey of methods and results, Canadian Mathematical Congress, 1970.

[11] S. Ramanujan: Notebooks, Vol. 1, chap. II, P. 35-36, Tata Institute of Fundamental Research, Bombay, 1957.

[12] P. Shor: A New Proof of Cayley’s Formula for Counting Labelled Trees, J. C. T., Series A, 71 (1995), 154–158.