(Discrete Mathematics and Its Applications) István Mező - Combinatorics and Number Theory of Counting Sequences-CRC Press (2020)
(Discrete Mathematics and Its Applications) István Mező - Combinatorics and Number Theory of Counting Sequences-CRC Press (2020)
Number Theory of
Counting Sequences
Discrete Mathematics and Its Applications
Series Editors
Miklos Bona
Donald L. Kreher
Douglas West
Patrice Ossona de Mendez
István Mező
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
⃝
c 2020 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
This book contains information obtained from authentic and highly regarded sources. Rea-
sonable efforts have been made to publish reliable data and information, but the author
and publisher cannot assume responsibility for the validity of all materials or the conse-
quences of their use. The authors and publishers have attempted to trace the copyright
holders of all material reproduced in this publication and apologize to copyright holders if
permission to publish in this form has not been obtained. If any copyright material has not
been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted,
reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other
means, now known or hereafter invented, including photocopying, microfilming, and record-
ing, or in any information storage or retrieval system, without written permission from the
publishers.
For permission to photocopy or use material electronically from this work, please access
www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Cen-
ter, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-
for-profit organization that provides licenses and registration for a variety of users. For
organizations that have been granted a photocopy license by the CCC, a separate system
of payment has been arranged.
Foreword xv
2 Generating functions 33
vii
viii Contents
Appendix 381
Formulas 387
Tables 405
Bibliography 433
Index 473
Foreword
This book is, on one hand, an introduction to the theory of finite set partitions
and to the enumeration of cycle decompositions of permutations; on the other
hand, it is an extensive collection of references to newer works, and also, it
contains number theoretical results on counting sequences of set partitions
and permutations.
During writing, I tried to be as “combinatorial” as possible, prioritizing
“enumerative” proofs wherever it is feasible. Still, there is a large number
of analytic tools presented in the text, like generating functions (as there is
no modern combinatorics without these), asymptotics (which provide valuable
large-scale information on the studied sequences), and a bit of Riordan arrays,
Hankel determinants, and orthogonal polynomials, to mention a few.
I suppose that some (or many) of the readers of this book are new to the
topic. Therefore, I intended to be as elementary as possible so that a part of
the text is available even on a high school level. Enthusiasts such as teachers
and students can pick several identities from the book (especially Chapters
1, 6, 8–9), and can try to provide proof for them with a high probability of
success. The self-training reader will find the exercises useful at the end of the
chapters.
The book is useful for researchers also, as it collects vast information for
many counting sequences (especially related to set partitions and permuta-
tions). Some parts of the text (mainly in Chapters 8–9, 13) appear for the
first time in this book or in a unified way.
At the end of many chapters, there is an Outlook which guides the reader
towards new topics and discusses the available results in the literature which
do not fit in this book because of page limitations or because of the complexity
of the tools and proofs. Also, the Outlooks contain results with respect to
generalizations or some more particular subjects. These Outlooks, together
with an extensive Bibliography and Tables at the end, make the book usable
as a standard reference for combinatorialists working in the field.
An extremely useful and widely used tool in the everyday work of those who
deal with integer sequences is the On-line Encyclopedia of Integer Sequences
(OEIS). We shall occasionally cite entries from this encyclopedia via their IDs.
During the past centuries, a very large number of scientists have con-
tributed to this area. For non-contemporary authors, we tried to give a short
footnote with some very basic information so that the reader might guide
himself or herself when the particular discovery and contribution was made.
xv
xvi Foreword
No book is the sole contribution of its author. I would like to thank Prof.
Miklós Bóna for his guidance during the whole process of the preparation of
the text, and for his encouragement. I would also like to thank my colleague
and friend, José Luis Ramı́rez Ramı́rez, for the great number of suggestions,
corrections, and references. ¡Gracias, mi amigo!
Many thanks also go to Ayhan Dil for the suggestions and for the careful
reading of the text. I am thankful to Prof. Hacéne Belbachir for the discussion
about the Kurepa conjecture.
András Bazsó and Ákos Pintér supplied a number of sources for the third
part of the book. Gábor Nyul gave valuable suggestions and corrections.
I would like to also thank Jose Soto, Robert Ross, Paul Boyd, and Shashi
Kumar at CRC Press for their professionalism shown during the preparation
of the book.
Thank you, Pamela and Eszter, for supporting me during the writing of
the book, and understanding how the work of a mathematician is. ¡Las amo
mucho!
István Mező
About the Author
xvii
Part I
1
Chapter 1
Set partitions and permutation
cycles
1, 5|2, 3|4, 6;
meaning that the first and fifth person go into the first group, the second
and third go into the second one, and the fourth and sixth are being put into
the third group. The order of the groups does not count for now. Another
possibility is
1|2, 6|3, 4, 5.
We feel that the number of different possibilities is not small, especially if
there are more people to group. Concretely, there are 203 different groupings!
Later on, we shall see how to get this exact number easily.
The problem of grouping or partitioning2 objects is many hundred years
old. Even more interestingly, the first appearance of this question is not in
1 As the concrete entity that we are counting rarely matters, we can equally talk about
“objects,” or “elements” in general. What only matters is that our objects are distinguish-
able. This is expressed by the fact that we can put labels on our objects and say that this
is the first, that is the second, and so on.
2 We use the words “grouping” and “partitioning” interchangeably.
3
4 Combinatorics and Number Theory of Counting Sequences
a mathematical treatise but in a Japanese novel, The Tale of Genji from the
eleventh century. In mathematical work, this problem appears firstly in a 1796
paper of C. Kramp3 .
Let us study the question of partitioning in general and introduce the
following definitions.
• every object from A appears in one – and, by the previous point, in only
one – subset,
then we say that this collection of subsets is a partition of A. The subsets in
the collection are shortly called blocks.
Definition 1.1.2. The number of all the possible partitions of the n element
set A is the nth Bell number, denoted by Bn .
A = {1, 2, 3, 4, 5, 6}.
physical papers.
4 Eric Temple Bell (1883-1960), Scottish mathematician, writer and early science fiction
author.
Set partitions and permutation cycles 5
writing down all the partitions. We explicitly mentioned two partitions, which
are
{1, 5}, {2, 3}, {4, 6} and {1}, {2, 6}, {3, 4, 5},
where now we are using set notations.
In the place of the last one we could write B0 if we set B0 = 1 to make the
formula more consistent. Also, since 1 = n−10 and we can fix B0 = 1, this
formula can be rewritten as
n−1 n−1 n−1 n−1
Bn = · Bn−1 + · Bn−2 + · Bn−3 + · · · + · B0 .
0 1 2 n−1
Shortly,
n−1
X
n−1
Bn = Bn−k−1 .
k
k=0
n n
For the symmetry k = n−k of the binomial coefficients6 , we have that
Our formula can then be written in its final form, if we do the summation
“from right to left”:
n−1
X n − 1
Bn = Bk . (1.1)
k
k=0
This is a recursive formula or recursion, because it provides a method to
calculate a member of a sequence by using the formerly calculated members.
Let us use our newly found formula! As we fixed, B0 = 1. Moreover, as we
have already seen, B1 = 1, B2 = 2, B3 = 5. For B4 we use our new recursion:
4−1
X 4−1 3 3 3 3
B4 = Bk = B0 + B1 + B2 + B3 =
k 0 1 2 3
k=0
1 · 1 + 3 · 1 + 3 · 2 + 1 · 5 = 15.
B5 and then B6 can be calculated in a similar way, and now the reader can
easily verify that there are 203 possible grouping of six elements, indeed.
At the end of the book in Tables, one can find a table of the Bell numbers
up to B30 .
1|2|3|4
1|2|3, 4, 1|3|2, 4, 1|4|2, 3, 2|3|1, 4, 2|4|1, 3, 3|4|1, 2
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
1, 2, 3, 4
All the B4 = 15 possibilities are listed. It is obvious that there is only one
partition which contains one block and only one exists with the maximal num-
ber of blocks. The cases in between are far more interesting. Let us introduce
the following definition.
Set partitions and permutation cycles 7
it also tells us that we are talking about sets; sets are just limited by braces
{ and } in mathematical texts.
Our above example shows that
4 4 4 4
= 1, = 7, = 6, = 1.
1 2 3 4
A table of the first several Stirling numbers can be found at the end of the
book.
By the definition of nk we won a new formula for the Bell numbers:
n n n
Bn = + + ··· + . (1.2)
1 2 n
Thus, we see additional evidence as to why B4 = 15: 15 = 1 + 7 + 6 + 1. The
relation between the Bell and Stirling numbers of the second kind is obvious,
because any partition is either a 1-partition, or a 2-partition, etc. Relation
(1.2), however, does not help us at all to calculate Bn if we do not know how
to calculate the individual Stirling number terms in the sum.
Certainly,
n n
= = 1.
1 n
7 While “ n ” is pronounced as “n choose k”, “ n
k k
” is read as “n subset k”.
8 Niels Nielsen (1865-1931), Danish mathematician.
9 James Stirling (1692-1770), Scottish mathematician. He calculated the Stirling num-
bers in his 1730 work Methodus Differentialis [539]. He studied the second kind of Stirling
numbers first, and then he went to the first kind case. Exactly as we do in this chapter.
10 In place of the widely used notation n , sometimes C k is used. The former was in-
k n
troduced by Andreas Freiherr von Ettingshausen (1796-1878), Austrian mathematician and
physicist in 1826. Ettingshausen developed some influential lecture notes at the Univer-
sity of Vienna, and he wrote a book [223] on combinatorial analysis in 1826 in which the
mentioned notation for the binomial coefficients first appeared. The notation n
k
for the
Stirling numbers of the second kind is more than a century younger: Jovan Karamata
(1902-
1967), Serbian mathematician invented it in 1935. Therefore, we also call the n k
notation
(and the later introduced notation n
k
) as Karamata notation. See [227, 262, 336] on these
questions but note that in [336] the credit was still given to I. Marx and A. Salmeri.
8 Combinatorics and Number Theory of Counting Sequences
elements into 2 blocks, one block will contain the first element. For any other
element from the n − 1, we have two possibilities: this element is contained in
the block of the first element 1, or it is contained in the other block. These
offer 2n−1 possibilities for the n − 1 elements. But it is not possible that all of
the n−1 elements go to the block of 1, because this would be a 1-partition and
not a 2-partition. Hence, we have to subtract this unique possibility. Thus,
n
= 2n−1 − 1. (1.3)
2
n
Determining n−1 is also simple: n elements can go to n − 1 (always non-
empty) blocks if all the blocks contain one element, but one block contains
two elements. If we fix those two elements which go into this block, we are
done. Two elements from n can be chosen in n2 ways; therefore11
n n
= .
n−1 2
We can compare these results with the partition in the example. An n-set
can have 2-partitions in the amount of 42 = 24−1 − 1 = 7 and 3-partitions
in the amount of 43 = 42 = 6.
Let us go further to find more ways to calculate the second kind of Stirling
numbers. If we have an n-set and a k-partition, there are two cases.
12
1. The first element is alone in its
n−1 1-block . Then the other n − 1
own
elements form k − 1 blocks in k−1 ways.
2. The first element shares a block other elements. The other n − 1
with
elements form a k-partition in n−1k possible ways, and we put the first
element in one of these. To perform this
insertion, we have k options.
This yields that in this case we have k n−1
k possibilities.
These two cases together give a simple calculation method for the Stirling
numbers of the second kind:
n n−1 n−1
= +k . (1.4)
k k−1 k
11 Note that the order of the blocks does not count.
12 1-blocks will also be called singletons.
Set partitions and permutation cycles 9
There
are some reasons we will meet later which suggest that we would better
set 00 to be one and not to be zero. We therefore fix
0
= 1.
0
Let us suppose that the block of the first element contains m objects and
that there are k blocks in total. If we consider
the partition of the rest of the
elements, then they go to k − 1 partitions on n−mk−1 possible ways. The m − 1
n−1
elements that are in the block of the first element can be chosen m−1 ways.
Since m is arbitrary between 1 and n, we must sum up its possible values.
The following important result follows:
X n
n n−1 n−m
= . (1.5)
k m=1
m−1 k−1
We now depart from the Stirling numbers of the second kind and we go
to meet with the first kind Stirling numbers. These, at first sight, seem to be
rather different from the second kind Stirlings, but there is a deep connection
between the two. This connection will be seen in Section 1.5.
10 Combinatorics and Number Theory of Counting Sequences
Cycles
The permutations are often described by the following method. In the first
line of a two-line table we put the labels of the elements, and in the second
line we put their orders after permuting them. For example, if we consider the
elements 1, 2, 3, 4 and we put them in the order 2, 4, 1, 3, then we have this
table:
1 2 3 4
. (1.6)
2 4 1 3
Now let us see a longer permutation. For instance:
1 2 3 4 5 6
.
3 1 2 6 4 5
Note that the first three and second three elements are “mixing” among them-
selves. In other words, this permutation can be rewritten as a “product” of
two smaller permutations:
1 2 3 4 5 6
and .
3 1 2 6 4 5
above 1 goes to the third place, 3 goes to the second place, and 2 goes to the
first position, where 1 was before. For this reason it is very useful to introduce
the following cycle notation:
1 2 3
= 1 3 2 .
3 1 2
If we have more than one cycle, we just write them down one after another:
1 2 3 4 5 6
= 1 3 2 4 6 5 . (1.7)
3 1 2 6 4 5
Now 3 forms a cycle of length one, the 1, 2, 4 elements form another cycle:
1 2 3 4
= 1 2 4 3 .
2 4 3 1
In this case we say that 3 is a fixed point of the permutation, since it stays in
its original position.
We should note that in a cycle the order of the elements do matter, but
the following cycles are still identical:
1 2 3 = 3 1 2 = 2 3 1 .
These cycles are related to each other by right shifts. In the initial cycle, we
shift the elements to the right, and the outgoing element on the right comes
back on the left.
One might note also that if we rewrite a permutation using this cycle
notation (as in (1.7)), the order of the cycles is indifferent.
We introduce two special permutations: the identical permutation, or iden-
tity is a permutation in which every element is a fixed point. Moreover, a
transposition is a permutation in which only two elements are interchanged.
A transposition is therefore constituted by a cycle of length two and possibly
some fixed points.
that we can ask an analogous question: how many permutations are there
with k cycles? The answer, as the reader might expect, is given by the Stirling
numbers of the first kind.
Definition 1.4.1. The Stirling number of the first kind with parameters n
and k gives the number of permutations of length n with k cycles. This number
is denoted by nk 15 .
The first kind Stirling numbers are sometimes called Stirling cycle num-
bers 16 .
To know the nk numbers a bit more profoundly, let us take an example. We
In this sense we meant above that n! and Bn are duals of each other,
compare (1.8) with (1.2).
For some special parameters, the first kind Stirling numbers can be calcu-
lated easily. For instance,
n
= (n − 1)!,
1
because in the only one cycle in which all the elements must appear (in n!
different possible orders) the right shifts do not alter the permutation (see the
end of the last section). Hence, n! must be divided by the number of possible
right shifts. The number of the latter is n, so n1 = n!/n = (n − 1)!, as we
stated.
15 This notation was also introduced by Karamata.
16 The British Museum guards a manuscript of Thomas Harriot (1560-1621, English math-
ematician, ethnographer, translator; he was the first in depicting the moon by using a
telescope) from the seventeenth century in which these numbers appear.
Set partitions and permutation cycles 13
On the other hand, a permutation with n elements can have n cycles only
if every element happens to be in its own cycle (so that these are fixed points):
n
= 1.
n
1. We have n − 3 fixed points and three goes into one cycle. Then we have
to choose these three elements: n3 choice. (We can choose the n − 3
n
= n3 .) In the 3-cycle there are
fixed points, but this is the same: n−3
two possible arrangements of the elements, so we have to multiply n3
by 2.
2. We can have two 2-cycles (transpositions). We have to choose two el-
ements into each of these transpositions: to do this we have n2 n−2 2
choices. But the order of the two transpositions is indifferent, thus we
divide by 2.
but
2 1 3 5 4 6
is a different permutation belonging to the partition
After having some special values, let us try to find a recursive formula
for the first kind Stirling numbers similar to (1.4) in the second kind case.
It is worth it to read the proof of (1.4) again, because the basic idea can be
applied here, too. Forming a k-cycle decomposition on n elements, we have
two possibilities.
1. The first element is in a 1-cycle (i.e.,it is a fixed point), and the rest of
the elements form k − 1 cycles: n−1 k−1 cases.
2. The first element is in a cycle longer than one. Then we already have k
cycles on n − 1 elements: n−1
k . We have to insert the first element into
one of the cycles: this can be done in n − 1 ways: at the first position
of the cycles, or between the elements; if we insert it at the end of the
cycles, we do not have new permutation by the shift invariance.
Having this recursion, we can find the special value n2 easily. By the
recursion,
n n−1 n−1 n−1
= (n − 1) + = (n − 1) + (n − 2)!
2 2 1 2
More concretely, if n = 3 or 4:
3 2 2 1
= 2 + = 2 · 1 + 1! = 2! 1 +
2 2 1 2
4 3 3 1 1 1
= 3 + = 3 · 2! 1 + + 2! = 3! 1 + + ,
2 2 1 2 2 3
and, in general,
n 1 1 1
= (n − 1)! 1 + + + · · · + .
2 2 3 n−1
The sum on the right-hand side is denoted by Hn−1 and it is called harmonic
Set partitions and permutation cycles 15
number 17 . Using this abbreviation, the above line can be written, after a
reparametrization, as
1 n+1 1 1 1
= Hn = 1 + + + · · · + . (1.10)
n! 2 2 3 n
We shall meet with the harmonic numbers later in Chapter 8.
of a given tone is a tone with a frequency that is a positive integer multiple of the frequency
of the original tone. The original tone is also called the first harmonic. As the wavelength
is the reciprocal of the frequency, the nth harmonic of a given tone has the wavelength
1/n-times the original.
16 Combinatorics and Number Theory of Counting Sequences
The first is called (double) couplet, the second is an alternate rhyme, the third
is an enclosed rhyme, while the fifth is a rubaiyat19 .
Such rhymes can be related to set partitions by the following correspon-
dences: elements ↔ lines, and blocks ↔ letters of rhymes:
Similarly, one can generalize this for more lines and more rhyme schemes.
At the end of the process and summing over all the possibilities, we have that
the nth Bell number gives that how many rhyme schemes can be there in a
poem of n lines.
such partitions. However, the different orders of the blocks result in different
functions; hence we have to multiply nk by k! to get the total number of
surjective functions.
We thus get that the number of surjective functions
is
n
k! .
k
With these preliminaries we can prove a nice identity. We have seen above
that the total number of functions of the form (1.12) is k n . It can also be
seen that every such function is surjective on some subset B ⊂ {1, 2, . . . , k}.
The number of the elements of B is denoted by |B|. If we sum over the
number
n of surjective functions on all the possible sets B (and this number is
|B|! |B| ), we get the number of all (not necessarily surjective) functions on
the n elements: k n . In symbols,
n
X n
k = |B|! .
|B|
B⊂{1,2,...,k}
k
B can be chosen in |B| ways, hence instead of summing over B we can sum
over 1 ≤ m = |B| ≤ k:
k X k X n
X k n k! n n
kn = m! = = k(k −1)(k −m+ 1).
m=1
m m m=1
(k − m)! m m=1
m
(We can extend the sum to n if m > k, because the product k(k −1)(k −m+1)
will be zero.) That is,
n
X n
k(k − 1)(k − m + 1) = k n .
m=1
m
do count. Indeed: the first ball can go into one of the k boxes; k possibilities.
The next ball can go into the k − 1 empty boxes or into the box where the
previously selected ball is put, but here we have two options: the new ball
goes to the left or to the right of the other one: k − 1 + 2 = k + 1 possibilities.
The reader sees that this continues in a similar manner.
Next, let us see how this ball selection process is related to the right-hand
side of (1.13). We put the balls in a given order (i.e., we make a permutation
of the balls). If this permutation
n has m cycles (1 ≤ m ≤ k), then the number
of such permutations is m . Every cycle corresponds to a box, and the balls in
the given cycle go into this box. There are k m such mappings, as we saw earlier.
Finally, we sum up the possible values of m to arrive at the identity (1.13).
As we saw, there are ten 2-regular partitions on six elements. The following
partition is a 3-regular partition of a 7-set:
1, 4, 7|2|5|3, 6.
At first sight, we might think that the d-regular partitions offer result in a
very different class of numbers from that of the nk numbers, but the truth
is that the d-regular partitions are counted by the Stirling numbers of the
second kind after a simple reparametrization. Indeed, we are going to show
that the total number of d-regular k-partitions of an n-set is
n−d+1
. (1.14)
k−d+1
This fact can be proven in an elegant and clever way. The proof is a bijective
proof . This means that we try to establish a bijection (one-to-one correspon-
dence) between two combinatorial arrangements; hence proving that in the
two arrangements there are the same number of objects.
Let us imagine a triangle shaped table with n − 1 columns. In the first
(leftmost) column there are n − 1 cells, in the second column there are n − 2
cells, and so on. The rightmost column contains only one cell. By reasons
which will be clear later on, we lengthen the bottom and leftmost lines of the
table, as it is seen below in the particular case when n = 11:
Now we recall the role of rook s in chess. The rooks can move horizontally
22
and vertically . On our triangle-shaped table, one can place n − k rooks in
exactly nk ways such that there is no pair of rooks in the same row or column
(so that the rooks do not attack each other). A possible arrangement is shown
here:
21 The names d-Fibonacci partition and non-consecutive partition are also used.
22 Rook arrangements often appear in enumerative combinatorics.
20 Combinatorics and Number Theory of Counting Sequences
R
R
R
R
Next, number the lines from top to bottom and left to right, including the
lengthened tiny lines:
1
6 R
7
8 R
9 R
10 R
11 R
1 2 3 4 5 6 7 8 9 10 11
Now place the rooks applying the following rule: considering a k-partition
on an n-set, we put a rook in the ith column and jth row if and only if i and
j satisfy the following conditions:
1. i and j are in the same block,
2. i < j,
3. there is no third element between i and j in their blocks.
Such an i, j pair of elements is called arc of a partition. Let us take a
6-partition on 11 elements:
1, 9; 2, 6; 6, 10; 4, 8; 7, 11
2 ×
3 × ×
4 × × ×
5 × × ×
6 R × × ×
7 × × ×
8 R × × ×
9 R × × ×
10 R × × ×
11 R × × ×
1 2 3 4 5 6 7 8 9 10 11
because the d-regular partitions can be counted by the usual Stirling numbers
of the second kind (see (1.14)).
Here we introduce an important subclass of permutations when the ele-
ments must be in a “zigzag” form. This definition will result in a new and
interesting counting sequence. For example,
1 2 3 4 5
3 1 4 2 5
Similarly, this permutation is down-up zigzag if, instead, their elements satisfy
the inequalities
i1 < i2 > i3 < · · · .
The down-up zigzag permutations are also called alternating, while the up-
down zigzags are often named as reverse alternating.
The reverse
1 2 3 ··· n
in in−1 in−2 · · · i1
of a down-up zigzag is an up-down zigzag, and vice versa. Therefore, it is
enough to introduce only one sequence to count the number of (up-down or
down-up) zigzag permutations. The number of up-down zigzag permutations
on n elements is denoted by En and called the Euler number sequence. The
fundamental properties of the zigzag permutations were studied by Désiré
André23 in 1879 [26], see also [27, 28].
On four elements there are E4 = 5 down-up zigzags:
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
, , , ,
2 1 4 3 3 2 4 1 3 1 4 2 4 2 3 1
and
1 2 3 4
.
4 1 3 2
23 Désiré André (1840-1917), French mathematician.
Set partitions and permutation cycles 23
For any n ≥ 1
n
X n
2En+1 = Ek En−k . (1.16)
k
k=0
In this subsection we write out only the second line and we left the parenthesis.
This shortens our formulas, and we do not lose any information. So π will look
like24 π = 634152879. We split this permutation into two parts, according to
its minimal element: 634 and 52879. Splitting these again with respect to
their minimal elements, we get 6, 4, 5, and 879. Finally, the only splittable
subpermutation is 879 which splits into 8 and 9. This splitting process together
with the minimal elements and the final remainders can be arranged in a shape
which we call tree:
24 This short notation is called word representation.
24 Combinatorics and Number Theory of Counting Sequences
More precisely, such a tree is called labeled increasing plane 2-tree. Labeled,
because the edges (nodes) of the tree have their labels; increasing25 , because
the labels increase on any path going downwards; plane, because the order of
the elements stemming to the left or right (the children) from a given edge
(like 3 and 4 from 2) matters; 2-tree, because every edge must contain two
children if it is not a terminal node. A terminal node is called leaf.
We have to note, however, that this correspondence (which is, we shall
see immediately, bijective!) between zigzags and 2-trees works only when the
number of elements in the permutation (and the number of edges in the tree)
is odd. It is easy to see that there is no labeled non-decreasing plane 2-tree
of even edges. How can we recover the bijective relation between zigzags and
trees? We consider a zigzag on an odd number of elements: i1 i2 · · · in−1 , then
try to insert n. In order to keep the zigzag property, n cannot be inserted
wherever we want. We are going to show that we have only one option. n
must be inserted somewhere where we have ik < ik+1 , so that ik < n > ik+1
(obviously, n cannot be inserted in a place where ik > ik+1 , because it would
immediately break the zigzag property). This seems to be okay as far as we
do not consider the element next to ik+1 : ik < ik+1 > ik+2 now turns to be
ik < n > ik+1 > ik+2 , which is not acceptable. The only way out is that ik+1
is the last element in the permutation. In the corresponding tree, this yields
that n appears as the leaf stemming out from the rightmost edge (to the left).
To illustrate this, insert n = 10 into the above permutation π = 634152879.
The resulting tree is
25 We admit that adding both adjectives “labeled” and “increasing” is somewhat super-
fluous, because the increasing property is defined only for labeled trees.
Set partitions and permutation cycles 25
Exercises
1. Calculate the fifth and sixth Bell number by using the recursion (1.1).
2. Write down all the 4-partition of {1, 2, 3, 4, 5}. (There are 10.)
3. Show that n3 = 92 3n−3 − 4 · 2n−3 + 1/2 (n ≥ 3).
4. Prove that X n
n+1 n m
= .
k+1 m=0
m k
into cycles.
7. Give all the 4-partitions of a 5-set. (There are 10.)
8. How many configurations are there if we would like 10 persons to sit
around four round tables such that none of the tables can be empty?
9. Show that the number of ways a product of n distinct primes can be
factored is Bn .
10. Prove the pair of (1.5):
X n
n n m
= .
k m=0
m k−1
11. Compute the first six lines of the first kind Stirling triangle.
12. Write a computer algorithm which calculates the Stirling numbers of
the first kind applying the recursion (1.9).
13. In how many ways can we give n coins to k people, if each person receives
at least one coin?
14. How many functions are there which map n elements into k elements,
such that none of the k images appears more than once (such function
is called invertible or injective)?
Set partitions and permutation cycles 27
1, 2, 6, 7, 8|3, 4, 9|5.
6 R
7 R
8 R
9 R
10 R
11
1 2 3 4 5 6 7 8 9 10 11
21. The increasing non-plane 1 − 2 trees are trees such that the non-leaf
edges can have one or two children, and the order of the children does
not matter (if there is only one child, it can go to the left or right; this
makes no difference). Prove that the number of such trees is En . (So
En counts at least two different tree classes.) (Hint: the combinatorial
28 Combinatorics and Number Theory of Counting Sequences
Outlook
1. The harmonic numbers are related to overhanging deck packings. See
[566] for a good source of the description and discussion of the problem.
Examples
f (x) = a0 x0 + a1 x1 + a2 x2 + a3 x3 + · · ·
bers.
2 [262] is a good source also for the basics of Stirling numbers. The books [597] and
[235] are other excellent sources for those who want to study the interrelationship between
combinatorics and analysis. A good introduction to generating functions is Chapter 8 in [82],
but the whole book [82] is worth reading for a wide scope introduction to combinatorics.
33
34 Combinatorics and Number Theory of Counting Sequences
f (x) = 1 + x + x2 + x3 + · · · + xn .
xf (x) = x + x2 + x3 + · · · + xn+1 .
Subtracting this from the above, we see that only two members survive on the
right-hand side:
f (x) − xf (x) = 1 − xn+1 .
This can be rewritten as
1 − xn+1
f (x) = . (2.1)
1−x
We have proven a handy calculation formula for sums of increasing powers of
a fixed number. Let us take an example. Let x = 3 and n = 10. Then
1 − 311
f (3) = = 88 573.
1−3
Let us move on and take infinite sequences. For instance, let every an = 1.
n+1
Since f (x) = 1−x1−x for any n, (2.1) is valid for every n. But if we try to
apply it to x = 3, the numerator becomes larger and larger as n grows. At the
end, we get that the infinite sum of the powers of 3 is infinity – an obvious
fact.
But if x is small, like x = 21 , then the powers of x in (2.1) become smaller
and smaller. In this case, if n tends to infinity, this argument results that xn+1
is negligibly small in the expression of f (x). Hence,
1
f (x) = 1 + x + x2 + x3 + x4 + · · · = . (2.2)
1−x
We can shed more light on this argument by taking another example. Let
1
x = 10 . Then
1 1 1 1 1
f = 1+ + + 3 + 4 + ···
10 10 102 10 10
= 1 + 0, 1 + 0, 01 + 0, 001 + 0, 0001 + · · ·
= 1, 111111 . . .
(2.2) 1 10
= 1 = 9 .
1 − 10
Generating functions 35
This is useful also because it can be generalized easily for arbitrary (not only
finite) an , bn sequences. The product of the generating functions of these se-
quences is then
∞ n
!
X X
n
f (x)g(x) = x ak bn−k . (2.5)
n=0 k=0
(From now on, we frequently use the sum symbol, hence the formulas will be
more readable and compact.) This product is called Cauchy5 product. In what
follows, we will always use the Cauchy product and never will use products
like (2.4). Hence, if we talk about the product of two generating functions,
the coefficients in the product are always taken to be as Cauchy’s product
dictates.
5 Augustin Louis Cauchy (1789-1857), French mathematician.
Generating functions 37
Here xk and x−k cancel and the resulting xn can be carried out from the inner
1 1 1 n 1
sum. Moreover, k! (n−k)! = n! k , and n! can also be carried out. The result
is
∞ n
!
X xn X n
f (x)g(x) = ak bn−k . (2.7)
n=0
n! k
k=0
Pn
The inner sum k=0 nk ak bn−k will play a very important role, see Section
2.3.
38 Combinatorics and Number Theory of Counting Sequences
∞ n
!
f (x) X X
= xn ak · 1 .
1 − x n=0
k=0
f (x)
Therefore, 1−x is the generating function of the partial sums of an :
f (x)
= a0 + (a0 + a1 )x + (a0 + a1 + a2 )x2 + (a0 + a1 + a2 + a3 )x3 + · · · .
1−x
These observations are valid for ordinal generating functions. In the ex-
an−1
ponential case, we get that xf (x) belongs to (n−1)! , and f (x)/x belongs to
an+1
(n+1)! .
In the third case, the exponential generating function of bn = 1 is ex , and
we have to apply (2.7):
∞ n
!
n
X x X n
f (x)ex = ak . (2.8)
n=0
n! k
k=0
The coefficient in the sum on the right-hand side is the binomial transform
of an . This is an important transformation, we will turn back to this notion
in Section 2.3.
∞ ∞
Z Z X ! Z
1 1 n 1X
f (x)dx = an x dx = an xn dx =
x x n=0
x n=0
∞ ∞
1 X xn+1 X an n
an = x .
x n=0 n + 1 n=0 n + 1
termwise. The series must converge uniformly. However, inside the radius of convergence
this always satisfies.
40 Combinatorics and Number Theory of Counting Sequences
Of course, one could add more and more rules dividing or multiplying by
x2 , differentiating two times, and so on. We will practice these tricks many
times in the course of this book, so here we mention just one additional exam-
ple: let us find the generating function of bn = n. We can take, for instance,
the sequence an = 1 and then nan will exactly be bn . The first transforma-
tion of this section says that the generating function of nan is xf ′ (x). Now
1
f (x) = 1−x , so
∞ ′
X 1 x
nxn = x = .
n=1
1 − x (1 − x)2
x
Thus, the generating function of bn = n is (1−x)2 .
and the nth term of the sum: an xn . If we take the derivative of this function n
times, the terms with powers smaller than n disappear. In addition, the first
not disappearing term, an xn , turns to be an nxn−1 after the first derivation,
then an n(n − 1)xn−2 after the second derivation, and finally an n(n − 1) · · · 2 ·
1x0 = an n! after taking the nth derivative. If we now substitute x = 0 into
the nth derivative, all the terms with power higher than 0 disappear, and
the value of this derivative at zero will be n!an . Dividing by n!, we have the
fundamental fact that
1 (n)
f (x) = an . (2.9)
n! x=0
Here the vertical line and x = 0 in the lower index means that we substitute
x = 0 into the derivative. If f (x) is an exponential generating function, then
it is equally easy to see that we do not divide by n!:
f (n) (x) = an . (2.10)
x=0
To take an example, we look for the sequence an for which the sine function
Generating functions 41
Similarly,
1 1
sin(1) (x)
a1 = = cos 0 = 1.
1! 1!
x=0
1 (2)
1
a2 = sin (x) = − sin 0 = 0.
2! 2!
x=0
1 (3)
1 1
a3 = sin (x) = − cos 0 = − .
3! 3! 3!
x=0
1 1
sin(4) (x)
a4 = = sin 0 = 0.
4! 4!
x=0
1 1 1
sin(5) (x)
a5 = = cos 0 = .
5! x=0 5! 5!
n
(−1)
We see that, in general, a2n+1 = (2n+1)! , and the even indexed an s are all
zero7 . We have the following statement for the sine function:
∞
X (−1)n 2n+1
sin x = x .
n=0
(2n + 1)!
From this nice expansion8 – and from the geometrical fact that sin π2 = 1 –
comes the nice infinite sum identity:
∞
X (−1)n
2n+1 (2n + 1)!
π 2n+1 = 1.
n=0
2
Many classical functions from analysis (like some hyperbolic functions, and
the trigonometric functions in general) are generating functions of sequences
having combinatorial meaning. This branch of mathematics is on the border
of combinatorics and analysis and it is called combinatorial trigonometry 9
7 If the reader is familiar with the notion of odd and even functions, she/he maybe knows
that sine is an odd function. This is so, because the even powers of x disappear in its
expansion. In generating function vocabulary, the even indexed members of the generating
sequence are zero.
8 This is also called the Taylor-expansion of the sine function.
9 A nice comprehensive treatment of this narrow area of mathematics is due to Arthur
n n
In this case an = x and bn = (x + 1) . The binomial transform is naturally
applicable on polynomial sequences.
We can invert the transform to get back an from bn in the above example.
We just need to substitute x + 1 in place of x and −1 in place of y:
n
n n
X n
(x + 1 − 1) = x = (x + 1)k (−1)n−k .
k
k=0
A similar approach works in general (the one line proof is seen below). If
n
X n
bn = ak , (2.11)
k
k=0
then
n
X n
an = (−1)n−k bk . (2.12)
k
k=0
This is the binomial inversion theorem. Applying this, say, to the Bell numbers
we readily get a new formula for them:
n
X n
Bn = (−1)n−k Bk+1 .
k
k=0
Generating functions 43
The proof of the binomial inversion theorem is just one line if we apply
exponential generating functions. If we note that the exponential generating
function of the transformed sequence is always ex f (x), so, to get back f (x)
we simply multiply by e−x .
The results in the above section can be rephrased in matrix form; this
approach can result in more comprehensive formulas and might be easier to
generalize.
Looking at the right-hand side of (2.11), we see immediately that it is, in
fact, a matrix multiplication. Considering the so-called Pascal10 matrix
0
0 0 0 · · · 0
1 1
0 · · · 0
20 1
2 2
Bn = 0
1 2 · · · 0
(2.13)
. . . . .
.. .. .. .. ..
n
n n
0 1 ··· ··· n
(Here we supposed that n is even, hence the last line begins with a positive
number. The sign of nk is always (−1)n−k in the inverse matrix).
quence of the rising factorials. We will meet these later and introduce them
in more details. For the moment, we just remark that
∞
X xk
1
= nk ,
(1 − x)n k!
k=0
11 The collected works of Euler appeared in a sequence of books entitled Opera Omnia (this
term is not referring only to Euler’s work; it is a Latin term meaning “Complete works”).
This result is contained in the 10th volume of the first series. The whole collection contains
79 volumes! See the Euler archive http://eulerarchive.maa.org/ for the compilation.
Generating functions 45
The double sum can be rewritten if we note that every index and power is of
the form n or n + k. We keep the outer summation index n, then the inner
index is m = n − k:
∞ ∞ ∞
X X n + k n+k X n X n
an x = x am .
n=0
n n=0
m
k=0 m=n−k
We also know that the derivative of f (x) gives the exponential generating
function of Bn+1 , that is,
f (x)ex = f ′ (x). (2.15)
x
Which function can be f (x)? We can easily see that f (x) = ee is a suitable
function satisfying the above differential equation. Equation (2.15) can be
multiplied by any real number c, cf (x) is also a solution. What distinguishes
the actual exponential generating function of the Bell numbers in the whole
class cf (x)? We know from the theory of generating functions that f (0) is
the zeroth coefficient in the series expansion of f (x) (see (2.9)). The zeroth
0
coefficient is B0 = 1 in our case. Since cee = ce, we infer that c = 1e . We
determined the exponential generating function of the Bell numbers:
∞
X xn 1 x
Bn = ee . (2.16)
n=0
n! e
46 Combinatorics and Number Theory of Counting Sequences
This result has a nice and immediate consequence that shows why the
generating functions are so useful. This consequence is the Dobiński formula.
On the left-hand side, there is the exponential generating function of the Bell
n
numbers; therefore, on the right-hand side the coefficient of xn! must be Bn 13 .
We deduced the formula of Dobiński:
∞
1 X kn
Bn = . (2.17)
e k!
k=0
Therefore, the Bell numbers can be represented by infinite sums. If, in partic-
ular, we take n = 4, we have
1 04 14 24 34 44 54 64 74
+ + + + + + + ≈ 14, 9548
e 0! 1! 2! 3! 4! 5! 6! 7!
One more term gives 14, 992. Remember: the exact value is B4 = 15.
Interestingly, the Dobiński formula can be deduced via probability theory
[467, 498].
12 G. Dobiński – We could not find information on him. The paper in which his formula
appears is [205]. The Internet Archive [206] contains a digitalized copy of Dobiński’s original
work. No affiliation is visible there.
13 If two generating functions are equal, they must belong to the very same sequence. This
The inner sum is the nth Bell number. Note that the sum on k is a finite sum,
because if k > n the members of the sum are all zero. So
∞ ∞
X X xn
fk (x) = Bn .
n=0
n!
k=0
This is actually not a proof, because there might be many function sequences
x
summing to ee −1 . To justify this conjecture, we recall the recursion (1.4):
n n−1 n−1
= +k .
k k−1 k
ex = ex
This formula not only provides an easy calculation of the second kind Stirling
n
numbers,
n but it shows one more thing. The inverse binomial transform of l
is k! k (see (2.12)). Hence, (2.11) yields that
n X n
n
X k n n
k = m! = k(k − 1) · · · (k − m + 1).
m=0
m m m=0
m
This is nothing other than our former identity on page 17 which we deduced
on a combinatorial way there!
Generating functions 49
Identity (2.21) appears in the following sources: [467, Eq. (21)], [597, Sec-
tion 1.6].
x
f1 (x) = ,
1−x
x2
f2 (x) = ,
(1 − x)(1 − 2x)
and in general
xk
fk (x) = .
(1 − x)(1 − 2x) · · · (1 − kx)
The ordinary generating function of the Stirling numbers of the second kind
is then:
∞
X n n xk
x = . (2.22)
n=0
k (1 − x)(1 − 2x) · · · (1 − kx)
The function on the right-hand side seems to be too complicated but can
be simplified by some tools we have not yet known. In Section 8.4 we turn
back to this question and offer a satisfying answer.
A consequence of (2.22)
Knowing (2.22) we can deduce yet another formula for the nk numbers.
we look for the original sequence. If we would do the reverse we got back (1.5)
(see the exercises at the end of the chapter and exercise 4 in Chapter 1).
Let k be fixed and we look for an with generating function f (x), supposing
that the binomial transform of an is nk . Upon this setting, we know that the
recently deduced generating function equals to the Euler-transformed form of
f (x) (see (2.14)):
xk
1 x
= f .
(1 − x)(1 − 2x) · · · (1 − kx) 1−x 1−x
Generating functions 51
1 x
Multiplying by 1−x and substituting 1+x in place of x14 , we get that
k
x
x 1+x
f (x) = 1−
1+x 1− x x
1 − 2 1+x x
· · · 1 − k 1+x
1+x
xk
1 (1+x)k
= 1+x−x 1+x−2x 1+x−kx
1+x 1+x 1+x · · · 1+x
k
1 x
=
1 + x (1 − x)(1 − 2x) · · · (1 − (k − 1)x)
x xk−1
=
1 + x (1 − x)(1 − 2x) · · · (1 − (k − 1)x)
∞
x X n
= xn .
1 + x n=0 k − 1
hence
∞ ∞
! !
X X
n n+1 n
f (x) = (−1) x xn
n=0 n=0
k − 1
∞ n !
X X n − m
= (−1)m xm+1 xn−m
n=0 m=0
k−1
∞ n !
m n−m
X X
n+1
= x (−1) ,
n=0 m=0
k−1
by the definition of the Cauchy product. It follows that f (x) is the generating
function of
n−1
X n−1−m
(−1)m
m=0
k−1
(if n = 0 this equals 0 – empty sums are always zero). Its binomial transform
is nk :
X n Xl−1
n n m l−1−m
= (−1) .
k l m=0 k−1
l=0
the harmonic numbers. In this section, this observation will be generalized and
it will be shown that not only the k = 2 lower parameter leads to harmonic
numbers but any k.
Our first approach is based on the exponential generating function, the
second approach (what we postpone until p. 63) will be based on the horizontal
generating function to be introduced in the next section.
1
It is easy to see by integration that the function ln 1−x = − ln(1 − x) is
the generating function of a0 = 0, an = 1/n (n > 0).
Hence, for its square,
∞ n 2 ∞
!2
1 X xn
X n x 1 1
= ln = =
n=0
2 n! 2! 1−x 2 n=1 n
∞ n−1
1X nX 1 1
x .
2 n=1 kn−k
k=1
Generating functions 53
holds whenever n ≥ 2.
The reader can easily prove that
n−1
X 1 1 2
= Hn−1 , (2.24)
kn−k n
k=1
n−1 n−1
1X n! 1X n 1
= = (2n − 2) = 2n−1 − 1.
2 k!(n − k)! 2 k 2
k=1 k=1
The proof of these can be worked out as follows. By (2.23) we have that
∞ n k
X n x 1 1
= ln .
n=0
k n! k! 1−x
1
Since − ln(1 − x) is the generating function of n,
k
∞ n ∞
X n x 1 X xj
= .
n=0
k n! k! j=1 j
∞ j−1 ∞
X X 1 X X 1
xj = xj .
j=1
l(j − l) j=1 j +j =j j1 j2
l=1 1 2
Generating functions 55
This is already enough to see how we can get the general case (2.26) for
arbitrary k.
In the second kind case, we have the powers of ex − 1, and this is the
1
exponential generating function of n! (if n ≥ 1); therefore, we see why the
factorials appear in (2.27) – the other steps are the same.
The other couple of identities ((2.28)-(2.29)) can be proven similarly but
now in place of the Cauchy product we use the polynomial theorem from the
Appendix. Again from (2.23) we know that
∞ n k
x x2 xn
X n x 1
= + + ··· + + ··· .
n=0
k n! k! 1 2 n
In this expression, the power of x is 1j1 + 2j2 + · · · + njn , and this sum must
be equal to n to match the coefficients on the two sides. This gives the other
condition for the sum in (2.28).
The representation (2.29) can be proven similarly.
As a consequence, we can easily have a new sum representation for the
Bell numbers. We just have to sum over k in (2.29). The terms with k > n
are zero, so
j 1 j2 j n
X n! 1 1 1
Bn = ··· . (2.30)
j1 +2j2 +···+njn =n
j1 !j2 ! · · · jn ! 1! 2! n!
j1 +j2 +···+jn ≥0
j1 + 2j2 + · · · + njn = n.
These classes can be ordered in ji ! ways. The individual elements in the classes
56 Combinatorics and Number Theory of Counting Sequences
have i! different orders, and there are ji blocks so the total number of orders
is (i!)ji .
For example, if j2 = 3 then two-two-two (6 in total) elements are put in
three blocks. There are 3! = j2 ! order of the blocks, and in the three individual
blocks the order of the elements is 2! and 2!2!2! = (2!)j2 in total.
In general, the number of the possibilities is
j1 !(1!)j1 · j2 !(2!)j2 · · · jn !(n!)jn ,
so, if we divide n! (the possible orders of all the elements) with this quan-
tity
we get the
n
number of the (j1 + · · · + jn )-partitions. This is nothing else
but j1 +···+jn
. This is the combinatorial proof for (2.29). If j1 + · · · + jn is
arbitrary, we get the relation (2.30) for the Bell numbers.
2.6 Orthogonality
If we take a closer look at the generating functions of the two kinds of
Stirling numbers, we can see an interesting fact: the two functions are almost
15 Pattern is often called shape or type.
Generating functions 57
we take
1
− ln (2.33)
1+x
then this is already the inverse of ex − 1:
The numbers (−1)n−k nk are called signed Stirling numbers of the first kind . It
will be very convenient to introduce a notation for the signed Stirling numbers
of the first kind:
n n
= (−1)n−k .
k k
Why do we need this change in sign? Considering (2.34) again, and knowing
1
that k! (ex − 1)k is the exponential generating function of the second kind
Stirlings we have
∞ n
xk k X
1 − ln( 1+x
1
) n 1 1
= e −1 = − ln . (2.37)
k! k! n=0
k n! 1+x
Applying (2.36):
∞ n X ∞ X
∞ m
xk
X n 1 1 n m x
= − ln = =
k! n=0
k n! 1+x n=0
k m=0 n m!
58 Combinatorics and Number Theory of Counting Sequences
∞ ∞
!
X xm X n m
.
m=0
m! n=0 k n
In the inner sum n can run between k and m:
∞ m
!
X xm X n m xk
= .
m=0
m! k n k!
n=k
This property is called orthogonality and the formula is called inversion for-
mula.
The above inversion formula looks like a matrix multiplication written out
term wise. Indeed, if A = (ai,j ) and B = (bi,j ) are two m × m matrices, then
the ci,j item of AB is given by
m
X
ci,j = ai,n bn,j .
n=0
The left-hand side of the inversion formula (2.38) is an item of the matrix
product of two matrices formed by the Stirling numbers:
0
0 0 0 0 0 ···
1 1
0 0 0 · · ·
0 1
2 2 2
0 1 2 0 0 · · ·
S1 = . ,
. .. .. .. ..
. . . . .
n n n
0 1 · · · n 0 · · ·
..
.
0
0 0 0 0 0 ···
1 1
0 0 0 · · ·
0
1
2 2 2
0 0 · · ·
0 1 2
S2 = .. .. .. .. ..
.
.
. . . .
n n n
0 1 · · · n 0 · · ·
..
.
Generating functions 59
These polynomials have their own name and we dedicate a whole chapter to
them. At the moment we only mention that these polynomials are called Bell
polynomials and they are denoted by Bn (x). From the (1.2) definition of Bell
numbers, we have that Bn (1) = Bn – hence the name.
The polynomials with first kind Stirling number coefficients can also be
determined by a small effort.
n
X n k
x = x(x + 1)(x + 2) · · · (x + n − 1). (2.41)
k
k=0
n n
X n k+1 X n k
x + n x =
k k
k=0 k=0
n+1
X n n
X n k
xk + n x =
k−1 k
k=1 k=0
n+1
X n
n
+n xk =
k−1 k
k=1
n+1
X n + 1 n+1
X n + 1
k
x = xk .
k k
k=1 k=0
16 In a recent paper [136], this formula was proven by using the notion of right-to-left min-
ima. We will encounter left-to-right minima in Section 8.8. The two are easily transformed
into each other. Four other proofs can be found in [534], and another in the online note
[110].
Generating functions 61
and
4 4 4 4
= 1, = 6, = 11, = 6,
4 3 2 1
as it must be. By (2.41) one can deduce the horizontal generating function of
the signed Stirling numbers of the first kind:
n
X n k
x = x(x − 1)(x − 2) · · · (x − n + 1). (2.42)
k
k=0
By using orthogonality again, this latter result offers an identity for the
second kind Stirling numbers. On one hand,
m X n
! m
X m n k X m
x = x(x − 1)(x − 2) · · · (x − n + 1).
n=0
n k n=0
n
k=0
Therefore
n
X n
x(x − 1)(x − 2) · · · (x − k + 1) = xn . (2.43)
k
k=0
This is just the same what we got by a combinatorial argument on page 17.
We got the same result as there. Remember that the same result was obtained
in a third way before (see p. 48.).
Polynomials of the form x(x − 1)(x − 2) · · · (x − n + 1) and x(x + 1)(x +
2) · · · (x + n − 1) will appear so frequently that we introduce a new notation
for them. Let
x(x − 1)(x − 2) · · · (x − n + 1) = xn .
This polynomial is called falling factorial , while
x(x + 1)(x + 2) · · · (x + n − 1) = xn ,
is called rising factorial . This latter is often denoted by (x)n and called
Pochhammer17 symbol . We set x0 = x0 = 1.
17 Leo August Pochhammer (1841-1920), Prussian mathematician.
62 Combinatorics and Number Theory of Counting Sequences
Using these new notations, we rewrite the results of the section one more
time.
n
X n k
x = xn , (2.44)
k
k=0
n
X n k
x = xn , (2.45)
k
k=0
n
X n k
x = xn . (2.46)
k
k=0
means that polynomials can be arbitrarily added or can be multiplied by constants, the
result will be a polynomial. In every vector space there are bases, such that every vector
(polynomial in this case) is a linear combination of base vectors. It is quite obvious that
any polynomial sequence pn (x) such that deg pn = n (n ≥ 0) forms a base – so the rising
and falling factorials as well as the monomials xn (n ≥ 0) are bases. The bases can be
transformed into each other, that is, one base vector of a given base can be expressed in
terms of some base vectors from another base. This expressibility and the concrete forms of
the expressions are the contents of the formulas (2.44)-(2.46). We see more examples when
we turn to the study of the Lah numbers.
Generating functions 63
But
first, we extract some information from the horizontal generating function
of nk .
we show another technique to deduce low parameter special values for these
numbers. Recall (2.41) and perform the following transformations:
n
X n+1 x x x
= n! 1 + 1+ ··· 1 + =
k+1 1 2 n
k=0
x x x
n! exp log 1 + + log 1 + + · · · + log 1 + =
1 2 n
n X∞ k+1
k
X (−1) x
n! exp =
j=1
k j
k=1
∞ ∞
n
!
X (−1)k+1 k
X 1 X (−1) k+1
k
n! exp x = n! exp x Hn,k .
k j=1
jk k
k=1 k=1
to get the wanted relations. Recall that the series of the exponential function
begins as
x2 x3
exp(x) = 1 + x + + + ··· ,
2! 3!
and we do not need the whole sum under the above exponent to determine
the smaller lower parameter first kind Stirling numbers: for nk one needs
only k − 1 terms. Truncate the series after the third term and write the much
simpler
1 1
n! exp Hn,1 x − Hn,2 x2 + Hn,3 x3
2 3
64 Combinatorics and Number Theory of Counting Sequences
we get that
n+1
= n!,
1
n+1
= n!Hn ,
2
n+1 n!
= (Hn2 − Hn,2 ),
3 2
n+1 n!
= (Hn3 − 3Hn Hn,2 + 2Hn,3 ).
4 6
The reader is kindly asked to verify that these coincide with the values given
by the first approach in Section 2.4.7.
and
n
n
X n k
x = x . (2.49)
k
k=0
Knuth notation20 .
How to begin to find the exact form of these coefficients? We shall need
a useful identity which is the counterpart of the binomial theorem for falling
factorials. Namely,
n
X n k n−k
(x + y)n = x y . (2.50)
k
k=0
This can be proven as follows. Divide by n! on both sides. Then the left-hand
19 Ivo Lah (1896-1979), Slovenian mathematician. He introduced these numbers in 1954
side becomes
(x + y)n
x+y
= ,
n! n
and the right-hand side is
n n
xk y n−k
X X x y
= = .
k! (n − k)! k n−k
k=0 k=0
It can be a bit peculiar at first sight, but we can write any real x in the
binomial coefficient, if it is defined as
xk
x x(x − 1)(x − 2) · · · (x − k + 1)
= = . (2.51)
k k! k!
Hence, our transformed relation reads as
X n
x+y x y
= . (2.52)
n k n−k
k=0
Since
n n
n
X n k n−k
X n
x = x (n − 1) = xk ,
k k
k=0 k=0
and chemist.
22 We remark that this identity was known much before Vandermonde. In 1303 the Chinese
Chu Shih-Chieh (in modern transcription: Zhu ShiJie), who lived between 1249 and 1314
used it: therefore, (2.52) is often called Chu-Vandermonde identity. For the history, see [38,
pp. 59-60].
66 Combinatorics and Number Theory of Counting Sequences
n n
= (n − 1)n−k .
k k
In the case of Lah numbers, the first and second kinds are equal up to sign.
Hence, in spite of talking about first and second kind Lah numbers, we say
that nk is a signed Lah number . Note that this kind of notation is compatible
with the notation for the signed first kind Stirling numbers.
Ordered lists
This is so because the order of the elements does not matter in a set. But
if we consider ordered lists, they are no longer identical. Hence, the question
comes: how many ordered lists are there on n elements with k blocks? The
answer can be guessed: nk .
To prove this, we construct all the ordered lists on n elements with k
blocks one by one. This can be established as follows. Choose k elements from
n which will be the first elements in their blocks. Then from the remaining
n − k elements we choose one after another and put them down in the possible
places. The first element can be put down in k ways (between the k elements
and after the last). The next element has k + 1 positions to go, and the last
has k + (n − k − 1) = n − 1 positions. This means that altogether we have
n n! n − 1
k(k + 1) · · · (n − 1) =
k k! k − 1
different ordered lists with k blocks on n elements. This expression is the same
as (2.53).
element somewhere between the n elements (n−1 positions), or before the first
element, or after the last one (1 + 1 options). We need to be careful: between
the last element of a block and the first element of the next block, there are
two distinct places. So we altogether have n − 1 + 1 + 1+ (k − 1) = n + k
places to insert the last element. This gives the (n + k) nk term.
Having this combinatorial interpretation for the Lah numbers, another nice
expression can be deduced. Namely,
X n
n n j
= . (2.55)
k j=0
j k
Note that (2.55) is like the orthogonality relation (2.38) without the alter-
nating signs; and it can actually be proven by the matrix symbolism we intro-
duced before. We continue to use S2 , but in place of S1 we use the matrix with
the unsigned Stirlings of the first kind; which we denote by S1,us . From (2.46)
T T
we know that S2 maps the vector x0 x1 x2 · · · to x0 x1 x2 · · · ,
T
and (2.44) says that S1,us maps the latter vector to x0 x1 x2 · · · . Here
T stands for the transpose. If we construct the matrix L with the Lah num-
bers as items, it maps the vector of falling factorials to the vector of rising
factorials. Thus, we get that
L = S1,us S2 ,
These numbers enumerate those partitions in which the order of the elements
in the blocks does matter23 ; that is, Ln is the total number of ordered lists on
n elements.
See the table at the end of the book for the first thirty values of this
sequence.
The analogue of the (1.1) recursion of the Bell numbers follows easily:
n
X n
Ln+1 = (k + 1)!Ln−k .
k
k=0
The rest of the elements can go into another ordered list in Ln−k ways.
Later we will define the polynomial version of Ln , see Section 4.4.
n
A relation among Bn , Ln and k
As another
application of orthogonality, we can find a relation between
Bn , Ln and nk based on (2.55). By using the matrix machinery again, (2.55)
can be rewritten in the compact form
L = S1,us S2 ,
where, as before, “us” means unsigned, and L is the (unsigned) Lah matrix.
Thus,
−1
S2 = S1,us L,
−1
The inverse S1,us is the signed second kind Stirling matrix as it follows from
orthogonality. Writing this latter relation out,
X n
n n−j n j
= (−1) .
k j=0
j k
Summing over k we get the Bell numbers on the left and Lj in the sum on
the right-hand side. Thus, we arrive at an interesting formula:
n
X n
Bn = (−1)n−j Lj .
j=0
j
In 2008 M. Spivey [531] proved the following identity with respect to the
Bell numbers:
n Xm
n−k m n
X
Bn+m = j Bk .
j=0
j k
k=0
This formula will be proven in Section 11.7 where we will explicitly use it.
Why we mention it now is because there is a formula of the same flavor with
respect to the Ln numbers. Namely,
n Xm
X m n
Ln+m = (m + j)n−k Lk , (2.57)
j=0
j k
k=0
for all n, m ≥ 0. The proof goes as follows. On the left-hand side, Ln+m counts
70 Combinatorics and Number Theory of Counting Sequences
The determinants det(Hn ) of the Hankel matrices are called Hankel deter-
minants and denoted by hn . Hence, for any sequence there is a corresponding
sequence of the Hankel determinants. The sequence of the Hankel determi-
nants is the Hankel transform of the given sequence. The Hankel transform is
not unique: many sequences have the same sequence of Hankel determinants –
we shall see examples.
The question we are interested in is, of course, the following: what are the
Hankel transforms of the sequences we have studied so far? One parameter
sequences must be considered, so the Bell numbers come first. To be able to
determine the Hankel transform easily, we need to know the so-called Euler-
Seidel matrices.
i
X i
al+j .
l
l=0
According to the rules of matrix multiplication, and taking into account that
(Hn )i,j = ai+j , we have
j
i X Xi X
X i j i j
(Bn Hn BnT )i,j = ak+m = an =
k m=0
m k n−k
k=0 k=0 n=m+k
i+j i Xi+j
X X i j i+j
an = an .
n=0
k n−k n=0
n
k=0
The steps were the following: first we took the product, in the second step
we introduced a new index n, and in the last step we used the Vandermonde
convolution. Finally we note that the last sum is nothing else but the binomial
transform of an . The multiplication theorem for determinants now provides
the invariance of the Hankel transform under the binomial transformation,
because
det Bn Hn BnT = det Bn det Hn det BnT = det Hn ,
knowing that
det Bn = det BnT = 1.
Moreover, as the Euler-Seidel matrix is just the product Bn Hn , we also
get that
hn = det(Bn Hn BnT ) = det(En BnT ) = det(En ) · 1.
This means that the (n + 1) × (n + 1) Euler-Seidel matrix En has the same
determinant sequence as an itself: hn .
We remark that a more general statement is also true. If an is a sequence,
then not only the
n
X n
bn = ak
k
k=0
sequence has the same Hankel transform, but also the more general sequence
n
X n
bn (x) = ak xn−k . (2.58)
k
k=0
This statement can be proven by the reader with a high probability of success.
Also, see Proposition 1 in [311] for a short proof.
Generating functions 73
Note that this is a finite sum. And, in addition, the sum can be considered
as a product of three matrices. These matrices are, by our assumptions, lower
triangular, diagonal, and upper triangular matrices, respectively. The first
and third are a transpose of each other28 . On the left-hand side, we have an
element of the Hankel matrix, and the determinant formed by these elements
is the same as the determinant formed by the elements on the right-hand side.
The latter is easy to calculate because of the structure of the matrices – the
determinant of a triangular or diagonal matrix is the product of the diagonal
elements. Hence, (2.60) is proven.
We note that we often have generating functions with two variables. This is
the case if we consider the exponential generating function of the polynomials
pn (x). We suppose that the sequence of these polynomials has its exponential
generating function as f (x, y). It is now useful to introduce the two variable
functions fk (x, y). Now the dk numbers turn to be functions; moreover, we
suppose that fk (x, y) = ∂xk f (x, y). With these assumptions (2.59) turns into
∞
X
dk (x)∂xk f (x, y)∂xk f (x, z) = f (x, y + z). (2.61)
k=0
Applications of (2.60)
Considering the Bell numbers and polynomials, we show how this machin-
ery works in practice. For the moment it suffices to know that the Bn (x) Bell
polynomials have the exponential generating function exp(x(ey − 1)). (See the
proof of (3.3).) In this case then
was proven in [477]. See also [211], where a combinatorial connection between
the Hankel determinants and specific permutation-partition pairs is given.
which we cannot develop in this book, so this subsection will not be self-
contained. However, it is easy for anyone to apply this theory without being
familiar with the otherwise rich topic of orthogonal functions (in fact, here
only orthogonal polynomials will be used). For a good general introduction,
see the book of Szegő [556]. The theorems that we are going to present here
are taken from [345] (see also the complement [346]).
This tool is usable when we can write the generating function of our se-
quence µn in a continued fraction form:
∞
X a0
µn xn = . (2.63)
n=0
b1 x2
1 + a0 x −
b2 x2
1 + a1 x −
.
1 + a2 x − . .
If this is possible, then the Hankel determinant of size n × n equals
n−1
Y
µn0 bn−k
k . (2.64)
k=1
The continued fraction might seem to be scary and too special for our pur-
poses: until now we have not seen any combinatorial sequence which generating
function would have continued fraction expansion. This is not entirely true,
however, as we shall see soon. The an and bn sequences in the continued frac-
tion can be determined with a small effort in many cases. We will find such
continued fraction expansion for some of our sequences30 . The bridge between
the two sides of (2.63) is the theory of orthogonal polynomials.
A sequence (pn (x))n≥0 of polynomials is called orthogonal if the degree of
pn (x) is n, and there exists a linear functional31 L such that
cn , if n = m;
L(pn (x)pm (x)) =
0, if n ̸= m
cL(f (x)), and L(f (x)+g(x)) = L(f (x))+L(g(x)). La,b (f (x)) = ab f (t)dt is a good example
R
of a linear functional, where f is integrable on [a, b].
32 Jean Favard (1902-1965), French mathematician, a former president of the French Math-
ematical Society.
Generating functions 77
We have two sets of quantities in (2.63): our sequence µn , and the pair
of sequences an and bn constituting the continued fraction. The statement is
that if
µn = L(xn ), (2.66)
then an and bn are the sequences in Favard’s theorem, and the (2.63) expansion
holds true. This extraordinary fact is proven in [579], see Theorem 51.1 there.
So, what do we need to do to find the Hankel determinants of a sequence?
First, we need to find a suitable sequence of orthogonal polynomials (usually
from a database that we will discuss below) for which our sequence satis-
fies (2.66). Second, look at the recurrence of these polynomials, particularly
the sequence bn is important, because an does not appear in (2.64). Third,
calculate the Hankel determinants via (2.64).
How this works in practice is shown in an example. When we will know
the so-called Fubini numbers, we present another example in Subsection 6.1.5.
Let µn = n!, and we want to calculate the determinants
0! 1! 2! ... n!
1! 2! 3! · · · (n + 1)!
hn = . (n = 0, 1, 2, . . . ).
..
n! (n + 1)! (n + 2)! · · · (2n)!
First we are looking for a sequence of polynomials such that
µn = n! = L(xn ).
The basic source of the database of common orthogonal polynomials is [338].
In Section 1.11 of [338] we find the basic properties of the Laguerre polynomials
(α)
Ln (x). Equation (1.11.2) says that
Z ∞
Γ(n + α + 1)
e−x xα L(α) (α)
n (x)Lm (x)dx = δmn (α > −1),
0 n!
(α)
where δmn = 1 if n = m and zero otherwise. This exactly means that Ln (x)
is an orthogonal polynomial sequence with respect to the linear functional
Z ∞
L(f (x)) = e−t tα f (t)dt.
0
Why is this good for us? In the particular case when f (x) = xn and α = 0 we
have that Z ∞
L(xn ) = e−t tn dt.
0
33
This integral is calculable by partial integration:
Z ∞
L(xn ) = e−t tn dt = n! = µn (n ≥ 0),
0
33 This integral will be more extensively used in Subsection 7.3.1, where more information
is given.
78 Combinatorics and Number Theory of Counting Sequences
exactly as we wish.
The first step is thus done. In the second step we look at the recurrence
of these polynomials: (1.11.3) in [338] could be used, but the normalized re-
currence (1.11.4), which is simpler, does the job. It refers to the polynomial
pn (x) = n!L(α)
n (x)
but it makes no difference since the pn (x) polynomials are orthogonal with
respect to the same functional L. When α = 0 (1.11.4) reads
whence
an = −(2n + 1), and bn = n2
by (2.65). The second step is performed.
In the third step we are already going to calculate the determinants. Recall
(2.64). Being careful with the size of the matrix and the indices:
0! 1! 2! ... n!
n
1! 2! 3! · · · (n + 1)! Y
hn = . = (k 2 )n+1−k (n = 1, 2, . . . ).
..
k=1
n! (n + 1)! (n + 2)! · · · (2n)!
converges nowhere except at the origin, so it makes not much sense to compare
it to the continued fraction. This, however, does not alter the correctness of
our result.
Generating functions 79
Exercises
1. Determine the generating function of the following sequences:
1, if n odd;
an = ,
0, if n even
bn = 1 + 2 + 3 + · · · + n,
1 1 1 1
cn = Hn = + + + · · · + ,
1 2 3 n
dn = n,
en = cn (c is an arbitrary real number),
fn = n2n ,
gn = n2 ,
1
hn = ,
n
(−1)n+1
in = .
n
2. Give the generating function of the recursive sequence F0 = 0, F1 =
1, Fn = Fn−1 + Fn−2 . (The sequence Fn is the famous Fibonacci34
sequence.)
3. Calculate the exact values of the sums
∞ ∞
X (−1)n+1 X n+1
, .
n=1
n n=0
3n
cian.
80 Combinatorics and Number Theory of Counting Sequences
9. Show the validity of the following sum formula for the generalized har-
monic numbers:
n
X
Hk,m = (n + 1)Hn,m + Hn,m−1 (m ≥ 1).
k=1
function (2.19).
12. Show that the exponential generating function of the En Euler numbers
is
∞
X xn
En = sec x + tan x.
n=0
n!
24. Prove that the exponential generating function of the xn falling factorial
is
∞
X yn x
xn = (1 + y) .
n=0
n!
(Now use the exponential generating function of the signed first kind
Stirling numbers: (2.36).)
25. Express n! in terms of falling and rising factorials.
26. Prove the binomial theorem for rising factorials:
n
n
X n k n−k
(x + y) = x y
k
k=0
28. Prove that the vertical generating function of the Lah numbers is
∞ n
X n x xk 1
= .
k n! k! (1 − x)k
n=k
with L0 = L1 = 1.
31. Prove that the Hankel transform of the sequence Ln+1 /(n + 1)! is
(−1)a(n)
Qn−1 (n+i)! (n ≥ 1),
i=0 i!
where
1, if n ≡ 1, 2 (mod 4);
a(n) =
0, if n ≡ 0, 3 (mod 4).
(Hint: first note that by the definition of Ln and the exact binomial
expression for the Lah numbers, it is true that
n
Ln+1 X n 1
= .
(n + 1)! k (k + 1)!
k=0
Then use Layman’s theorem which says that the binomial transform
does not modify the Hankel determinants. So it is enough to find the
1
Hankel determinant of (k+1)! . This result is taken from [430].)
Generating functions 83
Outlook
1. A formula similar to (2.26) was presented by V. Adamchik [3]:
n X (n − 1)!
= .
k j <j <···<j
j1 j2 · · · jk−1
1 2 k−1
and then ask for the Hankel determinants of this sequence. The first
84 Combinatorics and Number Theory of Counting Sequences
h1 (x) = 1
h2 (x) = 2x
h3 (x) = 4x2 (3 + 4x)
h4 (x) = 48x3 16x3 + 48x2 + 45x + 12
8. The Bell and Stirling numbers and Dobiński’s formula appear in some
interesting contexts. See [467] and its references for probability theory,
[192] for a connection with random matrices, and [299, Section 5.5] for
representation theory of the symmetric group.
9. The Stirling matrices have been the subject of several studies from a
linear algebraic point of view [144, 609].
Chapter 3
The Bell polynomials
We already know that Bn (1) = Bn , the nth Bell number. By knowing the
second kind Stirling numbers, we can easily calculate the Bell polynomials.
For example
B4 (x) = x4 + 6x3 + 7x2 + x.
The recursion for the Stirling numbers can be applied to get a recursion for
the Bell polynomials. First of all, we calculate the derivative of Bn (x):
n
X n
Bn′ (x) = kxk−1 .
k
k=0
Multiply this by x:
n
X n k
xBn′ (x) = k x .
k
k=0
85
86 Combinatorics and Number Theory of Counting Sequences
n n
X n k X n−1 n−1
Bn (x) = x = +k xk
k k−1 k
k=0 k=0
n n
X n−1 k X n−1 k
= x + k x
k−1 k
k=0 k=0
n−1
X n − 1 n−1
X n − 1
k+1
= x + k xxk−1
k k
k=0 k=0
n−1
X n − 1 n−1
X n − 1
k
= x x +x k xk−1
k k
k=0 k=0
′
= xBn−1 (x) + xBn−1 (x).
Therefore
′
Bn (x) = xBn−1 (x) + xBn−1 (x). (3.2)
For instance, we determine B4 (x) from B3 (x) as follows. The Stirling triangle
says that
B3 (x) = x3 + 3x2 + x.
The derivative is
B3′ (x) = 3x2 + 6x + 1.
By the recursion, B4 (x) must be
B4 (x) = xB3 (x)+xB3′ (x) = (x4 +3x3 +x2 )+(3x3 +6x2 +x) = x4 +6x3 +7x2 +x.
Applying this recurrence, we can determine the Bell polynomials directly,
without relying on the Stirling triangle. Indeed, the first polynomial is B0 (x) =
1, and then B1 (x) = xB0 (x) + xB0′ (x) = x, and so on.
As it is in many cases, this results in a new formula for the Bell polynomials:
∞
X yn y y y
Bn (x + z) = e(x+z)(e −1) = ex(e −1) ez(e −1) .
n=0
n!
Comparing the coefficients, we get a nice formula which we can call addition
theorem (after changing z to y):
n
X n
Bn (x + y) = Bk (x)Bn−k (y).
k
k=0
We had the recursion (1.1) for the Bell numbers. Can we find the poly-
nomial version of it? Recalling (1.1) and the method on how we got the ex-
ponential generating function on page 45, the reverse steps yield the wanted
result. Taking the derivative on both sides of (3.3), on the left-hand side we
get the generating function of Bn+1 (x), while on the right-hand side we have
y
xey ex(e −1) . This is equivalent to
∞ ∞
X yn X yn
Bn+1 (x) = xey Bn (x) ,
n=0
n! n=0
n!
(n)
where ti are the zeros of the Bell polynomials (i = 1, . . . , n), and that these
numbers are negative, except one zero which is x = 0. We choose this to be
(n) (n)
t1 , that is, t1 = 0
By Viète’s3 formulas we can have a bit more knowledge about these zeros.
One of these formulas says that if we have a polynomial
p(x) = an xn + an−1 xn−1 + · · · + a1 x + a0 , (3.5)
such that the zeros are x1 , . . . , xn (these can be real or complex), that is,
p(x) = an (x − x1 )(x − x2 ) · · · (x − xn ), (3.6)
then the sum of these zeros is
an−1
x1 + x2 + · · · + xn = − .
an
Another formula evaluates the product of the zeros:
a0
x1 x2 · · · xn = (−1)n . (3.7)
an
These can easily be seen by comparing the coefficients of xn−1 and x0 on the
right-hand sides of (3.5) and (3.6), respectively4 .
These formulas result in the following sum and product formulas with
respect to the zeros of the Bell polynomials:
n
(n) (n) (n) n−1 n n(n − 1)
t1 + t2 + · · · + tn = − n = − =− (n ≥ 1),
n
2 2
The sum formula yields that the average of the zeros tends to minus infinity:
(n) (n) (n)
t1 + t2 + · · · + tn n−1
=− .
n 2
The product formula assures that Bn (x) (at least for n ≥ 3) has always a zero
in the interval ] − 1, 0[. (If all the zeros were smaller than minus one, they
would not form a product being equal to minus one.)
3 François Viète (1540-1603), French mathematician and lawyer.
4 More on the history of Viète’s formulas can be read in [239].
90 Combinatorics and Number Theory of Counting Sequences
Let us construct the set of all the zeros of all the Bell polynomials:
n o
(n)
T = tk | n = 1, 2, . . . ; k = 1, 2, . . . , n .
We already know that T ⊂] − ∞, 0], but much more is true: in any neighbor
of any negative number there is an element of T . In other words, T is dense
in ] − ∞, 0].
The proof of this density statement uses some heavy machinery from com-
plex function theory (Nevanlinna’s theory and the saddle point method), and
therefore it is out of the scope of this book, but we give some insight.
First a statement comes, which is interesting in itself.
A derivation formula
The proof of this statement hinges on the recursion of the Stirling numbers of
the second kind. It is true for n = 1:
iz ′ 1 ′ iz i1z
(f (e )) = i f (e )e .
1
n−1
X n − 1
n−1
i f (k+1) (eiz )ieiz eikz + f (k) (eiz )ikeikz =
k
k=0
n−1
X
n − 1 (k+1) iz i(k+1)z
in f (e )e + kf (k) (eiz )eikz =
k
k=0
n n−1
X n − 1
n
X n − 1 (k) iz ikz n
i f (e )e + i f (k) (eiz )eikz =
k−1 k
k=1 k=0
n
n
X n (k) iz ikz
i f (e )e .
k
k=0
iz
The zeros of the derivatives of ee
radius of convergence.
7 Numerical approximations can be applied, however.
The Bell polynomials 93
α = α1 α2 · · · αn .
x2
1 x x
pn (x)pn (−x) = 1 − 2 1 − 2 ··· 1 − 2 .
α2 α1 α2 αn
94 Combinatorics and Number Theory of Counting Sequences
Let us introduce the following notation for the reciprocal power sum of the
zeros:
n
X 1
Zn (l) = .
αl
k=1 k
Then we almost have our final result:
∞
p′ (x) X
− n = Zn (l + 1)xl .
pn (x)
l=0
Multiplying both sides by x and re-indexing on the right-hand side, we get the
below generating function for the reciprocal sums of the zeros of a polynomial:
∞
X p′n (x)
Zn (l)xl = −x . (3.12)
pn (x)
l=1
Note that the initial formula (3.11) is not without its own interest. If we
apply it for the Bell polynomials, we get that
1 1 1 Bn+1
(n)
+ (n)
+ ··· + (n)
= − 1.
1− t1 1− t2 1− tn Bn
Some examples enlighten how this function incorporates our counting se-
quences. First let zn = 1 for all n. Then
∞ ∞
n
! " !#
X X
k yn X yn
Bn,k (1, 1, . . . )x = exp x = exp(x(ey − 1)),
n=0
n! n=1
n!
k=0
and on the right-hand side we have the exponential generating function of the
Bell numbers. Hence,
n
X
Bn,k (1, 1, . . . )xk = Bn (x).
k=0
By the same reason the coefficients of the powers of x are the Stirling numbers
of the second kind:
n
Bn,k (1, 1, . . . ) = . (3.14)
k
These considerations show that the generalized Bell polynomials cover the
theory of the second kind Stirling numbers. And they also show where the
name “generalized Bell polynomial” comes.
Now let zn = (n − 1)!. What we get is
∞ ∞
n
! " !#
X X
k yn X yn
Bn,k (0!, 1!, . . . )x = exp x =
n=0
n! n=1
n
k=0
x
1
exp(x(− ln(1 − y))) = .
1−y
The reader might remember
xan Exercise 23 of the previous chapter. In this
1
exercise we saw that 1−y is the exponential generating function of the
96 Combinatorics and Number Theory of Counting Sequences
rising factorials xn . Since this is a polynomial (with first kind Stirling num-
ber coefficients) we get that the generalized Bell polynomials incorporate the
theory of the first kind Stirling numbers (see (2.44)), too:
n
X
Bn,k (0!, 1!, . . . )xk = xn ,
k=0
n
Bn,k (0!, 1!, . . . ) = . (3.15)
k
Idempotent numbers
Let us see in more detail what the assumption f (f (x)) = f (x) means. If
Hence, we can prescribe the function in some points and then the images
of these points as elements in the domain will be fixed points. Therefore, a
function f with the above property can be given if we choose some, say k,
elements from n and we prescribe the function on these points arbitrarily and
on the images of these points the function f is prescribed to be identical.
(3.17) follows by summing on the possible values of k.
8 This is the Greek letter iota.
The Bell polynomials 97
Involutions
We take one more interesting particular case of the generalized Bell poly-
nomials. A permutation π is called involution if applying π two times, the
permuted elements are sent back to their original positions. In formula,
π 2 = ε,
where ε denotes the identity permutation. Note that the cycle decomposition
of an involution must not contain cycles of length 3 or more. In other words,
an involution contains only fixed points and transpositions (see page 11). Let
the number of involutions on n letters be In .
An involution can recursively be constructed. Let us suppose first that we
have an involution on n − 1 elements and we add n to this involution as a
fixed point. This offers In−1 possibilities. Next, having an involution on n − 1
elements we can put n into a 1 length cycle. But how many 1-length cycles
are there in an involution of n − 1 elements? To answer the question, we must
remember the permutation patterns on page 56. Recalling formula (2.32) we
now have a pattern of the form (j1 , j2 ), where j1 + 2j2 = n. Hence, the total
number of involutions on n − 1 elements is
X (n − 1)!
In−1 = .
j1 +2j2
j !1j1 j2 !2j2
=n−1 1
We have to insert n beside a fixed point. As there are j1 fixed points, we have
j1 possibilities (j1 varies, of course):
X (n − 1)! X (n − 1)!
j1 = =
j1 +2j2
j !j !2j2
=n−1 1 2 j
(j1 − 1)!j2 !2j2
1 +2j2 =n−1
X (n − 1)! X (n − 1)!
= =
j1 +1+2j2
j !j !2j2
=n−1 1 2 j
j !j !2j2
=n−2 1 2
1 +2j2
X (n − 2)!
(n − 1) = (n − 1)In−2 .
j1 +2j2
j !j !2j2
=n−2 1 2
In total – considering the first case above – we have that on n elements there
are
In = In−1 + (n − 1)In−2 (3.18)
involutions.
After introducing the sequence In , we show how it is related to the general-
ized Bell polynomials. This relation is easy to see via the generating functions,
98 Combinatorics and Number Theory of Counting Sequences
∞
! ∞ ∞
!k
X ym X xk X ym
exp x zm = zm .
m=1
m! k! m=1
m!
k=0
If wen would like to get the Bell polynomials, we have to look for the coefficient
of yn! inside the sum. The power of y is 1j1 + 2j2 + · · · , the coefficient in
question is
n! z j1 z j2
1 2
X
···
j1 !j2 ! · · · 1! 2!
j1 +j2 +···=k
1j1 +2j2 +···=n
n! z j1 z j2
1 2
X
Bn,k (z1 , z2 , . . . ) = ··· (3.21)
j1 !j2 ! · · · 1! 2!
j1 +j2 +···=k
1j1 +2j2 +···=n
Note that this representation gives the already known formulas (2.28) and
(2.29) for the Stirling numbers if we choose zi , as in (3.14) or in (3.15).
∞ ∞ ∞
!k
X g(x)k X ak X xi
ak = bi =
k! k! i=1
i!
k=0 k=0
∞ 1
j1 2
j2
X ak X k! b1 x b2 x
···.
k! j1 !j2 ! · · · 1! 2!
k=0 j1 +j2 +···=k
These are the coefficients of the composition f (g(x)). On the other hand,
comparing this with (3.21), we arrived at the fact that cn equals to the Bell
polynomials:
Xn
cn = ak Bn,k (b1 , b2 , . . . ).
k=1
9 Francesco Faà di Bruno (1825-1888), Italian mathematician, catholic priest, and musi-
cian.
The Bell polynomials 101
Exercises
1. Calculate B5 (x) using B4 (x) and the recursion (B4 (x) can be found on
p. 85).
2. Prove the polynomial version of the Dobiński formula:
∞
1 X k n xk
Bn (x) = .
ex k!
k=0
3. Prove that
n
X n
k = Bn+1 − Bn ,
k
k=0
n
X n
k2 = Bn+2 − 2Bn+1 .
k
k=0
15. Prove (3.19) and prove that from (3.19), (3.20) follows.
16. Calculate the fifth involution number I5 by the recursion given for these
numbers. (The initial values are I0 = I1 = 1.)
17. Prove that the Hankel transform of the involutions are the superfacto-
rials. (Use the “polynomial method” introduced in Section 2.10. To do
this, you might consider the generating function
∞
X xn 2
In (y) = ey(x+x /2) .
n=0
n!
18. Determine the coefficient of xn in sin(ex −1) by the Faà di Bruno formula!
(It is interesting to note that the second kind Stirling numbers appear
in the coefficients.)
104 Combinatorics and Number Theory of Counting Sequences
Outlook
1. The problem of generalized involutions, when a permutation π satisfies
π k = ε is discussed in [158, p. 257], see also the references therein. The
problem was considered originally in [447].
2. Involutions and even more general constructions were studied in great
detail in [17] from number theoretical and combinatorial perspective,
and detailed asymptotic analysis is also given for In in this paper.
3. The Hilbert series of a flag variety can be related to the Stirling numbers
of the second kind and the Bell polynomials [303].
4. The reciprocal sum formula (3.12) for the roots of polynomials can be
extended to polynomials of infinite degree, and thus getting formula for
reciprocal sums of zeros of transcendental entire functions. See the paper
of Spiegel [529].
Chapter 4
Unimodality, log-concavity, and
log-convexity
It can also be seen by the symmetry of the Pascal triangle that the sequence
n
n
k k=0
grows, reaches its maximum/maxima at the center and then decreases. The
index/indices of the maximum/maxima is/are n/2 or (n ± 1)/2, depending on
the parity of n.
Considering the Stirling triangles (see the tables
at the end of the book),
we see that they behave similarly. For example k6 :
105
106 Combinatorics and Number Theory of Counting Sequences
tics is the most often appearing element of a statistical data set. In probability theory, mode
is a point where the density function attains its maximum value.
2 Positivity is necessary to claim for sequences, too. In the opposite case, the statement
would not be true: the sequence −1, −2, −1 is log-concave ((−2)2 ≥ (−1)(−1)) but not
unimodal.
Unimodality, log-concavity, and log-convexity 107
p(x) = a0 + a1 x + a2 x2 + · · · + an xn (4.3)
has only real zeros (and these zeros are then non-positive by the positivity of
the coefficients), then
k n−k+1
a2k ≥ ak−1 ak+1 (1 ≤ k ≤ n − 1). (4.4)
k−1 n−k
3 Inequality (4.4) is also called as Newton’s inequality after Isaac Newton who intended
to solve the problem of counting the number of imaginary roots of the algebraic equation
a0 xn + a1 xn−1 + · · · + a1 x + a0 . During this attempt, he claimed (but gave no proof)
that the number of imaginary roots cannot be less than the sign changes in the sequence
!2 !2
a a
a20 , a1 − a2 a0 , . . . , n−1 − an n−2 , a2 . If all the solutions of the above
n n n n n n n
1 2 0 n−1 n n−2
equation are real, then all the entries in the above sequence must be non-negative. From
here, (4.4) follows. More details can be found in [453].
108 Combinatorics and Number Theory of Counting Sequences
k n−k+1
Since k−1 n−k > 1, it follows that a0 , . . . , an is strictly log-concave. Before
proving this theorem, we see some examples on how it works – but even before
that, we give a short and interesting historical remark.
n
Let us set ak = k(n is fixed). Then by the binomial theorem
n n n n
p(x) = + x + ··· + x = (x + 1)n .
0 1 n
This polynomial has only real zeros (−1 with multiplicity n), so the assump-
tion of the theorem holds. Thus, ak is strictly log-concave:
2
n n n k n−k+1 n n
≥ ≥ . (4.5)
k k−1 k+1 k−1 n−k k−1 k+1
n
X n k
p(x) = x = x(x + 1)(x + 2) · · · (x + n − 1),
k
k=0
where [·] is the integer part. The proof can be found in the cited paper of
Erdős. The maximizing index is therefore located close to ln n. This is smaller
than n/2 so the maximum of the first kind Stirling number sequence is not
around the center but occurs much earlier.
mathematicians in history who published approximately 1500 articles with 231 co-authors!
Unimodality, log-concavity, and log-convexity 109
Now let us prove (4.4). In place of the polynomial (4.3), we consider the
two-variable polynomial
Note that
x
p = y n q(x, y),
y
hence the zeros of q(x, y) are the same as that of p(x), apart from the 0 of
multiplicity n which comes from the factor y n . If now we take the derivative
of q(x, y) k − 1 times with respect to x and we take the derivative of the result
n − k − 1 times with respect to the variable y, then only three terms survive
for any k. We verify this in an example. Let k = 6 and n = 10. Then a part
of q(x, y) is
· · · + a4 x4 y 6 + a5 x5 y 5 + a6 x6 y 4 + a7 x7 y 3 + a8 x8 y 2 + · · · .
Differentiating this as we described before, only the three central terms sur-
vive:
5! · 5 · 4 · 3a5 y 2 + 6!4!a6 xy + 7 · 6 · 5 · 4 · 3 · 3!a7 x2 .
Factoring out y 2 we get
x 7!3! x2
5!5!
y2 a5 + 6!4!a6 + a7 2 .
2 y 2 y
In the parentheses, there is a second-degree polynomial of xy . The zeros of this
polynomial are real by the reasons mentioned above. Hence, the discriminant
is surely non-negative:
7!3! 5!5!
(6!4!a6 )2 − 4 a7 a5 ≥ 0.
2 2
Rearranging and simplifying:
75
a26 ≥ a5 a7 .
64
This is exactly what we wanted to get. The general case works similarly and
leads directly to (4.4).
Bell polynomials have only real zeros. This statement and its proof were the
content of Section 3.2. It is interesting to know that the shape of the Stirling
number triangle depends on the real zero property of the Bell polynomials.
The consequence of this real zero property is that the Stirling numbers of
the second kind with fixed upper parameter form log-concave sequences:
2
n n n
≥ .
k k−1 k+1
The real zero property of the Bell polynomials was proven by Harper in
1967 [279], the log-concavity independently by Dobson in 1968 [200] (where it
is remarked that the log-concavity inequality was presented also by D. Klarner
in an unpublished paper), see also [374]. Estimation on the maximizing index
was carried out in [42, 115, 277, 317, 318, 319, 403, 491, 593] and in a paper of
Yu [612] by probabilistic methods. About the uniqueness of the maximizing
index, see [119, 330, 593].
(here ⌊x⌋ is the greatest integer not exceeding x, ⌈x⌉ is the smallest integer
which is not smaller than x).
Unimodality, log-concavity, and log-convexity 111
Solving (4.6) is not an easy task at all5 . The function that describes the
solutions is called Lambert6 W function (see the Appendix).
Even more recently, in 2009 Yu [612] found a similar bound for Kn which
is not asymptotic but valid for all n ≥ 2:
Therefore the maximizing index grows at most by one in each line. This result
is due to Dobson [200].
We prove the statement by induction. For n = 1, 2 the statement is true.
Now let us suppose that up to a given n it is true that Ki ≤ Kn if i ≤ n. To
prove the statement for n + 1, we use the recursion:
n+1 n n
= +k .
k k−1 k
For parameters n + 1, k − 1 this becomes
n+1 n n
= + (k − 1) .
k−1 k−2 k−1
Subtracting this from the previous equation, we have
n+1 n+1
− =
k k−1
n n n n n
− +k − + .
k−1 k−2 k k−1 k−1
If 2 ≤ k ≤ Kn (remember: n0 = 0) then both differences are positive which
means that
n+1 n+1
− ≥ 0.
k k−1
So, for 2 ≤ k ≤ Kn the sequence nk grows and
Kn+1 ≥ Kn . (4.7)
5 Thisequation has infinitely many solutions for any n if we enable x to be complex.
6 Johann Heinrich Lambert (1728-1777), Swiss mathematician, physicist and astronomer.
He proved first that π is irrational.
112 Combinatorics and Number Theory of Counting Sequences
n+1 X n
X n n−m+1 n m
= .
m=1
n−m+1 k−1 m=0
m k−1
Writing down this again for the parameters n + 1, k − 1 and subtracting from
the above we have
X n
n+1 n+1 n m m
− = − .
k k−1 m=0
m k−1 k−2
This results that Kn must be smaller than any possible k. In other words,
Kn+1 < k for any k for which Kn + 2 ≤ k ≤ n + 1. Then it follows that
Kn+1 < Kn + 2.
given for the Lah numbers, it costs nothing to show that these numbers are
strictly log-concave, i.e.,
2
n n n
< .
k−1 k+1 k
are equivalent to
k 2 ⪋ n + 1,
√
i.e., k = n + 1. Consequently, if n + 1 is a square number, then there are
two maximizing indices (the Lah numbers have a plateau)
√ √
Kn,1 = n + 1 − 1, and Kn,2 = n + 1.
If, in turn, n + 1 is not a square, then the maximizing index is unique (we
have a peak), and √
Kn = ⌊ n + 1⌋.
These results are valid for all n ≥ 1.
The above statements can be found in [456] where the results are given in
a more general form (with respect to the r-Lah numbers).
We have learned that the real zero property of a polynomial with positive
coefficients implies the log-concavity of the
coefficient sequence. Although we
have just seen the strict log-concavity of nk , it is not without interest to know
that the Lah polynomials
n
X n k
Ln (x) = x
k
k=0
have the real zero property (note also that log-concavity does not imply the
real zero property, as one of the exercises shows).
Our approach is similar to what we have done for the Bell polynomials.
Remembering (2.54) we can easily give a recursive formula for the Lah poly-
nomials:
Ln+1 (x) = nLn (x) + xLn (x) + xL′n (x).
This is equivalent to
e−x ′
Ln+1 (x) = (xn ex Ln (x)) . (4.9)
xn−1
(Just perform the derivation and simplify.)
We show that all the polynomials Ln (x) have only real zeros; they have
n − 1 negative zeros and one zero at x = 0. This statement is true for n ≥ 1.
114 Combinatorics and Number Theory of Counting Sequences
4.5 Log-convexity
4.5.1 The log-convexity of the Bell numbers
It was observed by K. Engel that the Bell numbers satisfy the reverse of
the log-concavity inequality [216].
Definition 4.5.1. The sequence a0 , a1 , . . . is log-convex if for all k ≥ 1
a2k ≤ ak−1 ak+1 . (4.10)
Engel’s observation can therefore be phrased as follows: the Bell number
sequence forms a log-convex sequence:
Bn2 ≤ Bn−1 Bn+1 (n ≥ 1).
See also [116]. The proof of Engel depends on some probabilistic results due
to Harper [279].
To show this, separate the partitions counted by Bn+1 into (1) those which
have a set consisting of the single element n + 1 and (2) those which do not.
It should be clear that there are Bn of the former. Also, there are Sn of the
latter because each partition in group (2) is formed by adding n + 1 to a set
in a partition of {1, 2, . . . , n}. Thus, Bn+1 = Bn + Sn .
The average number of blocks is the total number of blocks divided by the
number of partitions. Hence, this average (for a fixed n) is equal
n
1 X n Bn+1
An = k = − 1.
Bn k Bn
k=1
For instance, let us re-prove the log-convexity of the Bell numbers. Know-
ing that
∞
X Bn n 1 1 1 2 1 3
u = exp(exp x − 1) = exp x + x + x + ··· .
n=0
n! 1! 2! 3!
1
Thus, we choose ti = (i−1)! for all i ≥ 1. Since
1 1 1
≤ ,
(i − 2)! i! (i − 1)!
This result can easily be used to prove the log-convexity of the sequence Ln .
Indeed, since x
e 1−x = exp(x + x2 + x3 + · · · ),
by virtue of the geometric series, we have to choose xi = i in (4.11). This
sequence is log-concave, and thus Ln is log-convex, while Ln /n! is log-concave.
Unimodality, log-concavity, and log-convexity 117
Exercises
1. Prove that the ratio of similarly indexed second kind Stirling numbers
and binomial coefficients is log-concave:
n !2 n n
k
n ≥ k−1
n
k+1
n
k k−1 k+1
Look for the maximal number x for which the sequence an is still con-
vergent. (The limit of this sequence for a given x (if it exists) is called
power tower .)
10. Show that if h(x) is the limit of the above-defined power tower, then
W (− ln x)
h(x) = − ,
ln x
where W is the Lambert function defined by (4.6).
11. Show that the sequence of the Bell numbers is convex, i.e.,
1
Bn ≤ (Bn−1 + Bn+1 ).
2
(Hint: use the arithmetic-geometric mean inequality.)
12. Prove that any log-convex sequence is convex.
13. Show that the En Euler (zigzag) number sequence is log-convex. (See
[380, Example 2.2].)
14. Show that the an = n! sequence is log-convex.
15. Verify the following derivation formulas with respect to the Lah poly-
nomials for all non-negative integer n:
Outlook
1. For more on the real zero property of the sequences appearing in this
book, see the Outlook of Chapter 10, and Subsection 7.6.5.
2. Log-concavity results can often be proved by injectivity. If we can ex-
hibit an injective function from pairs counted by ak−1 ak+1 to those
corresponding to ak · ak = a2k , then we clearly have that ak−1 ak+1 ≤ a2k .
This approach is described in details in [505].
3. An interesting question is about the unimodality in the Stirling trian-
gle not in the horizontal direction
but in other directions, for example
through the diagonal formed by n−k k , where k runs. See the thesis [559]
for examples on non-horizontal unimodality in the second kind Stirling
triangle; and [543] for the log-concavity of n−akc+bk , where k runs. For
similar studies in the Pascal triangle, see [542], and the next point. This
question with respect to the multinomial coefficients was studied in [543].
4. B.-X. Zhu [614] studied log-concavity in triangular arrays which are
rather general. They include the Stirling numbers, the so-called Jacobi-
Stirling and Legendre-Stirling numbers, and central factorials (see the
citations in [614] for further information on these sequences which were
attracting a great deal of attention of combinatorialists recently). Zhu’s
triangle is defined by the recurrence
and
n
X n
dn = ak
k
k=0
This problem was studied in [180, 246, 294, 295]. By the symmetry of the
Pascal triangle, there are always solutions, but the question of finding
all the solutions is a harder problem.
Chapter 5
The Bernoulli and Cauchy numbers
On the left-hand side there is the pth power of a real number x. Sum on x
from 1 to n − 1. (We shall see later that summing up to n − 1 in place of n
makes the resulting expressions somewhat simpler looking.)
n−1 p
XX p k
1p + 2p + · · · + (n − 1)p = x .
x=1 k=0
k
123
124 Combinatorics and Number Theory of Counting Sequences
would be ready. What we immediately see is that we should know the sums
of the falling factorials, since
n−1 p p n−1
XX p k X p X k
x = x .
x=1 k=0
k k x=1
k=0
In one of the exercises at the end of this chapter the reader is asked to prove1
that
n−1
X nk+1
xk = . (5.2)
x=1
k+1
Applying this identity, we can have the intermediate formula
p X n p k+1
X p X p n
1p + 2p + · · · + (n − 1)p = xk = ,
k x=1 k k+1
k=0 k=0
1 The most simple proof uses mathematical induction. A more sophisticated and very
elegant way to prove (5.2) is using finite differences – a tool which is similar in many ways
to analysis but it is on discrete sets.
The Bernoulli and Cauchy numbers 125
We see now that the power sums are indeed polynomials, and the coefficients
of these polynomials are expressible in terms of the Stirling numbers of both
kinds.
Two other rapid facts are (1) The power sum of the first n − 1 positive
integers with power p is a polynomial of n (this is why we sum up to n − 1
instead of n); and of degree p + 1. (2) The constant term of these power sum
polynomials is always zero (because the term m = 0 in (5.4) is simply 0).
The expression (5.3) asks for a combinatorial proof. The following one was
found by D. Callan [113].
We will consider sequences of p + 1 positive integers such that all the ele-
ments of the sequences are at most n; moreover, the last entry of the sequence
is also the largest. Repetitions are allowed. Thus, for example, when n = 7
and p = 8, the nine-element sequence 6, 7, 4, 7, 6, 2, 4, 7, 7 is a possible one. We
will enumerate such sequences in two ways.
First, we count them by the last entry i. Let i be fixed between one and
n. Then for each entry of the sequence we can choose from i numbers, so
altogether we have ip choices for the sequence. The last, (p + 1)th Pelement is
n
always fixed, as it must be the greatest. Summing over i we have i=1 ik , the
left-hand side of our formula.
Second, we count such sequences by the number k of distinct integers
occurring among the entries. Thus, k can vary between one and p + 1. First,
choose those k distinct integers from that of n in nk ways. We permute these
elements such that the last element is the greatest. There are (k − 1)! such
permutations.
Next, choose a partition for the p + 1 entries into k non-empty
blocks (in p+1
k ways), and order the blocks in increasing order according
to the blocks’ maximal element. We have (k − 1)! p+1
n
k k choices for such
permutation-partition pairs. To match our sequences and the permutation-
block pairs, we place the jth entry of the permutation into the positions shown
by the jth block. For example, let the set of different elements be {2, 4, 6, 7}
(so k = 4), and choose the permutation 6247 on these elements. Then choose
the partition {1, 5}, {6}, {3, 7}, {2, 4, 8, 9} of the p+1 = 9 elements. Now put
6 into the first and fifth positions, put 2 into the sixth position, put 4 into the
third and seventh position, etc. We arrive at the sequence 6, 7, 4, 7, 6, 2, 4, 7, 7.
It can be seen that the sequences and the partition-permutation pairs have a
bijective correspondence.
126 Combinatorics and Number Theory of Counting Sequences
As this formula is valid for all positive integer t, and on both sides we have
polynomials of t, it follows that the formula is valid for all real t. Let us write
t as a rational number t = r/m. Then multiply both sides of the last formula
with mp . We get that
n p+1
X X p+1 n + r/m r/m
(r + im)p = mp (k − 1)! − .
i=1
k k k
k=1
The Bell numbers are also denoted by Bn , but the Bell numbers and Bernoulli
numbers will not appear together in this book so there will be no risk of
confusion during using the notation Bn .
We are going to connect our power sum formula to the Bernoulli numbers.
We begin with the exponential generating function of
p
X p 1 k+1
. (5.7)
k k+1 m
k=0
∞ ∞ ∞ k
k + 1 xk k + 1 xk+1 lnm (1 + x)
X 1 X X k x
x = = = ,
k + 1 m k! m (k + 1)! m k! m!
k=0 k=0 k=1
∞
k + 1 (ex − 1)k 1 lnm (1 + ex − 1) 1 xm
X 1
= x = x . (5.9)
k+1 m k! e −1 m! e − 1 m!
k=0
In the last step, we used the exponential generating function in (5.8) and that
of the second kind Stirling numbers.
The
1 xm
x
e − 1 m!
generating function is not equal to (5.6) but we can rewrite it:
∞ ∞
1 xm xm−1 x xm−1 X xn 1 X xn+m−1
= = B n = B n =
ex − 1 m! m! ex − 1 m! n=0 n! m! n=0 n!
∞
1 X xn
Bn−m+1 .
m! n=m−1 (n − m + 1)!
128 Combinatorics and Number Theory of Counting Sequences
Since
1 n+1 n!
= ,
n+1 m m!(n − m + 1)!
1 1 n+1 1
Bn−m+1 = Bn−m+1 ,
n! n + 1 m m!(n − m + 1)!
we see that
∞ ∞
xn+m−1 xn 1
1 X X n+1
Bn = Bn−m+1 .
m! n=0 n! n=0
n! n + 1 m
Comparing this with the coefficients of (5.9), we get the wanted relation be-
tween the coefficients of the power sum polynomials and Bernoulli numbers
(if m > 0):
n
X n 1 k+1 1 n+1
= Bn−m+1 . (5.10)
k k+1 m n+1 m
k=0
4 Analytic number theory studies number theoretical questions via the methods of com-
plex analysis. The Bernoulli numbers and polynomials appear as some special values of the
Riemann zeta function and its relatives.
The Bernoulli and Cauchy numbers 129
Thus, we get yet another expression (and the simplest looking one) for our
power sums:
1
1p + 2p + · · · + (n − 1)p = (Bp+1 (n) − Bp+1 ). (5.12)
p+1
This gives another reason why it is better to sum up to n − 1: the argument
of the Bernoulli polynomial is the simplest one in this case.
The initial point in the proof that the power sums can be expressed by
the Stirling numbers was (5.1). When we consider power sums of arithmetic
progressions, we should consider expressions like
p
X
(mx + r)p = mk Wm,r (p, k)xk , (5.13)
k=0
where Wm,r (p, k) are some appropriate coefficients, similar to the Stirling
numbers (mk could have been put into the Wm,r (p, k) coefficients). Such co-
efficients indeed exist, and they are called r-Whitney numbers of the second
kind 5 . We do not delve into the theory of these numbers; for the details, see
[418, 429]. It is enough to know that the whole process can be done, mutatis
mutandis, in the case of the arithmetic progressions. Summing (mx + r)p we
get the above expression with the r-Whitney numbers, and, on the other hand,
the r-Whitney sum can be transformed by expanding the falling factorial (and
using the first kind Stirlings) similarly as we did in (5.4). This latter step was
analyzed in [50, Theorem 1.], and we get that
p+1 p !
p p p
X
i
X
k 1 k+1
r +(r+m) +· · ·+(r+(n−1)m) = n m Wm,r (p, k) .
i=1
k+1 i
k=0
5 These numbers were discovered by several authors independently, see [167, 418].
130 Combinatorics and Number Theory of Counting Sequences
p+1
mp X p+1−i p + 1
r r
n Bi − Bp+1 .
p + 1 i=0 i m m
We need the translation property of the Bernoulli polynomials:
n
X n
Bn (x + y) = Bk (x)y n−k
k
k=0
r
to realize that the first sum in the second line above equals Bp+1 n + m .
Hence, we arrive at the pretty expression
mp h r r i
rp + (r + m)p + · · · + (r + (n − 1)m)p = Bp+1 n + − Bp+1 .
p+1 m m
(5.14)
This gives back (5.12) as a particular case when r = 0 and m = 1 (similarly as
(5.13) goes into
the relation involving the Stirling numbers; and in this case
W1,0 (n, k) = nk ).
Formula (5.14) was given in [52, 290], and [133, 283] contain evaluations
in terms of Bernoulli numbers.
Both kinds of Cauchy numbers are rational numbers (they are definite inte-
grals of polynomials), and Cn is always positive.
Note that we can rewrite the definition of the Cauchy numbers in a shorter
form if we take the binomial coefficients into account:
Z 1 Z 1
n x
cn = x dx = n! dx,
0 0 n
Z 1 Z 1 Z 1
−x x+n−1
Cn = xn dx = (−1)n n! dx = n! dx.
0 0 n 0 n
(For the definition of the binomial coefficients for real upper parameters see
(2.51).)
These numbers are connected to the Stirling numbers. This connection
immediately comes if we expand the falling and rising factorials by using the
Stirling numbers:
Z 1 n
X n 1
cn = x(x − 1)(x − 2) · · · (x − n + 1)dx = ,
0 k k + 1
k=0
Z 1 n
X n 1
Cn = x(x + 1)(x + 2) · · · (x + n − 1)dx = .
0 k k+1
k=0
We prove the first; the second one is left as an exercise. Recalling the Stirling
number expression for cn we have that
∞ ∞ n
X xn X xn X n 1
cn = .
n=0
n! n=0
n! k k + 1
k=0
We can extend the inner sum for k > n, because these terms are zero but with
this step we make the two sums interchangeable:
∞ n ∞ ∞
X xn X n 1 X 1 X n xn
=
n=0
n! k k+1 k + 1 n=0 k n!
k=0 k=0
as we stated.
Now we deduce additional identities for cn and Cn by using the Riordan
array method.
where ak is a given sequence and dn,k is a triangular sequence as, for example,
the binomial coefficients or the Stirling numbers. By definition, the Riordan7
array is the lower triangular infinite matrix
where d and h are two almost arbitrary generating functions. It must hold true
that d(0) ̸= 0. Also, if we want our array to be invertible, which equivalently
means that dn,n ̸= 0 for all n, then we must suppose that h(0) ̸= 0. In this
case, the Riordan array is proper . Above [xn ]f (x) denotes the coefficient of
xn in the generating function f (x). Thus, for example,
1
[xn ]ex = .
n!
If we write down dn,k in matrix form where n is the row index and k is the
column index, then we see that the resulting matrix will be a lower triangular
matrix as we said. This is so, because [xn ]d(x)(x · h(x))k will be obviously zero
if n < k.
In symbols, we write that
therefore
k! n
n n k 1
[x ] = [x ] log .
n! k 1−x
This must be rewritten in the form (5.18). Choosing d(x) = 1 and h(x) =
1 1
x log 1−x we are done, because
k! n x 1
[xn ] = [xn ]d(x)(x · h(x))k = [xn ]1 · logk =
n! k x 1−x
n k 1
[x ] log .
1−x
As we mentioned, the Riordan array method is useful if we would like to
find sums of the form (5.17). To demonstrate this statement, we are going to
prove the following identity (which is due to R. Sprugnoli [533]):
n
X
dn,k ak = [xn ]d(x)f (x · h(x)), (5.21)
k=0
Then, by (5.21),
n
X n
ck = n![xn ]d(x)f (x · h(x)),
k
k=0
where
ex − 1
x
(d(x), h(x)) = 1, , and f (x) =
x log(1 + x)
by (5.19) and (5.15). Therefore,
n x
x e x−1
X n n ex − 1
ck = n![x ] x
= n![xn ] .
k log (1 + x (e − 1x)) x
k=0
ex −1 1
Since, as it is easy to see, x is the generating function of (n+1)! ,
ex − 1 1
n![xn ] = ,
x n+1
and (5.22) follows.
The dual of this identity is
n
X n (−1)n
(−1)k Ck = .
k n+1
k=0
A recurrence can also be established for the first kind Cauchy numbers:
n−1
X ck (−1)n−k+1
cn = n! (n ≥ 1). (5.23)
k! n − k + 1
k=0
The Bernoulli and Cauchy numbers 135
whence Cauchy’s product leads to the recursion. The dual of this recurrence
for the second kind Cauchy numbers can be found in the Exercises.
k! n
To see this relation, we must apply the Riordan method with R n! k and
with ak = (−1)k Ck /k. To this end, we only have to find the generating func-
tion of (−1)k Ck /k. If we divide (5.16) by x we get that
∞
X xn−1 1
(−1)n Cn = ,
n=0
n! (x + 1) log(1 + x)
and then we integrate. The integral will not be convergent because of the
presence of 1/x on the left-hand side. Therefore, we subtract 1/x from both
sides:
∞
X xn−1 1 1
(−1)n Cn = − ,
n=1
n! (x + 1) log(1 + x) x
whence
∞ x
Cn xn
Z
X 1 1
(−1)n = − dt =
n=1
n n! 0 (t + 1) log(1 + t) t
136 Combinatorics and Number Theory of Counting Sequences
log(1 + x)
log .
x
This means that
log(1 + x)
f (x) = log .
x
Remember that the attached Riordan array is
ex − 1
k! n
R = 1, ,
n! k x
so
n n
X n Ck X k! n Ck
(−1)k = n! (−1)k =
k k n! k kk!
k=1 k=1
log(1 + ex − 1) x
n![xn ]d(x)f (x · h(x)) = n![xn ]1 · log
x
= n![xn ] log x .
e −1 e −1
We would be ready if we could show that
x Bn
[xn ] log =− (n ≥ 1).
ex −1 nn!
This is left to the reader. For the dual of (5.24), see the Exercises.
The Bernoulli and Cauchy numbers 137
Exercises
1. Prove by induction (without using the Stirling numbers) the three power
sum identities at the beginning of the chapter.
2. Now solve the previous problem by using (5.4).
3. Prove (5.2) by induction.
4. Calculate the first six Bernoulli numbers.
5. Show that B2n+1 = 0 for all n > 1.
6. Verify the identity
n
X k!
k n
Bn = (−1) (n ≥ 0).
k+1 k
k=0
9. Prove (5.16).
10. Present and prove the binomial theorem using the language of Riordan
arrays (see (5.20)).
11. Show that the generating function of the binomial transform of the se-
quence an with generating function f (x) is
1 x
f ,
1−x 1−x
12. By using the Riordan method, show that the exponential generating
y
function of the Bell polynomials Bn (x) is ex(e −1) .
13. Prove the identity of Wang [582]:
n
X n ck
(Hn − Hk ) = n.
k k!
k=0
14. Show that the following recursion connecting the first and second kind
Cauchy numbers is valid:
(−1)n cn = Cn − nCn−1 (n ≥ 1).
(Hint: use the trivial identity
x x
= (1 + x) .)
log(1 + x) (1 + x) log(1 + x)
15. Verify the dual of (5.22):
n
X n (−1)n
(−1)k Ck = .
k n+1
k=0
18. If, in the previous example, there is no denominator, then the next
formula arises:
n
X n (n − 1)!
Bk = − (n ≥ 1).
k n+1
k=1
Outlook
1. There are studies of power sums when the consecutive members of the
arithmetic progression are of opposite sign (these are called alternating
power sums). See [431] and the citations in it.
2. In [501] the weighted sum
m−1
X
(aj + b)2 z j
j=0
are completely different from “our” Euler numbers on Section 1.8. Still,
these numbers are related to the Stirling numbers of the second kind,
and the coefficients of En (x) are determined by nk . See [271] for the
details.
7. One sees from the very first lines of this chapter that the first power
sums can be described as a polynomial with integer coefficients times
a rational number. This is not a difficult statement: we know that the
power sums are polynomials, and each polynomial can be multiplied
by a rational number such that the coefficients become integers. The
reciprocal of the smallest such number is what we are talking about,
carried from the right to the left. This number sequence has been the
subject of many studies. See [329] for a recent source of results and
citations, and also A064538 in The On-Line Encyclopedia of Integer
Sequences.
8. The Cauchy numbers have an interesting relationship to the Riemann
zeta function, see [79] and the references therein.
9. The Bernoulli numbers, their connection to the Riemann zeta function,
their generalizations, and their importance in analytic number theory
are studied in detail in [34].
Chapter 6
Ordered partitions
1, 5|2, 3|4, 6
and
2, 3|1, 5|4, 6
are identical. In this chapter we do distinguish them and make the following
definition.
Going back to our very first example in the book, we saw that four elements
have 15 partitions:
1|2|3|4
1|2|3, 4, 1|3|2, 4, 1|4|2, 3, 2|3|1, 4, 2|4|1, 3, 3|4|1, 2
1|2, 3, 4, 2|1, 2, 4, 3|1, 2, 4, 4|1, 2, 3, 1, 2|3, 4, 1, 3|2, 4, 1, 4|2, 3
1, 2, 3, 4
1 Guido Fubini (1879-1943), Italian mathematician.
2 Sometimes preferential arrangement is also used.
141
142 Combinatorics and Number Theory of Counting Sequences
Since the first line contains four blocks, we have 4! = 24 different ordered
partitions on this level. In the second line, there are six 3-partitions; therefore,
there are 6 · 3! ordered 3-partitions, and so on. Altogether
4 4 4 4
F4 = 4! + 3! + 2! + 1! = 75.
1 3 2 1
We set F0 = 1.
Surjective functions
n−1
X
n
Fn = Fk . (6.3)
k
k=0
It is worth it to compare this with the (1.1) recursion for the Bell numbers.
U1 ⊂ U2 ⊂ · · · ⊂ Uk (6.4)
of subsets of S is a chain if Ui ⊂ Ui+1 and Ui ̸= Ui+1 for all possible is. The
length of the chain (6.4) is defined to be k.
Let a chain be called full if U1 = ∅ and Uk = S. We are going to see that
the number of all the full chains on an n element set S is the n-th Fubini
number.
Indeed, U1 = ∅, and we would like to choose an U2 , as the next element of
the chain. If the chain is of length two, we choose U2 to be S. If it is longer,
then we have to choose a non-empty proper subset of S. If the chain is of
length three, we must choose U3 = S. Otherwise, we have to fix the proper
subset U3 of S such that it is disjoint from U2 . We continue the process in
this manner until eventually we reach Uk = S. Obviously, U2 \ U1 (= U1 ), U3 \
U2 , . . . , Uk \ Uk−1 form a partition of S. In the case of chains, the order in
which we have chosen our chain elements (blocks) matters, since, for example,
the two chains
∅ ⊂ {1, 2} ⊂ {1, 2, 3, 4} = S,
and
∅ ⊂ {3, 4} ⊂ {1, 2, 3, 4} = S
are different (even if the corresponding partitions, 1, 2|3, 4 and 3, 4|1, 2, are
the same). For this
reason, the number of chains of length k for a set of n
elements is k! nk . Summing over k, we get the number of all the possible full
chains for an n element set, and this is the number Fn .
Here k can run from 0 to infinity, so that we can interchange the sums:
∞ ! n ∞ ∞ n ∞
n
!
X X n x X X n x X (ex − 1)k
k! = k! = k! =
n=0
k n! n=0
k n! k!
k=1 k=0 k=0
∞
X 1
(ex − 1)k = .
1 − (ex − 1)
k=0
The last sum is a simple geometric series (see (2.2)). The exponential genera-
ting function is therefore
∞
X xn 1
Fn = . (6.5)
n=0
n! 2 − ex
This results in a nice infinite sum representation for the Fubini numbers, which
can be considered as the analogue of the Dobiński formula (2.17). Rewriting
the generating function:
∞ k ∞
1 1 1 1 X ex 1 X ekx
= x = = =
2 − ex 2 1 − e2 2 2 2 2k
k=0 k=0
∞ ∞ ∞ ∞
X 1 X k n xn X xn X k n
= .
2k+1 n=0
n! n=0
n! 2k+1
k=0 k=0
Comparing the coefficients,
∞
X kn
Fn = . (6.6)
2k+1
k=0
As the Fubini numbers are also called ordered Bell numbers, we may call this
nice result an ordered Dobiński formula.
L(xn ) = Fn .
by the ordered Dobiński formula. The factor two is irrelevant here because it
can be incorporated into L and the orthogonality relation. The (1.9.4) recur-
rence in [338] for the normalized Meixner polynomials
n
c
pn (x) = (β)n Mn (x; β, c)
c−1
is, in our particular choice of parameters,
pn+1 (x) = (x − (3n + 1))pn (x) − 2n2 pn−1 (x),
meaning that
an = −(3n + 1), and bn = 2n2 .
Substituting this into (2.64), we get that
F0 F1 F2 ... Fn
n
F1 F2 F3 · · · Fn+1 n(n+1) Y
=2 2 k!2 (n = 1, 2, . . . ).
..
.
k=1
Fn Fn+1 Fn+2 · · · F2n
This result can be found in [233], see the table at the end of the paper.
sum. Infinite sums can be considered as special integrals when, in place of summing over
areas, we sum over numbers where the “area” covered by the numbers is one. This is why
the authors of [338] kept the summation index being x.
146 Combinatorics and Number Theory of Counting Sequences
as
n
X n k
Fn (x) = k! x
k
k=0
for all n ≥ 0.
The fourth Fubini polynomial, for instance, is
The Fn (x) polynomials satisfy a recurrence that can be proven by the re-
cursion of the Stirling numbers (similarly as we did with the Bell polynomials).
Since
n n−1 n−1
=k + ,
k k k−1
we have that
n n
X n−1 k X n−1 k
Fn (x) = k!k x + k! x .
k k−1
k=1 k=1
′
xFn−1 (x) + x2 Fn−1 (x).
Finally,
′
Fn (x) = x[Fn−1 (x) + (1 + x)Fn−1 (x)].
Note that this yields the relation
Based on this relation, we can study the zero structure of the Fubini poly-
nomials and use this knowledge to prove the log-concavity of the coefficients.
As we shall see, the zeros of Fn (x)
are
all real, non-positive and greater than
−1. Therefore, the coefficients k! nk form a log-concave sequence in k (this
notion was introduced in Chapter 4):
2
n n n
k! ≥ (k − 1)! (k + 1)! , (6.9)
k k−1 k+1
follows.
Now let us see why the zeros of Fn (x) are real and fall into ] − 1, 0]. We
proceed by induction. For F1 (x) = x the statement is true. The non-zero root
of F2 (x) = x + 2x2 is negative and greater than −1. The other is x = 0. Note
that Fn (x) does not contain a constant term if n > 0, so x = 0 is always a
zero with multiplicity one.
Now let us prove our statement for general n. Recall (6.8). The right-
hand side already contains the x = 0 zero with multiplicity one, so we can
concentrate on the negative zeros. We will show that the derivative on the
right-hand side has zeros only in the interval ] − 1, 0[. The function
(1 + x)Fn−1 (x)
has a zero at x = −1 because of the factor 1 + x. The other zeros come from
the equation Fn−1 (x) = 0. The x = 0 is a solution, and by the induction
hypothesis Fn−1 (x) has n − 2 roots in ] − 1, 0[. Hence, by Rolle’s theorem,
the derivative has a zero on the right-hand side of −1 but on the left of all
the zeros of Fn−1 (x). Moreover, the derivative has zeros among the zeros of
Fn−1 (x) and, in addition, between the rightmost non-zero root of Fn−1 (x) and
x = 0. Altogether, we counted n − 1 negative zeros, all of them in ] − 1, 0[.
Hence, we have found all the zeros of the n degree polynomial Fn (x) and these
possess the properties we wanted to demonstrate.
be given. The position j in (the bottom line of ) π is called ascent if ij < ij+1 .
If ij > ij+1 we say that the position j is a descent.
For example, in
1 2 3 4 5 6
3 1 4 6 2 5
the positions 2, 3, 5 are ascents, while 1, 4 are descents.
The following definition is strongly related.
On the other hand, a permutation always begins with a run and this run
ends at the first descent. Then a new run follows until the next descent, and
so on. This means that two neighboring runs are separated by a descent, so
runs = descents + 1.
Having the fact that the number of ascents determines the number of runs
and descents, it is enough to deal with ascents. We therefore introduce the
notion of Eulerian numbers4 which count permutations with a given number
of ascents.
4 Not to be confused with the Euler numbers En which count zigzag permutations!
Ordered partitions 149
5 This notation is not so common as the notation for the Stirling numbers. It was in-
troduced
f : N → M,
is not always the case. A famous example is that of L(n): these count the number of n × n
Latin squares. There is no known recursion for this sequence. Even worse, there is not any
effective formula to calculate L(n) in general.
7 Julius Daniel Theodor Worpitzky (1835-1895), German mathematician.
8 According to our present knowledge, this identity first appeared in a Chinese mathe-
matical article by Li Shan-Lan in 1867. For n ≤ 5 it was known to the Japanese Yoshiuke
Matsunaga, who died in 1744. See [459, p. 14.].
Ordered partitions 151
(a1 , a2 , . . . , an ),
where ai ∈ {1, 2, . . . , m}. Put these elements in increasing order and make a
permutation as follows. If the increasing order of a1 , . . . , an is ai1 , ai2 , . . . , ain ,
then let the permutation be
1 2 ··· n
.
i1 i2 · · · in
(This is so because the first and unique 1 was originally in the fourth position,
the first 2 in the first position, the second 2 was in the fifth position, and so
on.)
The next observation is crucial. In the arising permutation, there is an as-
cent if and only if in the ordered list there is an equality between two elements.
(In our example, the permutation has ascent in the 2, 3, 5 positions (1-5, 5-6,
2-3), and in (6.16) there is an equality in these positions with the following
elements (2-3, 3-4, 5-6). These agree with the given positions in the first line
of the permutation.)
In general, if aij = aij+1 then ij < ij+1 (ascent). Now we make the mono-
tonically increasing sequence
to be strictly increasing. For the above reason, equality appears only at as-
cents, we have inequality in descent positions. Supposing that we have k
ascents in the permutations (there are nk such permutations), the strictly
1 ≤ ai1 < ai2 (+1) < ai3 (+2) < · · · < ain (+k − 1) ≤ m + k.
Here the terms in parenthesis are added only when there is an equality (k
cases). How many such strictly increasing sequences are there? We choose
152 Combinatorics and Number Theory of Counting Sequences
n elements from m + k (and then put them in increasing order, but this is
uniquely determined), so the answer is m+kn .
Summing over k, we are done. All the possible functions can be given in
such a way, so Worpitzky’s identity is proved9 .
The left-hand side counts the number of ways we can group n elements into
m blocks such that the order of the blocks counts. We have to show that the
k k
right-hand side counts the same grouping. First note that n−m = m−n+k
and so
m X m
X n k n n−k
= .
k n−m n−k m−k
k=0 k=0
Let an n-permutation be given with k runs. The runs – whose positions obvi-
ously matter in a permutation – give k blocks. If k = m, we are ready because
there is a one-to-one correspondence between the blocks and runs. Hence, let
us suppose that k < m. Now we have to split some runs to get new blocks.
More concretely, we need m − k new runs to get m − k new blocks and hence
m blocks in total. We know that k runs mean n − k = n − 1− (k − 1) ascending
n−k
positions, and from these we have to choose m − k: m−k possibilities (in a
descent position
the run terminates, so we cannot get new runs splitting here).
n
Since there are n−k n-permutations with n − k ascents, altogether we have
n−k
n
m−k n−k different possibilities for a fixed k. Summing over k = 0, 1, . . . , m
we get the assertion.
The inverse of (6.18) can also be proven. This expresses the Eulerian num-
bers by the Stirling numbers:
X n
n n n−m
= m! (−1)n−m−k .
k m=0
m k
We give a formal proof. Multiply both sides of (6.18) by xn−m and sum
over the possible values of m:
n n n n
X n n−m X n X k X n
m! x = xn−m = (x + 1)k ,
m=0
m k m=0
n − m k
k=0 k=0
On both sides, we have polynomials of x. These are equal if and only if all the
coefficients are equal. The statement is therefore proved.
From this statement we immediately get a relation to the Fubini numbers.
Substitute x = 2 in (6.19):
n
X n k
Fn = 2 . (6.20)
k
k=0
3 − 7 − 8, 4 − 6, 1 − 2, 5
(which means that first we press the third, seventh and eighth buttons in one
step simultaneously and then the fourth and sixth buttons, and so on). The
order of the different button presses counts, but the order of the simultaneous
button presses does not count. Hence, for example
3 − 7 − 8, 4 − 6, 1 − 2, 5
and
3 − 7 − 8, 4 − 6, 5, 1 − 2
154 Combinatorics and Number Theory of Counting Sequences
a new combination lock. The number of the possibilities for this auxiliary lock
is Fn−k . Summing over k, we get the total number of different lock opening
combinations:
n
X n
Fn = Fn−k .
k
k=1
This is the same recursion as (6.2). Since the initial values are also the same,
the two sequences must be equal (one certainly anticipated this by the no-
tation). Fn is the sequence of the Fubini numbers. (The combination lock
approach and the competition approach are equivalent, as one can see easily.)
After this simple discovery about the connection between combination
locks and Fubini numbers, we are going to see how to prove (6.20) combina-
torially.
A combination lock can be transformed into a permutation by simply
writing down the list of the button pushes. For example, from the above 4
step combinations
3 − 7 − 8, 4 − 6, 1 − 2, 5
we have that the attached permutation is
1 2 3 4 5 6 7 8
.
3 7 8 4 6 1 2 5
Such a permutation will contain at most as many runs as many simultaneous
button pushes we had10 (4 in the example). At most, because the simulta-
neously pushed buttons are in increasing order and they correspond to runs
in the permutation. But it can happen that two (or more) consecutive simul-
taneous button pushes correspond to one common run. This happens in our
example: 1-2-5 gives one run; however, they belong to two button pushes (1-2
and 5). Another example
5; 3, 4; 1, 2
contains three steps and three runs:
1, 2; 5; 3, 4
10 Remember that we agreed to list the buttons in increasing order in the simultaneous
button pushes.
Ordered partitions 155
which (after reversing the order of the summation) is nothing else but (6.20).
A final observation. A k step combination lock can be interpreted as a
k-partition on n elements, where
the blocks are formed by the simultaneously
pushed buttons. There are nk k-partitions but – as the order of the steps
counts – we have to multiply this with k!. Summing over k, we get all the
combination locks:
n
X n
Fn = k! .
k
k=1
This is just the (6.1) definition of the Fubini numbers!
1 x−1
1 = .
1− x−1 (e
(x−1)y − 1) x − e(x−1)y
now as before; however, (6.22) makes the situation easier. The root structure
of the Fubini polynomials is known to us, so we see directly that
n 1
0 = En (x) = (x − 1) Fn (6.24)
x−1
is possible only if x = 1 or
1
Fn = 0.
x−1
To prove this identity consider the left-hand side as a generating function (in
fact, this is really a generating function belonging to ai = in ). If we can show
that the right-hand side has the same coefficients as a generating function, we
will be ready. Earlier we saw (Exercise 23 in Chapter 2) that
∞
1 X n+j j
= x ,
(1 − x)n+1 j=0
j
that is,
n
∞ n
x 1 X n + j j X n n−k
E n = x x .
(1 − x)n+1 x j=0
j k
k=0
We are looking for the ith coefficient in this expression. This belongs to those
indices j for which j + n − k = i or j = i + k − n. The coefficient in question is
n X n
X n+i+k−n n i+k n
= = in .
i+k−n k n k
k=0 k=0
the third
∞ n
!
∂f X X n k+1 yn
yx = x n ,
∂y n=0
k n!
k=0
Bring this last term to the right-hand side of the equation, change the indices
properly, and finally take everything under a common summation on n:
∞
" n ! n+1 !
X X n X n
k
k x − (k − 1) xk +
n=0
k k − 1
k=0 k=1
∞
n+1
! n
!# n !
yn n + 1 k yn
X n X n k X X
n xk + x = x .
k−1 k n! n=0
k n!
k=1 k=0 k=0
Upon the substitution eiz = y we have that the nth derivative of the cotangent
equals to
n n
d 2 d 2
cot(n) (z) = in+1 y 1+ 2 = in+1 y .
dy y −1 dy y2 − 1
d
Here y dy is an operation, it derives what appears on its right and then multi-
plies by y. Its nth power means that we perform this operation n times, one
160 Combinatorics and Number Theory of Counting Sequences
after another. In the following step we expand y22−1 into a geometric series
n
d
and then perform the y dy operation. We arrive at an attractive identity:
∞
X
(n) n+1
cot (z) = −(2i) k n y 2k ,
k=1
where, as before, y = eiz . The right-hand side is first expressed by the Eulerian
polynomials via (6.25):
∞
y 2n
X 1
−(2i)n+1 k n y 2k = −(2i)n+1 En ,
(1 − y 2 )n+1 y2
k=1
y2
1 n+1 1
Fn = (2i) Fn .
1/y 2 − 1 y2 − 1 1 − y2
The correspondence eiz = y and (6.27) gives the statement.
By similar methods, it can be shown that
(n) n i tan(z) − 1
tan (z) = (−2i) (tan(z) − i)Fn .
2
These results appeared in [2], and were further extended to tan, sec, csc
functions and their hyperbolic counterparts in [182].
Ordered partitions 161
Exercises
1. Calculate the first five Fubini numbers.
2. How many runs, ascents and descents are there in the permutation
1 2 3 4 5 6 7 8 9 10
?
3 8 6 7 2 5 1 4 10 9
3. Prove that
n
X n
n! = Fk .
k
k=0
which is a simple closed form for the A(n, k) numbers. Rewriting this
formula using
ascents in place of runs and re-indexing we get the closed
form for the nk Eulerian numbers, too:
X k
n i n+1
= (−1) (k − i + 1)n .
k i=0
i
6. Show that
n n
= = 2n − n − 1,
1 n−2
n n 1
= = 3n − (n + 1)2n + n(n + 1).
2 n−3 2
(Hint: use the symmetry relation (6.13) together with the previous ex-
ercise.)
7. Express E4 (x) by the help of F4 (x) using (6.22).
162 Combinatorics and Number Theory of Counting Sequences
11. Show that the product of the zeros of the nth Eulerian polynomial is
(−1)n−1 . Prove also that their sum is n + 1 − 2n . Note that the first
result yields that En (x) has zeros between −1 and 0, and, also, some
zeros are smaller than −1.
12. Prove that
n
X n
Fk = 2n−1 n!.
k
k=0
16. Prove that the n × n-sized Hankel determinants of the polynomial se-
xk 1
quence (1−x) k+1 Ek x is
n n−1
n x( 2 ) Y
(−1) 2 k!2 (|x| < 1, n ≥ 1).
(x − 1)n
k=1
17. Let n ≥ 3 be an odd number. Show that for the maximal Eulerian
numbers in two consecutive rows the following ratio is valid:
maxk nk
n−1 = n + 1.
maxk k
Outlook
1. The Eulerian numbers and first kind Stirling numbers appear in a very
interesting context. J. M. Holte [285] studied digit carries during adding
some random numbers in some base b. The corresponding Markov chain
and its transition matrix can be related to nk and to nk .
2. The chains that we have mentioned in Subsection 6.1.3 are just the tip
of an iceberg. The underlying theory is the theory of partially ordered
sets and lattices. The chains we mentioned in our text belong to the
subset lattice. More on this interesting theory can be found in [10] (see
also the Outlook of Chapter 8).
3. The series
∞ ∞ n
X xi X i
in , and
i=0
i! i=0
ix
L1 = e − 1 ≈ 1.71828,
L2 = e2 − 2e ≈ 1.95249,
3
L3 = e3 − 3e2 + e ≈ 1.99579.
2
So the average length of the first run is slightly smaller than that of the
second, and the second one is slightly smaller than the third one. This
does not go this way, however. The Lk sequence is not monotone. An
exact formula for Lk was given by B. J. Gassner [245], see also [335,
Section 5.1.3]. Among others, it is known that limk→∞ Lk = 2. These
numbers were applied in the determination of average rib lengths of
postorder trees [595].
Ordered partitions 165
For very large parameters, it is usually hard to determine the concrete values
of combinatorial sequences1 . If we are ready to some trade-off – not requiring
the exact value but a feasible estimation – then the task can be solved.
Also, sometimes we would only like to know “how rapidly” a given sequence
grows. If we take a look on the values of superfactorials and the Bell numbers in
the tables at the end of the book, we see that in some sense the superfactorial
sequence grows faster than the sequence of the Bell numbers. But how rapidly
do these sequences grow? Usually we consider the answer given if we can
approximate our sequence in question with a “simpler” sequence for which
the growth is known or obvious. Let us see what this exactly means.
It seems to be acceptable to consider two sequences “equally growing”
if the ratio of the members tends to some finite limit as the index tends to
infinity2 . By appropriate rescaling we can suppose that this limit, if it exists,
is one. Thus, we say that two sequences an and bn are asymptotically equal if
an
lim → 1.
n→∞ bn
Asymptotic equality is shortly denoted by the symbol
an ∼ bn .
gence or some notions from analysis and set theory. We suppose that the reader is familiar
with these.
167
168 Combinatorics and Number Theory of Counting Sequences
the number of the maximal index set such that the intersection of Ai ’s is still
non-empty (i ∈ T ). Then m ≥ 1, and when l = 1, 2, . . . , m then
Sn
= | i=1 Ai | , if l = m,
l \
X
j−1
X Sn
(−1) Ai > | i=1 Ai | , if l < m, and l odd,
j=1 T ⊂{1,2,...,n} i∈T
|T |=j Sn
< | i=1 Ai | , if l < m, and l even.
while for n = 3 it is
+|A1 ∩ A2 ∩ A3 | = |A1 ∪ A2 ∪ A3 |.
for all l = 1, 2, . . . , n. Sn
The proof of this statement is as follows. Since ω ∈ i=1 Ai , ω is contained
in some Ai , whence m(ω) ≥ 1 is indeed satisfied. If j = 1, 2, . . . , n, then
X X m(ω)
χ∩i∈T Ai (ω) = χ∩i∈T Ai (ω) = .
j
T ⊂{1,2,...,n} T ⊂{i : ω∈Ai }
|T |=j |T |=j
In the last step – that was done by Wegner slightly differently – we used the
fact that
l
X m m−1
(−1)j = (−1)l
j=0
j l
for all positive integer m.
Having the lemma proven, we can proceed to prove the Bonferroni-inequa-
lity. For the left-hand side:
X l X \ X l X X
j−1
(−1) Ai = (−1)j−1 χ∩i∈T Ai (ω)
Sn
j=1 T ⊂{1,2,...,n} i∈T j=1 T ⊂{1,2,...,n} ω∈ i=1 Ai
|T |=j |T |=j
170 Combinatorics and Number Theory of Counting Sequences
[
n
X m(ω) − 1
X
l m(ω) − 1
l
= 1 − (−1) = Ai −(−1) .
Sn l
i=1
Sn l
ω∈ i=1 Ai ω∈ i=1 Ai
n
An under- and overestimation for k via the Bonferroni inequal-
ity
A bit more is true. These sums enclose the second kind Stirling numbers in
the following sense:
= nk
if l = k − 1,
l
1 X j k
n
> nk
(−1) (k − j) if 0 ≤ l < k − 1, and l is even,
k! j=0 j
< nk
if 1 ≤ l < k − 1, and l is odd.
Ay = {f : X → Y | y ̸∈ f (X)} (y ∈ Y ).
Let gT: X → Y be a function for which g(x) = y0 for all x. By this definition
g ∈ y∈Y \{y0 } Ay . On the other hand, there is no function that it takes no
value y 4 , hence y∈Y Ay = ∅. This means that we can choose |Y |−1 sets from
T
the Ay sets such that their intersection is non-empty (remember g). That is,
\
m = max |T | : T ⊂ Y, Ay ̸= ∅ = k − 1.
y∈Y
T
By the definition of Ay the y∈T Ay intersection contains functions with co-
domain Y \ T , i.e.,
\
Ay = (k − |T |)n .
y∈T
For all j = 1, 2, . . . , k − 1
X \ X
k
n
(k − j)n .
Ay =
(k − |T |) =
j
T ⊂Y y∈T T ⊂Y
|T |=j |T |=j
n The sums presented in the previous statement for certain l are bigger than
k , for certain l they are smaller. Let us see what these inequalities say in
the simplest cases when l = 0, 1.
1 n k n n 1
k − (k − 1) < < kn .
k! 1 k k!
4 In fact, the functions f ⊂ A × ∅ would be counterexamples to this statement, but we
supposed that y ̸= ∅.
172 Combinatorics and Number Theory of Counting Sequences
After simplification:
kn (k − 1)n kn
n
− < < . (7.3)
k! (k − 1)! k k!
(If n is not much larger than k, then the left-hand side can be negative, so
the lower estimation is more informative when n is much larger than k.) From
here the asymptotic behavior of nk can already be seen. If we divide by k n
If k is fixed and n tends to infinity, then the left-hand side tends to one. By
the comparison test, we get the asymptotic description of the second kind
Stirling numbers when k is fixed and n tends to infinity:
kn
n
∼ . (7.4)
k k!
Note that this result readily follows from (7.2) after dividing by k n .
The right-hand side of (7.3) follows since the sum is positive on the left-hand
side is positive. On the other hand, by using this last relation again:
k−1 k−1
kn kn
X n X n (k − 1)!
n 1 1
= − > − =
k k! m=0 m (k − m)! k! (k − 1)! m=0 m (k − 1 − m)!
Asymptotics and inequalities 173
k−1
kn 1 X n kn (k − 1)n
− (k − 1)m = − .
k! (k − 1)! m=0 m k! (k − 1)!
To reach this aim, we need some new knowledge from special function theory.
This part of mathematics studies the properties of functions “useful in some
sense”6 A function is considered to be special if it is relatively widely used
and applied. Elementary functions (sin, arctan, log) are, of course, special.
The Bessel polynomials we will encounter in Chapter 9 are also special as
well as the Lambert W function (see pp. 110–111). We need two other special
functions here, the Euler Gamma function and the Digamma function.
Definition 7.3.1. The Euler Gamma function is defined by the improper in-
tegral Z ∞
Γ(x) = tx−1 e−t dt,
0
where x > 0.
It can be seen that Γ(1) = 1 = 0!, and by partial integration it follows that
Γ(2) = 1 = 1!, Γ(3) = 2 = 2!, and, in general,
Γ(n) = (n − 1)!.
Partial integration says actually much more, it comes easily that Γ satisfies
the functional equation
Γ(x + 1) = xΓ(x), (7.5)
Although the above integral is divergent when x ≤ 0, but the functional
equation (7.5) still enables us to extend Γ to negative (non-integer) values.
Indeed, for example,
1 1 1
− Γ − =Γ − +1 ,
2 2 2
whence
1 1
Γ − = −2Γ .
2 2
On the other hand, the integral definition of the Γ function is valid and
makes sense not only for integers but for real or even complex numbers when
6 Some mathematicians indeed say that special function theory should be called “useful
function theory.”
Asymptotics and inequalities 175
the real part is positive. Therefore, the Γ function (and thus the factorial) is
extensible to the whole complex plane (except the non-positive integers)7 .
Γ′ (x)
ψ(x) = (log Γ(x))′ = .
Γ(x)
satisfy the functional equation f (x + 1) = xf (x) (together with the necessary normalization
f (1) = 1), but Γ is considered to be the most useful one. What is more important, it is
known that if, in addition, f is log-convex, then there is only one such f and it is the Gamma
function. This characterization is the content of the famous Bohr-Mollerup theorem. See [35]
for a good treatise and a classical on the Gamma function, and [89] for a modern treatment.
8 Lorenzo Mascheroni (1750-1800), Italian mathematician.
176 Combinatorics and Number Theory of Counting Sequences
for the maximizing index of nk . Actually, we are going to prove the slightly
better approximation
n
Kn ∼ .
log n − log log n
Knowing that for large n and fixed k
kn
n
∼ ,
k k!
xn xn xn−1
= = .
x! Γ(x + 1) Γ(x)
Taking the derivative and applying the definition of the Digamma function, we
can see after some algebra that the maximum must satisfy the simple equation
xψ(x) = n − 1. (7.7)
Now recall the definition of the Lambert W function on pp. 110–111. Taking
the logarithm of that equation, we have that the solution of (7.9) is simply
W n − 21 . That is,
n − 12
x = expW (n− 2 ) =
1
.
W n − 21
This is the approximate maximum of the function xn /x! what we were looking
for. Hence,
n − 12
Kn ∼ .
W n − 12
If we do not like the presence of the Lambert function, we can approximate
it by a better known function, exactly as we did with the Digamma passing
from (7.7) to (7.8). However, to be able to do this, we would need how rapidly
W (n) grows as n → ∞. Recalling again the defining equation xex = n of
W (n), we see that if n is large, x must be large as well. If, on the other hand,
x is large, then ex is exponentially large and x can be neglected in xex . Hence,
in the first approximation, ex = n, and this equation is solvable. It comes that
W (n) ∼ log n
for large n. This is already enough for us to see that
n − 21 n − 12
Kn ∼ ∼ .
W n − 12 log n − 12
result of Berend and Tassa [70] is the following upper bound which is valid
for all n > 0: n
0.792n
Bn < .
log(n + 1)
This result is based on probabilistic arguments. To see the accuracy of this
upper bound we present the following table:
n 1 5 10 20 50 100
Bn 1 52 115 975 5.17 · 1013 1.86 · 1047 4.76 · 10115
n
0.792n
log(n+1) 1.14 52.73 154 508 2.11 · 1014 1.43 · 1050 2.85 · 10123
The terms of the form Fk /k! suggest that it is beneficial to introduce the
notation Gk = Fk /k!, so that G0 = 1, and
Gn−1 Gn−2 G0
Gn = + + ··· + (n > 0).
1! 2! n!
180 Combinatorics and Number Theory of Counting Sequences
7.6 Inequalities
We have seen that the Bonferroni inequality results in (7.3), a two-sided
inequality for the Stirling numbers nk . Another inequality for the same num-
bers is (6.10). There are many ad-hoc methods to find combinatorial inequal-
ities, but there also is a more-or-less systematic way, employing the theory
of polynomials. Given some properties of a polynomial (like reality of zeros,
zeros concentrated in a radius, etc.), many inequalities can be deduced with
respect to their coefficients. Thanks to the fact that many counting sequences
possess attached polynomials with real roots, this interrelationship proves to
be useful in finding inequalities. In what follows, we present some theorems
with respect to polynomials, which are interesting in themselves, and we show
how they can be applied to deduce inequalities for our sequences. Other ex-
amples than the ones presented here can easily be worked out by the reader
for other sequences.
12 We will always assume that the coefficient of the highest power of the indeterminate is
not zero when we write out a given polynomial. This coefficient is called leading coefficient.
13 The problem was proposed as Problem 5040 in the American Mathematical Monthly
[452], and the solution was given by several authors in a later issue [97]. See also [440, 3.3.7].
182 Combinatorics and Number Theory of Counting Sequences
a10 = 0.249087 . . .
a100 = 0.224036 . . .
a1 000 = 0.221616 . . .
a10 000 = 0.221374 . . .
Therefore, we ask the question: does the sequence an converge to a finite limit?
If so, can we find a closed expression for this limit?
p(x) = a0 + a1 x + a2 x2 + · · · + an xn ,
and
q(x) = b0 + b1 x + b2 x2 + · · · + bm xm ,
and their leading coefficients are positive. Let us suppose, moreover, that their
zeros are real, and interlacing in the sense of Section 3.2. Then, if m = n, then
and, if m = n − 1, then
The following result is due to P. Erdős [440, 3.3.31]: if the degree of p(x) is n,
and p has no zeros in ]a, b[ but otherwise all the zeros are real, then
|p′ (y)| n
<e (a ≤ y ≤ b).
max |p(x)| b−a
a≤x≤b
Many of our polynomials, like Bn (x), Ln (x), Fn (x), have only real and
negative roots, thus the most natural choice is a = 0 and b = 1. Also, let
y = 1, because the derivatives are easily calculable at the unity (see exercises
in Chapters 3, 4, and 6, respectively, for Bn (x), Ln (x), Fn (x)). Then, since all
the polynomials in question are positive for positive arguments together with
their derivatives, and are increasing as well,
p′ (1)
< en. (7.13)
p(1)
Bn+1
< en + 1.
Bn
p′ (x) n
≤ (x > 0).
p(x) x
a0 + a1 + · · · + an ≤ αn max ak , (7.15)
0≤k≤n
and
min ak ≤ βn max ak . (7.16)
0≤k≤n 0≤k≤n
Here
(n + 1)n
αn = n ,
(n − s)n−s (s + 1)s
s
1
βn = n ,
s
n
and s = 2 is the integer part of n/2.
n n
Lower estimations for Kn and Kn
Applying the second part (7.16) of Dixon’s theorem for the Bell polyno-
mials
n n n n−1
Bn (x)/x = + x + ··· + x
1 2 n
(which is famous for having only real zeros), we have that
n n n
min = 1 ≤ βn−1 max = .
1≤k≤n k 1≤k≤n k Kn
That is,
n n−1
≥ n−1 .
Kn 2
This means that the maximal Stirling number in the row n is at least as big
as the central binomial coefficient in the (n − 1)-th row.
16 Dixon’s theorem is a generalization of a result of L. Moser and J. R. Pounder. They
Better but a bit more complex estimation comes, however, from (7.15):
n n 1 n n n
max = ≥ + + ··· + .
1≤k≤n k Kn αn−1 1 2 n
(The shift in the index in αn−1 comes from the fact that we work with Bn (x)/x
instead of Bn (x).) This, putting it in simple form, says that
n Bn
≥ .
Kn αn−1
For large n this estimation is rather good as the following table shows.
n
n
10 100 500
Kn 42 525 7.77 · 10114 1.52 · 10842
Bn
αn−1 28 540.7 3.79 · 10114 5.73 · 10841
Everything works, mutatis mutandis, with respect to the first kind Stirling
numbers. Repeating the above argument, we have
n n!
≥ .
Kn αn−1
Here, naturally, Kn is the maximizing index in the first kind case. The esti-
mation has a very similar performance as in the table above.
Note that, with respect to the binomial coefficients, Dixon’s theorem gives
the trivial result that the central binomial coefficient(s) is (are) greater than
or equal to itself (themselves).
p(x) = a0 + a1 x + · · · + an xn
the zeros are bounded by the positive real number M , then the absolute value
of the kth derivative of p can be estimated as follows:
n
|p(k) (x)| ≤ k! |an |(|x| + M )n−k , (7.17)
k
where k can be 0, 1, . . . , n. We use this inequality not to bound p(k) (x) but to
find estimation for M .
Let us denote the leftmost zero of the nth Bell polynomial by zn∗ . Colucci’s
theorem immediately gives, with k = 0, and x = 1, that
n n
Bn ≤ 0! (1 + |zn∗ |)n ;
0 n
in other words, p
|zn∗ | ≥ n
Bn − 1.
This is a pretty inequality, but even better can be given if we take k = n − 1
instead. Note that
(n−1)
(n−1) n n n−1 n n
Bn (x) = x + ··· + x + x =
1 n−1 n
(n−1)
n n−1 n n n n
x + x = (n − 1)! + n! x.
n−1 n n−1 n
Noting that nn = 1, we substitute this into (7.17),
n n n n
(n − 1)! + n! x ≤ (n − 1)! (|x| + |zn∗ |)1 .
n−1 n n−1 n
Rearranging, and recalling that
n n n(n − 1)
= = ,
n−1 2 2
we get
n−1
+ x − |x| ≤ |zn∗ |.
2
For the best result, we choose positive x, so we get the result that
n−1
≤ |zn∗ |
2
n−1
for
√ all n. It is worth it to remark that 2 is much better estimation than
n
Bn − 1.
Asymptotics and inequalities 187
The question that which root estimation theorem works best for a given
class of polynomials is mainly an issue of experimenting18 . Colucci’s theo-
rem seems to be very sharp for the Bell polynomials. Another theorem, the
Laguerre–Samuelson theorem, seems to be more appropriate for, for instance,
the Eulerian polynomials.
The Laguerre–Samuelson theorem19 states that for a polynomial
p(x) = a0 + a1 x + · · · + an xn
with only real zeros, the interval [x− , x+ ] bounds the zeros of p, where
r
an−1 n−1 2n
x± = − ± a2n−1 − an−2 an .
nan nan n−1
We are going to apply this interval estimation with respect to the Eulerian
polynomials En+1 (x) to get an upper estimation for the leftmost root. (Note
that En (x) is an (n − 1)-degree polynomial.) We do not need to deal with x+ ,
because we know that all the zeros are negative; we are only interested
in x− .
Denoting the leftmost zero of En+1 (x) by x∗n+1 , we have (since an = n+1
n =
1) that r
∗ an−1 n−1 2n
|xn+1 | ≤ |x− | = + a2n−1 − an−2 =
n n n−1
17 It is also necessary to know for the existence of α that |z ∗ | monotone increases with n.
n
But this fact follows from the interlacing property of the zeros of the Bell polynomials.
18 Many root estimations exist, see, for example, [130, 237, 339, 434, 546] for the original
rediscovered it in 1968 [506]. See also [302] for a detailed treatise on the theorem and its
applications in statistics.
188 Combinatorics and Number Theory of Counting Sequences
s 2
1 n+1 n−1 n+1 2n n + 1
+ − . (7.18)
n n−1 n n−1 n−1 n−2
This could be left as it is now, but a simpler form can be given if n is large.
Exercise 6 of Chapter 6 gives that
n
= 2n − n − 1,
n−2
n 1
= 3n − (n + 1)2n + n(n + 1).
n−3 2
whence
1 p
|x∗n+1 | < O(2n+1 ) + O(1) O(22n+2 ) − O(1)O(3n+1 ) =
n
n+1 n+1
2 p 2
O + O(2 2n+2 )=O + O(2n+1 ) = O(2n+1 ).
n n
That is,
|x∗n | < O(2n ).
If we use (7.18) in its exact form, we get surprisingly good estimations.
For
x∗5 = −23.2,
the Laguerre-Samuelson estimate gives −23.28. If n = 10, we have
x∗10 = −963.85,
The derivative of p is
1 1 1 1
p′ (x) = nxn−1 Fn + xn Fn′ · − 2 .
Fn x x x
Recall that Fn′ (1) = Fn+1 − Fn . After multiplying by 2Fn this gives that
From our former studies (see (7.14)) we know that Fn+1 < (2n + 1)Fn , thus
the absolute value can be omitted. We finally get that
Fn+1 ≥ (n + 1)Fn .
for all n ≥ 0.
For these last inequalities, there is a combinatorial proof20 . Recall that the
20 This proof was told to the author by Daniel Ullman, problems editor of The American
Mathematical Monthly.
190 Combinatorics and Number Theory of Counting Sequences
objects that are counted by the Fubini numbers are the ordered partitions.
The number (n + 1)Fn counts the ordered partitions on n + 1 symbols that
have a single element in the first block. This is clearly less than Fn+1 ; thus
the left-hand side inequality follows21 . Now Let Fn,k be the number of ordered
partitions on n symbols with k blocks. Then
n
X
Fn+1 = (2k + 1)Fn,k ,
k=1
since there are 2k+1 places to insert the symbol n+1 into an ordered partition
on n symbols with k blocks. This is clearly less than
n
X
(2n + 1)Fn,k = (2n + 1)Fn ,
k=1
21 Prof. √
Ullman noted that the lower bound can further be improved to 2( e−1)nFn ; and
1
numerical evidence suggests that even this can be improved to log 2 nFn , which is compatible
with the asymptotic estimation (7.12).
Asymptotics and inequalities 191
Exercises
1. Take a look at (7.2) and try to prove (7.4) directly. (This is the most
rapidly deducible, but less precise, estimation from the three we have
encountered so far.)
2. Prove that the Hn harmonic numbers behave asymptotically like the
logarithm. That is, prove that the limit
exists. This limit is actually γ and is the very definition of the Euler-
Mascheroni constant. (Hint: use the 1/x function, and estimate its inte-
gral on the [1, n] intervals, and compare this to the harmonic numbers.
Two proofs of this exercise plus a sketch of a third is contained in [90],
where many other properties of the γ constant appear.)
3. Prove the validity of the following inequality:
n n
nm ≥ mn .
m m
for fixed k. (Hint: use Exercise 5 of Chapter 6.) (This asymptotic result
would suggest that the Eulerian numbers grow exponentially when n
is fixed and k runs between 0 and n. But this is far from being true:
we know that the Eulerian numbers are log-concave for fixed n, so they
grow, reach a peak or plateau and then decrease. By symmetry the max-
imizing index is around the center. The argument breaks down because
the above asymptotics you are asked to find in this exercise works only
when k is fixed and n grows. More on the asymptotics of the Eulerian
numbers can be found in [300].)
9. By using the recurrence (3.18) for the idempotent numbers, show by
induction that
√ In √
n≤ ≤ n + 1 (n ≥ 1).
In−1
In √
This shows that In−1 ∼ n. See [151] for the simple proof and for a
better approximation, and also the Outlook of Chapter 10 in this book.
10. For short, let us introduce the notation
n
X n k
An (x) = x = xn ,
k
k=0
In particular,
A′n (1) = n!Hn (n ≥ 0).
11. Based on the previous exercise, show that the particular case (7.13) of
Erdős’ theorem, applied to An (x), yields
Hn < en,
Outlook
1. For more on the asymptotics of the sequences appearing in this book,
see also the Outlook of Chapter 10.
n2k
n+k f1 (k) f2 (k) ft (k) 1
= k 1+ + + · · · + + O ,
n 2 k! n n2 nt nt+1
n2k
n k(4k − 1) 1
= k 1− +O .
n−k 2 k! 3n n2
Generalizations of our
counting sequences
195
Chapter 8
Prohibiting elements from being
together
After having presented the theory of Stirling numbers, we now turn to some
of their generalizations. We shall see that there are many different ways one
can choose to generalize the Stirling numbers by considering some additional
constraints put on permutations and partitions1 .
Here we study three main generalizations when: (1) several elements are
restricted to be in different cycles/blocks, and (2) the size of the cycles/blocks
is limited from above or below.
65. But the restriction complicates things a bit. Before solving the problem,
we continue with a definition.
explained how Stirling numbers and more general numbers appear when one considers quan-
tum mechanical creation and annihilation operators. We will restrict ourselves, however, to
generalizations having a permutation theoretical or partition theoretical meaning.
2 Sometimes non-central Stirling number is also used. These numbers were introduced by
N. Nielsen in 1906 [454] whose name was already mentioned on p. 7. L. Carlitz studied the r-
Stirling numbers, too [126, 127] and named them as weighted Stirling numbers. However, the
combinatorial study on these numbers only appeared in 1984 [100]. The r-Stirling numbers
were rediscovered by Merris [408] who called them p-Stirling numbers. More on the history
of Stirling and r-Stirling numbers can be found in Charalambides’ book [134, p. 319-321].
Another good source for Stirling and r-Stirling numbers is [135] where they are applied in
197
198 Combinatorics and Number Theory of Counting Sequences
After having this definition, we can solve the above problem symbolically.
The answer is 64 2 . Let us calculate this 2-Stirling number! We can apply the
following argument. Take all the 64 = 65 cases and subtract the undesirable
possibilities, i.e., those prison distributions where the two accomplices share
the cell. The order of the cells does not matter, so we can suppose that they
are, say, in the first cell. If so, there is at most one other prisoner that can
be put into the first cell, as we can leave none of the other three cells empty.
We therefore choose one prisoner from four to be put into the first cell: 4
possibilities. In this case, the three other cells contain 1 − 1 − 1 prisoners, and
this is only one case (not considering the order of the cells). If there is no
other prisoner in the first cell, then the other threecells
will host the other
four prisoners. The number of such configurations is 43 = 6. Altogether there
are 4 + 6 = 10 cases we need to exclude. Hence, the solution is 65 − 10 = 55.
n
Recursion for k r
Another approach can be taken that will sound familiar. Let now our
accomplices be the ones with indices 1 and 2. We suppose that we have hosted
all our prisoners except the last, sixth, in the four cells, including 1 and 2. The
sixth prisoner still must be hosted somewhere. It can happen that he goes into
a cell and does not share it with
others. Then the other three cells must be
filled by the five prisoners in 53 2 ways – taking into account the restriction
on the accomplices. If prisoner number 6 does share a cell with one or more,
then
5 five prisoners must go into four cells not leaving an empty cell. This gives
cases. Then prisoner number 6 can go to any of the four cells so we have
4 2
4 54 2 cases. Hence,
6 5 5
= +4 .
4 2 3 2 4 2
This should look familiar. The above counting matches with the proof of
recursion (1.4). Hence, the recursion of the second kind r-Stirling and Stirling
numbers is the same! Concretely,
n n−1 n−1
= +k . (8.1)
k r k−1 r k r
How is it possible? Should they not give the same number sequence then?
Obviously not, since we have an extra restriction here so the numbers cannot
be the same (there must
be less
configurations when we pose extra restric-
tions). In particular, 64 2 < 64 . We saw this, the difference is 10. What we
have
0 to take into
n account is the initial value of the recursions. By agreement,
0 = 1, and 0 = 0. Now our recursion must be supplied with somewhat
probability theory. In [134] and [135] the r-Stirling numbers are called “non-central Stirling
numbers.”
Prohibiting elements from being together 199
We now give another definition for the r-Stirling numbers of the second
kind. If we partition a set into blocks, then every block will contain a minimal
element that will be called, more than obviously, minimal element or, more
elegantly, block leader . These lead to the following observation.
The number of those k-partitions of an n element set in which 1, 2, . . . , r
are all block leaders is the r-Stirling number of the second kind with parameters
n, k, and r.
In what follows, we will use the distinguished element or special element
expressions for the first r elements.
We use the above interpretation to prove the following statement.
n n n−1
= − (r − 1) (n ≥ r ≥ 1). (8.2)
k r k r−1 k r−1
To prove this identity, first rearrange it:
n−1 n n
(r − 1) = − .
k r−1 k r−1 k r
On the right-hand side, there are the k-partitions of 1, . . . , n where the first
r − 1 elements are minimal, but r is not. Such partitions can be formed such
that we leave out r and we construct the k-block on n−1 elements in n−1
k r−1
ways, and then we insert r appropriately. As r must not be minimal by our
assumption, it can be put into blocks that already contain one of the 1, . . . , r−1
elements. All of these are in pairwise different
r−1 blocks. So r can be inserted
in one of these. This results in (r − 1) n−1 k r−1
possibilities, the quantity
presented on the left-hand side.
r blocks – these contain the distinguished elements – and we must put the
remaining n − j elements in these. The r blocks then must be chosen n − j
times independently and one block can be chosen repeatedly. There are rn−j
choices. At the end, we have to sum with respect to the possible values of j.
The formula hence reads as
n
n+r X n j n−j
= r . (8.3)
k+r r j k
j=k
cases. As m is arbitrary, we must sum on it. Finally, taking into account the
straightforward special value formula
p+m
= pm ,
p p
n n
X n n−m m X n m m
r = r . (8.5)
m=0
m k m=0
m k
The binomial coefficient should ring the bell: the exponential generating func-
tion of n+r
k+r r can be written as the product of two exponential generating
m
functions.
n One of them is the exponential generating function of r , the other
is of k . We know both very well, so the result comes without effort:
∞
n + r xn
X 1
= erx (ex − 1)k . (8.6)
k + r r n! k!
n=k
Note that (8.4) generalizes the formula (1.5) we proved earlier (see also
Exercise 4 in Chapter 1). Just put r = 1 in (8.5).
n+r
A polynomial formula for k+r r
too. This task was done in no less than three ways for the Stirling numbers
(see pages 17, 48 and 61)! We could choose the simplest one of these but,
instead, we present another proof.
By (8.6) and by Exercise 24 of Chapter 2,
∞ ∞
X [x(r + y)]n X yk
= ex(r+y) = erx (1 + (ex − 1))y = erx (ex − 1)k =
n=0
n! k!
k=0
202 Combinatorics and Number Theory of Counting Sequences
∞ ∞ n ∞ n ! n
X X n + r x X X n + r x
yk = yk .
n=0
k + r r n! n=0
k + r r n!
k=0 k=0
Compare the coefficients of xn on the far left and far right sides:
n
n
X n+r k
(y + r) = y . (8.7)
k+r
k=0
n+r
The ordinary generating function of k+r r
1 1 1
Take the 1−rx 1−(r+1)x product first, then multiply it by 1−(r+2)x , and so on,
to see the validity of (8.10).
Let us make use of the recently proven generating functions. The right-
hand side of (8.10) can be split into two factors:
1
=
(1 − rx)(1 − (r + 1)x) · · · (1 − kx)
1 1
.
(1 − rx) · · · (1 − px) (1 − (p + 1)x) · · · (1 − kx)
These are two r-Stirling generating functions; in the first, the lower parameter
is now p, in the second, r = p + 1. Hence, the right-hand side is
∞ ! ∞ !
X n+p X n + k
n n
x x .
n=0
p r n=0
k p+1
This can easily be elaborated by the multiplication rule (2.5). The formula we
gain then reads as
n
n+k X m+p n−m+k
= . (8.11)
k r m=0
p r k p+1
Definition 8.3.1. The nth r-Bell number Bn,r gives how many partitions
there are on n + r elements such that r fixed elements belong to separate
blocks3 .
Once we know the r-Stirling numbers we just sum them to get the r-Bell
numbers:
n
X n+r
Bn,r = .
k+r r
k=0
It can now be seen why the parametrization of the r-Bell numbers was given,
so we can start the summation from k = 0 and the minimal value of n is also
3 Note that Bn,r counts partitions on n + r and not on n elements.
Prohibiting elements from being together 205
zero. If we would not have given the definition as it is, the first r − 1 Bell
numbers and polynomials were zero.
Let us take an example4 :
4 4 4
B2,2 = + + .
2 2 3 2 4 2
4
2 2 gives the ways 4 elements can be put into 2 blocks, while the first 2
(special) elements are in different blocks:
{1, 3, 4}, {2} ; {1}, {2, 3, 4} ; {1, 3}, {2, 4} ; {1, 4}, {2, 3}.
Similarly, for 43 2 :
{1}, {2}, {3, 4} ; {1, 3}, {2}, {4} ; {1, 4}, {2}, {3} ;
{1}, {2, 3}, {4} ; {1}, {2, 4}, {3}.
4
Finally 4 2 enumerates the single case contribution
{1}, {2}, {3}, {4}.
So
4 4 4
B2,2 = + + = 4 + 5 + 1 = 10,
2 2 3 2 4 2
meaning that 4 elements can be partitioned in 10 ways if we want to avoid 1
and 2 to be together.
4 The r-Bell numbers appear in a paper by Whitehead who studied chromatic polynomials
of graphs [596]. The first systematic study of the Bn,r numbers and Bn,r (x) polynomials
was given in [412].
206 Combinatorics and Number Theory of Counting Sequences
The proof is similar to that of (8.3), we factor the exponential into two:
y y
−1)+ry −1)
ex(e = ery ex(e ,
and consider the Cauchy product. One twist can result in another formula.
Write r = s + t. Then
n
X n
Bn,r (x) = Bk,t (x)sn−k (s + t = r). (8.14)
k
k=0
In particular,
∞
1 X (k + r)n
Bn,r = .
e k!
k=0
The Hankel determinants for the r-Bell polynomials are the same as the
Bell polynomials, thanks to (8.13), and the remarks around (2.58).
5 Remember that log-concavity assures that there are at most two maximizing indices.
Prohibiting elements from being together 207
ex = 0 F0
x .
1
So the simple 1−x function is also hypergeometric.
Now let us see a more complex example! Is the sin(x) function hypergeo-
metric? First, we write down its generating function. To this end, we use the
knowledge given at the end of Section 2.2. What we get is
∞
X (−1)n 2n+1
sin(x) = x .
n=0
(2n + 1)!
√
The 2n + 1 exponent is disturbing, so we first divide by x then substitute x
in place of x:
√ ∞
sin( x) X (−1)n n
√ = x .
x n=0
(2n + 1)!
208 Combinatorics and Number Theory of Counting Sequences
an+1
1 an+1
2 ···an+1
p xn+1
b1 b2 ···bn+1
n+1 n+1
q
(n+1)! (n + a1 )(n + a2 ) · · · (n + ap ) x
an n n
= .
1 a2 ···ap xn (n + b1 )(n + b2 ) · · · (n + bq ) n + 1
bn b
1 2
n ···bn n!
q
This tells us that the ratio of two consecutive terms in any hypergeometric
function must have this form. And the reverse is also true: if in an expansion
the ratio of two consecutive terms has the above form, then it is necessarily
hypergeometric with parameters a1 , . . . , ap , b1 , . . . , bq√
.
sin( x)
Let us check what this argument says for the √
x
function.
(−1)n+1 n+1
(2(n+1)+1)! x −1
(−1)n = x.
n (2n + 2)(2n + 3)
(2n+1)! x
−1 1 −x/4
x= .
(2n + 2)(2n + 3) (n + 3/2) n + 1
The final result can be read out directly: there is no upper parameter and
there is only one lower parameter, b1 = 3/2. Hence,
√
sin( x) x
√ = 0 F1 − .
x 3/2 4
√
To express sin(x) we multiply by x and substitute x2 in place of x.
x2
sin(x) = x · 0 F1 − .
3/2 4
Now we are ready to prove that the generating function of the r-Bell
polynomials can be expressed in hypergeometric function terms. Concretely,
∞ rz−1
X
n −1 1 z
Bn,r (x)z = x 1 F1 rz+z−1 x .
n=0
rz − 1 e z
Prohibiting elements from being together 209
Our initial point is the (8.10) generating function of the second kind r-
Stirling numbers. After a re-parametrization, it reads as
∞
zk
X n+r
zn = .
n=0
k+r r (1 − rz)(1 − (r + 1)z) · · · (1 − (k + r)z)
Since
1 r
z
z
= (−1)r ,
− z1
r+1 rz − 1
we get that
∞
(−1)k
X n+r −1
zn = .
k+r r rz − 1 rz+z−1 k
n=k z
This is already what we wanted (expressing the generating function with the
210 Combinatorics and Number Theory of Counting Sequences
Definition 8.5.1. The nth r-Fubini number Fn,r gives the number of par-
titions of an (n + r)-element set such that r fixed elements go to separate
partitions and the order of the blocks matters.
By this definition, the basic formula for the Fn,r numbers reads as
n
X n+r
Fn,r = (k + r)! ,
k+r r
k=0
We begin the study of the r-Fubini numbers and polynomials by the de-
termination of their exponential generating function. We are going to show
6 Ernst Eduard Kummer (1810-1893), German mathematician.
Prohibiting elements from being together 211
that
∞ ∞
!r+1
X tn r!ert X tn
Fn,r (x) = t − 1))r+1
= r!ert Fn (x) .
n=0
n! (1 − x(e n=0
n!
Here Fn (x) = Fn,0 (x) is the classical Fubini polynomial (see Section 6.1).
To deduce this result, we apply a tricky idea7 . As xk is a polynomial of
degree k (constant polynomials are of degree 0), any polynomial can be written
as a linear combination of the polynomials (xk )∞ k=0 (see Chapter 2). We say
that the polynomials (xk )∞ k=0 form a base in the vector space of polynomials
(say, of real coefficients).
Let L be a linear operator acting on the vector space of real polynomials8 .
Here we prescribe the effect of the operator L on the falling factorial base:
L(xk ) = L(x(x − 1) · · · (x − k + 1)) := (k + r)!xk .
Because of (8.7)
n
n
X n+r
(x + r) = xk ,
k+r r
k=0
it holds true that
n ! n
n
X n+r k
X n+r
L((x + r) ) = L x = L(xk ) =
k+r r k+r r
k=0 k=0
n
X n+r
(k + r)!xk = Fn,r (x).
k+r r
k=0
Thus,
∞ ∞ ∞
!
X tn X tn X ((x + r)t)n
Fn,r (x) = L((x + r)n ) = L = ert L(ext ).
n=0
n! n=0 n! n=0
n!
Write et = 1 + v. Then ext = (et )x = (1 + v)x , and apply the general binomial
theorem
∞ ∞
x
X x n X xn n
(1 + v) = v = v .
n=0
n n=0
n!
By the definition of L,
∞ ∞
X L(xn ) n X (n + r)!
L(ext ) = L((1 + v)x ) = v = (xv)n .
n=0
n! n=0
n!
7 This proof was done by Stephen M. Tanny in [558] with respect to the Fubini polyno-
mials, but the idea goes back to at least Gian-Carlo Rota [498].
8 An operator is linear if it preserves the multiplication by constant and it also preserves
the addition of polynomials. For example, f L is linear, then it must hold true that L(5x) =
5L(x) and L(x2 + x) = L(x2 ) + L(x). Therefore, it is enough to prescribe how L acts on
the non-negative powers of x. Also, it is enough to prescribe how L acts on any other base.
212 Combinatorics and Number Theory of Counting Sequences
∞ n ∞ ∞
! ! !
X t X tn tn X
(r + 1) Fn (x) Fn,r (x) =
n=0
n! n=0 n=0
n! n!
∞ n
! ∞ n
!
X t X X n tn
(r + 1) Fl (x)Fn−l,r (x) =
n=0
n! n=0 l n!
l=0
∞ X n Xk
!
X n k tn
(r + 1) Fl (x)Fk−l,r (x) .
n=0
k l n!
k=0 l=0
n−1 !′
1 X n−1+r 1
(k + r)! x k+r
= r−1 (xr Fn−1,r (x))′ =
xr−1 k+r r x
k=0
n−1 !′
1 X n−1+r 1
(k + r − 1)! xk+r = r−1 (xr+1 Fn−1,r (x))′ =
xr−1 k+r r x
k=0
′
(r + 1)xFn−1,r (x) + x2 Fn−1,r (x).
This results in the recursion. It also follows that
′
x1−r (xr+1 + xr )Fn−1,r (x) = Fn,r (x).
(8.18)
In particular,
Fn (x) = x((1 + x)Fn−1 (x))′ .
This was proven earlier (see (6.8)).
From the recursion (8.18) above, one can prove that all the zeros of Fn,r (x)
are real. What is more, these zeros all belong to the interval ] − 1, 0[.
Fn,r (x) cannot have positive real zeros, as its coefficients are positive so
it takes positive values for positive x. Moreover, for positive integer r, x1−r
cannot be zero for finite x (but it is zero when r = 0 and x = 0), so Fn,r (x)
is 0 if and only if
′
[xr (x + 1)Fn−1,r (x)] = 0.
214 Combinatorics and Number Theory of Counting Sequences
These integrals are known (but you are asked to calculate these in the exercise
at the end of this chapter):
Z ∞ k+r Z ∞ k+r
x x
x
= (k + r)!, = (k + r)!2−(k+r+1) . (8.20)
0 e 0 e2x
A relation between the Stirling and Eulerian numbers was also given:
X n
n n m
k! = , (8.23)
k m=0
m n−k
We try to find the “r-version” of the above results. First, let us try the
crudest method to find the generalization of the Eulerian numbers that are
attached to the r-Fubini numbers. Write the r-Fubini polynomials to the left-
hand
n side of (8.22) and denote the new coefficients on the right-hand side by
k r:
n
X n
Fn,r (x) = (x + 1)k xn−k . (8.25)
k r
k=0
9 The r-Eulerian numbers were introduced in the thesis [419], see also [420].
216 Combinatorics and Number Theory of Counting Sequences
by (8.16).
Equation (8.25) gives the following relation between the r-Eulerian poly-
nomials and r-Fubini polynomials:
x+1
Fn,r (x) = xn En,r ,
x
1
En,r (x) = (x − 1)n Fn,r . (8.28)
x−1
Recalling that the zeros of the r-Fubini polynomials lie in ] − 1, 0[, a straight
consequence of (8.28) is that all the
zeros
nof En,r (x) are real and belong to
n
] − ∞, 0[. The log-concavity of the m r m=0
coefficients thus follows. That
is,
2
n n n
≥ .
m r m−1 r m+1 r
The exponential generating function of the r-Eulerian polynomials is
∞ r+1 ∞
!r+1
tn tn
X x−1 X
En,r (x) = r!er(x−1)t = r!e r(x−1)t
En (x) .
n=0
n! x − e(x−1)t n=0
n!
10 We saw that the E (x) classical Eulerian polynomials are of degree n − 1. The E
n n,r (x)
polynomials are of degree n when r > 0.
218 Combinatorics and Number Theory of Counting Sequences
Having the exponential generating function at our disposal, the basic re-
cursion for the Eulerian numbers is readily found. This will be helpful when we
want to find the combinatorial meaning of these numbers in the next section.
Let
∞
X tn
f (x, t) = En,r (x) .
n=0
n!
Then it can be seen that f (x, t) satisfies a partial differential equation similar
to the one found in Section 6.7:
∂f ∂f
(x − x2 ) + (tx − 1) + (1 + rx)f = 0.
∂x ∂t
Recall Equation (6.26) given for the Eulerian polynomials:
∂f ∂f
(x − x2 ) + (tx − 1) + f = 0.
∂x ∂t
The only difference is the additive rxf term. This term modifies the recursion
in the following manner:
n n−1 n−1
= (m + 1) + (n − m + r) . (8.30)
m r m r m−1 r
This result can be used to find a recursion for En,r (x):
′
En,r (x) = (1 + (n + r − 1)x)En−1,r (x) + (x − x2 )En−1,r (x).
Indeed,
En,r (x) =
n n n
X n−1 m
X n−1 m
X n−1
(m + 1) x + (n − m) x +r xm .
m=0
m r m=0
m − 1 r m=0
m − 1 r
The first two terms are the same as in the Eulerian polynomial case, the third
term is rxEn−1,r (x). Using the recursion
′
En (x) = (1 + (n − 1)x)En−1 (x) + (x − x2 )En−1 (x)
given for the Eulerian polynomials, we are done.
We have derived a number of identities with respect to the r-Eulerian
numbers and polynomials without knowing their combinatorial meaning. In
the next section, we study this latter question.
Definition 8.7.1. A run is called r-run if in this run there is at most one
distinguished element.
r-ascents + r-descents = n − 1,
r-runs = r-descents + 1,
r-runs = n − r-ascents.
These relations show that the definitions are correct and these are proper
generalizations of the classical notions of ascents, descents, and runs.
These new definitions make easier the generalization of the combination
lock game. If we had classical runs in a lock combination, then additional sep-
arators must be put in the places where there are two distinguished elements.
Such a button press sequence is the following when r = 3:
1; 2; 3, 4, 5.
To see how these definitions work, let us take again the permutation
1 2 3 4 5 6 7 8
,
1 2 3 6 4 5 7 8
n
Recursion for k r
After generalizing the notion of ascents, we can easily present the combi-
natorial proof of the (8.30) recursion
n n−1 n−1
= (m + 1) + (n − m + r) .
m r m r m−1 r
The proof given for the usual Eulerian number recursion can be repeated word
for word (see (6.14)). The last element is put somewhere in the permutation
such that we want or do not want a new ascent. As the last element is not
distinguished if n > 0, the usual notion of ascent coincides with the r-ascent.
The n − m + r = n + r − m factor is different but only because we have n + r
elements in place of n. This is similar to the fact that the recursion for the
Stirling numbers is unmodified when
we take r
>0.
The initial values do change: 00 r = 1 and n0 = r! if n ≥ 1. The first is
a convention and the second is clear: 0 r-ascent can be gotten only if we list
our non-distinguished elements in a decreasing order in a permutation. The
distinguished elements can never form r-ascents (they are always r-descents),
so they can be put at the beginning of the permutation in any order. (But
cannot be put to the end or somewhere else to keep zero ascents!) This results
in r! permutations with no r-ascents.
Prohibiting elements from being together 221
(9(8(2764(135 → (9)(8)(2764)(135).
222 Combinatorics and Number Theory of Counting Sequences
We have already seen similar notations for permutations, the word represen-
tation on page 23.
We introduce the sub index R for the Riordan representation, and w for
the word representation. So 375214689w means that we have a word repre-
sentation, while 982764135R warns us that the given permutation is in the
Riordan representation.
Let us go back now to the definition of the r-Stirling numbers. The dis-
tinguished elements 1, . . . , r are certainly cycle leaders. But not only cycle
leaders, they are left-to-right minima also. Hence, there are one-to-one corre-
spondence between those permutations in which the last r left-to-right minima
are r, r − 1, . . . , 1 and those in which the first r elements are in different cycles.
Therefore, the next definition is equivalent to the former one.
n
Two recursions for k r
Applying the argument above, we can give a recursion for the r-Stirling
numbers of the first kind.
!
n 1 n n
= − .
k r r−1 k − 1 r−1 k−1 r
The right-hand side gives the number of those permutations which are consti-
tuted by k − 1 cycles, the first r − 1 elements are left-to-right minima but r is
not. These permutations can be constructed from permutations with k cycles
where the first r elements are left-to-right minima (there are nk r many of
these), but then we must put the cycle containing r after a cycle containing
one of 1, . . . , r − 1. This can be done in r − 1 ways. (If it was put after another
cycle, then it would be a minimum.)
The basic recurrence for nk r is still missing. As for the second kind r-
Stirling case, the recursion coincides with that of the classical Stirlings:
n n−1 n−1
= (n − 1) + ,
k r k r k−1 r
Prohibiting elements from being together 223
Until the point when we start to fill the distinguished blocks (with j elements)
the proof is the same as the proof of (8.3). The remaining n − j elements go
to the distinguished blocks. The first element can go to r places, the second
can go into r + 1 positions, and so on. The (n − j)th element can go into
r + n − j − 1 positions. Multiplying these, we get the rising factorial rn−j , and
the statement is proved.
We list some other identities without proof (as the proofs are similar to
the former ones). The “first kind versions” of (8.4) and (8.12) are
n−r
X n − rn − p − m
n
= pm (r ≥ p ≥ 0),
k r m=0 m k−p r−p
and
n
k+m n+r+s X n l+r n−l+s
= .
m k + m + r + s r+s l k+r r m+s s
l=0
and
∞ r
n + r xk
X 1 1 m 1
= ln .
n=0
k + r r k! k! 1 − x 1−x
Prohibiting elements from being together 225
The first and second kind r-Stirling numbers are orthogonal to each other,
similarly to the classical Stirling numbers:
m
X m n 1 if m = k
= .
n r k r 0 otherwise
n=k
Here the overline denotes the signed Stirling numbers of the first kind:
n n
= (−1)n−k .
k r k r
Similarly to the fact that the r-Stirling numbers generalize the Stirling
numbers, we need a generalization of the harmonic numbers to express the
small lower parameter special values of the r-Stirling numbers. This general-
ization is introduced now. The numbers
1
Hn0 := (H00 = 0)
n
are called harmonic numbers of order zero, the numbers
n n
X 1 X 0
Hn1 := = Hk
k
k=1 k=1
are the harmonic numbers of order 1 or simply harmonic numbers, while the
numbers
Xn
Hn2 := Hk1
k=1
are called – as you probably expect – second order harmonic numbers, or
hyperharmonic numbers. In general,
n
X
Hnr := Hkr−1 (H0r = 0)
k=1
226 Combinatorics and Number Theory of Counting Sequences
we infer
an,r an−1,r an,r−1
= + .
n! (n − 1)! n!
This results in the recursion
The proof of this recursion is based on a simple argument. Taking the first
element, 1, we have two alternatives: (1) it is a fixed point, or (2) there are
other elements in its cycle. If 1 is a fixed point, then we put the remaining
n + r − 1 elements into k − 1 cycles such that r − 1 elements are in different
cycles. This results in the second term. If 1 shares its cycle with some other
elements, then we can do the following. Let us determine which element will
be the immediate successor of 1 in the cycle (by right shifts we can move 1 to
11 A funny fact that the hyperharmonic numbers were firstly defined in The Book of
the first position, and then the immediate successor of 1 goes to the second
position in the cycle) and denote it by s. There are n choices for this successor
s. We construct a k-permutation on n + r − 1 elements such that the first r
elements are in different cycles in n+r−1
r r
ways. In the final step, we insert
s into its position.
Now we are ready to prove (8.31). For brevity, we introduce the abbrevi-
ation
n+r
An,r = .
r+1 r
r
= 0 = a0,r , while for n ≥ 1 we have An,0 = n1 0 =
Hence, A0,r = r+1 r
(n − 1)! = an,0 . By the recursion we have just proved
and this agrees with 8.32. Since the initial values of an,r and An,r also agree,
we get that the two sequences are identical. Hence, (8.31) is valid.
(n + r − 1)!
.
(r − 1)!(t − 1)
To see why this statement is true, note that, as t is minimal in its cycle, the
12 This relation firstly appeared in the book [162] in 1996 without proof. An analytic proof
of this identity can be found in [426] where infinite sums of hyperharmonic numbers are
studied.
13 It is known since 1915 that the H harmonic numbers are never integer, but whether
n
there exists integer hyperharmonic numbers is still an open question. There is ongoing
research on this topic, see the literature [20, 21, 22, 257, 415]. The latest result on the
non-integerness of the hyperharmonic numbers is [16], in which it is shown that if there are
integer hyperharmonic numbers, they must be “rare.”
228 Combinatorics and Number Theory of Counting Sequences
from which
n+r
(r − 1)! = (n + r − 1)!(Hn+r−1 − Hr−1 )
r+1 r
proof for (8.33). In fact, much more is true than (8.34). Namely, for all 0 ≤
r ≤ m ≤ n we have
k
n X m n
= .
k r t=r t r k + m − t m
This reduces to (8.34) when r = 1 and k = 2. Let us prove this latter state-
ment. The left-hand side counts the elements of Tn,k,r . Elements of Tn,k,r can
be constructed such that we put the n elements not into k cycles but into
k + m − t cycles such that the first m ≥ r elements are in different cycles.
n
There are k+m−t r
ways to do this. Since m ≥ r we need to decompose fur-
ther the m cycles into t cycles by treating the m cycles as elements for a
moment.
m
Still we need to put the r elements into separate cycles so there are
t r possibilities. We sum over the possible values of t.
We note that the already mentioned paper [61] has many other identities
with respect to the first kind r-Stirling numbers.
230 Combinatorics and Number Theory of Counting Sequences
Exercises
6
1. Calculate 4 2 by using (8.1).
3. Determine 64 2 by (8.8).
10. Expand the polynomial 3x2 − 2x1 + 5x0 in the usual 1, x, x2 , . . . base.
11. How many 4-ascents, 4-descents and 4-runs are there in the permutation
1 2 3 4 5 6 7 8
?
7 8 1 3 2 4 6 5
Prohibiting elements from being together 231
12. Show that the r-Eulerian numbers have the following special values
n
= r!,
0 r
n
= r!rn ,
n r
n
= r! [(r + 1)((r + 1)n − rn ) − nrn ] .
n−1 r
16. Prove the r-Stirling version of the (11.27) Spivey formula and its dual
(11.40):
n X m
n−k m + r n
X
Bn+m+r,r = (j + r) Bk ,
j+r r k
k=0 j=0
n X m
n−k m + r n
X
(r + 1)n+m = (m + r) (r + 1)k .
j=0
j + r r k
k=0
(See [413].)
17. Show that (n)
iz iz
ee +riz
= in ee +riz
Bn,r (eiz ).
for all n, r ≥ 0. For the details and for a polynomial generalization see
[427].
19. Show that
Bn+p,r ≡ (r + 1)Bn,r + Bn,r+1 (mod p).
See [427].
20. Prove (8.13) and (8.14) for the r-Bell numbers (that is, when x = 1).
Do not use analysis, only combinatorics.
21. Prove that
n−1
X n−1
X n − 1
n−1
Bn,r = rBn−1,r + Bk,r = rBn−1,r + Bn−1−k,r .
k k
k=0 k=0
22. Show that the r-Bell number sequence is log-convex. (Hint: use (8.13)
and the binomial convolution’s log-convexity preserving property men-
tioned in Point 6 in the Outlook of Chapter 4.)
23. Find the combinatorial proof of
r
n X r n−r
= (k − i)r−i ,
k r i=0 i k−i
r
n+r i n+r−i
X
= k .
k + r r i=0 k+r r−i
Outlook
1. We noted already in the Outlook of Chapter 11, that it is possible to
generalize the Touchard congruence (originally given for the Bell num-
bers) to polynomials. In Exercise 18 of this chapter, we have seen that
this congruence can be extended to the r-Bell numbers. Polynomial ex-
tension is also possible with respect to the r-Bell polynomials, see [427]
for the details, and for other congruences of the r-Bell numbers and de-
rangement numbers. In this paper, one can also find results with respect
to the remainders of Bn,r modulo primes as well as results for modulo
2-powers.
2. It is known for more than 100 years [561] that the Hn harmonic numbers
are not integers except, obviously, H1 = 1. (The reader can prove it full
of hope; this is a standard textbook problem. See also Chapter 11 for a
detailed discussion.) That the hyperharmonic numbers (except H1r = 1)
can be integers or not – this is a much harder question. This question was
first studied by the author in 2007 [415]. There it was proven that Hn2 and
Hn3 are never integers (see, again, Chapter 11). In the subsequent years,
a large number of results came out and a large class of hyperharmonic
numbers is known to be non-integers [20, 21, 22, 195, 257].
3. For which n1 ̸= n2 and r1 ̸= r2 does the equality Hnr11 = Hnr22 holds?
This is another question from [415].
4. The r-Lah numbers generalize the Lah numbers in the spirit of the r-
Stirlings. That is, the r-Lah number nk r counts the number of partitions
of a set with n + r elements into k + r non-empty subsets such that
r distinguished elements have to be in distinct ordered blocks. These
numbers were studied in [54, 142] and were thoroughly studied by G.
Nyul and G. Rácz [456]. In [55] one can find the extension of the r-Lah
numbers to the associated case. M. Shattuck [516] introduced a two-
parameter generalization of the r-Lah numbers by set partition statistics.
5. The zigzag permutations can be subject to a restriction that in their
cycles the first element is in different cycles. These are the r-zigzag
permutations and were studied in [485].
6. The asymptotic behavior of the r-Stirling and r-Bell numbers was ex-
tensively studied in [163, 164, 174].
7. Cesàro’s integral formula (p. 30) can be extended easily to the r-Bell
numbers, see [412].
8. As we saw, the r-Bell polynomials have only real zeros, and even the
corresponding result of (3.8) can be found for the r-Bell polynomials
234 Combinatorics and Number Theory of Counting Sequences
(see the exercises). Note that Edrei’s paper [210] determines the final set
z
(in the sense of Section 3.2.4) not only for e−e but also for any function
z
of the form h(z)e−e , where h(z) is an admissible entire function taking
real values for real z.
iz
As we see from Exercise 17, we need the final set of f (z) = ee +riz
.
This function can be transformed into
i(−iz+π) iπ z z
f (−iz + π) = ee +ri(−iz+π)
= erz (eiπ )r ee e
= (−1)r erz e−e .
(−1)k+1
z z, z, ..., z
= k F
k+1 k
1 ,
k z Γ(1 − z) z + 1, z + 1, . . . , z + 1
or, alternatively,
∞
(−1)k+1 sin(πz) X Γ(i + z)
z
= .
k π i=0
i!(i + z)k
Here z can be any real or even complex number such that its real part
is less than k. Γ is the Gamma function (Subsection 7.3.1).
An integral representation can also be deduced, where even the lower
parameter can be complex:
Z 1 z−1
z 1 t
= logw−1 (t)dt.
w Γ(1 − z)Γ(w) 0 (1 − t)z
14 Admissibility here means that the function does not vanish in some strip. Here this
The coefficients Wm,r (n, k) and wm,r (n, k) give back the Stirling,
236 Combinatorics and Number Theory of Counting Sequences
h1,3 (x) = 6
h2,3 (x) = 144x(1 + x)
h3,3 (x) = 34 560x3 (1 + x)3
h4,3 (x) = 149 299 200x6 (1 + x)6
h5,3 (x) = 18 059 231 232 000x10 (1 + x)10
h5,3 (x) = 87 377 784 392 908 800 000x15 (1 + x)15
For r = 4
h1,4 (x) = 24
h2,4 (x) = 2 880x(1 + x)
h3,4 (x) = 4 147 200x3 (1 + x)3
h4,4 (x) = 125 411 328 000x6 (1 + x)6
h5,4 (x) = 121 358 033 879 040 000x10 (1 + x)10
h6,4 (x) = 5 284 608 400 083 124 224 000 000x15 (1 + x)15
In this and the next chapter, we start to study those partitions and permuta-
tions where the blocks/cycles are limited in size.
Definition 9.1.1. If n elements are put into k blocks such that the size of
the
n blocks is at most two, then the total number of allocations is given by the
1 2
k ≤2 Bessel number of parameters n and k.
239
240 Combinatorics and Number Theory of Counting Sequences
2k − n + 2(n − k) = 2k − n + 2n − 2k = n.
Knowing the partition pattern formula (2.31) we can give a simple expression
for the Bessel numbers:
n n!
= . (9.1)
k ≤2 (2k − n)!2n−k (n − k)!
Clearly, k cannot be smaller than ⌈n/2⌉ (this is the upper integer part of n/2).
It can also be seen that the Bessel numbers satisfy the recursion
n n−1 n−2
= + (n − 1) . (9.2)
k ≤2 k − 1 ≤2 k − 1 ≤2
This is not proven here, as we will present a more general treatment from
which this will immediately follow.
n
The horizontal generating function of k ≤2
Recall the (2.46) identity for the Stirling numbers of the second kind:
n
X n k
x = xn .
k
k=0
We complicate the right-hand side a bit. etx is simply the exponential gene-
rating function of xn . Because of this fact, based on (2.9), we know that the
nth derivative of etx with respect to t at t = 0 equals xn . Therefore
n
X n k
(etx )(n) = x .
t=0 k
k=0
Avoidance of big substructures 241
The exponential is
x
t2 t3
tx t x
e = (e ) = 1 + t + + + ··· .
2! 3!
Note one interesting thing. We permit blocks of size at most two and, at
the same time, in the horizontal generating function the maximal exponent
of t is two! This is an appearance of a more general phenomenon to be fully
developed in Sections 10.3-10.4.
We prove (9.3). By Exercise 24 of Chapter 2
x X∞ k
t2 xk t2
f (t) = 1 + t + = t+ =
2! k! 2!
k=0
∞ k l !
xk t2
X X k k−l
t =
k! l 2!
k=0 l=0
∞ X
k ∞ n
X xk tk+l X X xk
= tn .
2l l!(k − l)! n=0 2n−k (n − k)!(2k − n)!
k=0 l=0 k=⌈n/2⌉
n
Now we determine the exponential generating function of k ≤2 . It is
already apparent from (9.1) that the sum
∞
X n xn
n=0
k ≤2 n!
242 Combinatorics and Number Theory of Counting Sequences
has non-zero terms only for values when n ≥ k and n ≤ 2k. Therefore, the
function we are looking for is actually a finite sum:
2k
X n xn
. (9.4)
k ≤2 n!
n=k
For the Stirling and r-Stirling numbers, it was true that the exponential ge-
nerating function is of the form f k (x)/k!, so we insist that for some f (x)
2k
f k (x) X n xn
= .
k! k ≤2 n!
n=k
the blocks we got the Bell numbers before. Summing now the Bessel numbers
we get another interesting counting sequence.
Clearly, the 2-restricted Bell numbers can be calculated via the Bessel
numbers:
n
X n
Bn,≤2 = .
k ≤2
k=⌈n/2⌉
This relation helps us find the exponential generating function of Bn,≤2 . But it
is better to be a bit more general and find the exponential generating function
of the polynomial
n
X n
Bn,≤2 (y) = yk .
k ≤2
k=⌈n/2⌉
k
Multiply both sides of (9.5) by y , sum over k and interchange the order of
summation:
∞
xn 2
y x+ x2
X
Bn≤2 (y) =e .
n=0
n!
In particular, for the 2-restricted Bell numbers:
∞
X xn x2
Bn,≤2 = ex+ 2 .
n=0
n!
the literature no later than in 1800! See some historical details in [438].
244 Combinatorics and Number Theory of Counting Sequences
However,
1 3 5 6 8 9
2 4 7 10
11 13 15
12 14 16
17
1 4 6 7 8 10
2 5 9 11
3 12 14
13 15 17
16
Then we successively fill the row of 6 with the subsequent elements of the
permutation but only if it results in a permitted tableau (i.e., if the new
element is greater than the former ones in the row). If this is not the case,
then the first greater element in the row (counted from the left) is bumped out
from its position and it goes to the next row. Before inserting this bumped
element, we must check whether there is an element in this row to be bumped.
In our example 6 is put, so the next element, 8 comes. As 8 > 6 it is just
put to the right of 6:
6 8
6 Normally it is permitted to choose a number repeatedly. If no repetition is allowed, the
tableau is called standard. We do not consider non-standard tableaux, so we do not use the
attribute “standard.”
7 In Quantum Theory, a central question is the description of symmetries of molecules.
Young diagrams help to describe the decomposition of such symmetries into simpler, “irre-
ducible” ones. More on this topic can be found in [238, 354].
246 Combinatorics and Number Theory of Counting Sequences
Now 5 comes. As 5 is smaller than 6, 6 is bumped out and goes to the next
row, and 5 goes into the position of 6:
5 8
6
2 8
5
6
1 3 4
2 3 2 3 9 2 3 7 2 3 4 2 7 9
5 8 5 8 5 8 9 5 7 9 5 8
6 6 6 6 8 6
The algorithm terminates after inserting 10 (simply in the first line as there
are no greater elements):
1 3 4 10
2 7 9
5 8
6
Note that the output of the algorithm is a Young tableau with increasing rows
and columns.
In the next step, we extend this algorithm by constructing a second Young
tableau parallel to the first one. In the kth step, we put down the kth element
of the permutation as we did before and, in addition, we attach squares to
the second Young tableau such that it follows the shape of the first one. The
new square in the second tableau is to be filled with k. This table is called
insertion table.
The first step in this extended algorithm results in the pair
6 1
In the second step, the first table extends to the right so we extend the second
table similarly:
6 8 1 2
In the third step, a second line is inserted so we modify the second table
accordingly:
5 8 1 2
6 3
Avoidance of big substructures 247
1 3 4 10 1 2 6 10
2 7 9 3 5 7
5 8 4 8
6 9
It is crucial that the initial permutation can be traced back from the pair.
This fact is called Robinson8 – Schensted9 -correspondence.
Now we explain how these Young tableaux are related to the restricted
Bell numbers. Because of the Robinson – Schensted-correspondence, there is a
bijective relation between permutations and Young tableaux pairs. Moreover,
if the permutation π results in a Young tableau pair (Y1 , Y2 ), then the inverse
of π results in (Y2 , Y1 ). In particular, if π −1 = π, i.e., π 2 = π, then this
permutation results in a standard Young tableau pair of identical tableaux,
(Y, Y ). By the bijection of the Robinson – Schensted-correspondence, we get
that there are as many Y Young tableaux as many involutions.
Bessel differential equation often appears [77, 268]. We show that the solutions
of this equation are polynomials and the coefficients of these are the Bessel
numbers. This is where the name of the B(n, k) = nk ≤2 numbers comes10 .
The solutions of the Bessel differential equation are the
n
X (n + k)!
yn (x) = xk
2k k!(n − k)!
k=0
find them. We should write down a function with unknown coefficients and substitute this
function into the differential equation. Performing the derivatives, we would get a recursion
for the coefficients and then we could show that these coefficients are the ones given above.
248 Combinatorics and Number Theory of Counting Sequences
account, is
n
X (n + k)!
x2 yn′′ (x) = xk ,
2k (k − 2)!(n − k)!
k=0
n
X (n + k)!
2xyn′ (x) = xk ,
2k−1 (k − 1)!(n − k)!
k=0
n n
X (n + k)! X (n + k + 1)!
2yn′ (x) = x k−1
= xk ,
2k−1 (k − 1)!(n − k)! 2k k!(n − k − 1)!
k=1 k=0
n
X (n + k)!
n(n + 1)yn (x) = n(n + 1) k xk .
2 k!(n − k)!
k=0
Summing the first three of these, we need to show that this sum agrees with
the right-hand side. As on both sides we have polynomials we simply compare
the coefficients.
(n + k)! (n + k)! (n + k + 1)!
+ + =
2k (k − 2)!(n − k)! 2k−1 (k − 1)!(n − k)! 2k k!(n − k − 1)!
(n + k)!
n(n + 1)
2k k!(n − k)!
Multiplying by 2k k!(n−k)! and dividing by (n+k)! the left-hand side simplifies
to
k(k − 1) + 2k + (n + k + 1)(n − k) = n(n + 1),
so the Bessel polynomials are indeed the solutions of (9.6), as we stated.
To relate these yn (x) polynomials to the Bessel numbers, we make the
following transformation12 .
X n n
n 1 (n + k)! n−k
X (n + n − k)!
x yn = x = xk =
x 2k k!(n − k)! 2n−k (n − k)!(n − (n − k))!
k=0 k=0
n
X (2n − k)!
xk .
2n−k (n − k)!k!
k=0
If we introduce the temporary notation
(2n − k)!
Bn,k = ,
2n−k (n − k)!k!
then we get the connection we were looking for:
n
= B(n, k) = Bk,2k−n .
k ≤2
This yields the identification between the Bessel numbers, and Bessel polyno-
mial coefficients. More on the Bessel polynomials can be found in [268].
12 The transformed polynomial xn yn x1 is also often used, it is usually denoted by θn (x),
and called reverse Bessel polynomial [268].
Avoidance of big substructures 249
The notation nk ≤m is still not very widely known and accepted, but we
13 In some works, the 2-restricted Stirlings are also called bi-restricted, the 3-restricted
Stirlings are called tri-restricted and, in general, named as multi-restricted Stirling numbers.
250 Combinatorics and Number Theory of Counting Sequences
We are now going to prove the analogue of (1.5) which we present here for
the convenience of the reader
X n
n+1 n i
= .
k+1 i=0
i k
Consider a set of n + 1 elements and pick an element, say, the first one. Then,
by our restriction, this element can share its block with i = 0, 1, . . . , m−1 other
elements. Thus, the block of 1 can be filled in ni ways, while the remaining
n + 1 − 1 − i = n − i elements must go into k blocks to have k + 1 blocks in
total. Summing on i the statement follows.
Later we prove in a general framework that the (9.5) exponential genera-
ting function generalizes to
mk k
xn x2 x3 xm
X n 1
= x+ + + ··· + . (9.8)
k ≤m n! k! 2! 3! m!
n=k
It is obvious that
n n
=
k ≤m k
for k ≤ n ≤ mk, while k is in the interval k ≤ n ≤ m. It is equally easy to see
that
n n
=
n − 1 ≤m 2
when n, m ≥ 2. It is a bit more work to show that
(
3n−5 n
n 4 3 (n ≥ 4, m ≥ 3);
= n
.
n − 2 ≤m 3 4 (n ≥ 4, m = 2) ,
To show this latter statement, first let m = 2, and the number of blocks
be k = n − 2. Then, for the block structure we have the only one possibility
.|.|···|.| ..|..
| {z }
n−4
Avoidance of big substructures 251
That is,
1 4 n
there
n
are n − 4 singletons and two blocks of length 2. There are
2 2 4 = 3 4 such partitions: we have to choose those four elements going
to the non-singleton blocks in n4 ways. Then we put two of four elements into
the first block and the other two go to the other block: 42 = 6 cases. Finally,
we have to divide by two because the order of the blocks does not matter.
If m = 3 then we have one more possible distribution of blocks sizes apart
from the above:
.|.|···|.| ...
| {z }
n−5
n
Into the last block we have 3 possible option to put
3 elements. So if m = 3
n n 3n−5 n
and k = n − 2, then we have 3 + 3 4 = 4 3 cases in total.
If m ≥ 4 there is no additional configuration, so the statement holds.
More special values of the restricted Stirling numbers can be found in [340].
This number is the nth m-restricted Bell number or simply restricted Bell
number. It counts the total number of partitions of an n element set where
the blocks cannot contain more than m elements.
The remaining (partially filled) blocks must contain n − ms elements and all
the blocks are of maximal size m − 1. There are Bn−ms,≤m−1 ways to reach
this state. Finally, we sum on s:
⌊n/m⌋
X n!
Bn,≤m = Bn−ms,≤m−1 . (9.10)
s=0
s!m!s (n − (s − 1)m)!
it reads as
∞
xn x2 x3 xm
X
Bn,≤m (y) = exp y x + + + ··· + .
n=0
n! 2! 3! m!
A number m is fixed by consensus. The host calls out the numbers 1 through
n in order. When the number you have been given is called, you can either
choose one of the wrapped (and so unknown) gifts remaining in the pool,
or you can take (or “steal”) a gift that some earlier person has unwrapped,
subject to the restriction that no gift can be “stolen” more than a total of
m times. If you choose a gift from the pool, you unwrap it and show it to
everyone. If a person’s gift is stolen from them, they immediately get another
turn, and can either take a gift from the pool, or can steal someone else’s gift,
subject always to the limit of m thefts per gift. The game ends when someone
takes the last (nth) gift. The problem is to determine the number of possible
ways the game can be played out, for given values of m and n.
Let us take the example from the original text! We have three players,
A, B, C, and fix m to be 1, that is, an already taken gift can be stolen at
most once. Then a possible output is the following: guest A chooses a gift, B
chooses another one and guest C chooses a third gift. If there is someone who
steals, then, for instance, A can choose gift 1, B chooses gift 2, but C steals
gift 1. Then, as 1 was previously chosen by A, he or she must choose again.
As a gift cannot be stolen more than once, gift 1 cannot be chosen anymore.
If A chooses, say, 3, then the game terminates as all the gifts are chosen. If
A chooses 2, then B follows as 2 is his/her gift. Now B can choose neither 1
nor 2 as these were stolen already. B ends up with the only one choice, the
third gift. The game terminates. These processes can shortly be described by
numbers and letters:
A1 B2 C3
A1 B2 C1 A3
A1 B2 C1 A2 B3
It is not hard to see that there are four other possible outputs:
A1 B2 C2 B3
A1 B2 C2 B1 A3
A1 B1 A2 C3
A1 B1 A2 C2 A3
Altogether there are seven different game outputs. To simplify life a bit,
we suppose that the guest who is about to choose either steals or chooses the
gift which is one greater than the greatest already chosen gift. (If the gifts
already chosen by the previous guests are 3, 7, 5, then he or she chooses 8.)
This is not a restriction as we can label the gifts in any order we want.
Another simplification can be done. If the players do not change their seats
during the game and always A begins we can simply leave out the letters. The
list
254 Combinatorics and Number Theory of Counting Sequences
1 2 3
1 2 1 3
1 2 1 2 3
1 2 2 3
1 2 2 1 3
1 1 2 3
1 1 2 2 3
1 2
1 2 1
1 2 1 2
1 2 2
1 2 2 1
1 1 2
1 1 2 2
1 2
1,3 2
1,3 2,4
1 2,3
1,4 2,3
1,2 3
1,2 3,4
This is nothing else but the possible decompositions of a set of two, three,
or four elements into two blocks where all the blocks are of size at most m = 2.
This statement is true in its full generality: a gift exchange output encodes
a partition on sets of at least n − 1 and at most (n − 1)(m + 1) elements,
Avoidance of big substructures 255
where there are n − 1 blocks, and each block contains at most m + 1 elements.
Summing over the possible k length of lists we get that there are
(n−1)(m+1)
X k
n − 1 ≤m+1
k=n−1
Since the duality of the signed first kind and second kind Stirling numbers
so nicely works and even generalizes smoothly to the r-Stirling numbers, we
would think that some duality should exist for the restricted Stirling numbers
as well. This is not so. The table of the first 3-restricted second kind Stirling
numbers begins
n
k ≤3 k=1 k=2 k=3 k=4 k=5 k=6
6×6
n=1 1
n=2 1 1
n=3 1 3 1
n=4 0 7 6 1
n=5 0 10 25 10 1
n=6 0 10 75 65 15 1
−1
n
k ≤3 k=1 k=2 k=3 k=4 k=5 k=6
6×6
n=1 1
n=2 −1 1
n=3 2 −3 1
n=4 −5 11 −6 1
n=5 10 −45 35 −10 1
n=6 35 175 −210 85 −15 1
In the last line of the inverse, we see that the sign does not alternate.
Ji Young Choi et al. called this disturbing phenomenon an anomalous sign
256 Combinatorics and Number Theory of Counting Sequences
but these will not coincide with the inverse matrix elements14 .
The problem of anomalous sign behavior was solved recently. It turned
out that the items of the inverse matrix count differences in sizes of two
labelled Schröder forests. It also came
out that for even m the sign behavior is
regular, and the numbers (−1)n−k nk ≤m are always positive and count specific
Schröder forests. These findings were published in [215] in 2016.
n
Definition and exponential generating function of k ≤m
We
do
not insist that the first kind restricted Stirling numbers be dual
with nk ≤m , instead, we do require them to have the expected combinatorial
meaning.
mk k
xn x2 x3 xm
X n 1
= x+ + + ··· + . (9.11)
k ≤m n! k! 2 3 m
n=k
1
If m tends to infinity, the sum in the parenthesis tends to ln 1−x and we
get back the exponential generating function of the first kind Stirling num-
bers. This and (9.8) show very nicely that the only difference between the
generating functions is in the denominators. In the first kind case, there are
simply integers and in the second kind case, we have factorials. This is not
independent of the fact that in a cycle of length l there are l possible identical
configurations (by the l right shifts) and in a block of size l there are l! equiv-
alent order of the elements. We already saw similar arguments in Section 2.5.
In the next chapter, we study this revelation in its full generality. More on
symbolic combinatorial computations of this kind can be found in [235].
If m = 2, then (9.8) and (9.11) coincide and
n n
= .
k ≤2 k ≤2
14 In the particular case when m = 2 the inverse matrix is still regular in sign alternation
The basic recursion for the first kind restricted Stirling numbers reads as
follows [341].
n+1 n n n! n−m
=n + − .
k ≤m k ≤m k − 1 ≤m (n − m)! k − 1 ≤m
We have two disjoint possibilities during constructing all the permutations
that the left-hand side counts:
(1) The last element, n+1, goes into an already constructed cycle. First we
construct a permutation on n elements into k cycles in nk ≤m ways and then
The left-hand side counts the restricted permutations of n+1 elements with
k cycles such that each cycle contains at most m elements. Such permutations
can be constructed such that we first form a restricted permutation on n − i
elements with k − 1 cycles, and then we construct an additional cycle which
contains the element n + 1 in order to have
n−i k cycles in total. The first part
of the construction can be realized in k−1 ways. Into the kth cycle of the
n
≤m
element n+1 we choose i elements in i ways. Since the order of the elements
in the cycles matters, we have i! ni = (n−i)! n!
possibilities. Altogether, for a
n! n−i
fixed i, we have (n−i)! k−1 ≤m different permutations. Here i can run from 0
to m − 1. Summing these disjoint possibilities, we are done.
Since
n−k+1
X n! n−i n
=n
i=1
(n − i)! k − 1 k
m ≥ n − k + 2.
258 Combinatorics and Number Theory of Counting Sequences
n
Some special values of m ≤m
For 0 ≤ n ≤ k − 1 or n ≥ km + 1, we have
n
= 0.
k ≤m
If k ≤ n ≤ km, the restricted and classical Stirling numbers of the first kind
coincide:
n n
= (k ≤ n ≤ m).
k ≤m k
Moreover, nn ≤m = 1 and, also, n−1
n
= n2 . Similarly,
≤m
n
= (n − 1)! (1 ≤ n ≤ m).
1 ≤m
Things get a bit more complicated for other special values:
(
3n−1 n
n 4 3 (m ≥ 3);
= n
(9.13)
n − 2 ≤m 3 4 (m = 2) ,
We prescribe the fixed points of a permutation and see how the lengthier
cycles look like. First we prove the m = 2 case. The number of cycles is
k = n − 2. Then for the cycle structure we have the only one possibility
(.)(.) · · · (.)(. .)(. .)
| {z }
n−4
That therenare n − 4 fixed points and two cycles of length 2. There are
is,
1 4 n
2 2 4 = 3 4 such permutations, as it is easy to see. Therefore, the m = 2
case of (9.13) follows.
If m ≥ 3, then we have two possible distributions of cycle lengths:
(.)(.) · · · (.)(. .)( . .)
| {z }
n−4
as before, or
(.)(.) · · · (.)(. . .)
| {z }
n−3
n
such permutations. Since 2 n3 + 3 n4 = 3n−1 n
There are 2 3 4 3 , the first part
of (9.13) also follows. n
We remember the fact from p. 14 that the harmonic n numbers and 2
numbers are related. Do we have some relation between 2 ≤m and harmonic
(or harmonic-like) numbers? The answer is yes:
(
n (n − 1)!Hn−1 (2 ≤ n ≤ m + 1);
=
2 ≤m (n − 1)!(Hm − Hn−m−1 ) (m + 2 ≤ n ≤ 2m).
Avoidance of big substructures 259
n−1
n n! 1 X 1 1
= + = (n − 1)!Hn−1
2 ≤m 2 n k n−k
k=1
holds.
Similarly, if k = 2 and m + 2 ≤ n ≤ 2m, by analyzing again the generating
function, we have the intermediate result
2m−n
n 1 1 X 1
= ,
2 ≤m n! 2 (n − m + k)(m − k)
k=0
from where
n−1
n (n − 1)! X 1 1
= +
2 ≤m 2 n−m+k m−k
k=1
= (n − 1)!(Hm − Hn−m−1 ).
gives the total number of permutations on n elements such that in the cy-
cle decomposition of the individual permutations the lengths are not longer
than m.
Their recursion can similarly be proven as (9.9) for the m-restricted Bell
numbers. The only difference that the binomial coefficients must be multiplied
by the corresponding factorial as the order of the elements in the cycle counts.
We get
An,≤n = n!.
See the Outlook of the next chapter to get information about the newest
results with respect to the restricted Stirling and related numbers.
Exercises
1. In how many ways can we stick 10 photos into an album if each page
has space for at most two pictures? How many possibilities are there if
we want to use exactly 6 pages?
2. Construct the Young tableau pair from the permutation
1 2 3 4 5 6 7 8 9 10
.
1 2 5 7 8 3 9 10 4 6
1 4 6 7 1 2 3 4
2 3 5 8 5 7 8 9
9 6
B(n, m)
am = (m = ⌈n/2⌉ + 1, . . . , n),
B(n, m − 1)
and show that am /am+1 > 1. Moreover, verify that a⌈n/2⌉+1 > 1 and
an < 1 for n > 7. (This unimodality problem was studied in [147], and
was proved combinatorially in [276].)
5. Use (9.5) to prove the (9.1) exact formula for the Bessel numbers. (Hint:
use the binomial theorem.)
6. Prove combinatorially that
⌊n/m⌋
n X 1 n
n − mj
= .
k ≤m j=0
j! m, m, . . . , m k − j ≤m−1
| {z }
j
For the definition of the multinomial coefficient, see the appendix. (The
proof is simple but if you need help, the article [341] contains a proof in
combinatorial flavor.)
262 Combinatorics and Number Theory of Counting Sequences
7. Show the validity of the first kind version of the above identity:
⌊n/m⌋
n m n − mj
X 1
m m
= n (n − m) · · · (n − (j − 1)m) .
k ≤m j=0
j! k − j ≤m−1
8. Prove that
n−k+1
X n! n−i n
=n
i=1
(n − i)! k − 1 k
holds true.
9. Give a combinatorial reasoning why the following special values hold:
n n−2
4 2 (n ≥ 4, m ≥ 4);
n
= 15 n6 + 10 n5
(n ≥ 4, m = 3);
n − 3 ≤m n
15 6 (n ≥ 4, m = 2).
(This and the previous problem come from the paper [416].)
14. Prove by induction and also by combinatorial methods that
Am+1,≤m = m · m!.
Avoidance of big substructures 263
and
⌊n/3⌋
X n (3j)!
An,≤3 = An−3j,≤2 .
j=0
3j j!3j
n
X n
Fn,≤m = ,
k ≤m
k=0
and
n
X n
Fn,≥m = ?
k ≥m
k=0
Outlook
1. The restricted Stirling numbers were used by B. Bényi [67] to enumer-
ate special restricted lonesum matrices. A lonesum matrix is a matrix
containing only values 0 and 1 such that it is uniquely reconstructible
from its row and column sum vectors.
2. The restricted Bell numbers are connected to certain sequences of
random-to-top shuffles, and sequences of box removals and additions
on the Young diagrams of integer partitions [99].
3. The question whether the Bessel polynomials yn (x) are irreducible was
raised in [268] (see Problem 9 on p. 163.). If the irreducibility cannot
be proved in full generality, give a class of values of n for which the
irreducibility holds.
4. The r-version (see the previous chapter) of the Bessel and restricted Bell
numbers was studied recently in [307].
Chapter 10
Avoidance of small substructures
n
A binomial representation of n−k
267
268 Combinatorics and Number Theory of Counting Sequences
This notation is not too riddling, you can easily find out what is the reason
behind choosing this notation. By the above results we know that
1 2 2 3 4
= = 0, = = 1, = 3.
0 ≥2 0 ≥2 1 ≥2 1 ≥2 2 ≥2
n
The exponential generating function of k ≥2
and it will make obvious what is the meaning of these numbers. First let us
re-index (10.2)1 :
X k
n n−j n
= . (10.3)
k j=0
k − j ≥2 j
1
nFrom
the re-indexed identity, it is actually very easy to find the combinatorial meaning
of k ≥2
.
Avoidance of small substructures 269
∞ ∞ n
(xt)j X xn−j X n − j
X
tk−j .
j=0
j! n=j
(n − j)! k − j ≥2 k=j
if n < 2k (except when k = 0). Therefore, in (10.6) the summation could run
from n = 2k.
We introduce the similar functions
k
x1 x2 x3 xm−1
1
ex − 1 − − − − ··· − .
k! 1! 2! 3! (m − 1)!
Recall (9.8):
k
x2 x3 xm
1
x+ + + ··· + .
k! 2! 3! m!
It is clear that these functions are related. The coefficients of the former ex-
ponential generating functions are the m-associated Stirling numbers of the
second kind :
∞ k
xn x1 x2 x3 xm−1
X n 1
= ex − 1 − − − − ··· − . (10.7)
k ≥m n! k! 1! 2! 3! (m − 1)!
n=mk
n
The basic recursion for k ≥m
Now we derive the basic recursion for these numbers. Take the derivative
on both sides
of (10.7). The left-hand side becomes the exponential generating
function of n+1
k ≥m
, while the right-hand side transforms as follows:
k−1
x1 xm−1
1 x
e −1− − ··· − ·
(k − 1)! 1! (m − 1)!
x1 xm−2
x
e −1− − ··· − =
1! (m − 2)!
k−1
x1 xm−1
1
ex − 1 − − ··· − ·
(k − 1)! 1! (m − 1)!
x1 xm−2 xm−1 xm−1
x
e −1− − ··· − − + =
1! (m − 2)! (m − 1)! (m − 1)!
k
x1 xm−1
1
k ex − 1 − − ··· − +
k! 1! (m − 1)!
k−1
xm−1 x1 xm−1
1 x
e −1− − ··· − .
(k − 1)! (m − 1)! 1! (m − 1)!
Avoidance of small substructures 271
On the right-hand side, we have two generating functions and all of these
result in the equality
∞
xn
X n+1
=
k ≥m n!
n=mk
∞ ∞
xn xm−1 xn
X n 1 X n
k + .
k ≥m n! (m − 1)! (k − 1)! k − 1 ≥m n!
n=mk n=m(k−1)
m−1
x
In the last term, we carry the factor (m−1)! behind the summation and re-
index. The final result comes by comparing the coefficients:
n n−1 n−1 n−m
=k + . (10.8)
k ≥m k ≥m m−1 k − 1 ≥m
⌊n/m⌋
X n
Bn,≥m = .
k ≥m
k=0
2 For these numbers, there is no widely used notation or name, so we feel free to use the
“associated Bell number” term. This expresses that we are talking about numbers somehow
related to the Bell numbers. The notation that we introduce here seems to be new.
272 Combinatorics and Number Theory of Counting Sequences
Basic recursion
For m > 0
n−m
X n
Bn+1,≥m = 1 + Bn−k,≥m . (10.9)
k
k=m−1
To see why this recursion is true, we consider the last element, n + 1, and
choose some, say k, other elements into its block. We cannot choose less than
m − 1 elements because then the block will contain less than m − 1 + 1 = m
elements, and this is not permitted. Similarly, we cannot choose more than
n − m elements because in that case the other blocks will contain less than
n − (n − m) = m elements. The n − m elements also must form a partition
with this restriction, and so they have Bn−k,≥m possibilities to be partitioned
properly. Summing over k, we get the sum. And what possibility is that plus
one responsible for? Note that we have not counted the case when all the
partition consist of only one block.
Bn = Bn,≥2 + Bn+1,≥2 .
We decide first how many singletons we want in our partition, then the rest of
the elements go into partitions with at least two elements in each block. This
Avoidance of small substructures 273
results in
n
X n
Bn = Bn−k,≥2 ,
k
k=0
Re-indexing this,
X k
n n−j n
= . (10.10)
k j=0
k − j ≥2 j
The recursion comes by the same method as in the second kind case.
n n−1 m−1 n − m
= (n − 1) + (n − 1) , (10.12)
k ≥m k ≥m k − 1 ≥m
if n ≥ mk.
Historical remarks on the associated Stirling numbers can be found in
[287]. See also [158, p. 256.] for some additional citations. From this source
one can learn, for example, that the recursion (10.12) was known (at least for
m = 2) by Appell [32].
Definition 10.2.1. The An,≥m number gives that how many permutations
there are on n elements such that the permutations do not contain cycles
shorter than m. The An,≥m numbers are called associated factorials3 .
Clearly,
⌊n/m⌋
X n
An,≥m = .
k ≥m
k=0
help us. Let Ω be the set of all the permutations on n elements, and let Ai be
the set of permutations such that i is a fixed point. (Note that the elements
of Ai may have other fixed points!) As
n
\
Ai
i=1
where T is the index set of the prescribed fixed points. What positions we
have fixed points at is irrelevant, only the number of the fixed points, |T |,
matters. If |T | = j we have that
\
Ai = (n − j)!.
i∈T
n
Since there are j different T sets, we have that
n l
j−1 n
[ X
Ai = (−1) (n − j)!.
i=1
j=1
j
On the left-hand side, we have those permutations which have some fixed
points somewhere. This is exactly the number we have to subtract from n! to
get the fixed point free permutations:
l
j−1 n
X
Dn = n! − (−1) (n − j)!.
j=1
j
The sum on the right-hand side is just Dn , so we get the remarkably simple
recursion
Dn = nDn−1 + (−1)n .
This is somewhat different in flavor than we have gotten used to. The alter-
nating term on the right-hand side suggests that some non-routine argument
will be necessary to prove this recurrence combinatorially. The following proof
was found by A. T. Benjamin and J. Ornstein [62]4 .
Let us try to interpret the first term, nDn−1 , on the right-hand side hoping
that it dictates what we should do. If we take one element from that of n and
make it a fixed point, and put the rest into a fixed point free permutation,
then we see that the number of such permutations is exactly nDn−1 . Let F
be the set of permutations of n elements with exactly one fixed point and let
D be the set of the derangements on these n elements. Then, as we have just
said, |F | = nDn−1 , and |D| = Dn .
If we try to find a one-to-one correspondence between the elements of F
and D, we see that there will either be one unmapped element of F or one
unhit element of D, depending on the parity of n.
We write the permutations in cycle decomposition such that the cycle
leaders (see p. 221) are the smallest elements, and the cycles are listed in
increasing order of their smallest element. Note that now every cycle decom-
position begins with 1.
First we describe the bijection
between those elements of F and D which
do not contain the cycle 1 2 . To this end we first fix a notation: let π be a
permutation in F and let α be the (unique) fixed point of π. The bijection is
based on the number of elements in the first cycle of π, and we consider four
cases:
Case I. When the first cycle of π has three or more elements, so it looks
like
π = 1 a1 a2 · · · aj · · · (α) · · ·
(here j ≥ 2), then π is mapped to the derangement where α is inserted after
1. For example,
π = 1 a1 a2 · · · aj · · · (α) · · · → 1 α a1 a2 · · · aj · · · ∈ D.
This mapping hits every derangement where the first cycle has four or more
elements.
Case II. When the first cycle has two elements (it is of the form 1 a1 ,
where a1 ̸= 2, then we proceed as before: α go after 1. This way we hit every
4 J. B. Remmel gave a proof earlier via the so-called weighted inversions [489].
278 Combinatorics and Number Theory of Counting Sequences
derangement where the first cycle is a 3-cycle of the form 1 x y such that
y ̸= 2. To have image permutations with 3-cycles of the form 1 x 2 we
go to the third case.
Case III. When the first cycle of π has one
element and it is 1, then it is
certain that π is of the form π = 1 2 a1 . We now apply the correspon-
dence
π = 1 2 a1 · · · → 1 a1 2 ∈ D,
so the resulting permutation will have a 3-cycle of the form 1 x 2 , as we
wanted.
Case IV. In this case we map the π permutations where 1 is a fixed point
and the second cycle has at least three elements as follows:
π = 1 2 a1 a2 · · · aj · · · → 1 a1 2 a2 · · · aj · · · ∈ D.
This mapping hits all derangements beginning with a cycle 1 x where
x ̸= 2.
Considering all four cases, we see that it remains to describe those bijec-
tions between F and D which act on a π beginning with 1 2 . To describe
our bijection in this case, we apply the following definition. A permutation is
said to be of type k if it begins like
1 2 3 4 · · · 2k − 1 2k · · · ,
and the next cycle is not of the form 2k + 1 2k + 2 . Let us introduce the
notation
σk = 1 2 3 4 · · · 2k − 1 2k .
The bijection acts as before where the elements 1 and 2 are replaced with 2k+1
and 2k+2, respectively. That is, the bijection acts as follows, considering cases
I-IV:
σk 2k + 1 a1 a2 · · · aj · · · α · · · →
σk 2k + 1 α a1 a2 · · · aj · · · ,
σk 2k + 1 a1 · · · α · · · → σk 2k + 1 α a1 · · · ,
σk 2k + 1 2k + 2 a1 · · · → σk 2k + 1 a1 2k + 2 · · · ,
σk 2k + 1 2k + 2 a1 a2 · · · aj · · · →
σk 2k + 1 a1 2k + 2 a2 · · · aj · · · .
Ki = {j | ai,j = 1}.
Examples
Ki = {0, 1, 2, . . . } (i ≤ m)
Ki = {0} (i > m)
Now it is clear that the m-associated Stirling numbers belong to the set
Ki = {0} (i < m)
Ki = {0, 1, 2, . . . } (i ≥ m),
and the
1 0 0 0 ···
1 0 0 0 · · ·
..
.
A≥m 1
= 0 0 0 · · ·
(10.17)
1
1 1 1 · · ·
1
1 1 1 · · ·
..
.
matrix:
n n
= .
k A≥m k ≥m
Note that ai,0 = 1, because from every block we can have 0 piece. What is
more, the number of small blocks must be zero in the associated case.
At last we determine the matrix of partitions which have only blocks of
even size. Clearly enough,
Ki = {0, 1, 2, . . . }, if i is even
Ki = {0}, if i is odd.
From where the following matrix arises:
1 0 0 0 ···
1 1 1
1 · · ·
1 0 0
0 · · ·
Ae = 1 1 1
1 · · ·
. (10.18)
1 0 0
0 · · ·
1 1 1 1 · · ·
..
.
More examples can be found on p. 226 in Comtet’s book [158].
The equality
∞ X∞ k ∞ ∞ j
Y ai,ki xki y i i Y X ai,j xj y i
=
i=1
ki ! i! i=1 j=0
j! i!
ki =0
holds, whence
∞ ∞ ∞ j
yn Y X ai,j xj yi
X
Bn,A (x) = . (10.19)
n=0
n! i=1 j=0
j! i!
This is the exponential generating function of the universal Bell polynomials.
In particular,
∞ ∞ X ∞ j
X yn Y ai,j y i
Bn,A = .
n=0
n! i=1 j=0
j! i!
Let us see how the universal generating functions work on the former exam-
ples. First, consider the associated Bell polynomials Bn,A≥m (x) = Bn,≥m (x).
Applying (10.19) to the matrix (10.17):
∞ ∞
yn
i
X Y xy
Bn,A≥m (x) = exp . (10.20)
n=0
n! i=m
i!
Avoidance of small substructures 283
More on the universal Stirling numbers can be found in [158, p. 225], [235,
Chapter 2], and [495, p. 74 and p. 80-89]. Particularly for permutations, see
Section 3.4 in [83].
286 Combinatorics and Number Theory of Counting Sequences
Exercises
1. How many options do we have if we want to give 7 gifts to 3 friends such
that we want everyone to get at least two gifts?
9. Find the analogue of the identity in the previous exercise with respect
to the associated Stirling numbers of the first kind.
10. Show that the 2-associated Stirling numbers take the following values:
n 1
= (2n − 2n − 2),
2 ≥2 2
n 1 1 1
= (3n − 3 · 2n ) − n(2n−1 − 1) + (n2 + 1),
3 ≥2 6 2 2
n n
2n 2
n 4 3 1
= − (n + 3) − (n3 + 2n + 1) + (n + 3n + 4).
4 ≥2 24 18 6 16
Avoidance of small substructures 287
(See [340].)
12. Provide a proof for the below special values
(
n
n 2 (m = 1, m = n = 2);
=
n − 1 ≥m 0 (otherwise),
3n−1 n
4 3 (m = 1);
n 3 (m = 2, n = 4);
=
n − 2 ≥m 2 (m = 2, 3; n = 3);
0 (otherwise),
n n
4 2 (m = 1);
6 (2 ≤ m ≤ 4, n = 4);
n
= 20 (m = 2, n = 5);
n − 3 ≥m
15 (m = 2, n = 6);
0 (otherwise).
(See [341].)
13. Show that
An,≥2 (−1) = 1 − n.
(See [158, p. 256].)
14. Show that
n
X n
n!Bn = mn Dm−n (n ≥ 0).
m=0
m
15. Let the number of partitions into odd number of blocks be Bn,Aodd .
Prove that this satisfies the recursion
[(n−1)/2]
X n−1
Bn,Aodd = Bn−2k−1,Aodd
2k − 1
k=0
with B0,Aodd = 1 initial value (this is the pair of (10.21)). Describe the
corresponding matrix Aodd and the exponential generating function of
Bn,Aodd .
16. Prove that the universal factorial’s exponential generating function is
y2
exp
1 − y2
21. Prove that the (n + 1)st order Hankel determinant of the derangement
numbers is
D0 D1 ... Dn !2
D1 D2 ··· Dn+1 n
Y
det . = k! .
.. ..
.
k=0
Dn Dn+1 ··· D2n
(This is actually Radoux’s theorem, see [478] and also [211] for a nice
combinatorial proof.) Hint: use the tool we developed in Subsection
2.10.2. Note that the derivatives of e−y /(1 − y) are more complex to
calculate than those of the derangement polynomials, so try to find the
Hankel determinants of the An,≥2 (x) polynomials first. The exponential
generating function of this sequence is e−y /(1 − xy). The derivatives of
this function with respect to x are much simpler.
22. Show that the Hankel determinant of all the polynomials Bn,≤2 (x),
Bn,≥2 (x) and Bn,=2 (x) is
n
n+1
x( )
Y
2 k!.
k=0
Here Bn,=2 (x) is the polynomial for the nk =2 numbers, where the block
size can only be 2. Note that Bn,=2 (1) = h(n) of Exercise 19. (This was
proven by Ehrenborg [211], although for Bn,≤2 (x) it was known earlier
by Radoux [479] as well.)
23. Prove the following integral representation for the derangements [39, p.
855]: Z ∞
Dn = e−t (t − 1)n dt.
0
24. Let Dn,k denote the number of permutations with exactly k fixed points
(so Dn = Dn,0 ). Apply the inclusion-exclusion principle to show that
n−k
n! X (−1)j
Dn,k = .
k! j=0 j!
In particular,
n−1
X 1 Dk
A′n,≥2 (1) = −nDn−1 + n! (n ≥ 1).
k! n − k
k=0
in particular,
′
Bn,≥2 (1) = Bn+1,≥2 − nBn−1,≥2 .
29. Prove the log-convexity of the An,≤m and Bn,≤m sequences (for fixed
m). (Hint: use the Bender-Canfield theorem of Subsection 4.5.2. An,≤m
and Bn,≤m were the examples in [59] to show how the theorem can be
applied.)
Avoidance of small substructures 291
Outlook
1. Historical remarks on the Stirling, Lah, r-Stirling, and associated Stir-
ling numbers can be found on p. 319-321 of the book of Charalambides
[134].
2. A very recent treatise on the particular version of the universal Stirling
numbers when the permitted block sizes belong to a fixed subset of
the positive integers (but the number of the blocks of a given size is
arbitrary) is presented in [69].
3. We met with the Bernoulli and Cauchy numbers in Chapter 5. These
numbers can be generalized many ways. Two of these generalizations
connect to the restricted and associated Stirling numbers. See the paper
[341] for the definition and basic properties of the restricted and associ-
ated Cauchy numbers, and [340] for the restricted and associated (poly-
)Bernoulli numbers. The latter paper gives a relation between these
poly-Bernoulli numbers, the Lambert W function and the Riemann zeta
function.
4. The real zero property of the associated factorial polynomials An,≥m (x)
(see (10.13)) was studied by several authors. Canfield [114], Tricomi [567]
(in this latter paper An,≥2 (x) = ln (−x)), and [120] in the m = 2 case
and Brenti [95] for general m showed that An,≥m (x) has only real zeros.
Tricomi also showed that the negative zeros are smaller than −1. See
the paper of Temme [560] about the asymptotics of ln (x).
Compare these
polynomials with the (2.41) horizontal generating func-
tion of the nk numbers. Latter has zeros at the negative integers and at
zero. One might ask whether this simple property generalizes somehow
for An,≥m (x) once we know that the roots of them are real. The answer
is due to M. Bóna [85] and it says that for any given m there exists a
positive integer N such that if n > N , then one zero of An,≥m (x) will
be close to −1, one other will be close to −2, and so on, and one zero
will be close to −n.
5. The real zero property for the associated Bell polynomials Bn,≥2 (x)
were proven in [87], and for Bn,≥3 (x) in [559]. It is not known in general
whether Bn,≥m (x) has only real zeros or not. However, it can be checked
easily that A9,≤3 (x) has complex zeros as well as B9,≤3 (x), so it is not
true in general that the restricted Bell and factorial polynomials have
only real zeros.
6. The divisibility properties of restricted and associated Fubini numbers
were probably first studied in [416]. See [106, 442] for other results re-
garding these sequences and polynomials.
292 Combinatorics and Number Theory of Counting Sequences
(cf. [151, Theorem 8], [597, p. 187], [235, pp. 558-560]). Recently, G.
Louchard studied the case when the number of singletons is given and
fixed [381]. In [586] it was proven for general m that
n! 1 exp n/m + O(n1−1/m )
An,≤m ∼ √ √ ,
2π mn nn/m
see also (the even more detailed) [17]. Similar statements hold for the
restricted Bell numbers:
n! 1 exp n/m + O(n1−1/m )
Bn,≤m ∼ √ √ .
2π mn (n(m − 1)!)n/m
9. The behavior of the associated Stirling numbers [585] does not differ
from that of the classical Stirling numbers:
n n n n
∼ , ∼ .
k ≥m k k ≥m k
This also means, by the idea introduced in Section 7.3, that the maxi-
mizing index of the associated Stirling numbers of both kinds behaves
similarly as the maximizing index of the classical Stirling numbers. This,
however, does not imply that the sub-dominant terms are also the same.
It would be an interesting problem to study the m-dependence of the
maximizing indices.
The “restricted version” makes sense only if the lower parameter tends
to infinity together with the upper parameter (otherwise, the restricted
Avoidance of small substructures 293
For a more profound analysis with respect to permutations, see the re-
cent PhD thesis of R. Petuchovas [461].
10. An extensive set of results (combinatorial identities, Hankel transform,
log-convexity, arithmetical properties) was obtained for the restricted
and associated Bell and factorial numbers in [442].
11. In [76] one can find some finite sum results with respect to the derange-
ment numbers. For example,
n 2
X Dk+2 Dn+2 Dn+3
= − 1.
(k + 1)! (n + 2)!
k=1
14. The generalized Bell polynomials of Section 3.3 are not including the
r-Stirling numbers (the reader should check this by comparing the ge-
nerating functions). Mihoubi and Rahmani generalized these Bell poly-
nomials to include the r-Stirlings, r-Lah, r-Whitney numbers (for the
latter, see the Outlook of Chapter 8) and even the restricted and asso-
ciated versions of all of these numbers. See [435].
15. In [143] the common generalization of the r-Stirling and restricted Stir-
ling numbers is defined and studied by the exponential Riordan array
method.
16. Some relations between nk ≥2 and the so-called Eulerian numbers of
the second kind [262] are deduced through the Lambert W function in
[314].
294 Combinatorics and Number Theory of Counting Sequences
17. The Lambert W function has been arising a couple of times in the book.
Here is another connection to W . The 3-associated Stirling numbers of
the first and second kind appear in some Taylor series representations
of the different branches of the Lambert W function [301].
18. The two-dimensional derangement problem was studied by Fisk [232],
see also [184].
19. The “r-version” of the universal Stirling numbers was introduced in [68].
20. One can study the relative derangements. A permutation, given in word
representation (see p. 23) as π1 π2 · · · πn , is a relative derangement if
πi+1 ̸= πi + 1 for all 1 ≤ i ≤ n − 1. Let Qn denote the number of relative
derangements on {1, . . . , n}. The following relation holds between this
sequence and the sequence of derangement numbers (see [103, Theorem
6.5.1], and [23, Example 6.11]:
Qn = Dn + Dn−1 .
QB B B
n = Dn + Dn−1 .
Number theoretical
properties
295
Chapter 11
Congruences
The counting sequences often have very interesting number theoretical proper-
ties. In the third part of this book, we will learn some of these and we develop
the tools to study such questions.
It is interesting to know that, for example, which Bell numbers are even,
or under what circumstances the Stirling numbers are divisible by a given
prime p. Such questions will be studied in the first part of the chapter. In the
second part, we apply the basic theory of divisibility to deduce the non-integer
property of harmonic numbers and some of its generalizations.
297
298 Combinatorics and Number Theory of Counting Sequences
Congruence of fractions
The proof is elementary, but needs to be broken down into some subcases.
We could not do better than Jonathan Gross in his book [266, Chapter 4],
so we do not repeat the proof here. Divisibility with other primes and more
sophisticated congruences will be the topic of the next chapter.
What we still mention is an interesting corollary of (11.1): the number of
odd binomial coefficients in the row n of the Pascal triangle is a(n) = 2w ,
where w is the number of 1-digits in the binary representation of n. The proof
is again easy, see [266, Proposition 4.1.11].
2 James Whitbread Lee Glaisher (1848-1928), English mathematician and astronomer.
Congruences 299
The below very simple proof comes from [231]. The binomial theorem says
that
n
X n k
x = (1 + x)n .
k
k=0
Taking
n = n0 + n1 p + n2 p2 + · · · + na pa ,
we can write the right-hand side of the above as
a
a Y i
(1 + x)n = (1 + x)n0 (1 + x)n1 p · · · (1 + x)na p = ((1 + x)p )ni .
i=0
p
≡ 0 (mod p). (11.4)
k
This can be seen easily, because
p 1
= (p − k + 1)(p − k + 2) · · · p
k k!
and p is not divisible by any numbers among 1, 2, . . . , p − 1. Hence, in partic-
ular, none of the factors of k! are divisible by p. We cannot cancel p from the
nominator.
Hence, in particular, we have
p
p
X p i
(1 + x) = x ≡ 1 + xp (mod p).
i=0
i
To match the coefficients of the powers of x on both sides, take a fix index k
on the left, and write it as
k = k0 + k1 p + k2 p 2 + · · · + ka p a .
On the right-hand side we have xk only if
s0 p0 + s1 p1 + · · · + sa pa = k.
But, as 0 ≤ si < p, this can happen only if for every i it holds that si = ki .
There is only one such si in each inner sum in (11.5). Therefore, modulo p,
Y a a
n ni Y ni
≡ = .
k i=0
si i=0
ki
In the first kind case, we apply the horizontal generating function (2.44):
n
X n k
x = x(x + 1)(x + 2) · · · (x + n − 1). (11.6)
k
k=0
302 Combinatorics and Number Theory of Counting Sequences
x⌈ 2 ⌉ (x + 1)⌊ 2 ⌋ = xm+⌈ 2 ⌉ .
n n n
2
m=0
m
A same result can be proven with respect to the second kind Stirling
numbers, but in this case the (2.46) horizontal generating function cannot be
applied. It is better to consider (2.22):
∞
X n n xk
x = .
n=0
k (1 − x)(1 − 2x) · · · (1 − kx)
The factors in the denominator of the form 1−2x, 1−4x, etc. are all congruent
to one. Therefore,
∞
X n n xk
x ≡ (mod 2).
(1 − x)⌈ 2 ⌉
k
n=0
k
By using Example 23 on page 81 we have that
∞ m m ∞ k
xk
k
X k x X
2 + m − 1 m+k
=x = x .
(1 − x)⌈ 2 ⌉
k
m=0
2 m! m=0
m
Comparing the coefficients on the left- and right-hand sides, we infer
k
n 2 +n−k−1
≡ (mod 2).
k n−k
The number of odd elements in a given row of the first kind Stirling triangle
is the A060632 sequence, while the same for the second kind is the sequence
A007306 in OEIS. Some other interesting results can be found there.
Congruences 303
also holds. Finally, after p − 2 steps k must be equal to p and the upper
parameter is p + p − 2:
2p − 2 2p − 2
≡ ≡ 0 (mod p).
p p
Applying the basic recursions of the Stirling numbers of the first kind, we
get divisibility properties for the upper parameter of the form p − 1:
p−1
≡ 1 (mod p). (11.10)
k
Let us see how to prove this. We have that
p p−1 p−1
= (p − 1) + ,
k k k−1
in which the left-hand side and p p−1
k are divisible by p, so
p−1 p−1
0≡− + (mod p).
k k−1
Rewriting this
p−1 p−1
≡ (mod p). (11.11)
k k−1
This nice congruence, which holds for all 1 ≤ k ≤ p − 1, says that all the
elements in a line which precedes a prime line have the same remainder
if we
divide them by p. We can go further. If we take k = p − 1, then p−1
p−1 = 1, so
p−1
1 ≡ 1 (mod p). By congruence (11.11) this value modulo p inherits all k.
Therefore,
p−1
≡ 1 (mod p) (1 ≤ k ≤ p − 1). (11.12)
k
however, this result was reportedly known around 1000 by Ibn al-Haytham (c. 965-1040),
Arab mathematician.
Congruences 305
when k = 2, even more is true. The theorem of Wolstenholme4 [15, 160, 602]
says that if p > 3, then
p
≡ 0 (mod p2 ).
2
To prove this nice divisibility property, we recall (2.42):
n
X n k
x = x(x − 1)(x − 2) · · · (x − n + 1).
k
k=0
Taking x = p and n = p
p
X p k
p = p!.
k
k=0
Writing this out in details,
p 2 p 3 p p−2 p p−1 p p p
p −p +p − ··· + p −p +p = p!
1 2 3 p−2 p−1 p
Since p1 = (p − 1)!, p! cancels. Rearranging and dividing by p2 :
p p−4 p p−3 p p−2 p p
p − ··· + p −p +p = (11.14)
3 p−2 p−1 p 2
Applying (11.7) for p3 we get that the left-hand side is a multiple of p2 . This
consequence does this have on the Hp−1 harmonic number? Since (p − 1)! is
not divisible by p, we have that Hp−1 can always be written in the form
a
Hp−1 = p2 (p > 3), (11.15)
b
where b is not divisible by p. Equivalently, by using the extended congruence
definition for fractions,
Hp−1 ≡ 0 (mod p2 ) (p > 3). (11.16)
4 Joseph Wolstenholme (1829-1891), English mathematician.
306 Combinatorics and Number Theory of Counting Sequences
For example,
14 274 301 39 541
H19−1 = H18 = = 192 4 .
4 084 080 2 · 3 · 5 · 7 · 11 · 13 · 17
Wolstenholme proved his theorem in 1862 [602]. The weaker result that
Hp−1 = p ab for odd primes was known already by Babbage5 [41] in 1819.
and
2 124 679
≡0 (mod 2 124 6793 ),
2
were introduced in Section 2.7.1 to express some special values of the Stirling
numbers of the first kind. In his paper [602], Wolstenholme proved another
statement together with (11.15). Namely,
a
Hp−1,2 = p
b
5 Charles Babbage (1791-1871), English mathematician, engineer, inventor, and philoso-
pher. He worked on cryptography also, and invented but never finished his differential
machine which was supposed to calculate polynomial values.
Congruences 307
for all prime p > 3 for some integers a and b, depending on p but not divisible
by p.
This statement follows from (11.15); let us see how. Consider the product
n
Y
(λ − xj ).
j=1
(−1)n en (x1 , . . . , xn ).
The constant coefficient in the product is (−1)n x1 x2 · · · xn , thus
en (x1 , . . . , xn ) = x1 x2 · · · xn .
e0 (x1 , x2 , . . . , xn ) = 1. (11.17)
Similarly,
e1 (x1 , x2 , . . . , xn ) = x1 + x2 + · · · + xn , (11.18)
e2 (x1 , x2 , . . . , xn ) = x1 x2 + x1 x3 + · · · + x1 xn + x2 x3 + x2 x4 + · · · + xn−1 xn .
(11.19)
p2 2 p2
pHp−1 ≡ Hp−1 − Hp−1,2 (mod p3 ). (11.21)
2 2
(Actually, the more general statement
p2
p−1 n 2
(mod p3 ).
≡ (−1) 1 − pHn + Hn − Hn,2
n 2
is also true for n < p.) For p > 3 Wolstenholme’s theorem (11.16) yields
that the left-hand side of (11.21) is congruent to zero modulo p3 , as well
2
as p2 Hp−1
2
. (Note that this latter is zero even modulo p4 by Wolstenholme’s
theorem.) Therefore,
p2
Hp−1,2 ≡ 0 (mod p3 ).
2
This means that the nominator of Hp−1,2 must contain a factor of p, i.e.,
Hp−1,2 ≡ 0 (mod p)
Congruences 309
for primes greater than three. This is the other theorem of Wolstenholme we
wanted to prove.
We note that the idea of the above proof comes from Emma Lehmer’s6
paper [361, p. 360], where (11.21) is presented, but not mentioned that it is
valid only for n < p. The statement and its proof can also be found in [551].
n = n′ + n0
′
nY −1 0 −1
nY
′
x(x + 1) · · · (x + p − 1) (x + b) = (xp )n xn0 .
a=0 b=0
6 Emma Lehmer (1906-2007), mathematician with Russian origin. She mainly worked on
We have nothing else to do but comparing the coefficients of both sides. This
is more convenient if we write k − n′ as
k − n′ = j(p − 1) + i (11.23)
for some i and j (such that if n0 = 0, then 0 ≤ i < p − 1 and if n0 > 0, then
0 < i ≤ p − 1). Then we get our result:
′
n ′ n n0
≡ (−1)n −j (mod p). (11.24)
k j i
A corollary of (11.24)
are divisible by p, except for k = 1, p. We have our first divisibility result for
the Bell numbers.
p p
Bp ≡ + = 2 (mod p).
1 p
For Bp+1 it is also easy to find something, but now we use (1.1):
p
X p
Bp+1 = Bk .
k
k=0
(See [58, Theorem 1.] and [260] for the Bell polynomial extension, and Exercise
19.) The proof is as follows. All the partitions of an (n+m)-element set (which
are counted by Bn+m on the left) can be constructed as follows. We put m
elements into j blocks in m j ways and from the other n elements we select
k and form an arbitrary partition with them in nk Bk ways. There are n − k
elements not selected before from that of n. We put these into the j blocks
of the m elements one-by-one. This can be done, of course, in j n−k ways.
Summing over j and k, we get all the partitions on n + m elements.
Going backto the congruence of Touchard, we take m = p in Spivey’s
formula. Since pj ≡ 0 (mod p) if 1 < j < p, so
p
n X
X
n−k p n
Bn+p = j Bk ≡
j k
k=0 j=0
n
X n
X
p n p n
Bk + Bk pn−k (mod p).
1 k p k
k=0 k=0
and therefore all the Fubini numbers are odd. Actually, even more is true.
The Fubini numbers have the same remainder after dividing not only by 2
but also by 25 = 32. This is Theorem 4 in [469]:
for n ≥ 5.
It is easy to prove that
Fp ≡ 1 (mod p)
314 Combinatorics and Number Theory of Counting Sequences
This is what we wanted to prove. The p = 2 case was excluded, because the
denominator would cause a problem. Fortunately, we do not need Fermat’s
theorem when p = 2 because we have already seen that
Fn+2 ≡ Fn+1 (mod 2),
(see (11.28)).
It costs no additional effort to prove a more general form:
Fn+mp ≡ Fn+m (mod p). (11.30)
mp
All the steps can be repeated verbatim after noting that k = (k ) ≡ k m p m
(mod p). The p = 2 case must be treated separately, but it gives the same
congruence.
9 Pierre de Fermat (1607-1665), French mathematician and lawyer, worked also on phys-
ical optics.
Congruences 315
n+4
X n + 4 X n X 4 X 4
n n+4 n
k! − k! + k! − k! ≡
k k k k
k=5 k=5 k=0 k=0
n+4 n+4 n+4 n+4 n+4
+ +2 +6 + 24
0 1 2 3 4
n n n n n
− − −2 −6 − 24 (mod 10).
0 1 2 3 4
Because of the special values n0 = 0, n1 = 1, the first two members cancel.
Gross’s congruence states that the last digits of the members of the se-
quence Fn form a periodic sequence of length four. This can readily be checked
for small n, see the table for Fn at the end of the book.
and
is never congruent to zero for primes greater than two. That is,
!p ̸≡ 0 (mod p)
when p > 2 is a prime. This conjecture is still unsolved11 .
We will prove12 now that
!p ≡ Dp−1 ≡ Bp−1 − 1 (mod p). (11.31)
p−1 p−1
X p−1 X p−1
(−1)p−1−k k! = (−1)k k! ≡
k k
k=0 k=0
p−1
X p−1
X
(−1)k (−1)k k! = k! =!p (mod p).
k=0 k=0
In the penultimate step, we used the congruence
p−1
≡ (−1)k (mod p),
k
which is a consequence of (11.21).
By the first part, it is enough to show that Bp−1 ≡ Dp−1 + 1 (mod p). To
this end we recall (2.21) which, in particular, says that
p−1
X p−1
(p − 1)!Bp−1 = mp−1 Dp−1−m .
m=1
m
Fermat’s little theorem (11.29) and Wilson’s theorem (11.13) offer a way of
simplification:
p−1
X p−1
(−1)Bp−1 ≡ Dp−1−m − Dp−1 .
m=0
m
11 For a while it was believed that a solution was found, see the attempt in [44] and the
falsification in [45]. Kurepa himself also announced a proof, but he never published it. See
the historical remarks in [297].
12 Our proof is completely elementary. The first proof of these congruences was given in
(See the exercises for a hint.) Wilson’s theorem is handy again to simplify this
factorial. We have now what we wanted to prove:
Bp−1 ≡ 1 + Dp−1 . (11.32)
352
u = 5−2 .
19
352
That is, the 5-adic valuation of u = 475 is −2:
352
ν5 = −2.
475
Congruences 319
For all n ≥ 1
n−Ap (n)
|n!|p = p− p−1 . (11.38)
Here Ap (n) is the sum of the digits of n in base p. By using valuations instead
of the p-adic absolute value, the statement reads as
n − Ap (n)
νp (n!) = .
p−1
Before proving this theorem, we give an example. Let p = 2 and n = 11.
We determine what is the highest power of p = 2 dividing n!. To this end, it
basically suffices to calculate A2 (11). Since
11 = 8 + 2 + 1 = 1 · 23 + 121 + 120 ,
it comes that
A2 (11) = 1 + 1 + 1 = 3.
Now
11 − 3
ν2 (11!) = = 8.
2−1
That is, 28 divides 11!, and no higher power of two divides 11!:
|11!|2 = 2−8 .
Let us prove now (11.38). The proof goes by induction. For n = 1, the
statement is clear. We suppose that (11.38) holds for n − 1. Let us write
n − 1 = a0 + a1 p + a2 p2 + · · · + am pm .
Ap (n) = Ap (n − 1) + 1.
Ap (n) = Ap (n − 1) − (p − 1)t + 1.
322 Combinatorics and Number Theory of Counting Sequences
In the second case, recalling (11.39), |n|p = p−t . Again by the induction
hypothesis, and by (11.35)
n−1−Ap (n−1)
|n|p = |n(n − 1)!|p = |n|p |(n − 1)!|p = p−t p− p−1 =
n−(Ap (n−1)−t(p−1)+1) n−Ap (n)
p− p−1 = p− p−1 ,
and our proof is complete.
To shorten the formulas a bit, we introduce the notation l2 (n) = ⌊log2 (n)⌋.
To prove that the consecutive sums of harmonic numbers is never integer, we
first determine the 2-adic absolute value of the hyperharmonic numbers in
general.
If l2 (n + r − 1) > l2 (r − 1), then
otherwise
2A2 (n+r−1)−n−r+1
= 2A2 (n+r−1)−A2 (n)−A2 (r−1) .
2A2 (r−1)−r+1 2A2 (n)−n
This and the previous equality give the result with respect to the condition
l2 (n + r − 1) > l2 (r − 1).
Let us fix an arbitrary n for which l2 (n + r − 1) = l2 (r − 1).
1 1 1
Hn+r−1 − Hr−1 = + + ··· + .
r r+1 n+r−1
Let us subtract all of the fractions with odd denominators. Then we can take
1
2 out of the remainder and continue the recursive method just the same way
as we did during proving (11.37). We can make such subtraction steps
1 1 1
max ,
,...,
r 2 r+1 2 n + r − 1 2
A2 (n + 1) − A2 (n) − A2 (1) + l2 (n + 1) = 1 − m − 1 + m = 0.
(2) (2)
We get that if n ̸= 2m − 1 for some m, then |Hn |2 > 1, that is, Hn ̸∈ N.
On the other hand, let us assume that n has the form 2m − 1. This implies
that
(2) n+2−1
Hn = (Hn+2−1 − H2−1 ) =
2−1
a a
(n + 1)(Hn+1 − 1) = 2m l (n+1) − 1 = − 2m ̸∈ N.
22 b b
And this is what we wanted to prove.
See the Outlook of Chapter 8 for references on generalizations.
Congruences 325
Exercises
180
1. Is 70 even or odd?
180
2. Is even or odd?
70
3. Determine 1567
789 modulo 7.
4. Let n and k be positive integers such that n + k is odd. Then prove that
(a) nk is divisible by the odd part of n − 1,
for all k ≤ l. Note that, because of (11.25), this result is the best possible.
(Hint: use the horizontal generating function modulo p.)
6. Generalize the previous exercise: if n > klp, then
n
≡ 0 (mod pr ).
k
10. Show that if we write the 2p-th harmonic number as H2p = ab , then
the maximal power of p which divides b is p2 . (Hint: use the previous
exercise with n = 2p + 1 and k = 2.)
11. Prove that
Bp+2 ≡ 7 (mod p).
12. Show that the congruence (11.32) generalizes to the r-Bell numbers as
follows:
Bp−1,r ≡ 1 + (−1)r0 Dp−1−r0 (mod p),
where r0 is the modulo p reduction of −r.
13. Applying
p
≡0 (mod p) (0 < k < p)
k
prove that
p−1
≡ (−1)k (mod p) (0 ≤ k < p).
k
(Use the recursion nk = n−1 + n−1
k k−1 .)
14. Show the following parity connection between the binomial coefficients
and Eulerian numbers:
n n−1
≡ (mod 2) (n > 0).
k k
18. Prove the dual of Spivey’s formula (11.27) for the first kind Stirling
numbers
n Xm
X m n
(n + m)! = mn−k k! (11.40)
j=0
j k
k=0
(What kind of divisibility statement comes from this for the factorials?
Follow the steps that we followed before to prove Touchard’s congru-
ence.)
19. Prove Spivey’s formula for the Bell polynomials:
n Xm
X n j m n−k
Bn+m (x) = x Bk (x) j .
j=0
k j
k=0
(See [605].)
20. Prove that the special value
n 1 n−1
− 2n + 1 ,
= 3
3 2
Lmp ≡ 1 (mod p)
for any m ≥ 0.
Outlook
1. The parity of the binomial coefficients can be represented in a very inter-
esting way, via cellular automata. If we go through the Pascal triangle,
and substitute 1 wherever we have an odd coefficient, and 0 wherever
there is an even one, we get the following diagram:
pm pm−1
≡ (mod pm ).
i1 , . . . , in i1 /p, . . . , in /p
These results are of Howard [288]. In the same paper, it is also proved
(with different notations) that for any h > 0, and 0 ≤ m < p
hp + m h m
≡ (−1) (mod p),
k ≥2 k − h ≥2
h
hp + m X h m+h−r
≡ (mod p).
k ≥2 r=0
t k−r ≥2
Note that this gives the following particular for 1 < a < p:
m
p
≡ 0 (mod p) (j ≥ 1).
a
n + pr+j (p − 1)
n
≡ (mod pr ).
k k
This is a result of Carlitz [121], but also was proven by Tsumura [568],
and for r = 1 Becker and Riordan [53].
10. The last digits of the Lah number sum Ln form a periodic sequence of
length ten. More generally, it holds true [430] that
11. Fubini numbers satisfy many other congruences which are not presented
in the main text. See Diagana and Maiga [193].
332 Combinatorics and Number Theory of Counting Sequences
This was later extended to the following statement [249] (solving the
conjecture of Zuber): If ν is the highest power of p ̸= 2 that divides n,
then
Bnp ≡ Bn+1 (mod pν+1 ).
If p = 2 then
Bnp ≡ Bn+1 (mod pν ).
A more complex congruence, due to Sagan [502], says that the three-fold
sum
r Xi j
X
i r i i−j
X j − 1 + δij
(−1) (−p(p − 1)) Bn+(r−i)p+l
i=0
i j=0 j l
l=0
and
j
r
! i
" # ! " #
X i r X i i−j
X j − 1 + δij l n + (r − i)p
(−1) (−p(p−1)) (p−1)
i=0
i j=0
j l k − (j − l)p − l
l=0
are divisible by pr .
14. Congruences with respect to the Stirling numbers of both kinds and
composite modulus can be found in [502].
15. A congruence for Bn involving p2 is due to Touchard [564, p. 314]:
Junod also studied finite field relations with respect to the Bell polyno-
mials [310].
16. We saw two reformulations of Kurepa’s conjecture in the text. There is
another equivalent statement [309] connected to the Bell numbers: if p
does not divide n, then p does not divide Bpn −1 − 1 for all odd primes
p and n ≥ 1.
There is yet another form of Kurepa’s conjecture: Kurepa asked whether
(!n, n!) = 2 for all integers n > 1. The relation among this formulation,
the other in our text and yet other equivalents can be found in [297].
No odd prime p is found up to p < 234 which divides !p [24].
17. The alternating left factorial function
n
X
A(n) = (−1)n−i i!
i=1
496-499 in [306].
20. Howard [289] studied congruences of nk in terms of Bernoulli numbers.
21. For each positive n, there are integers a0 , a1 , . . . , an−1 such that for all
m≥0
for any non-zero integer m and prime p not dividing m. Here Dm−1
is the derangement number. Sun and Zagier presented this result in a
polynomial version in the same paper, and later it was extended to an
even more general form [548]. The r-Bell polynomial extension reads as
p−1
X Bk,r (x)
(−x)m ≡ (−x)p−r Dm+r−1 (mod pZp [x]).
(−m)k
k=1
This was presented in [427]. Here Zp [x] is the polynomial ring over the
field of p elements.
23. The Spivey congruence for polynomials was proven by several authors
[58, 605, 260] (see also Exercise 19.), as we have already mentioned in
the text. In [605] an extension can be found for the generalized Stirling
numbers of L. C. Hsu, and P. J.-Sh. Shiue [293]. See [171, 323] for q-
extension, and also [385, 395] for other generalizations. Interestingly, the
proof in [171] uses rook placements on specific shapes.
24. The overwhelming majority of the Bell numbers seems to be a composite
number. The only known prime Bell numbers are
B2 = 2, B3 = 5, B7 = 877, B13 = 27 644 437,
B42 = 35 742 549 198 872 617 291 353 508 656 626 642 567,
B55 = 359 334 085 968 622 831 041 960 188 598 043 661 065 388 726 959 079 837,
and B2841 , which has approximately 6539 digits (to determine the ap-
proximative number of digits, we made use of (7.10)). To find the evi-
dence that B2 841 is a prime, it took 17 months, and the calculation was
carried out in 2003-2004 by Ignacio Larrosa Cañestro (see the remarks
on OEIS: A051130).
Congruences 335
It was known until 2006 that there are no other prime Bell numbers
below B6 000 . On the 23rd of April, 2006, this limit was pushed forward
by E. W. Weisstein [594] who proved that there are no new primes among
the Bell numbers at least until B30 447 .
25. Chowla, Herstein and Moore [151], and independently Sagan [502]
proved three congruences with respect to the involutions In :
holds for all number n not divisible by six. This was proven in 1888 by
Leudesdorf [371].
For historical remarks, generalizations, extensions and equivalents, see
[410]. For congruences involving harmonic numbers, see [551].
28. Another analogue of Wolstenholme’s theorem is when, in place of Hp−1 ,
we sum reciprocals congruent to a given integer. The following interest-
ing statement is due to Zhi-Wei Sun [550]:
p−1
X 1 1 n r o r−p
≡ Bp−1 − Bp−1 (mod p)
k m m m
k=1
k≡r (mod m)
for positive integers m not divisible by the odd prime p, while r can be
an arbitrary integer. The {·} denotes the fractional part.
29. We have seen that the numerator of Hp−1 is always divisible by p (and
also by p2 ). An interesting question is the following. Given a prime
p, determine the set of the positive integers n for which p divides the
nominator of Hn . This set is denoted by J(n) in the literature. We know
from Wolstenholme’s result that p − 1 ∈ J(p) for p > 3. The study of
the set J(p) was started in [222], where the authors showed that p2 − 1
and p2 − p are also in J(p) for all p > 3. There are primes for which
J(p) contains only the above three numbers. These numbers are called
harmonic. For example, 5, 13, 17, 23, 67 are harmonic primes.
336 Combinatorics and Number Theory of Counting Sequences
It is believed that J(p) is finite for all primes, and that there are infinitely
many harmonic primes. We will see in Chapter 11 that p = 2 is always
a divisor of the denominator if n > 1, so J(2) = {0}. It takes more
effort to show that J(3) = {0, 2, 7, 22} [222]. For more on the set J(p),
apart of [222], see [94, 507, 603, 604] for estimations on the cardinality
of J(p), and further statements. The set J(p) can be generalized to
hyperharmonic numbers [258], as well as Wolstenholme’s theorem.
30. Wilson’s theorem states that (p − 1)! ≡ −1 (mod p), i.e., (p − 1)! + 1 is
divisible by p. It is an interesting question what the remainder is of this
division. To this end, one defines
(p − 1)! + 1
wp = .
p
These numbers are called Wilson quotients.
Similarly, the little Fermat theorem says that ap−1 ≡ 1 (mod p), that
is,
ap−1 − 1
qp (a) =
p
is an integer number, called Fermat quotient. The Wilson and Fermat
quotients are interesting quantities. The latter is strongly connected to
special harmonic number sums. We give a remarkable example of this:
Eisenstein and, in a slightly different form, Sylvester [554] proved that
For similar relations with respect to more general Fermat quotients, see
Congruences 337
[197, 201]. Such formulas were studied in [524] in the framework of p-adic
numbers. See the book [494] of Ribenboim, too.
Since the Fermat quotient qp (a) is an integer, it can be asked which is
the smallest a such that qp (a) ≡ 0 (mod p). This was studied in [91]
and in the references of this paper. Numerical results are contained in
[221]. The value set of the Fermat quotients is also interesting: one can
ask, which is the smallest number L such that {qp (1), qp (2), . . . , qp (L)}
represents all the residues modulo p. See [519] and its references for the
details and bounds on L.
It is Glaisher’s [255] result that
p−1
1 X 2j
gp (2) ≡ − (mod p).
2 j=1 j
(See [361, 437] for similar congruences.) In his paper, Sondow introduced
and studied the Lerch quotient
p−1
1 X
ℓp = qp (j) − wp ,
p j=1
α1 , . . . , αk−1 positive integers, and co-prime m and d. See [520, 610] for
the most recent results, and [462] for extensions to multiple harmonic
sums. For the non-integerness results with respect to the hyperharmonic
numbers, see the footnote on p. 227 in this book.
For more on the p-adic properties of Hn , see the short writing of K. See
Conrad [160].
32. The 2-adic valuation of the binomial coefficients from an asymptotic
distribution point of view was recently studied in [530].
33. The 2-adic valuation of the Bell numbers was studied by Ambdeberhan,
de Angelis and Moll [18], and of the r-Bell numbers in [427].
34. The difference operator ∆c is defined on an sequence an by
∆c an = an+c − an ,
The 2-adic valuation of the Stirling numbers of the second kind is rather
subtle, only partial description is known. See the already cited [286] for
more results, and also [19].
37. The p-adic valuation of the Stirling numbers of the first kind was recently
studied in details by T. Lengyel [366]. A remarkable result among the
many in [366] is that for any prime p and k ≥ 1
n
lim νp = ∞.
n→∞ k
In other words, as n grows nk contains more and more primes (in limit,
all the primes appear) and on higher and higher powers. (This is, by the
way, not some curious property, the an = n! sequence has the very same
property, as the reader sees.) Other works on the topic are [73, 253].
Simplifications of some proofs of Lengyel and other results can be found
in [5]. See also the most recent work [439].
340 Combinatorics and Number Theory of Counting Sequences
38. The theory p-adic numbers has a large number of applications in number
theory, analysis, and even in physics. For applications in number theory,
see [155, 156], and for an application in physics, see [208]. It is believed
by some physicists that physics should be done “locally” by measuring
distances p-adically (via the p-adic norm as a distance), and “globally,”
as we are used to: using the standard absolute value.
Chapter 12
Congruences via finite field methods
The result of this and the following chapter is mainly collections of the material
scattered in the literature rather than a systematic treatise on the topic. The
latter cannot be expected, since the literature is rather hollow. Some properties
that are known for a given counting sequence might be completely unknown
for another. Still there is a lot of research to be done here.
additive term and the sequence members are all on the first power.
341
342 Combinatorics and Number Theory of Counting Sequences
n = p − 1:
where the coefficient matrix is just a k × k Hankel matrix! We are looking for
the ai coefficients, which are given uniquely by
−1
a0 A0 A1 ... Ak−1 Ak
a1 A1 A2 ... Ak Ak+1
= .. .. , (12.2)
.. .. .. ..
. . . . . .
ak−1 Ak−1 Ak ... A2k−2 A2k−1
if the matrix is invertible. We are working modulo p, but this does not cause
any difference: a square matrix is invertible modulo p if and only if its deter-
minant is not zero modulo p.
The determinants of Hankel matrices are just the Hankel determinants,
that we have calculated for many sequences. We know take some examples,
applying our discovery that Hankel determinants and modulo p recurrences
are related.
we can recall that the k × k Hankel determinant (i.e., the Hankel transform)
of the Bell numbers is
B0 B1 ... Bk−1
B1 B2 ... Bk k−1
Y
.. = i!,
.. .. ..
. . . . i=0
Bk−1 Bk ... B2k−2
Congruences via finite field methods 343
which was a nice result of Chapter 2 (see (2.62)). Thanks to the fact that p is
a prime, this determinant is not zero modulo p for k = p, so the coefficients
can be found, and they are unique2 .
Taking k = p = 3, the Hankel matrix of the Bell numbers is
B0 B1 B2 1 1 2 1 1 2
B1 B2 B3 = 1 2 5 ≡ 1 2 2 (mod 3).
B2 B3 B4 2 5 15 2 2 0
Hence, we have
a0 1 2 2 2
a1 = 2 2 0 0 ,
a2 2 0 2 1
where it comes that
a0 4 1
a1 = 4 ≡ 1 (mod p),
a2 6 0
resulting in
Bn+3 ≡ Bn + Bn+1 (mod 3) (n ≥ 0),
which we recognize as a particular case of Touchard’s congruence.
If the reader has a new sequence to study, the above approach is of great
help. One can perform the above calculations for some small primes, and if
there is a common pattern in the resulting recurrences, a good conjecture can
be formed for general primes.
p, so the highest order recurrence we can find is of order p in the case of Bell numbers.
344 Combinatorics and Number Theory of Counting Sequences
In this case, we do not even need to solve the equation, because we can note
that this vector is the same as the first column of the coefficient matrix. By
Cramer’s3 rule4 , all the determinants we should calculate are zero (having two
equal columns), except the very first one when we substitute our vector into
the first row. In this case the determinants in the nominator and denominator
are equal, resulting in the solution a0 = 1, a2 = · · · = a4 = 0. Hence, we get
the congruence
In+5 ≡ In (mod 5).
This congruence is actually a particular case of
In+m ≡ In (mod m)
for odd integers m and n ≥ 0, see [151]. Note that the longest possible recur-
rence for In is of length p−1, because the higher order Hankel determinants are
not regular, just as in the case of the Bell numbers (Exercise 17 of Chapter 3).
where the βj numbers are uniquely determined by the sequence and belong
to the splitting field of f (x).
But
k
X k
X k
X k
X
βj αjn+k − ak−1 βj αjn+k−1 − ak−2 βj αjn+k−2 − · · · − a0 βj αjn =
j=1 j=1 j=1 j=1
k
X
βj f (αj )αjn = 0,
j=1
1 = β1 + β2
1 = β1 x + β2 (1 + x)
This seems to be a bit complicated. It is not even obvious at first sight that the
polynomial on the right-hand side simplifies to a number. However, (12.4) can
considerably be simplified. Below we use the “=” sign while doing calculations
Congruences via finite field methods 347
in our splitting field. Let us consider the first term xn+1 as n runs from n = 0
in the field F2 /(x2 − x − 1):
x0+1 = x,
x1+1 = x2 = x + 1,
x2+1 = x3 = x2 · x = (x + 1)x = x2 + x = 1,
x3+1 = x4 = x3 · x = x,
..
.
That is, the nth Bell number Bn is even if and only if n is of the form 3k + 2
(k = 0, 1, . . . ).
This can be put in another form: the Bell numbers modulo 2 form a peri-
odic sequence of length three.
A slightly weaker version,
Now we consider the modulo 3 case, because some new aspects of our
theory show themselves more clearly for higher primes. So let p = 3. Then
the characteristic polynomial of Bn (mod 3) is x3 − x − 1. In its splitting field
F3 /(x3 − x − 1) one of its zeros is x. If we recall an important fact from the
theory of finite fields, we do not need to work hard to find the other zeros.
This theorem says that if f is an irreducible polynomial of degree m in Fq ,
348 Combinatorics and Number Theory of Counting Sequences
then all the roots of f are simple and are given by the m distinct elements
2 m−1
α, αq , αq , . . . , αq of its splitting field with q m elements. (See [373, Theorem
2.14].)
Hence, the roots of the irreducible characteristic polynomial x3 − x − 1 are
x, x3 , x9 in F3 /(x3 − x − 1). These can be reduced in this field, resulting in
α1 = x,
α2 = x3 = x + 1,
α3 = x9 = (x3 )3 = (x + 1)3 = 1 + x3 = 1 + (x + 1) = 2 + x.
1 = β1 + β2 + β3 ,
1 = β1 α1 + β2 α2 + β3 α3 ,
2 = β1 α12 + β2 α22 + β3 α32 .
In matrix form
1 1 1 β1 1
α1 α2 α3 β2 = 1 .
α12 α22 α32 β3 2
We can recognize the matrix as a Vandermonde matrix . There exists a rel-
atively simple expression for the inverse of Vandermonde matrices [569] by
using LU -decomposition. Even without using this expression, one can easily
find that
β1 = 2x2 + 2x + 2,
β2 = 2x2 ,
β3 = 2x2 + x + 2,
whence
Bn ≡ (2x2 + 2x + 2)xn + 2x2 x3n + (2x2 + x + 2)x9n
in the field F3 /(x3 − x − 1). Our observation above is that with respect to the
values of αi we can reduce the powers:
αj ’s are elements of a finite field, so the sequence αjn can take only finitely
many values, and for some kj
n+kj
αj = αjn .
One might conclude that then we just take the least common multiple of all
the kj ’s and we get the k in (12.5). The problem at this level is actually even
simpler: we can express all the αj s with α1 :
n
αjn = (xp )j−1 = (xn )p(j−1) = (α1n )p(j−1) .
Thus,
αjn+k = (α1n+k )p(j−1) = (α1n )p(j−1) = αjn ,
where k is the order of the periodicity of α1n = xn modulo the characteristic
polynomial.
Hence, the periodicity k of a sequence An satisfying a linear homogeneous
recurrence modulo a prime p, having irreducible characteristic polynomial f
with pairwise distinct roots, equals to the periodicity of the sequence (xn )n≥0
modulo f .
The periodicity k can be expressed in another way, involving only the
characteristic polynomial. We need that xn+k ≡ xn (mod f (x)) for all n ≥ 0.
It is sufficient, however, to claim only that the n = 0 case satisfies:
the rest comes by multiplying with xn . Congruence (12.6) satisfies if and only
if
xk − 1 ≡ 0 (mod f (x)),
that is, when
xk − 1 = c(x)f (x)
with some polynomial c(x). We therefore have the following statement: the
(shortest) period of the sequence An is equal to the smallest integer k such
350 Combinatorics and Number Theory of Counting Sequences
Taking into account what we have said about the pre-periods above, we see
also from the form of f (x) that Fn modulo p has a pre-period of length one.
It readily comes that the period of Fn modulo p is p − 1, since f (x) divides
xp−1 − 1 but does not divide any xk − 1 if k < p − 1.
For example, taking p = 5, the sequence Fn (mod 5) is
1, 1, 3, 3, 0, 1, 3, 3, 0, 1, 3, 3, 0, . . . .
Here come some facts about minimal polynomials (see [373, Section 8.4]):
1. The minimal polynomial exists for any linear recurrence sequence, and
it is unique.
2. The minimal polynomial is the characteristic polynomial belonging to
the linear recurrence of the least possible order.
3. The order of the minimal polynomial coincides with the period of the
linear recurrence it belongs to.
4. If a characteristic polynomial belonging to a given recurrence of a given
sequence is monic irreducible, then it is minimal.
g0 (x) = 1, h0 (x) = x, m0 = 0.
and
−mj , if bj ̸= 0 and mj ≥ 0;
mj+1 =
mj + 1, otherwise.
In the following lines we present the code for the Berlekamp – Massey al-
gorithm written in Mathematica:
g [ x ,0]:=1
h[ x ,0]:=x
m[ 0 ] : = 0
For [
j =0, j <=2k , j ++,
Congruences via finite field methods 353
b [ j ]= S e r i e s C o e f f i c i e n t [ g [ x , j ] ∗G[ x ] , { x , 0 , j } ] ;
g [ x , j +1]=g [ x , j ]−b [ j ] h [ x , j ] ;
h [ x , j +1]= I f [ b [ j ]!=0&&m[ j ] >=0 ,1/b [ j ] ∗ x∗g [ x , j ] , x∗h [ x , j ] ] ;
m[ j +1]= I f [ b [ j ]!=0&&m[ j ]>=0,−m[ j ] ,m[ j ] + 1 ]
] ( ∗ End o f For ∗ )
r := F l o o r [ k+1/2−1/2m[ 2 k ] ]
PolynomialMod [ xˆ r ∗ g [ 1 / x , 2 k ] , p ] / / Expand
If we want to find the minimal polynomial for the Bell polynomials modulo
p = 5, we recall that
n 0 1 2 3 4 5 6 7 8 9
Bn (mod 5) 1 1 2 0 0 2 3 2 0 2
a ≡ a1 (mod n1 ),
a ≡ a2 (mod n2 ),
..
.
a ≡ ak (mod nk ),
Bézout’s lemma
n1 x + n2 y = 1 (12.7)
9 Étienne Bézout (1730-1783), French mathematician.
Congruences via finite field methods 355
a ≡ a1 (mod n1 ),
a ≡ a2 (mod n2 ),
a ≡ a1 n2 y + a2 n1 x (mod n1 n2 ).
a ≡ a1 n2 y + a2 n1 x = a1 (1 − n1 x) + a2 n1 x ≡ a1 (mod n1 ),
Owing to the Bézout formula with, say, x = 3 and y = −1, such that
2x + 5y = 6 − 5 = 1 = (2, 5),
we get
a ≡ 1 · 5 · (−1) + 2 · 2 · 3 (mod 2 · 5).
This is then equivalent to
length three modulo 2, and of length 781 modulo 5. The least common multiple
of these two periodicities is 2343. We know that both Bn and Bn+2 343 have
the same remainder with respect to the moduli 2 and 5; therefore, they must
have the same remainder modulo 2 · 5 = 10, too. Therefore
Bn+2 343 ≡ Bn (mod 10),
that is, the last digits of the Bell numbers form a periodic sequence with length
2343.
Basically everything is the same for higher moduli, but the solution of the
congruence system is more laborious when k > 2.
We should note that from prime moduli we can deduce results for the
product of these moduli, but not for moduli having prime power divisors. For
example, we must know how the Bell number sequence’s behavior modulo
22 = 4 in order to get results with respect to 20 = 22 · 5.
recurrences and not modulo p but among the integers is treated in Chapter 13.
Congruences via finite field methods 357
Solvability of Bn ≡ 0 (mod p)
We will prove more than the mere solvability of the above congruence. We
show that the sequence Bn (mod p) contains p − 1 consecutive zeros:
where
pp − p pp − 1
mp ≡ 1 − (mod ).
(p − 1)2 p−1
To prove this statement11 , first recall Exercise 16 of Chapter 11. It states,
in particular, that
n
X n
Bpn ≡ Bi (mod p).
i=0
i
On the right-hand side we can recognize the basic recurrence (1.1) for the Bell
numbers. Therefore, for any prime p,
11 The proof is taken from [359], another proof can be found in [312].
358 Combinatorics and Number Theory of Counting Sequences
Solvability of Bn ≡ λ (mod p) (λ ̸= 0)
The statement is that the congruence in the title is always solvable for any
fixed λ, and for the smallest solution we have the upper bound
2p − 1
n≤ .
p−1
This is Theorem 2 in [518].
Let us define the sequence Wn as
Wn = (Bn − λ)p−1 − 1.
It can easily be seen that the Bn − λ ≡ 0 congruence is solvable if and only
if Wn ̸≡ 0. Wn is a periodic sequence, and, considering (12.3) applied to the
Bell numbers, we have, by the polynomial theorem, that
X (p − 1)! k0 k1 n
Wn = λ β1 · · · βpkp α1k1 · · · αpkp
k0 ! · · · kp !
k0 +···+kp =p−1
Now we see that the degree of q is less than p. Because of this, and for the
irreducibility of xp −x−1, we see that these polynomials can have no common
zeros in Fp .
It is also true that
(p − 1)! k0 k1
λ β1 · · · βpkp ̸= 0
k0 ! · · · kp !
Exercises
1. Let A0 = A1 = 1 and An+2 = An+1 + An (n ≥ 0) be a linear recurrence
in F2 (note that these are the Fibonacci numbers modulo 2). Prove that
An can be represented as
Then show that An+3 = An for all n ≥ 0. (So the Fibonacci and Bell
numbers coincide modulo 2.)
2. Based on Exercise 24 of Chapter 11, show that the period of the hori-
zontal Ln sums of Lah numbers is p − 1 without pre-period.
3. Construct a sequence An such that it is not periodic modulo p.
4. Run the Berlekamp – Massey algorithm to find the minimal polynomial
for the Euler numbers modulo p = 5. (Note that this sequence has a
proper pre-period. The result you should get is m(x) = x4 + 4.)
p
−1
5. Let Np = pp−1 . Show that any Np consecutive Bell numbers sum up
to zero modulo p. (This result can be proven by elementary methods
[313].)
6. Let Wn = (Bn − λ)p−1 − 1, as in Subsection 12.5.1. Supposing that
λ ̸= 0, show that the Bn − λ ≡ 0 congruence is solvable if and only if
Wn ̸≡ 0.
Congruences via finite field methods 361
Outlook
1. The modulo p periodicity of the Bell numbers has been studied by several
authors. The first result about this was given by Hall [275]. He showed
p
−1
that the sequence of Bell numbers has a period Np = pp−1 , which is not
necessarily minimal. This result was rediscovered by Williams [599], who
also showed that the minimum period is exactly Np for p = 2, 3, 5. Levine
and Dalton [372] showed that the period is exactly Np for p = 7, 11, 13
and 17. Afterwards, Radoux [475] conjectured that for any prime p, the
number Np is the minimum period of the Bell sequence. Since then,
several authors have shown this conjecture for some particular primes.
For example, Wagstaff [577] proved that the period is exactly Np for all
primes p < 102 and several larger ps. Montgomery et al. [443] improved
Wagstaff’s result for most primes p < 180.
Lower bounds for the period of the sequence Bn (mod p) are known.
Denoting the shortes period by a(p), we have that [384]:
1 2p
< a(p),
2 p
and even that [575]
22.54p < a(p).
Here “even” means that 12 2p
p < 22.54p . See also [240], where further
results on a(p) are given, including divisibility relations between this
sequence and Np (under the assumption, of course, that accidentally
a(p) ̸= Np ).
Note that Radoux conjecture is equivalent to saying that the smallest
number k for which xp − x − 1 divides xk − 1 is k = Np .
These considerations can be extended to composite modulus. To be
able to write Touchard’s congruence in a compact form, we use the
Ean = an+1 right shift operator. Then, if the prime decomposition of
αk
the positive integer m is pα
1 . . . pk
1
k
!
Y
pi
(E − E − 1) Bn ≡ 0 (mod m).
i=1
363
364 Combinatorics and Number Theory of Counting Sequences
Fi Li + Fi2
n= , (13.1)
2
2
Fi Li − Fi
k= − 1. (13.2)
2
Then
n n−1
= . (13.3)
k k+1
This infinite family of numbers appears not only twice but, because of
n n
n n
= = k = nk ,
n−k k 1 k −1
and
n−1 n−1
=
k+1 n−k−2
it occurs altogether six times, as we stated.
The proof is as follows. Writing out the factorials in (13.3), we see that
this equation is actually equivalent to the simple
Setting
x = n − k − 1, (13.4)
we have that (13.3) is equivalent to
which can be proven by using the basic recurrence for the Fibonacci numbers.
Now (13.6) follows by induction.
What (13.7) tells us is that when x = Fi2 is a perfect square (with i even),
then
5x + 4 = 5Fi2 = 4 = (Fi−1 + Fi+1 )2
is a perfect square, too.
The parameters n and k can be recovered from (13.5) and (13.4):
Fi Li = F2i ,
whence
F2i + Fi2
n= ,
2
F2i − Fi2
k= − 1.
2
Note that in these expressions the nominator is always even, because in
(13.5) x and 5x2 + 4x always have the same parity:
Tovey also proved that whenever (13.3) holds, n and k must be of the form
as given in (13.1)-(13.2).
A related problem proposed by Ira Gessel1 is a test for a number n being
a Fibonacci number. Gessel asked a proof for the following statement: the
positive integer n is a Fibonacci number if and only if either 5n2 + 4 or 5n2 − 4
is a Fibonacci number. For the details, see [251].
1 Ira Martin Gessel (1951-), American mathematician.
366 Combinatorics and Number Theory of Counting Sequences
Every number > 1 can only finitely many times occur in the
Pascal triangle
We know from p. 108, every line in the binomial coefficient table forms a
log-concave sequence. This, in particular, means that the minimal elements in
a given line are the extremal elements (the ones, n0 = nn ), and thesecond
we get that
i+j i+j−1 i+j−1 i−1+j
= + ≥ ,
i i i−1 i−1
(k, l) ∈ {(2, 3), (2, 4), (2, 5), (2, 6), (2, 8), (3, 4), (3, 6), (4, 6), (4, 8)}.
The case (k, l) = (2, 3) was solved by Avanesov [40] in 1966, (k, l) = (2, 4) was
settled by de Weger [591] and Pintér [463] independently in 1996 and 1995,
respectively. de Weger [590] gave the complete solution when (k, l) = (3, 4)
in 1997. A result of Mordell2 [444] easily yields this case but this fact was
seemingly not realized by Mordell or by others until de Weger published his
paper 30 years after the publication of Mordell’s result. Bugeaud and his co-
authors solved the case (k, l) = (2, 5) in 2008 [104]. The rest of the cases were
solved by Stroeker and de Weger [541] in 1999.
In order to show what type of tools are necessary, we highlight a simple case
below which was discovered by the above-mentioned de Weger (and essentially
solved by Mordell).
n m
13.2.2 The particular case 3 = 4
Writing out
n m
= (13.12)
3 4
in its simplified form, we face to the equation
n(n − 1)(n − 2) m(m − 1)(m − 2)(m − 3)
= .
6 24
The symmetry of this equation dictates that we should introduce the new
variables
m(m − 3)
x = n − 1, y = ,
2
2 Louis Joel Mordell (1888-1972) American-British number theorist.
Diophantic results 369
x3 − x = y 2 + y,
or
(x − 1)x(x + 1) = y(y + 1).
That is, when solving (13.12) we are, in fact, looking for numbers which are
simultaneously products of two consecutive integers and three consecutive
integers. This problem was solved by Mordell in 1963 [444]. His proof uses
algebraic number theory (properties of the class group of the unit group of
a certain number field). See [590] for details, extensions to rational numbers,
and references to other solutions.
For example,
i+j i+j−1 i+j−1 i−1+j
= +i ≥ ,
i i−1 i i−1
so i+j
i is indeed monotone increasing in i. The other statements are similar.
370 Combinatorics and Number Theory of Counting Sequences
We will also need the Lambert W function W (a), and its estimation from
the Appendix.
If a tends to infinity,
log a
M2 (a) = O . (13.13)
log log a − log log log a
The proof is as follows. Let us fix an integer a > 1. By the second point
of the above monotonicity property of the Stirling numbers, there exists a
unique smallest integer b such that
2b
>a
b
still holds. If we attempt to solve the equation
i+j
= a, (13.14)
j
we see that it can have at most one solution in i for all fixed j.
Because of the definition of b, it cannot hold true that both i and j are
greater than equal to b. That is, we must have that for our potential solutions
i < b or j < b. It therefore follows that (13.14) has at most 2b solutions:
M2 (a) ≤ 2b.
If we can find an upper bound for b in terms of a, we are ready. Here
the present proof is a bit more complicated than the proof for the binomial
coefficient case. To find a suitable lower bound for the central Stirling numbers,
we make use of the expression (10.2) for the Stirling numbers:
k
n X k+j n
= (n ≥ k + 1).
n−k j=0
j ≥2 k+j
In particular
X b
2b b+j 2b 2b
= ≥ .
b j=0
j ≥2 b + j b ≥2
whence b−1
2(b − 1) 2(b − 1) b−1
a≥ ≥ ≥ .
b−1 b − 1 ≥2 2
The definition of the Lambert W function yields that the equation a =
b−1 b−1
2 is invertible (expressible in terms of W ). By monotonicity,
log a
b≤1+ ;
W 12 log a
therefore,
log a
M2 (a) ≤ 2b ≤ 2 + 2 1
.
W 2 log a
This is our first statement. The second one, (13.13), follows by recalling the
asymptotics of the W function (see the Appendix).
It is clear that 2n
2n
n ≥2 = n ≥2 , so our method to estimate b and M1 (a) can
be repeated verbatim. Thus, we have the following statement.
For all a ≥ 2
log a
M1 (a) ≤ 2 + 2 .
W 12 log a
If a tends to infinity,
log a
M1 (a) = O . (13.15)
log log a − log log log a
372 Combinatorics and Number Theory of Counting Sequences
and
14 364
= = 66 066. (13.18)
11 363
The equal values were studied in [229], but the authors’ conjecture does not
hold: they proposed that there are no multiple values in the Stirling triangle
of the second kind apart of 15 and 4 095. As we have just seen, there is at
least one more: 66 066.
n m
13.4.2 The diophantine equation n−3 = m−1
was quite amazing, and altogether beyond anything I [G. H. Hardy] have met with in any
European mathematician.”
4 Wilhelm Ljunggren proposed the same conjecture in 1943 [376].
5 Trygve Nagell (1895-1988), Norwegian mathematician, mostly known for his contribu-
m(m − 1)
n! = . (13.21)
2
So 6 and 120 are two factorial-triangular numbers6 . These belong to the pairs
(n, m) = {(1, 2), (3, 4), (5, 16)}.
Are there any other factorial-triangular numbers?
Equation (13.21) is quadratic in m and equivalent to
√
1 + 8n! + 1
m= .
2
√
Note that 8n! + 1 is odd for all n ≥ 0, thus 8n! + 1 is also odd if it is an
integer. Thus, one should consider those n integers for which 8n! + 1 is a
perfect square. The fraction in the expression of m then will automatically
be an integer. Therefore, we have that finding the solutions of (13.21) is the
same as finding all those ns for which 8n! + 1 is a perfect square. Computer
calculations show that there are no such numbers apart of 1, 3, 5 up to 1 000.
This question was studied with respect to the second kind case by M. Klazar
and F. Luca. In the first kind case, such studies are not known.
In fact, Klazar and Luca studied the even more general question: how often
can it happen that
n n
=c
k2 k1
for some integer c and 1 < k1 < k2 < n? It turns out that such an equality
can be valid only for finitely many n. In other words, only in finitely many
rows it can happen that some values are multiples of another.
Now we are going to prove the Klazar – Luca theorem.
Recall the (2.20) closed-form expression for the Stirling numbers of the
second kind:
k
n 1 X k n
= l (−1)k−l .
k k! l
l=0
1 k
This expression is a special power sum of ln with factors k! l (−1)
k−l
. In
general, we will consider the set E of power sums with rational number coef-
ficients:
( k )
X
n
E= cl al k ≥ 1, cl ∈ Q, al ∈ N, a1 > a2 > · · · > ak > 0 .
l=0
Here N is the set of positive integers and Q is the set of rational numbers.
In these sums k is the rank, ci ’s are the coefficients,
and the ai ’s are the
roots of the given power sum. In particular, by (2.20), nk ∈ E is a power sum
of rank k, and the roots are 1, 2, . . . , k.
We now describe a mapping which is important in the study of general
power sums. Let Q[xp | p is a prime] be the set of polynomials with rational
coefficients and variables (indeterminates) indexed by the primes. For exam-
ple,
3 5 4
x2 − 14x85 + x211
2 3
is an element of the above set. Such polynomials can be added and multiplied
in the usual way.
We define ψ : E → Q[Xp | p is a prime] which maps power sums into the
above-defined polynomials such that
For example,
1 1
ψ 2 · 15 − 3 · 55 + · 105 + 4 · 1215 = 2 − 3x5 + x2 x5 + 4x211 .
2 2
This map is clearly bijective. Probably the first appearance of this mapping
is in [496]. Section 3.2 in [470] contains more information about ψ.
We will need a proposition with respect to the general power sums. Let
α, β ∈ E such that α/β is an integer number for infinitely many exponents n.
Then there exists a third power sum γ ∈ E such that
α = βγ.
If xp does not appear in ψ(γ), then equality (13.23) is impossible to hold. If, in
turn, ψ(γ)
appears a term with xp , then (13.23) is still not possible, because
then ψ kn1 ψ(γ) would contain a monomial of the form M xp with a non-
constant monomial coming from ψ kn1 and containing some xq . But, as
we saw, the left-hand side contains only monomial of the form constant times
xp . This contradiction results in the fact that our original assumption about
the existence of infinitely many n’s in (13.22) cannot hold.
378 Combinatorics and Number Theory of Counting Sequences
Exercises
1. Prove inequality (13.10).
n = F2i F2i+1 ,
k = F2i−2 F2i+1 .
Then
n n−1
= .
k k+1
Outlook
n
1. D. M. Kane [316] studied the number of solutions to m = t by using
the interesting function f defined implicitly by
f (x)
= t.
x
has only finitely many solutions in n > 0 and x > 0 for d > 1, and
a1 , . . . , am positive integers not all divisible by d, and 1 < k1 < k2 · · · <
km . See [333] for the details.
7 Adrien-Marie Legendre (1752-1833), is a French mathematician who worked on a wide
range of mathematical problems. He wrote the book Éléments de Géométrie on elementary
geometry, simplifying and rearranging the statements and proofs of Euclid’s Elements. This
text was the standard book on the subject for a long time.
380 Combinatorics and Number Theory of Counting Sequences
7. There are some effective finiteness results8 with respect to the Stirling
numbers.
Pintér [464] proved that the number of solutions of the equation
x y
=
a b
(with 1 < a < b given and x > a, y > b unknowns) is finite, and the
maximum of x and y is bounded from above by an expression depending
only on a and b.
n
Another result of Pintér [465] is the following: if n−a is an m-th power
(m ≥ 3) for some n > a, then n is bounded from above by a con-
stant which is computable explicitly if one follows the steps of the proof.
Such constants are called effectively computable.
n An analogous result was
proved in the same paper, stating that if n−a (n > a) falls into a set
S of positive integers which are divisible only by a fixed finite collection
of primes, then n is bounded from above by an effectively computable
constant. Remarkably, the bounds in the statements depend only on a
and S, but not on the magnitude of the right-hand side.
Brindza and Pintér [98] established an effective finiteness result with
respect to both equations
x
= ay z ,
x−k
x
= ay z
x−k
8 In the theory of diophantine equations “effective finiteness” means that the solutions
are finite in number and they can be bounded by an explicit bound which is a function of
the fixed parameters. A finiteness result is ineffective if it is known that there are finitely
many results but no bound is given.
Appendix
n! = 1 · 2 · · · n.
It is easy to see why this holds: to put n elements in an order we first determine
where the first element goes. We have n positions, so n choices. To choose a
position for the second element, we have n − 1 places, and so on. To put the
last element down, we have only one position.
381
382 Appendix
There are
n!
n(n − 1)(n − 2) · · · (n − (k − 1)) = = nk
(n − k)!
variations without repetition for any given n and k. (For the last notation, see
the falling factorial on p. 61.)
We can choose the first element from that of n in n ways. The second
element is chosen n − 1 ways, and so on. The kth element can be chosen
n − (k − 1) ways. This argument justifies the formula for nk .
Definition 14.4.4. If we choose k objects from n such that the order counts,
and an element can be chosen multiple times10 , then we get a variation with
repetition.
nk .
The proof of this is slightly more complicated than the above formulas for
permutations and variations. Note that
n+k−1 n(n + 1) · · · (n + k − 1)
= .
k k!
Label the chosen objects (which can be repeated) and put them in order:
0 ≤ o1 ≤ o2 ≤ · · · ≤ ok ≤ n.
we see that we must multiply each term with every other term. This means
that the expanded power constitutes products of k factors. If x1 is chosen j1 -
times from the k parentheses, x2 is chosen j2 -times from the k−j1 parentheses,
and finally xn is chosen jn -times from the k − j1 − j2 − · · · − jn−1 parentheses,
then the number of possible choices is
k k − j1 k − j1 − j2 k − j1 − j2 − · · · − jn−1
··· .
j1 j2 j3 jn
It can be seen by the definition of the binomial coefficients (see the combina-
tions above) that this binomial product equals to the much simpler
k!
.
j1 !j2 ! · · · jn !
Since the sum of powers of the several xi s must be k, it is necessary that
j1 + · · · + jn = k. Summing over these possibilities, we get the polynomial
theorem.
The above long binomial product can be written in the much more compact
form, by applying the multinomial coefficient:
k k − j1 k − j1 − j2 − · · · − jn−1 k
··· = .
j1 j2 jn j1 , j2 , . . . , jn
Equation (14.2) has infinitely many solutions when z ̸= 0, and these solu-
tions can be indexed by the integers. In function theory language, we say that
the W function has infinitely many branches. These are denoted by Wk (z).
Except for W−1 and W0 , all the branches are complex-valued and do not at-
tain real values at all. W−1 (z) is real when − 1e ≤ z < 0, and W0 (z) is real
when z ∈ [−1/e, +∞[ . This latter branch is called the “principal branch.” If
we do not write out the branch index, it is understood that we are talking
about the principal branch.
It can be seen that
1 log(2)
W (0) = 0, W (e) = 1, W − = −1, W − = − log(2).
e 2
W (1) = Ω = 0.567143290409784 . . . .
Recursion:
n n−1 n−1 0 n
= (n − 1) + ; = 1; = 0 (n > 0).
k k k−1 0 0
Special values:
n
= (n − 1)!,
1
n
= (n − 1)!Hn−1 ,
2
n (n − 1)! 2 1 1 1
= Hn−1 − + + · · · + ,
3 2 12 22 (n − 1)2
n (n − 1)! 3 1 1 1
= Hn−1 − 3Hn + + · · · + +
4 6 12 22 (n − 1)2
1 1 1
+ + · · · + ,
13 23 (n − 1)3
n n n+1 n+2
= +8 +6 ,
n−3 6 6 6
n n 1 n n−2
=2 + ,
n−2 3 2 2 2
n n
= ,
n−1 2
n
= 1.
n
387
388 Formulas
Generating functions:
n
X n k
x = x(x + 1)(x + 2) · · · (x + n − 1) = xn ,
k
k=0
∞ n k
X n x 1 1
= ln ,
n=0
k n! k! 1−x
∞ n
!
n k xn
X X 1
y = ,
n=0 k=0
k n! (1 − x)y
n
X n+1
xk = (1 + x)(1 + 2x) · · · (1 + nx).
n+1−k
k=0
Orthogonality:
m
X m n 1, if m = k;
=
n k 0, otherwise.
n=k
Congruences:
n
n 2
≡ (mod 2),
k k − n2
p
≡ 0 (mod p) (1 < k < p),
k
p
≡ −1 (mod p),
1
p
≡ 1 (mod p),
p
p−1
≡ 1 (mod p) (1 ≤ k ≤ p),
k
mp
≡ 0 (mod p) (m > 1, k ̸= jp),
k
p+1
≡ 0 (mod p) (2 < k ≤ p),
k
p+2
≡ 0 (mod p) (3 < k ≤ p),
k
..
.
2p − 2
≡ 0 (mod p).
p
Wolstenholme-congruence:
p
≡0 (mod p2 ).
2
390 Formulas
Other formulas:
n −k
= ,
k −n
X n
n+1 n m
= ,
k+1 m=0
m k
X n
n n+1 m
= (−1)m−k ,
k m=0
m + 1 k
X n n
n+1 m n−m X m
= n = n! /m!,
k+1 m=0
k m=0
k
X n
n+k+1 n+m
= (n + m) ,
k m=0
m
X n
n k−n k+n k+m
= ,
n−k m=0
k+m n+m m
n n! X 1
= ,
k k! j +j +···+j =n j1 j2 · · · jk
1 2 k
j1 j2 jn
n X n! 1 1 1
= ··· ,
k j +2j +···+nj =n 1 2
j !j ! · · · j n ! 1 2 n
1 2 n
j1 +j2 +···+jn =k
X k
n n−j n
= .
k j=0
k − j ≥2 j
Schlömilch (1852) [511], see [83, pp. 113-114.] or [134, p. 290] for proofs:
n−k
n n+m−k n − 1 + m 2n − k n−k+m
X
= (−1) ,
k m=0
n−k+m n−k−m m
Determinantal formula:
1
1 1 ··· 1 1 ··· 1
1 2 22 ··· 2k−1 2k+1 ··· 2n
n+1 1
= 1 3 32 ··· 3k−1 3k+1 ··· 3n .
k 1!2!3! · · · (n − 1)!
· · · ··· ··· ··· ··· ··· ··· · · ·
1 n n2 ··· nk−1 nk+1 ··· nn
Formulas 391
Recursion:
n n−1 n−1 0 n
= +k ; = 1, = 0 (n > 0).
k k−1 k 0 0
Special values:
n
= 1,
1
n
= 2n−1 − 1,
2
n 1 n−1
− 2n + 1 ,
= 3
3 2
n 1 1 1
= 4n−1 3n−1 + 2n−2 − ,
4 6 2 6
n n n n
= + 10 + 15 ,
n−3 4 5 6
n n n
= +3 ,
n−2 3 4
n n
= ,
n−1 2
n
= 1.
n
Generating functions:
n
X n
x(x − 1)(x − 2) · · · (x − k + 1) = xn ,
k
k=0
∞ n
X n x 1
= (ex − 1)k ,
n=0
k n! k!
∞
X n n xk
x = ,
n=0
k (1 − x)(1 − 2x) · · · (1 − kx)
∞ n
!
X X n k xn x
y = ey(e −1) .
n=0
k n!
k=0
Formulas 393
Orthogonality:
m
X m n 1, if m = k;
= .
n k 0, otherwise.
n=k
Asymptotics:
kn
n
∼ .
k k!
Congruences:
k
n
≡ 2 +n−k−1 (mod 2),
k n−k
p
≡ 0 (mod p) (1 < k < p),
k
p
≡ 1 (mod p),
1
p
≡ 1 (mod p).
p
p+1
≡ 0 (mod p) (2 < k ≤ p),
k
p+2
≡ 0 (mod p) (3 < k ≤ p),
k
..
.
2p − 2
≡ 0 (mod p).
p
394 Formulas
Other formulas:
n −k
= ,
k −n
k
n 1 X k n
= l (−1)k−l ,
k k! l
l=0
X n X l−1
n n m l−1−m
= (−1) ,
k l m=0 k−1
l=0
X n
n+1 n m
= ,
k+1 m=0
m k
X n
n m+1 m
= (−1)m−k ,
k m=0
k + 1 k
X n
n+1 m
= (k + 1)n−m ,
k+1 m=0
k
X n
n+k+1 n+m
= m ,
k m=0
m
X n
n k−n k+n k+m
= ,
n−k m=0
k+m n+m m
X n
n k+l m n−m n
= ,
k+l l m=0
l k k
n n! X 1
= ,
k k! j +j +···+j =n j1 !j2 ! · · · jk !
1 2 k
j1 j2 jn
n X n! 1 1 1
= ··· ,
k j +2j +···+nj =n 1 2
j !j ! · · · j n ! 1! 2! n!
1 2 n
j1 +j2 +···+jn =k
X k
n n−j n
= ,
k j=0
k − j ≥2 j
X k X k
n+m j (k − i)! n m
= . [588]
k i=0 j=i
i (k − j)! k − i j
Formulas 395
Determinantal formula:
1
1 1 ··· 1 1 1
1 2 22 ··· 2k−3 2k−2 2n
n 1
= 1 3 32 ··· 3k−3 3k−2 3n .
k k!
··
· ··· ··· ··· ··· ··· · · ·
1 k k2 ··· k k−3 k k−2 kn
Relations between the Stirling numbers of the second kind and Eulerian num-
bers:
n
n 1 X n m
= ,
k k! m=0 m n − k
X n
n n n−m
= m! (−1)n−m−k .
k m=0
m k
k jn
n+k n+k X j k+1 jn−k
= (−1) .
n k j=1
j + 1 jn−1k
n X
m
X
n−k m n
Bn+m = j Bk .
j k
k=0 j=0
396 Formulas
Recursion:
n
= 0, if n < r;
k r
n
= 1, if n = r and k = r;
k r
n
= 0, if n = r and k ̸= r.
k r
Special values:
n
= rn−r ,
r r
n
= 1 (n ≥ r),
n r
n+r
= n!Hnr .
r+1 r
Generating functions:
n
X n
xk = xr (x + r)(x + r + 1) · · · (x + n − 1),
k r
k=0
∞ r
n + r xn
X 1 1 1
= lnk ,
n=0
k + r r n! k! 1 − x 1−x
∞ n
!
X X n k xn 1
y = .
n=0
k n! (1 − x)r+y
k=0
Orthogonality:
m
X m n 1, if m = k;
=
n r k r 0, otherwise.
n=k
Generalized orthogonality:
X n + r k + p
n
(−1)m+k = (r − p)n−m .
k+r r m+p p m
k
Formulas 397
Other formulas11 :
!
n 1 n n
= − ,
k r r−1 k − 1 r−1 k−1 r
n X
= i1 i2 · · · ik ,
n − k r r<i <···<i <n
1 k
n−r
n X n−r n−p−m
= pm (r ≥ p ≥ 0),
k r m=0 m k−p r−p
n−r
X n−r
n n−p−m
= pm (r ≥ p ≥ 0),
k r m=0 m k−p r−p
X n n − m + p
n+r
= (r − p)m ,
k+r r m
m k + p p
n+r n+r−1 n+r−1
=n + ,
k r k r k − 1 r−1
k
n X m n
= ,
k r t=r t r k + m − t m
X p n
n
= (r ≤ p ≤ n),
k r m
p−k r k+m p
X
n n m−1
= (−1)k+r (n ≥ r > p ≥ 0),
k r m
k − r + m p r − 1 p
n
k+m n+r+s X n l+r n−l+s
= ,
m k + m + r + s r+s l k+r r m+s s
l=0
n−l
k−r n+r X n t+r−m n+m−t
= ,
l k r t k − m − l r−m m+l m
t=k−r−l
n n m m n
= + (0 ≥ r ≥ m ≥ n),
r+1 r m+1 m r r r+1 r m m
r
n+r n X n+r−t
= +n ,
k r k−r 1 t=1
k − t + 1 r−t+1
m
n+r X m n! n+r−m
= (0 ≤ m ≤ r).
k r t=0 t (n + t − m)! k−t r−t
11 Those summations which do not contain explicit limits are always running on the widest
possible range.
398 Formulas
(h − j)m−k+h n−m
m−1+h 2m − k
r .
m−k+h m−k−h h!
The r-Stirling numbers of the first kind are expressible in terms of the
classical Stirling numbers:
n
n+r X n j n−j
= r ;
k+r r j k
j=k
Recursion:
n
= 0, if n < r;
k
r
n
= 1, if n = r and k = r;
k
r
n
= 0, if n = r and k ̸= r.
k
r
n n−1 n−1
= +k
k r k−1 r k r
Special values:
n
= rn−r ,
r r
n
= (r + 1)n−r − rn−r ,
r+1 r
n 1 1
= (r + 2)n−r − (r + 1)n−r + rn−r ,
r+2 r 2 2
n
=1 (n ≥ r).
n r
Generating functions:
n
X n+r
x(x − 1) · · · (x − k + 1) = (x + r)n ,
k+r r
k=0
∞
n + r xn erx x
X
= (e − 1)k ,
n=0
k + r r n! k!
∞
X n xk
xn = ,
n=0
k r (1 − rx)(1 − (r + 1)x) · · · (1 − kx)
∞ n !
X X n + r k xn x
y = ey(e −1)+rx .
n=0
k+r n!
k=0
Orthogonality:
m
X m n 1, if m = k;
= .
n r k r 0, otherwise.
n=k
400 Formulas
Generalized orthogonality:
X n + r k + p
n
(−1)m+k = (r − p)n−m .
k+r r m+p p m
k
Asymptotics:
(k + r)n
n+r
∼ .
k+r r k!
Formulas 401
Other formulas:
k
n+r 1 X k
= (l + r)n (−1)k−l ,
k+r r k! l
l=0
n n n−1
= − (r − 1) (n ≥ r ≥ 1),
k r k r−1 k r−1
n+m X
= i1 i2 · · · im ,
n r r≤i1 ≤···≤im ≤n
n
n+r X n j n−j
= r ,
k+r r j k
j=k
n−r
n X n−r n−p−m
= pm (r ≥ p ≥ 0),
k r m=0
m k−p r−p
X n n − m + p
n+r
= (r − p)m ,
k+r r m
m k + p p
X p + m n − m
n
= (r ≤ p < n),
k r m
p r k p+1
X r n − r + m
n
= (−1)k+r (n ≥ r ≥ p ≥ 0),
k r m
m p k p
n−r
X n − rn − p − m
n
= pm (r ≥ p ≥ 0),
k r m=0
m k − p r−p
n k−1
n X n X l+r−2 k−l
= (−1)l−1 ,
m r k l−1 m − 1 r−1
k=2 l=1
r
n X r n−r
= (k − i)r−i ,
k r i=0
i k−i
r
n+r i n+r−i
X
= k .
k+r r i=0
k+r r−i
402 Formulas
Bell polynomials
∞
X yn
Bn (x) = exp(x(ey − 1)),
n=0
n!
∞ −1
X 1
Bn (x)y n = x 1 F1
z
z−1 x .
n=0
e z
′
Bn (x) = xBn−1 (x) + xBn−1 (x) = e−x x(ex Bn−1 (x))′ ,
n
X n
Bn (x + y) = Bk (x)Bn−k (y),
k
k=0
n
X n
Bn+1 (x) = x Bk (x),
k
k=0
∞
1X kn k
Bn (x) = x ,
ex k!
k=0
n X m
X n j m n−k
Bn+m (x) = x Bk (x) j .
j=0
k j
k=0
The Bell polynomials have only real and negative zeros (except B0 (x) = 1),
the leftmost zero does not grow faster than c1 · n3/2 , see [175]; and does not
grow slower than c2 n [432].
r-Bell polynomials
∞
X yn y
Bn,r (x) = ex(e −1)+ry ,
n=0
n!
∞ rz−1
X
n −1 1 z
Bn,r (x)z = 1 F1 rz+z−1
x .
n=0
rz − 1 ex z
Formulas 403
n
X n
Bn,r (x) = Bk (x)rn−k ,
k
k=0
n
X n
Bn,r (x) = Bk,t (x)sn−k (s + t = r),
k
k=0
d
Bn,r (x) = x Bn−1,r (x) + Bn−1,r (x) + rBn−1,r (x),
dx
d x r
ex xr Bn,r (x) = x (e x Bn−1,r (x)) ,
dx
Bn,r (x) = xBn−1,r+1 (x) + rBn−1,r (x),
∞
1 X (k + r)n k
Bn,r (x) = x x .
e k!
k=0
Fubini polynomials
∞
X yn 1
Fn (x) = .
n=0
n! 1 − x(ey − 1)
′
Fn (x) = x[Fn−1 (x) + (1 + x)Fn−1 (x)] = x((1 + x)Fn−1 (x))′ ,
1+x
Fn (x) = xn En .
x
The Fubini polynomials have only real and negative zeros, and all the zeros
belong to ] − 1, 0].
Eulerian polynomials
∞
X yn x−1
En (x) = .
n=0
n! x − e(x−1)y
′
En (x) = (1 + (n − 1)x)En−1 (x) + (x − x2 )En−1 (x),
1
En (x) = (x − 1)n Fn ,
x−1
∞
xn
X
1
En = i n xi .
(1 − x)n+1 x i=0
404 Formulas
r-Fubini polynomials
∞ ∞
!r+1
X tn r!ert X tn
Fn,r (x) = t − 1))r+1
= r!ert Fn (x) .
n=0
n! (1 − x(e n=0
n!
′
Fn,r (x) = x[(r + 1)Fn−1,r (x) + (1 + x)Fn−1,r (x)] + rFn−1,r (x),
1−r
r+1 r
′
Fn,r (x) = x (x + x )Fn−1,r (x) ,
n k
X n X k
Fn,r+1 (x) = (r + 1) Fl (x)Fk−l,r (x),
k l
k=0 l=0
n 1+x
Fn,r (x) = x En,r .
x
The r-Fubini polynomials have only real and negative zeros, and all the zeros
belong to ] − 1, 0[ (r > 0).
r-Eulerian polynomials
∞ r+1
tn
X x−1
En,r (x) = r!er(x−1)t .
n=0
n! x − e(x−1)z
′
En,r (x) = (1 + (n + r − 1)x)En−1,r (x) + (x − x2 )En−1,r (x),
1
En,r (x) = (x − 1)n Fn,r ,
x−1
∞
xn+r
X
1
E n,r = in (i)r xi .
(1 − x)n+r+1 x i=0
The headlines over the tables contain the Sloane On-Line Encyclopedia of In-
teger Sequences12 (OEIS) ID of the given sequence where available. For some
sequences, more members are calculated below than in the Sloane Encyclo-
pedia (but for other sequences, the contrary is true, in OEIS you can find
sometimes up to hundreds of members).
n
k
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
n=1 1
n=2 1 1
n=3 2 3 1
n=4 6 11 6 1
n=5 24 50 35 10 1
n=6 120 274 225 85 15 1
n=7 720 1764 1624 735 175 21 1
n=8 5040 13068 13132 6769 1960 322 28 1
n=9 40320 109584 118124 67284 22449 4536 546 36 1
0
0 = 1.
n
k
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
n=1 1
n=2 1 1
n=3 1 3 1
n=4 1 7 6 1
n=5 1 15 25 10 1
n=6 1 31 90 65 15 1
n=7 1 63 301 350 140 21 1
n=8 1 127 966 1701 1050 266 28 1
n=9 1 255 3025 7770 6951 2646 462 36 1
0
0 = 1.
12 http://oeis.org/
405
406 Tables
n
k 2
k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
n=2 1
n=3 2 1
n=4 6 5 1
n=5 24 26 9 1
n=6 120 154 71 14 1
n=7 720 1044 580 155 20 1
n=8 5040 8028 5104 1665 295 27 1
n=9 40320 69264 48860 18424 4025 511 35 1
n = 10 362880 663696 509004 214676 54649 8624 826 44
10
10 2 = 1.
n
k 2
k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k = 10
n=2 1
n=3 2 1
n=4 4 5 1
n=5 8 19 9 1
n=6 16 65 55 14 1
n=7 32 211 285 125 20 1
n=8 64 665 1351 910 245 27 1
n=9 128 2059 6069 5901 2380 434 35 1
n = 10 256 6305 26335 35574 20181 5418 714 44 1
Tables 407
n
k 3
k=3 k=4 k=5 k=6 k=7 k=8 k=9 k = 10
n=3 1
n=4 3 1
n=5 12 7 1
n=6 60 47 12 1
n=7 360 342 119 18 1
n=8 2520 2754 1175 245 25 1
n=9 20160 24552 12154 3135 445 33 1
n = 10 181440 241128 133938 40369 7140 742 42 1
n = 11 1814400 2592720 1580508 537628 111769 14560 1162 52
11
11 3 = 1.
n
k 3
k=3 k=4 k=5 k=6 k=7 k=8 k=9 k = 10
n=3 1
n=4 3 1
n=5 9 7 1
n=6 27 37 12 1
n=7 81 175 97 18 1
n=8 243 781 660 205 25 1
n=9 729 3367 4081 1890 380 33 1
n = 10 2187 14197 23772 15421 4550 644 42 1
n = 11 6561 58975 133057 116298 47271 9702 1022 52 1
408 Tables
The 2-restricted Stirling numbers of the first and second kind and
Bessel numbers (A100861)
n
k ≤2
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8
n=1 1
n=2 1 1
n=3 3 1
n=4 3 6 1
n=5 15 10 1
n=6 15 45 15 1
n=7 105 105 21 1
n=8 105 420 210 28 1
n=9 945 1260 378 36
n = 10 945 4725 3150 630
n = 11 10395 17325 6930
n = 12 10395 62370 51975
n = 13 135135 270270
n = 14 135135 945945
n = 15 2027025
n = 16 2027025
n n
k ≤2 = k ≤2 = B(n, k).
Tables 409
n
k ≤3
k=1 k=2 k=3 k=4 k=5 k=6
n=1 1
n=2 1 1
n=3 2 3 1
n=4 11 6 1
n=5 20 35 10 1
n=6 40 135 85 15 1
n=7 490 525 175 21
n=8 1120 2905 1540 322
n=9 2240 12600 11865 3780
n = 10 47600 76545 38325
n = 11 123200 435050 333795
n = 12 246400 2032800 2582195
n = 13 8008000 17357340
n = 14 22422400 102302200
n = 15 44844800 504504000
n = 16 2062860800
n = 17 6098892800
n = 18 12197785600
n
k ≤3
k=1 k=2 k=3 k=4 k=5 k=6
n=1 1
n=2 1 1
n=3 1 3 1
n=4 7 6 1
n=5 10 25 10 1
n=6 10 75 65 15 1
n=7 175 315 140 21
n=8 280 1225 980 266
n=9 280 3780 5565 2520
n = 10 9100 26145 19425
n = 11 15400 102025 125895
n = 12 15400 323400 695695
n = 13 800800 3273270
n = 14 1401400 12962950
n = 15 1401400 42042000
n = 16 106506400
n = 17 190590400
n = 18 190590400
410 Tables
n
k ≥2
k=1 k=2 k=3 k=4 k=5 k=6
n=1 0
n=2 1
n=3 2
n=4 6 3
n=5 24 20
n=6 120 130 15
n=7 720 924 210
n=8 5040 7308 2380 105
n=9 40320 64224 26432 2520
n = 10 362880 623376 303660 44110 945
n = 11 3628880 6636960 3678840 705320 34650
n = 12 39916800 76998240 47324376 11098780 866250 10395
n = 13 479001600 967524480 647536032 177331440 18858840 540540
n
k ≥3
k=1 k=2 k=3 k=4 k=5
n=1 0
n=2 0
n=3 6
n=4 6
n=5 24
n=6 120 40
n=7 720 420
n=8 5040 3948
n=9 40320 38304 2240
n = 10 362880 396576 5040
n = 11 3628880 4419360 859320
n = 12 39916800 53048160 13665960 246400
n = 13 479001600 684478080 216339552 9609600
n = 14 6227020800 9464307840 3501834336 258978720
n = 15 87178291200 139765167360 58680445824 6112906800 44844800
n = 16 1307674368000 2197067846400 1023947084160 137124907920 2690688000
Tables 411
n
k ≥2
k=1 k=2 k=3 k=4 k=5 k=6 k=7
n=1 0
n=2 1
n=3 1
n=4 1 3
n=5 1 10
n=6 1 25 15
n=7 1 56 105
n=8 1 119 490 105
n=9 1 246 1918 1260
n = 10 1 501 6825 9450 945
n = 11 1 1012 22935 56980 17325
n = 12 1 2305 74316 302995 190575 10395
n = 13 1 4082 235092 1487200 1636635 270270
n = 14 1 8177 731731 6914908 12122110 4099095 135135
n = 15 1 16368 2252341 30950920 81431350 47507460 4729725
n
k ≥3
k=1 k=2 k=3 k=4 k=5 k=6 k=7
n=1 0
n=2 0
n=3 1
n=4 1
n=5 1
n=6 1 10
n=7 1 35
n=8 1 91
n=9 1 210 280
n = 10 1 456 2100
n = 11 1 957 10365
n = 12 1 1969 42735 15400
n = 13 1 4004 158301 200200
n = 14 1 8086 549549 1611610
n = 15 1 16263 1827826 10335325 1401400
n = 16 1 32631 5903898 57962905 28028000
n = 17 1 65382 18682014 297797500 333533200
n = 18 1 130900 58257810 1439774336 3073270200 190590400
412 Tables
n
k
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9
n=1 0
n=2 1 0
n=3 4 1 0
n=4 11 11 1 0
n=5 26 66 26 1 0
n=6 57 302 302 57 1 0
n=7 120 1191 2416 1191 120 1 0
n=8 247 4293 15619 15619 4293 247 1 0
n=9 502 14608 88234 156190 88234 14608 502 1 0
n
0 = 1 for all n ≥ 0.
n
k 2
k=0 k=1 k=2 k=3 k=4 k=5 k=6
n=0 2
n=1 2 4
n=2 2 14 8
n=3 2 36 66 16
n=4 2 82 342 262 32
n=5 2 176 1436 2416 946 64
n=6 2 366 5364 16844 14394 3222 128
n=7 2 748 18654 99560 156190 76908 10562
n=8 2 1514 61946 528818 1378310 1242398 33734
n=9 2 3048 199464 2610840 10593276 15724248 8882952
8
9
9
9
7 2 = 512, 7 2 = 1796136, 8 2 = 105810, 9 2 = 1024.
n
k 3
k=0 k=1 k=2 k=3 k=4 k=5 k=6 k=7
n=0 6
n=1 6 18
n=2 6 60 54
n=3 6 150 402 162
n=4 6 336 1956 2256 486
n=5 6 714 7884 18804 11454 1458
n=6 6 1476 28650 122520 151290 54564 4374
n=7 6 3006 97758 690630 1491570 1083834 248874 13122
13 The r-Eulerian numbers are still not added to the Sloane encyclopedia.
Tables 413
B0 = 1
B1 = 1
B2 = 2
B3 = 5
B4 = 15
B5 = 52
B6 = 203
B7 = 877
B8 = 4140
B9 = 21147
B10 = 115975
B11 = 678570
B12 = 4213597
B13 = 27644437
B14 = 190899322
B15 = 1382958545
B16 = 10480142147
B17 = 82864869804
B18 = 682076806159
B19 = 5832742205057
B20 = 51724158235372
B21 = 474869816156751
B22 = 4506715738447323
B23 = 44152005855084346
B24 = 445958869294805289
B25 = 4638590332229999353
B26 = 49631246523618756274
B27 = 545717047936059989389
B28 = 6160539404599934652455
B29 = 71339801938860275191172
B30 = 846749014511809332450147
414 Tables
F0 = 1
F1 = 1
F2 = 3
F3 = 13
F4 = 75
F5 = 541
F6 = 4683
F7 = 47293
F8 = 545835
F9 = 7087261
F10 = 102247563
F11 = 1622632573
F12 = 28091567595
F13 = 526858348381
F14 = 10641342970443
F15 = 230283190977853
F16 = 5315654681981355
F17 = 130370767029135901
F18 = 3385534663256845323
F19 = 92801587319328411133
F20 = 2677687796244384203115
F21 = 81124824998504073881821
F22 = 2574844419803190384544203
F23 = 85438451336745709294580413
F24 = 2958279121074145472650648875
F25 = 106697365438475775825583498141
F26 = 4002225759844168492486127539083
F27 = 155897763918621623249276226253693
F28 = 6297562064950066033518373935334635
F29 = 263478385263023690020893329044576861
Tables 415
The odd indexed Bernoulli numbers are all zero, except B1 = − 12 . The
numerator and denominator of these numbers are separately indexed in OEIS
under the ID A027641 and A027642, respectively.
The Bernoulli numbers
B0 = 1
1
B1 = −
2
1
B2 =
6
1
B4 = −
30
1
B6 =
42
1
B8 = −
30
5
B10 =
66
691
B12 = −
2 730
7
B14 =
6
3 617
B16 = −
510
43 867
B18 =
798
174 611
B20 = −
330
854 513
B22 =
138
236 364 091
B24 = −
2 730
8 553 103
B26 =
6
23 749 461 029
B28 = −
870
8 615 841 276 005
B30 =
14 322
7 709 321 041 217
B32 = −
510
2 577 687 858 367
B34 =
6
26 315 271 553 053 477 373
B36 = −
1 919 190
416 Tables
The numerator and denominator of the Cauchy numbers of the first kind
are separately indexed in OEIS under the ID A006232 and A006233, respec-
tively.
The Cauchy numbers of the first kind
c0 = 1
1
c1 =
2
1
c2 = −
6
1
c3 =
4
19
c4 = −
30
9
c5 =
4
863
c6 = −
84
1 375
c7 =
24
33 953
c8 = −
90
57 281
c9 =
20
3 250 433
c10 = −
132
1 891 755
c11 =
8
13 695 779 093
c12 = −
5 460
24 466 579 093
c13 =
840
132 282 840 127
c14 = −
360
240 208 245 823
c15 =
48
111 956 703 448 001
c16 = −
1 530
4 573 423 873 125
c17 =
4
30 342 376 302 478 019
c18 = −
1 596
56 310 194 579 604 163
c19 =
168
Tables 417
C0 = 1
1
C1 =
2
5
C2 =
6
9
C3 =
4
251
C4 =
30
475
C5 =
12
19 087
C6 =
84
36 799
C7 =
24
1 070 017
C8 =
90
2 082 753
C9 =
20
134 211 265
C10 =
132
262 747 265
C11 =
24
703 604 254 357
C12 =
5 460
1 382 741 929 621
C13 =
840
8 164 168 737 599
C14 =
360
5 362 709 743 125
C15 =
16
8 092 989 203 533 249
C16 =
1 530
15 980 174 332 775 873
C17 =
180
12 600 467 236 042 756 559
C18 =
7 980
24 919 383 499 187 492 303
C19 =
840
418 Tables
F1,2 = 10
F2,2 = 62
F3,2 = 466
F4,2 = 4 142
F5,2 = 42 610
F6,2 = 498 542
F7,2 = 6 541 426
F8,2 = 95 160 302
F9,2 = 1 520 385 010
F10,2 = 26 468 935 022
F11,2 = 498 766 780 786
F12,2 = 10 114 484 622 062
F13,2 = 219 641 848 007 410
F14,2 = 5 085 371 491 003 502
F15,2 = 125 055 112 347 154 546
F16,2 = 3 255 163 896 227 709 422
F17,2 = 89 416 052 656 071 565 810
F18,2 = 2 584 886 208 925 055 791 982
F19,2 = 78 447 137 202 259 689 678 706
F20,2 = 2 493 719 594 804 686 310 662 382
F21,2 = 82 863 606 916 942 518 910 036 210
F22,2 = 2 872 840 669 737 399 763 356 068 462
F23,2 = 103 739 086 317 401 630 352 932 849 266
F24,2 = 3 895 528 394 405 692 716 660 544 040 942
F25,2 = 151 895 538 158 777 454 756 790 098 714 610
F26,2 = 6 141 664 301 031 444 410 269 097 709 080 942
F27,2 = 257 180 823 198 073 623 987 374 955 109 242 226
F28,2 = 11 140 090 408 748 856 793 721 570 867 140 325 102
F29,2 = 498 604 467 780 257 507 947 098 559 879 733 217 010
F30,2 = 23 035 146 049 160 627 260 753 649 613 068 937 357 422
The 1-Fubini numbers are just re-indexed Fubini numbers: Fn,1 = Fn+1 .
Tables 419
F1,3 = 42
F2,3 = 342
F3,3 = 3 210
F4,3 = 34 326
F5,3 = 413 322
F6,3 = 5 544 342
F7,3 = 82 077 450
F8,3 = 1 330 064 406
F9,3 = 23 428 165 002
F10,3 = 445 828 910 742
F11,3 = 9 116 951 060 490
F12,3 = 199 412 878 763 286
F13,3 = 4 646 087 794 988 682
F14,3 = 114 884 369 365 147 542
F15,3 = 3 005 053 671 533 400 330
F16,3 = 82 905 724 863 616 146 966
F17,3 = 2 406 054 103 612 912 660 362
F18,3 = 73 277 364 784 409 578 094 742
F19,3 = 2 336 825 320 400 166 931 304 970
F20,3 = 77 876 167 727 333 146 288 711 446
F21,3 = 2 707 113 455 903 514 725 535 996 042
F22,3 = 97 993 404 977 926 830 826 220 712 342
F23,3 = 3 688 050 221 770 889 455 954 678 342 410
F24,3 = 144 104 481 369 966 069 323 469 010 632 726
F25,3 = 5 837 873 224 713 889 500 755 517 511 651 722
F26,3 = 244 897 494 596 010 735 166 836 759 691 080 342
F27,3 = 10 625 728 762 352 709 545 746 820 956 921 840 650
F28,3 = 476 324 286 962 759 794 359 655 418 145 452 566 806
F29,3 = 22 037 937 113 600 112 244 859 452 493 309 470 923 402
F30,3 = 1 051 344 296 019 000 117 096 802 419 429 724 152 398 742
420 Tables
0! = 1
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5 040
8! = 40 320
9! = 362 880
10! = 3 628 800
11! = 39 916 800
12! = 479 001 600
13! = 6 227 020 800
14! = 87 178 291 200
15! = 1 307 674 368 000
16! = 20 922 789 888 000
17! = 355 687 428 096 000
18! = 6 402 373 705 728 000
19! = 121 645 100 408 832 000
20! = 2 432 902 008 176 640 000
21! = 51 090 942 171 709 440 000
22! = 1 124 000 727 777 607 680 000
23! = 25 852 016 738 884 976 640 000
24! = 620 448 401 733 239 439 360 000
25! = 15 511 210 043 330 985 984 000 000
26! = 403 291 461 126 605 635 584 000 000
27! = 10 888 869 450 418 352 160 768 000 000
28! = 304 888 344 611 713 860 501 504 000 000
29! = 8 841 761 993 739 701 954 543 616 000 000
30! = 265 252 859 812 191 058 636 308 480 000 000
Tables 421
ı0 = 1
ı1 = 1
ı2 = 3
ı3 = 10
ı4 = 41
ı5 = 196
ı6 = 1 057
ı7 = 6 322
ı8 = 41 393
ı9 = 293 608
ı10 = 2 237 921
ı11 = 18 210 094
ı12 = 157 329 097
ı13 = 1 436 630 092
ı14 = 13 810 863 809
ı15 = 139 305 550 066
ı16 = 1 469 959 371 233
ı17 = 16 184 586 405 328
ı18 = 185 504 221 191 745
ı19 = 2 208 841 954 063 318
ı20 = 27 272 621 155 678 841
ı21 = 348 586 218 389 733 556
ı22 = 4 605 223 387 997 411 873
ı23 = 62 797 451 641 106 266 330
ı24 = 882 730 631 284 319 415 505
ı25 = 12 776 077 318 891 628 112 376
ı26 = 190 185 523 485 851 040 093 857
ı27 = 2 908 909 247 751 545 392 493 182
ı28 = 45 671 882 246 215 264 120 864 553
ı29 = 735 452 644 411 097 903 203 941 148
ı30 = 12 136 505 435 201 514 536 093 218 561
Tables 423
I0 = 1
I1 = 1
I2 = 2
I3 = 4
I4 = 10
I5 = 26
I6 = 76
I7 = 232
I8 = 764
I9 = 2 620
I10 = 9 496
I11 = 35 696
I12 = 140 152
I13 = 568 504
I14 = 2 390 480
I15 = 10 349 536
I16 = 46 206 736
I17 = 211 799 312
I18 = 997 313 824
I19 = 4 809 701 440
I20 = 23 758 664 096
I21 = 119 952 692 896
I22 = 618 884 638 912
I23 = 3 257 843 882 624
I24 = 17 492 190 577 600
I25 = 95 680 443 760 576
I26 = 532 985 208 200 576
I27 = 3 020 676 745 975 552
I28 = 17 411 277 367 391 104
I29 = 101 990 226 254 706 560
In = Bn,≤2 = An,≤2 .
424 Tables
B0,≤3 = 1
B1,≤3 = 1
B2,≤3 = 2
B3,≤3 = 5
B4,≤3 = 14
B5,≤3 = 46
B6,≤3 = 166
B7,≤3 = 652
B8,≤3 = 2 780
B9,≤3 = 12 644
B10,≤3 = 61 136
B11,≤3 = 312 676
B12,≤3 = 1 680 592
B13,≤3 = 9 467 680
B14,≤3 = 55 704 104
B15,≤3 = 341 185 496
B16,≤3 = 2 170 853 456
B17,≤3 = 14 314 313 872
B18,≤3 = 97 620 050 080
B19,≤3 = 687 418 278 544
B20,≤3 = 4 989 946 902 176
B21,≤3 = 37 286 121 988 256
B22,≤3 = 286 432 845 428 192
B23,≤3 = 2 259 405 263 572 480
B24,≤3 = 18 280 749 571 449 664
B25,≤3 = 151 561 941 235 370 176
B26,≤3 = 1 286 402 259 593 355 776
B27,≤3 = 11 168 256 342 434 121 152
B28,≤3 = 99 099 358 725 069 658 880
B29,≤3 = 898 070 590 439 513 534 464
B30,≤3 = 8 306 264 068 494 786 829 696
Tables 425
A0,≤3 = 1
A1,≤3 = 1
A2,≤3 = 2
A3,≤3 = 6
A4,≤3 = 18
A5,≤3 = 66
A6,≤3 = 276
A7,≤3 = 1 212
A8,≤3 = 5 916
A9,≤3 = 31 068
A10,≤3 = 171 576
A11,≤3 = 1 014 696
A12,≤3 = 6 319 512
A13,≤3 = 41 143 896
A14,≤3 = 281 590 128
A15,≤3 = 2 007 755 856
A16,≤3 = 14 871 825 936
A17,≤3 = 114 577 550 352
A18,≤3 = 913 508 184 096
A19,≤3 = 7 526 682 826 848
A20,≤3 = 64 068 860 545 056
A21,≤3 = 561 735 627 038 496
A22,≤3 = 5 068 388 485 760 832
A23,≤3 = 47 026 385 852 423 616
A24,≤3 = 447 837 548 306 401 728
A25,≤3 = 4 374 221 252 904 547 776
A26,≤3 = 43 785 991 472 018 760 576
A27,≤3 = 448 610 150 446 698 125 952
A28,≤3 = 4 701 535 239 730 197 200 256
A29,≤3 = 50 364 829 005 083 927 722 368
A30,≤3 = 550 980 793 119 978 524 802 816
426 Tables
B0,≥2 = 1
B1,≥2 = 0
B2,≥2 = 1
B3,≥2 = 1
B4,≥2 = 4
B5,≥2 = 11
B6,≥2 = 41
B7,≥2 = 162
B8,≥2 = 715
B9,≥2 = 3 425
B10,≥2 = 17 722
B11,≥2 = 98 253
B12,≥2 = 580 317
B13,≥2 = 3 633 280
B14,≥2 = 24 011 157
B15,≥2 = 166 888 165
B16,≥2 = 1 216 070 380
B17,≥2 = 9 264 071 767
B18,≥2 = 73 600 798 037
B19,≥2 = 608 476 008 122
B20,≥2 = 5 224 266 196 935
B21,≥2 = 46 499 892 038 437
B22,≥2 = 428 369 924 118 314
B23,≥2 = 4 078 345 814 329 009
B24,≥2 = 40 073 660 040 755 337
B25,≥2 = 405 885 209 254 049 952
B26,≥2 = 4 232 705 122 975 949 401
B27,≥2 = 45 398 541 400 642 806 873
B28,≥2 = 500 318 506 535 417 182 516
B29,≥2 = 5 660 220 898 064 517 469 939
B30,≥2 = 65 679 581 040 795 757 721 233
Tables 427
B0,≥3 = 1
B1,≥3 = 0
B2,≥3 = 0
B3,≥3 = 1
B4,≥3 = 1
B5,≥3 = 1
B6,≥3 = 11
B7,≥3 = 36
B8,≥3 = 92
B9,≥3 = 491
B10,≥3 = 2 557
B11,≥3 = 11 353
B12,≥3 = 60 105
B13,≥3 = 362 506
B14,≥3 = 2 169 246
B15,≥3 = 13 580 815
B16,≥3 = 91 927 435
B17,≥3 = 650 078 097
B18,≥3 = 4 762 023 647
B19,≥3 = 36 508 923 530
B20,≥3 = 292 117 087 090
B21,≥3 = 2 424 048 335 917
B22,≥3 = 20 847 410 586 719
B23,≥3 = 185 754 044 235 873
B24,≥3 = 1 711 253 808 769 653
B25,≥3 = 16 272 637 428 430 152
B26,≥3 = 159 561 718 111 166 776
B27,≥3 = 1 611 599 794 949 346 621
B28,≥3 = 16 747 401 536 644 152 613
B29,≥3 = 178 881 496 831 139 695 357
B30,≥3 = 1 962 101 672 879 398 037 863
428 Tables
A0,≥2 = 1
A1,≥2 = 0
A2,≥2 = 1
A3,≥2 = 2
A4,≥2 = 9
A5,≥2 = 44
A6,≥2 = 265
A7,≥2 = 1 854
A8,≥2 = 14 833
A9,≥2 = 133 496
A10,≥2 = 1 334 961
A11,≥2 = 14 684 570
A12,≥2 = 176 214 841
A13,≥2 = 2 290 792 932
A14,≥2 = 32 071 101 049
A15,≥2 = 481 066 515 734
A16,≥2 = 7 697 064 251 745
A17,≥2 = 130 850 092 279 664
A18,≥2 = 2 355 301 661 033 953
A19,≥2 = 44 750 731 559 645 106
A20,≥2 = 895 014 631 192 902 121
A21,≥2 = 18 795 307 255 050 944 540
A22,≥2 = 413 496 759 611 120 779 881
A23,≥2 = 9 510 425 471 055 777 937 262
A24,≥2 = 228 250 211 305 338 670 494 289
A25,≥2 = 5 706 255 282 633 466 762 357 224
A26,≥2 = 148 362 637 348 470 135 821 287 825
A27,≥2 = 4 005 791 208 408 693 667 174 771 274
A28,≥2 = 112 162 153 835 443 422 680 893 595 673
A29,≥2 = 3 252 702 461 227 859 257 745 914 274 516
A30,≥2 = 97 581 073 836 835 777 732 377 428 235 481
Tables 429
A0,≥3 = 1
A1,≥3 = 0
A2,≥3 = 0
A3,≥3 = 2
A4,≥3 = 6
A5,≥3 = 24
A6,≥3 = 160
A7,≥3 = 1 140
A8,≥3 = 8 988
A9,≥3 = 80 864
A10,≥3 = 809 856
A11,≥3 = 8 907 480
A12,≥3 = 106 877 320
A13,≥3 = 1 389 428 832
A14,≥3 = 19 452 141 696
A15,≥3 = 291 781 655 984
A16,≥3 = 4 668 504 894 480
A17,≥3 = 79 364 592 318 720
A18,≥3 = 1 428 562 679 845 888
A19,≥3 = 27 142 690 734 936 864
A20,≥3 = 542 853 814 536 802 656
A21,≥3 = 11 399 930 109 077 490 560
A22,≥3 = 250 798 462 399 300 784 640
A23,≥3 = 5 768 364 635 100 620 089 152
A24,≥3 = 138 440 751 242 507 472 273 856
A25,≥3 = 3 461 018 781 064 593 367 693 824
A26,≥3 = 89 986 488 307 675 206 245 836 800
A27,≥3 = 2 429 635 184 307 185 219 369 763 200
A28,≥3 = 68 029 785 160 601 345 467 104 670 848
A29,≥3 = 1 972 863 769 657 440 129 000 783 404 544
A30,≥3 = 59 185 913 089 723 198 139 150 966 450 176
430 Tables
n
k
k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8
n=1 1
n=2 2 1
n=3 6 6 1
n=4 24 36 12 1
n=5 120 240 120 20 1
n=6 720 1800 1200 300 30 1
n=7 5040 15120 12600 4200 630 42 1
n=8 40320 141120 141120 58800 11760 1176 56 1
n=9 362880 1451520 1693440 846720 211680 28224 2016 72
9
9 = 1.
sf (0) = 1
sf (1) = 1
sf (2) = 2
sf (3) = 12
sf (4) = 288
sf (5) = 34 560
sf (6) = 24 883 200
sf (7) = 125 411 328 000
sf (8) = 5 056 584 744 960 000
sf (9) = 1 834 933 472 251 084 800 000
sf (10) = 6 658 606 584 104 736 522 240 000 000
sf (11) = 265 790 267 296 391 946 810 949 632 000 000 000
sf (12) = 127 313 963 299 399 416 749 559 771 247 411 200 000 000 000
sf (13) = 792 786 697 595 796 795 607 377 086 400 871 488 552 960 000 000 000 000
sf (14) = 69 113 789 582 492 712 943 486 800 506 462 734 562 847 413 501 952 · 1015
L0 = 1
L1 = 1
L2 = 3
L3 = 13
L4 = 73
L5 = 501
L6 = 4 051
L7 = 37 633
L8 = 394 353
L9 = 4 596 553
L10 = 58 941 091
L11 = 824 073 141
L12 = 12 470 162 233
L13 = 202 976 401 213
L14 = 3 535 017 524 403
L15 = 65 573 803 186 921
L16 = 1 290 434 218 669 921
L17 = 26 846 616 451 246 353
L18 = 588 633 468 315 403 843
L19 = 13 564 373 693 588 558 173
L20 = 327 697 927 886 085 654 441
L21 = 8 281 153 039 765 859 726 341
L22 = 218 456 450 997 775 993 367 443
L23 = 6 004 647 590 528 092 507 965 393
L24 = 171 679 472 549 945 695 230 447 313
L25 = 5 097 728 684 975 832 001 895 021 401
L26 = 156 976 479 403 800 014 958 377 703 651
L27 = 5 006 229 763 167 109 991 562 254 382 853
L28 = 165 145 148 432 723 439 035 142 843 093 913
L29 = 5 628 563 759 710 900 871 382 077 742 916 173
L30 = 197 987 401 295 571 718 915 006 598 239 796 851
432 Tables
E0 = 1
E1 = 1
E2 = 1
E3 = 2
E4 = 5
E5 = 16
E6 = 61
E7 = 272
E8 = 1 385
E9 = 7 936
E10 = 50 521
E11 = 353 792
E12 = 2 702 765
E13 = 22 368 256
E14 = 199 360 981
E15 = 1 903 757 312
E16 = 19 391 512 145
E17 = 209 865 342 976
E18 = 2 404 879 675 441
E19 = 29 088 885 112 832
E20 = 370 371 188 237 525
E21 = 4 951 498 053 124 096
E22 = 69 348 874 393 137 901
E23 = 1 015 423 886 506 852 352
E24 = 15 514 534 163 557 086 905
E25 = 246 921 480 190 207 983 616
E26 = 4 087 072 509 293 123 892 361
E27 = 70 251 601 603 943 959 887 872
E28 = 1 252 259 641 403 629 865 468 285
E29 = 23 119 184 187 809 597 841 473 536
E30 = 441 543 893 249 023 104 553 682 821
Bibliography
433
434 Bibliography
[111] D. Callan, Cesàro’s integral formula for the Bell numbers (corrected),
online note, http://www.stat.wisc.edu/~callan/papersother/
[112] D. Callan, A note on downup permutations and increasing 0-1-2 trees,
online note, http://www.stat.wisc.edu/~callan/papersother/
Pn Pk+1 k+1 n
[113] D. Callan, i=1 ik = j=1 j j (j − 1)!, online note, http://
www.stat.wisc.edu/~callan/papersother/
[114] E. R. Canfield, Asymptotic Normality in Binomial Type Enumeration
(Doctoral Dissertation), University of California San Diego, 1975.
[115] E. R. Canfield, Location of the maximum Stirling number(s) of the
second kind, Stud. Appl. Math. 59 (1978), 83-93.
[116] E. R. Canfield, Engel’s inequality for Bell numbers, J. Combin. Theory
Ser. A 72(1) (1995), 184-187.
[117] E. R. Canfield, The size of the largest antichain in the partition lattice,
J. Combin. Theory Ser. A. 83 (1998), 188-201.
[118] E. R. Canfield, L. H. Harper, Large antichains in the partition lattice,
Random Structures Algorithms 6 (1995), 89-104.
[119] E. R. Canfield, C. Pomerance, On the problem of uniqueness for the
maximum Stirling number(s) of the second kind, Integers 2 (2002),
paper A01. Corrigendum: 5 (2005), #A09.
[120] L. Carlitz, On some polynomials of Tricomi, Boll. Un. Mat. Ital. 13(3)
(1958), 58-64.
[121] L. Carlitz, Congruences for generalized Bell and Stirling numbers,
Duke Math. J. 22 (1955), 193-205.
[122] L. Carlitz, Single variable Bell polynomials, Collect. Math. 14 (1962),
13-25.
[123] L. Carlitz, A problem in partitions related to the Stirling numbers,
Bull. Amer. Math. Soc. 70 (1964), 275-278.
[124] L. Carlitz, Generating functions and partition problems, Proc. Symp.
Pure Math. vol. VIII, American Mathematical Society (1965), 144-169.
[125] L. Carlitz, Some partition problems related to the Stirling numbers of
the second kind, Acta Arith. (1965), 409-422.
[126] L. Carlitz, Weighted Stirling numbers of the first and second kind – I,
Fibonacci Quart. 18 (1980), 147-162.
[127] L. Carlitz, Weighted Stirling numbers of the first and second kind – II,
Fibonacci Quart. 18 (1980), 242-257.
Bibliography 441
[132] O-Y. Chan, D. Manna, Congruences for Stirling numbers of the second
kind, Gems in Experimental Mathematics (Volume 517 of Contempo-
rary Mathematics), Amer. Math. Soc. (2010), 97-111.
PN
[133] R. Chapman, Evaluating n=1 (a + nd)p again, Math. Gaz. 92 (2008)
92-94.
[134] Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall
/ CRC, 2002.
[135] Ch. A. Charalambides, Combinatorial Methods in Discrete Distribu-
tions, John Wiley & Sons, Hoboken, New Jersey, 2005.
[136] R. X. F. Chen, A note on the generating function for the Stirling
numbers of the first kind, J. Integer Seq. 18 (2015), Article 15.3.8.
[137] W. Y. C. Chen, The skew, relative, and classical derangements, Dis-
crete Math. 160 (1996), 235-239.
[138] W. Y. C. Chen, J. C. Y. Zhang, The skew and relative derangements
of type B, Electron. J. Combin. 14 (2007), #N24.
[139] Y.-G. Chen, M. Tang, On the elementary symmetric functions of
1, 1/2, . . . , 1/n, Amer. Math. Monthly 119 (2012), 862-867.
[140] W. Y. C. Chen, L. X. W. Wang, A. L. B. Yang, Recurrence relations
for strongly q-log-convex polynomials, Canad. Math. Bull. 54 (2011),
217-229.
[144] G.-S. Cheon, J.-S. Kim, Stirling matrix via Pascal matrix, Linear Al-
gebra Appl. 329 (2001), 49-59.
[145] N. Chheda, M. K. Gupta, RNA as a permutation, arXiv:1403.5477.
[146] J. Y. Choi, J. D. H. Smith, On the combinatorics of multi-restricted
numbers, Ars Combin. 75 (2005), 45-63.
[147] J. Y. Choi, J. D. H. Smith, On the unimodality and combinatorics of
Bessel numbers, Discrete Math. 264 (2003), 45-53.
[148] J. Y. Choi, J. D. H. Smith, Recurrences for tri-restricted numbers, J.
Combin. Math. Combin. Comput. 58 (2006), 3-11.
[149] J. Y. Choi, L. Long, S.-H. Ng, J. D. H. Smith, Reciprocity for mul-
tirestricted Stirling numbers, J. Combin. Theory Ser. A 113 (2006),
1050-1060.
[150] C.-O. Chow, On derangement polynomials of type B, Sém. Lothar.
Combin. 55 (2006), Article B55b.
[151] S. Chowla, I. N. Herstein, W. K. Moore, On recursions connected with
symmetric groups I, Canad. J. Math. 3 (1951), 328-334.
[152] F. Chung, R. Graham, D. E. Knuth, A symmetrical Eulerian identity,
J. Comb. 17(1) (2010), 29-38.
[153] F. Clarke, Hensel’s lemma and the divisibility by primes of Stirling-like
numbers, J. Number Theory 52(1) (1995), 69-84.
[154] P. Codara, O. M. D’Antona, P. Hell, A simple combinatorial interpre-
tation of certain generalized Bell and Stirling numbers, Discrete Math.
318 (2014), 53-57.
[155] H. Cohen, Number Theory, Vol I. Springer, 2007.
[156] H. Cohen, Number Theory, Vol II. Springer, 2007.
[157] A. Colucci, General maggiorazione dei polinomi e delle derivate e una
sua conseguenza, Boll. Un. Mat. Ital. 8(3) (1953), 258-260.
[158] L. Comtet, Advanced Combinatorics, D. Reidel Publishing Company,
Dordrecht, Holland, 1974.
[159] L. Comtet, Une formule explicite pour les puissances successives de
l’opérateur de dérivation de Lie, C. R. Acad. Sci. Paris Sér. A-B 276
(1973), A165-168.
[160] K. Conrad, The p-adic growth of harmonic sums, available online
at http://www.math.uconn.edu/~kconrad/blurbs/gradnumthy/
padicharmonicsum.pdf
Bibliography 443
[175] R. B. Corcino, I. Mező, The estimation of the zeros of the Bell and
r-Bell polynomials, Appl. Math. Comput. 250 (2015), 727-732.
[176] R. M. Corless, G. H. Gonnet, D. E. G. Hare, D. J. Jeffrey, D. E. Knuth,
On the Lambert W function, Adv. Comput. Math. 5 (1996), 329-359.
[177] P. Corvaja, U. Zannier, Diophantine equations with power sums and
universal Hilbert sets, Indag. Math. 9(3) (1998), 317-332.
[178] R. E. Crandall, K. Dilcher, C. Pomerance, A search for Wieferich and
Wilson primes, Math. Comput. 66 (1997), 433-449.
[179] J. Culver, A. Weingartner, Set partitions without blocks of certain
sizes, arXiv:1806.02316
[180] T. W. Cusick, Y. Li, kth order symmetric SAC boolean functions and
bisecting binomial coefficients, Discrete Appl. Math. 149 (2005), 73-86.
[181] D. Cvijović, The Dattoli-Srivastava conjectures concerning generat-
ing functions involving the harmonic numbers, Appl. Math. Comput.
215(11) (2010), 4040-4043.
[182] D. Cvijović, Derivative polynomials and closed-form higher derivative
formulae, Appl. Math. Comput. 215(8) (2009), 3002-3006.
[183] S. Daboul, J. Mangaldan, M. Z. Spivey, P. J. Taylor, The Lah numbers
and the nth derivative of e1/x , Math. Mag. 86(1) (2013), 39-47.
[184] K. Dale, I. Skau, The (generalized) secretary’s packet problem and the
Bell numbers, Discrete Math. 137 (1995), 357-360.
[185] G. Dattoli, H. M. Srivastava, A note on harmonic numbers, umbral
calculus and generating functions, Appl. Math. Lett. 21(7) (2008), 686-
693.
[186] H. Davenport, G. Pólya, On the product of two power series, Canad.
J. Math. 1 (1949), 1-5.
[187] M. Davis, Quadrant marked mesh patterns and the r-Stirling numbers,
J. Integer Seq. 18 (2015), Article 15.10.1.
[188] K. S. Davis, W. A. Webb, Lucas’ theorem for prime powers, Eur. J.
Combin. 11 (1990), 229-233.
[189] K. S. Davis, W. A. Webb, A binomial coefficient congruence modulo
prime powers, J. Number Theory 43 (1993), 20-23.
[190] N. G. de Bruijn, Asymptotic Methods in Analysis, Dover, 1981.
[191] E. Deutsch, S. Elizalde, The largest and the smallest fixed points of
permutations, Eur. J. Combin. 31(5) (2010), 1404-1409.
Bibliography 445
[209] B. Duncan, R. Peele, Bell and Stirling numbers for graphs, J. Integer
Seq. 12 (2009), Article 09.7.1.
[256] J. Goldman, J. Joichi, D. White, Rook theory III. Rook polynomials and
the Chromatic structure of graphs, J. Combin. Th. Ser. B 25 (1978),
135-142.
[257] H. Gōral, D. C. Sertbaş, Almost all hyperharmonic numbers are not
integers, J. Number Theory 171 (2017), 495-526.
[258] H. Gōral, D. C. Sertbaş, Divisibility properties of hyperharmonic num-
bers, Acta Math. Hungar. 154(1) (2018), 147-186.
[259] H. W. Gould, Explicit formulas for Bernoulli numbers, Amer. Math.
Monthly 79 (1972), 44-51.
[260] H. W. Gould, J. Quaintance, Implications of Spivey’s Bell number
formula, J. Integer Seq. 11 (2008), Article 08.3.7.
[261] F. Q. Gouvêa, p-adic Numbers – An Introduction, second edition,
Springer, 1997.
[262] R. L. Graham, D. E. Knuth, O. Patashnik, Concrete Mathematics,
Addison-Wesley, 1990.
[263] A. Granville, Binomial coefficients modulo prime powers, Canadian
Mathematical Society Conference Proceedings 20 (1997), 253-275.
[264] A. Granville, The square of the Fermat quotient, Integers 4 (2004),
#A22.
[265] G. Grätzer, Lattice Theory: Foundation, Birkhäuser, 2011.
[266] J. L. Gross, Combinatorial Methods with Computer Applications,
Chapman and Hall/CRC, 2007.
[267] O. A. Gross, Preferential arrangements, Amer. Math. Monthly 69(1)
(1962), 4-8.
[268] E. Grosswald, Bessel Polynomials, Springer, 1978.
[269] B.-Ni Guo, I. Mező, F. Qi, An explicit formula for Bernoulli polynomi-
als in terms of r-Stirling numbers of the second kind, Rocky Mountain
J. Math. 46(6) (2016), 1919-1923.
[270] B.-Ni Guo, F. Qi, Some identities and an explicit formula for Bernoulli
and Stirling numbers, J. Comput. Appl. Math. 255 (2014), 568-579.
[271] B.-Ni Guo, F. Qi, Explicit formulae for computing Euler polynomials
in terms of Stirling numbers of the second kind, J. Comput. Appl.
Math. 272 (2014), 251-257.
[286] Sh.-F. Hong, J-R. Zhao, W. Zhao, The 2-adic valuations of Stirling
numbers of the second kind, Int. J. Number Theory 8(4) (2012),
1057-1066.
[287] F. T. Howard, Associated Stirling numbers, Fibonacci Quart. 18
(1980), 303-315.
[320] S. Karlin, Total Positivity, Vol. 1., Stanford University Press, 1968.
[321] S. Karlin, G. Szegő, On certain determinants whose elements are
orthogonal polynomials, J. Anal. Math. 8(1) (1960), 1-157.
[322] A. Kasraoui, d-regular set partitions and rook placements, Sém.
Lothar. Combin. 62 (2009), Article B62a.
Bibliography 453
[517] S. Shirai, K.-I. Sato, Some Identities Involving Bernoulli and Stirling
Numbers, J. Number Theory 90 (2001), 130-142.
[518] I. E. Shparlinski, On the distribution of values of recurring sequences
and the Bell numbers in finite fields, Eur. J. Comb. 12(1) (1991), 81-87.
[519] I. E. Shparlinski, On the value set of Fermat quotients, Proc. Amer.
Math. Soc. 140(4) (2011), 1199-1206.
[520] A. Silberger, D. Silberger, S. Silberger, Finite segments of
the harmonic series, Workshop “Algebra Across the Bor-
ders”, 2011. Available online at the conference’s webpage
http://www.mini.pw.edu.pl/~aab/.
[521] D. Singmaster, How often does an integer occur as a binomial
coefficient?, Amer. Math. Monthly 78(4) (1971), 385-386.
[522] D. Singmaster, Repeated binomial coefficients and Fibonacci numbers,
Fibonacci Quart. 13(4) (1975), 295-298.
[523] D. Singmaster, Divisibility of binomial and multinomial coefficients by
primes and prime powers, 18th Anniversary Volume of the Fibonacci
Association (1980), 98-113.
[524] L. Skula, Fermat and Wilson quotients for p-adic integers, Acta
Mathematica et Informatica Universitatis Ostraviensi 6(1) (1998),
167-181. Available online at http://dml.cz/dmlcz/120531
[525] A. B. Soble, Majorants of polynomial derivatives, Amer. Math.
Monthly 64 (1957), 639-643.
[526] A. Solomon, G. Duchamp, P. Blasiak, A. Horzela, K. Penson, Normal
order: combinatorial graphs, Proc. 3rd Int. Symp. on Quantum
Theory and Symmetries, World Scientific (2003), 527-536.
[527] J. Sondow, Lerch quotients, Lerch primes, Fermat-Wilson quotients,
and the Wieferich-non-Wilson primes 2, 3, 14771, Combinatorial
and Additive Number Theory (CANT) 2011-2012, Springer (2014),
243-255. Available also on Arxiv:1110.3113.
[528] J. Sondow, K. MacMillan, Reducing the Erdős-Moser equation
1n + 2n + · · · + k n = (k + 1)n modulo k and k 2 , Integers 11 (2011),
Article A34. An expanded version available at Arxiv:1011.2154.
[529] M. R. Spiegel, The summation of series involving roots of transcen-
dental equations and related applications, J. Appl. Phys. 24(9) (1953),
1103-1106.
[530] L. Spiegelhofer, M. Wallner, Divisibility of binomial coefficients by
powers of two, J. Number Theory 192 (2018), 221-239.
466 Bibliography
[547] Y.-D. Sun, X. Wu, The largest singletons of set partitions, Eur. J.
Combin. 32 (2011), 369-382.
[593] H. Wegner, Über das Maximum bei Stirlingschen Zahlen, zweiter Art,
J. Reine Angew. Math. 262/263 (1973), 134-143.
470 Bibliography
[612] Ya-M. Yu, Bounds on the location of the maximum Stirling numbers
of the second kind, Discrete Math. 309(13) (2009), 4624-4627.
[613] J. Zhao, S. Hong, W. Zhao, Divisibility by 2 of Stirling numbers of
the second kind and their differences, J. Number Theory 140 (2014),
324-348.
[614] B.-X. Zhu, Some positivities in certain triangular arrays, Proc. Amer.
Math. Soc. 142(9) (2014), 2943-2952.
[615] B.-X. Zhu, H. Sun, Linear transformations preserving the strong q-
log-convexity of polynomials, Electron. J. Combin. 22 (2015), #P3.27.
[616] Q. Zou, The log-convexity of the Fubini numbers, Trans. Comb. 7(2)
(2018), 17-23.
Index
473
474 Index