100% found this document useful (3 votes)
1K views499 pages

(Discrete Mathematics and Its Applications) István Mező - Combinatorics and Number Theory of Counting Sequences-CRC Press (2020)

Uploaded by

Paul Taniwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
1K views499 pages

(Discrete Mathematics and Its Applications) István Mező - Combinatorics and Number Theory of Counting Sequences-CRC Press (2020)

Uploaded by

Paul Taniwan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 499

Combinatorics and

Number Theory of
Counting Sequences
Discrete Mathematics and Its Applications

Series Editors
Miklos Bona
Donald L. Kreher
Douglas West
Patrice Ossona de Mendez

Combinatorics of Compositions and Words


Silvia Heubach and Toufik Mansour

Handbook of Linear Algebra, Second Edition


Leslie Hogben

Combinatorics, Second Edition


Nicholas A. Loehr

Handbook of Discrete and Computational Geometry, Third Edition


C. Toth, Jacob E. Goodman and Joseph O’Rourke

Handbook of Discrete and Combinatorial Mathematics, Second Edition


Kenneth H. Rosen

Crossing Numbers of Graphs


Marcus Schaefer

Graph Searching Games and Probabilistic Methods


Anthony Bonato and Paweł Prałat

Handbook of Geometric Constraint Systems Principles


Meera Sitharam, Audrey St. John, and Jessica Sidman,

Volumetric Discrete Geometry


Karoly Besdek and Zsolt Langi

The Art of Proving Binomial Identities


Michael Z. Spivey

Combinatorics and Number Theory of Counting Sequences


István Mező
For more information about this series, please visit:
https://www.crcpress.com/Discrete-Mathematics-and-Its-Applications/book-
series/CHDISMTHAPP?page=1&order=dtitle&size=12&view=list&status=published,forthcoming
Combinatorics and
Number Theory of
Counting Sequences

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

No claim to original U.S. Government works

Printed on acid-free paper

International Standard Book Number-13: 978-1-138-56485-5 (Hardback)

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.

Trademark Notice: Product or corporate names may be trademarks or registered trade-


marks, and are used only for identification and explanation without intent to infringe.

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
Para mi querida esposa, Pamela, és a kislányomnak Eszternek
Contents

Foreword xv

About the Author xvii

I Counting sequences related to set partitions and


permutations 1
1 Set partitions and permutation cycles 3

1.1 Partitions and Bell numbers . . . . . . . . . . . . . . . . . . 3


1.2 Partitions with a given number of blocks and the Stirling
numbers of the second kind . . . . . . . . . . . . . . . . . . 6
1.3 Permutations and factorials . . . . . . . . . . . . . . . . . . 10
1.4 Permutation with a given number of cycles and the Stirling
numbers of the first kind . . . . . . . . . . . . . . . . . . . . 11
1.5 Connections between the first and second kind Stirling
numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.6 Some further results with respect to the Stirling numbers . 16
1.6.1 Rhyme schemes . . . . . . . . . . . . . . . . . . . . 16
1.6.2 Functions on finite sets . . . . . . . . . . . . . . . . 16
1.7 d-regular partitions . . . . . . . . . . . . . . . . . . . . . . . 18
1.8 Zigzag permutations . . . . . . . . . . . . . . . . . . . . . . 21
1.8.1 Zigzag permutations and trees . . . . . . . . . . . . 23
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2 Generating functions 33

2.1 On the generating functions in general . . . . . . . . . . . . 33


2.2 Operations on generating functions . . . . . . . . . . . . . . 35
2.2.1 Addition and multiplication . . . . . . . . . . . . . 35
2.2.2 Some additional transformations . . . . . . . . . . . 38
2.2.3 Differentiation and integration . . . . . . . . . . . . 38
2.2.4 Where do the name generating functions
come from? . . . . . . . . . . . . . . . . . . . . . . . 40
2.3 The binomial transformation . . . . . . . . . . . . . . . . . 42

vii
viii Contents

2.4 Applications of the above techniques . . . . . . . . . . . . . 45


2.4.1 The exponential generating function of the Bell
numbers . . . . . . . . . . . . . . . . . . . . . . . . 45
2.4.2 Dobiński’s formula . . . . . . . . . . . . . . . . . . . 46
2.4.3 The exponential generating function of the second
kind Stirling numbers . . . . . . . . . . . . . . . . . 46
2.4.4 The ordinary generating function of the second kind
Stirling numbers . . . . . . . . . . . . . . . . . . . . 49
2.4.5 The generating function of the Bell numbers and a
formula for nk . . . . . . . . . . . . . . . . . . . . 50
2.4.6 The exponential generating function of the first kind
Stirling numbers . . . . . . . . . . . . . . . . . . . . 52
2.4.7 Some particular lower parameters of the first kind
Stirling numbers . . . . . . . . . . . . . . . . . . . . 52
2.5 Additional identities coming from the generating functions . 53
2.6 Orthogonality . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.7 Horizontal generating functions and polynomial identities . 59
2.7.1 Special values of the Stirling numbers of the first kind
- second approach . . . . . . . . . . . . . . . . . . . 63
2.8 The Lah numbers . . . . . . . . . . . . . . . . . . . . . . . . 64
2.8.1 The combinatorial meaning of the Lah numbers . . 66
2.9 The total number of ordered lists and the horizontal sum of
the Lah numbers . . . . . . . . . . . . . . . . . . . . . . . . 68
2.10 The Hankel transform . . . . . . . . . . . . . . . . . . . . . 70
2.10.1 The Euler-Seidel matrices . . . . . . . . . . . . . . . 71
2.10.2 A generating function tool to calculate the Hankel
transform . . . . . . . . . . . . . . . . . . . . . . . . 73
2.10.3 Another tool to calculate the Hankel transform
involving orthogonal polynomials . . . . . . . . . . 75
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

3 The Bell polynomials 85

3.1 Basic properties of the Bell polynomials . . . . . . . . . . . 85


3.1.1 A recursion . . . . . . . . . . . . . . . . . . . . . . . 85
3.1.2 The exponential generating function . . . . . . . . . 86
3.2 About the zeros of the Bell polynomials . . . . . . . . . . . 88
3.2.1 The real zero property . . . . . . . . . . . . . . . . 88
3.2.2 The sum and product of the zeros of Bn (x) . . . . . 89
3.2.3 The irreducibility of Bn (x) . . . . . . . . . . . . . . 90
3.2.4 The density of the zeros of Bn (x) . . . . . . . . . . 90
3.2.5 Summation relations for the zeros of Bn (x) . . . . . 92
3.3 Generalized Bell polynomials . . . . . . . . . . . . . . . . . 95
3.4 Idempotent numbers and involutions . . . . . . . . . . . . . 96
Contents ix

3.5 A summation formula for the Bell polynomials . . . . . . . 99


3.6 The Faà di Bruno formula . . . . . . . . . . . . . . . . . . . 99
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

4 Unimodality, log-concavity, and log-convexity 105

4.1 “Global behavior” of combinatorial sequences . . . . . . . . 105


4.2 Unimodality and log-concavity . . . . . . . . . . . . . . . . 106
4.3 Log-concavity of the Stirling numbers of the second kind . . 109
4.4 The log-concavity of the Lah numbers . . . . . . . . . . . . 112
4.5 Log-convexity . . . . . . . . . . . . . . . . . . . . . . . . . . 114
4.5.1 The log-convexity of the Bell numbers . . . . . . . . 114
4.5.2 The Bender-Canfield theorem . . . . . . . . . . . . 115
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

5 The Bernoulli and Cauchy numbers 123

5.1 Power sums . . . . . . . . . . . . . . . . . . . . . . . . . . . 123


5.1.1 Power sums of arithmetic progressions . . . . . . . . 126
5.2 The Bernoulli numbers . . . . . . . . . . . . . . . . . . . . . 126
5.2.1 The Bernoulli polynomials . . . . . . . . . . . . . . 128
5.3 The Cauchy numbers and Riordan arrays . . . . . . . . . . 130
5.3.1 The Cauchy numbers of the first and second kind . 130
5.3.2 Riordan arrays . . . . . . . . . . . . . . . . . . . . . 132
5.3.3 Some identities for the Cauchy numbers . . . . . . . 134
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

6 Ordered partitions 141

6.1 Ordered partitions and the Fubini numbers . . . . . . . . . 141


6.1.1 The definition of the Fubini numbers . . . . . . . . 141
6.1.2 Two more interpretations of the Fubini numbers . . 142
6.1.3 The Fubini numbers count chains of subsets . . . . 143
6.1.4 The generating function of the Fubini numbers . . . 143
6.1.5 The Hankel determinants of the Fubini numbers . . 144
6.2 Fubini polynomials . . . . . . . . . . . . . . . . . . . . . . . 145
6.3 Permutations, ascents, and the Eulerian numbers . . . . . . 147
6.3.1 Ascents, descents, and runs . . . . . . . . . . . . . . 148
6.3.2 The definition of the Eulerian numbers . . . . . . . 149
6.3.3 The basic recursion for the Eulerian numbers . . . . 150
6.3.4 Worpitzky’s identity . . . . . . . . . . . . . . . . . . 150
x Contents

6.3.5 A relation between Eulerian numbers and Stirling


numbers . . . . . . . . . . . . . . . . . . . . . . . . 152
6.4 The combination lock game . . . . . . . . . . . . . . . . . . 153
6.5 Relations between the Eulerian and Fubini polynomials . . 155
6.6 An application of the Eulerian polynomials . . . . . . . . . 157
6.7 Differential equation of the Eulerian polynomials . . . . . . 158
6.7.1 An application of the Fubini polynomials . . . . . . 159
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

7 Asymptotics and inequalities 167

7.1 The Bonferroni-inequality . . . . . . . . . . . . . . . . . . . 168


7.2 The asymptotics of the second kind Stirling numbers . . . . 170
7.2.1 First approach . . . . . . . . . . . . . . . . . . . . . 170
7.2.2 Second approach . . . . . . . . . . . . . . . . . . . . 172
7.3 The asymptotics of the maximizing index of the Stirling
numbers of the second kind . . . . . . . . . . . . . . . . . . 173
7.3.1 The Euler Gamma function and the Digamma
function . . . . . . . . . . . . . . . . . . . . . . . . 174
7.3.2 The asymptotics of Kn . . . . . . . . . . . . . . . . 175
7.4 The asymptotics of the first kind Stirling numbers and Bell
numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
7.5 The asymptotics of the Fubini numbers . . . . . . . . . . . 179
7.6 Inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.6.1 Polynomials with roots inside the unit disk . . . . . 181
7.6.2 Polynomials and interlacing zeros . . . . . . . . . . 182
7.6.3 Estimations on the ratio of two consecutive sequence
elements . . . . . . . . . . . . . . . . . . . . . . . . 182
7.6.4 Dixon’s theorem . . . . . . . . . . . . . . . . . . . . 184
7.6.5 Colucci’s theorem and the Samuelson–Laguerre
theorem and estimations for the leftmost zeros of
polynomials . . . . . . . . . . . . . . . . . . . . . . 185
7.6.6 An estimation between two consecutive Fubini
numbers via Lax’s theorem . . . . . . . . . . . . . . 189
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

II Generalizations of our counting sequences 195


8 Prohibiting elements from being together 197

8.1 Partitions with restrictions – second kind r-Stirling numbers 197


8.2 Generating functions of the r-Stirling numbers . . . . . . . 200
8.3 The r-Bell numbers and polynomials . . . . . . . . . . . . . 204
Contents xi

8.4 The generating function of the r-Bell polynomials . . . . . . 207


8.4.1 The hypergeometric function . . . . . . . . . . . . . 207
8.5 The r-Fubini numbers and r-Eulerian numbers . . . . . . . 210
8.6 The r-Eulerian numbers and polynomials . . . . . . . . . . 215
8.7 The combinatorial interpretation of the r-Eulerian numbers 218
8.8 Permutations with restrictions – r-Stirling numbers of the first
kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
8.9 The hyperharmonic numbers . . . . . . . . . . . . . . . . . 225
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

9 Avoidance of big substructures 239

9.1 The Bessel numbers . . . . . . . . . . . . . . . . . . . . . . 239


9.2 The generating functions of the Bessel numbers . . . . . . . 240
9.3 The number of partitions with blocks of size at most two . 242
9.4 Young diagrams and Young tableaux . . . . . . . . . . . . . 244
9.5 The differential equation of the Bessel polynomials . . . . . 247
9.6 Blocks of maximal size m . . . . . . . . . . . . . . . . . . . 249
9.7 The restricted Bell numbers . . . . . . . . . . . . . . . . . . 251
9.8 The gift exchange problem . . . . . . . . . . . . . . . . . . . 252
9.9 The restricted Stirling numbers of the first kind . . . . . . . 255
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

10 Avoidance of small substructures 267

10.1 Associated Stirling numbers of the second kind . . . . . . . 267


10.1.1 The associated Bell numbers and polynomials . . . 271
10.2 The associated Stirling numbers of the first kind . . . . . . 273
10.2.1 The associated factorials An,≥m . . . . . . . . . . . 274
10.2.2 The derangement numbers . . . . . . . . . . . . . . 275
10.3 Universal Stirling numbers of the second kind . . . . . . . . 279
10.4 Universal Stirling numbers of the first kind . . . . . . . . . 284
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

III Number theoretical properties 295


11 Congruences 297

11.1 The notion of congruence . . . . . . . . . . . . . . . . . . . 297


11.2 The parity of the binomial coefficients . . . . . . . . . . . . 298
11.2.1 The Stolarsky-Harborth constant . . . . . . . . . . 299
11.3 Lucas congruence for the binomial coefficients . . . . . . . . 299
11.4 The parity of the Stirling numbers . . . . . . . . . . . . . . 301
xii Contents

11.5 Stirling numbers with prime parameters . . . . . . . . . . . 303


11.5.1 Wilson’s theorem . . . . . . . . . . . . . . . . . . . 304
11.5.2 Wolstenholme’s theorem . . . . . . . . . . . . . . . 305
11.5.3 Wolstenholme’s theorem for the harmonic numbers 305
11.5.4 Wolstenholme’s primes . . . . . . . . . . . . . . . . 306
11.5.5 Wolstenholme’s theorem for Hp−1,2 . . . . . . . . . 306
11.6 Lucas congruence for the Stirling numbers of both kinds . . 309
11.6.1 The first kind Stirling number case . . . . . . . . . 309
11.6.2 The second kind Stirling number case . . . . . . . . 311
11.7 Divisibility properties of the Bell numbers . . . . . . . . . . 311
11.7.1 Theorems about Bp and Bp+1 . . . . . . . . . . . . 311
11.7.2 Touchard’s congruence . . . . . . . . . . . . . . . . 312
11.8 Divisibility properties of the Fubini numbers . . . . . . . . 313
11.8.1 Elementary congruences . . . . . . . . . . . . . . . 313
11.8.2 A Touchard-like congruence . . . . . . . . . . . . . 314
11.8.3 The Gross-Kaufman-Poonen congruences . . . . . . 315
11.9 Kurepa’s conjecture . . . . . . . . . . . . . . . . . . . . . . 316
11.10 The non-integral property of the harmonic and hyperharmonic
numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
11.10.1 Hn is not integer when n > 1 . . . . . . . . . . . . . 319
11.10.2 The 2-adic norm of the hyperharmonic numbers . . 321
11.10.3 H1 + H2 + · · · + Hn is not integer when n > 1 . . . 323
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

12 Congruences via finite field methods 341

12.1 An application of the Hankel matrices . . . . . . . . . . . . 341


12.2 The characteristic polynomials . . . . . . . . . . . . . . . . 344
12.2.1 Representation of mod p sequences via the zeros of
their characteristic polynomials . . . . . . . . . . . 345
12.2.2 The Bell numbers modulo 2 and 3 . . . . . . . . . . 346
12.2.3 General periodicity modulo p . . . . . . . . . . . . . 348
12.2.4 Shortest period of the Fubini numbers . . . . . . . . 350
12.3 The minimal polynomial . . . . . . . . . . . . . . . . . . . . 350
12.3.1 The Berlekamp – Massey algorithm . . . . . . . . . 351
12.4 Periodicity with respect to composite moduli . . . . . . . . 354
12.4.1 Chinese remainder theorem . . . . . . . . . . . . . . 354
12.4.2 The Bell numbers modulo 10 . . . . . . . . . . . . . 355
12.5 Value distributions modulo p . . . . . . . . . . . . . . . . . 356
12.5.1 The Bell numbers modulo p . . . . . . . . . . . . . 356
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Contents xiii

13 Diophantic results 363

13.1 Value distribution in the Pascal triangle . . . . . . . . . . . 363


13.1.1 Lind’s construction . . . . . . . . . . . . . . . . . . 363
13.1.2 The number of occurrences of a positive integer . . 366
13.1.3 Singmaster’s conjecture . . . . . . . . . . . . . . . . 367
13.2 Equal values in the Pascal triangle . . . . . . . . . . . . . . 368
n m
13.2.1 The history of the equation k = l . . . . . . . . 368
13.2.2 The particular case n3 = m
 
4 . . . . . . . . . . . . 368
13.3 Value distribution in the Stirling triangles . . . . . . . . . . 369
13.3.1 Stirling triangle of the second kind . . . . . . . . . 369
13.3.2 Stirling triangle of the first kind . . . . . . . . . . . 371
13.4 Equal values in the Stirling triangles and some related
diophantine equations . . . . . . . . . . . . . . . . . . . . . 372
13.4.1 The Ramanujan-Nagell equation  n . . . m. . . . . . . . 372
13.4.2 The diophantine equation n−3 = m−1 . . . . . 373
13.4.3 A diophantic equation involving factorials and
triangular numbers . . . . . . . . . . . . . . . . . . 374
13.4.4 The Klazar – Luca theorem . . . . . . . . . . . . . . 374
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

Appendix 381

Basic combinatorial notions . . . . . . . . . . . . . . . . . . . . . . 381


The polynomial theorem . . . . . . . . . . . . . . . . . . . . . . . 384
The Lambert W function . . . . . . . . . . . . . . . . . . . . . . . 386

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!

Debrecen, 2009–2011. Nanjing, 2015–2019.

István Mező
About the Author

István Mező is a Hungarian mathematician who was born in Debrecen. He


earned his PhD at the Doctoral School of Mathematics and Computer Science
in 2010 at the University of Debrecen. He was working in this institute until
2014. After two years of Prometeo Professorship at the Escuela Politécnica
Nacional (Quito, Ecuador) between 2012 and 2014, he moved to Nanjing,
China where he is now a full-time research professor at the Nanjing University
of Information Science and Technology, Nanjing, P. R. China.
Dr. Mező is currently working on Combinatorics and Special Function
Theory.

xvii
Part I

Counting sequences related


to set partitions and
permutations

1
Chapter 1
Set partitions and permutation
cycles

In this chapter we introduce the basic vocabulary that we will be using


throughout the book. The notions to be introduced below are simple ab-
stractions of everyday life questions like, “how many ways can six people be
grouped into two groups?”. The content of this chapter is entirely elementary,
although for those who are not familiar with combinations, permutations and
binomial coefficients, running over the Appendix might be useful.

1.1 Partitions and Bell numbers


Let us suppose that we have six people1 . The most simple question might
be the following: “in how many ways can we group these six people into
some non-empty groups?”. If we decide to label our people with the labels
1, 2, 3, 4, 5, 6, then a possible grouping is the following:

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.

Definition 1.1.1. Let an n-element set of objects A be given. If we have a


non-empty collection of subsets of A such that
• the subsets in this collection are pairwise disjoint, and

• 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.

After introducing the notion of partitions, we arrive at a central definition


of our topic, and we meet our first counting sequence.

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 .

E. T. Bell4 wrote a comprehensive article on these numbers; therefore,


later mathematicians named the Bell numbers after him.
For the sake of brevity, we shall often use the abbreviation “n-set” in place
of “an n element set.” As we have already remarked, the objects in the set
A can be any kind of objects, like books, people, etc. As we assume them to
be distinguishable, we do not lose the generality if we use a labeling of these
objects, and consider the n-set A to be the label set {1, 2, . . . , n}.
Let us determine the first few Bell numbers “by hand.” Of course, one
element can be grouped in only one way, hence B1 = 1. For two objects
B2 = 2, and it still can easily be seen that B3 = 5; all the partitions are listed
here:
1, 2, 3 1|2, 3 2|1, 3, 3|1, 2 and 1|2|3.
In our opening example, we took six people. Labeling these people with
the labels 1, 2, . . . , 6, our set A is

A = {1, 2, 3, 4, 5, 6}.

This set – as we remarked – has 203 different partitions. Hence, B6 = 203, as


we shall see a bit later by concrete calculation – but without the necessity of
3 Christian Kramp (1760-1826), French mathematician. He also published medical and

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.

A recursion for the Bell numbers

As n grows, it is becoming harder and harder to calculate the Bell numbers


by simply listing the partitions, so we must find a simpler way. To do this,
we consider the following method. Let us fix an n-set A, and we pick out an
arbitrary element a from that of n. If we consider all the partitions of A, there
will be n possible cases: the element a is in a block of k elements, where k
can be 1, 2, . . . , n. The first possibility, when k = 1, results in the block {a}.
When a is in a two-element block, say, in {a, b}, then we have to choose the
element b beside a. This can be done in n − 1 = n−1 1 ways. If a is contained
5
in a block of three elements , then we have to choose two elements beside a
on n−1

2 ways. And so on, until arriving k = n: if a is contained in an n-block
(i.e., the partition contains one block and this is the whole A), then we have
to choose n − 1 elements beside a. This is possible just in n−1

n−1 = 1 way. After
fixing the size k of the block of a, we can focus on the remaining elements not
in the block of a. We see that the remaining n − k elements can be partitioned
arbitrarily and the total number of these partitions is Bn−k by the definition
of the Bell numbers. Hence, for any single k there are n−1 k−1 Bn−k cases. We
can sum up the possible values of k, because these cases are pairwise disjoint.
Hence, we have that
     
n−1 n−1 n−1
Bn = 1 · Bn−1 + · Bn−2 + · Bn−3 + · · · + · 1.
1 2 n−1

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

5A k element block will also be called k-block for short.


6 Ifwe choose k elements from n, it is the same as choosing n − k elements which we do
not want to choose.
6 Combinatorics and Number Theory of Counting Sequences
n−1 n−1
 
k = n−1−k , and hence
n−1
X 
n−1
Bn = Bn−1−k .
n−1−k
k=0

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 Partitions with a given number of blocks and the


Stirling numbers of the second kind
After knowing how to determine the number of all possible groupings of a
given number of objects, we continue our investigations with a new question:
“how many partitions are there for an n-set which contain a given number of
blocks?”. Let us consider, for example, the following groupings:

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

Definition 1.2.1. Let A be an n element set. The partitions of A which con-


tain exactly k blocks are called k-partitions of A. The number of k-partitions
(on n elements) is denoted by nk , and called Stirling number of the second

kind with parameters n and k 7 .


8
This name was given by Niels Nielsen who gave this honor to James
9 n
Stirling . The k numbers are also called Stirling partition numbers. The
reason why we classify these numbers as “second kind” will be clear soon.
Nevertheless, one can easily guess before we reach there: there are first kind
Stirling numbers also.
The notation nk is similar to the binomial coefficient notation nk 10 , and


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.

Special values of the Stirling numbers of the second kind

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

Let us try to find other special cases. We begin with n2 . If we group n




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.
 

Hence, we can easily calculate – one more time – that


         
4 4 4 4 4
B4 = + + + = 1 + (24−1 − 1) + + 1 = 15.
1 2 3 4 2

Recursion of the Stirling numbers of the second kind

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

As we already mentioned around (1.1), such formulas are called recursive.


To see how this recursion works in practice, let us try to answer the fol-
lowing question: “in how many ways can we group five elements into three
groups?”. In other words, we want to determine the value of 53 . By our new
recursion we have that      
5 4 4
= +3 .
3 2 3
Luckily, we have already seen the Stirling numbers on the right: 42 = 7, and

4
3 = 6. Hence,  
5
= 7 + 3 · 6 = 25.
3
We have not
yet analyzed what numbers can go to the upper and lower
position in nk . The upper parameter n is always a number of objects, so it is
a positive number; however, sometimes it is useful to permit n = 0. The lower
parameter k is the number of blocks, so it cannot be greater than n. We also
permit k to be zero, so 0 ≤ k ≤ n, and n ≥ 0. However, it is often useful to
permit k > n and in this case we simply fix
 
n
=0
k

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

Yet another formula

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

1.3 Permutations and factorials


After knowing how to partition objects into blocks, now we study how
to order objects. If we have 30 books to put on a shelf (regardless of the
alphabetical order of the titles, their sizes or colors, etc.) we can do this task
as follows: we choose one book from the 30 and we put it the first on the shelf.
Then we choose one from the remaining 29 books, and so on, until we have
the last book to put. Therefore, we have 30 · 29 · · · 2 · 1 different cases in total.
(This is a huge number with 33 digits.) This approach works for any number
of books, so we introduce the following elementary notion.

Definition 1.3.1. A fixed order of n elements is a permutation of these ele-


ments. The number of all the possible permutations is n·(n−1)·(n−2) · · · 2·1,
which is denoted13 by n! and we read it as n factorial14 . n is also called the
length of the permutation.

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

A permutation which cannot be rewritten as a product of smaller permu-


tations is called cycle, or sometimes orbit. The name “cycle” comes from the
fact that the elements in a cycle permute cyclically: in the first permutation
13 This notation was introduced by the already mentioned Christian Kramp in 1808.
14 We shall see that n! is the cousin (or, more fancily speaking, the dual) of the Bell
numbers.
Set partitions and permutation cycles 11

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

What happens if an element stays in its position? Like 3 in the permutation


 
1 2 3 4
.
2 4 3 1

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.

1.4 Permutation with a given number of cycles and the


Stirling numbers of the first kind
There are n! permutations and Bn partitions in total on n elements. In
addition, there are nk k-partitions on an n-set. These observations suggest

12 Combinatorics and Number Theory of Counting Sequences

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
 

would like to put four elements into 2 cycles. We have 42 = 11 possibilities,




because the following cases are all the possibilities we have:


       
1 2 3 4 , 1 2 4 3 , 1 3 4 2 , 2 3 4 1 ,
       
2 1 3 4 , 2 1 4 3 , 3 1 4 2 , 3 2 4 1 ,
     
1 2 3 4 , 1 3 2 4 , 1 4 3 2 .
Summing the Stirling numbers of the second kind we got the number of all
the possible partitions and this was the Bn Bell number (see (1.2)). If we sum
the first kind Stirling numbers, we must get the number of all the permutations
which are – by the remark before Definition 1.3.1. – the factorials:
     
n n n
n! = + + ··· + . (1.8)
1 2 n

In this sense we meant above that n! and Bn are duals of each other,
compare (1.8) with (1.2).

Special values of the Stirling numbers of the first kind

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

And, similarly as in the second kind case,


   
n n
= .
n−1 2

Now let us see the parameters n, n − 2. n elements can go into n − 2 cycles


in two ways:

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.

Altogether, we have that


      
n n 1 n n−2
=2 + .
n−2 3 2 2 2

It can also be seen that    


n n
≥ .
k k
This is so, because a k-partition on n elements always yields a k-cycle decom-
position. For example, the 2-partition

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

gives the decomposition


 
1 2 3 4 5 6 ,

but  
2 1 3 5 4 6
is a different permutation belonging to the partition

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


14 Combinatorics and Number Theory of Counting Sequences

which is still the same as before.

Recursion of the Stirling numbers of the first kind

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.

Hence, our recursion reads as:


     
n n−1 n−1
= (n − 1) + . (1.9)
k k k−1

The initial values for this recursion are 00 = 1 and n0 = 0 when n ≥ 1.


  

A special value involving harmonic numbers

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.

1.5 Connections between the first and second kind Stir-


ling numbers
There is more than just a similar naming convention between the first and
second kind Stirling numbers. In this section, we reveal this connection.
Let us change the parameters and their signs in (1.9). What we get is the
following:      
−k −k −k + 1
= (n − 1) + .
−n −n + 1 −n + 1
Rearranging:      
−k + 1 −k −k
= + (−n + 1) .
−n + 1 −n −n + 1
We can realize an interesting fact. This recursion is the same as for the Stirling
numbers of the second kind. The signs are a bit confusing, so let us take a
concrete example. Let us substitute n = 7 and k = 3:
     
−2 −3 −3
= + (−6) .
−6 −7 −6
One can get the first term on the right-hand side, −3
 
−2 −7 , from the left-hand
side by decreasing the parameters in −6 by one. The Stirling number in the
second term, −3
 
−6 , is multiplied by the lower parameter −6 and the upper
parameter is decreased by one. Exactly as in (1.4). We therefore have the
following important relation:
   
n −k
= . (1.11)
k −n
This relation says that one can get the Stirling numbers of the first kind by
negating and interchanging the parameters in the second kind Stirling numbers
during performing the recursion. This phenomenon is called duality.
17 The name of the harmonic numbers comes from the following observation. A harmonic

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

1.6 Some further results with respect to the Stirling


numbers
In this section, we give some new formulas and interpretations for the
second kind Stirling numbers.

1.6.1 Rhyme schemes


If we rephrase the definition of nk by using rhyme schemes, we can have an


interesting enumeration of schemes in strophes. Restricting us to two couplets


in a strophe and a strophe is restricted to be of four lines18 , then the following
possibilities can appear:

aabb, abab, abba, aaab, aaba, abaa, abbb

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:

1, 2|3, 4, 1, 3|2, 4, 1, 4|2, 3, 1, 2, 3|4, 1, 2, 4|3, 1, 3, 4|2, 1|2, 3, 4.

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.

1.6.2 Functions on finite sets


The second kind Stirling numbers are also related to functions on finite
sets. First we ask a simple question: “how many functions are there on an
n-set which attain at most k different values?”. Suppose that these k values
are 1, 2, . . . , k, while the n-set is simply A = {1, 2, . . . , n}. The answer can be
given easily: we map 1 ∈ A to one of the k elements, then map 2 ∈ A to one
of the k elements again, and so on. Altogether we have k · k · · · k = k n possible
functions.
The following question leads directly to the Stirling numbers: how many
functions are there on A which map exactly to k elements? Such a function is
called surjective. In this case n ≥ k is necessary. We can consider a surjective
function as a partition: every element from A maps to one of the k numbers.
This observation results in a k-partition on A, and, as we know, there are nk


18 Such strophes are called quatrains.


19 More on these can be read in the Wikipedia article Rhyme scheme.
Set partitions and permutation cycles 17

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

f : {1, 2, . . . , n} → {1, 2, . . . , k} (1.12)

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

This formula will be of great importance later.


The pair of this identity exists for the first kind Stirling numbers:
n  
X n m
k(k + 1) · · · (k + n − 1) = k . (1.13)
m=1
m

The proof is as follows. The left-hand side equals to


 
k+n−1
n! = k(k + 1) · · · (k + n − 1).
n
This expression counts the following selection process. We choose n balls, and
we distribute them among k boxes such that the order of the balls in the boxes
18 Combinatorics and Number Theory of Counting Sequences

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).

1.7 d-regular partitions


After seeing how the Stirling numbers are related to the enumeration prob-
lem of functions, we study another question20 .
Once upon a time, a mad king of a small kingdom of five cities was facing a
problem. The citizens of the capital did not want to pay his newly introduced
air tax. The king knew that there were some rebels convincing the citizens
not to pay the tax. He also knew that a group of six rebels were causing the
problem who were living in adjacent houses. The king decided to separate the
instigators: he announced that all of these rebels must be moved to five other
cities. To make it even harder for them to form a group again, the king added
that none of two adjacent neighbors can move to the same city. How many
possibilities did the gendarmerie have to execute the king’s order?
Since there are six rebellious instigators, but only five cities, two of the
rebels will surely go to the same city. The first rebel can live together with the
third, fourth, fifth, or sixth rebel, and the others are separated. These give
four possibilities. Or, the second rebel can live together with one of the fourth,
fifth, or sixth rebels, the third rebel together with the fifth or sixth (here we
do not write the first-third pairing, because this configuration was counted
before). Finally, the fourth rebel can live together with the sixth (and also
with the already counted first and second) rebel. These give 4 + 3 + 2 + 1 = 10
cases in total. The question has been answered.
How can we generalize this problem? The adjacent neighbors could not
be put together. Therefore, a possible direction of generalization is that we
restrict the citizens to live together only with even more distant neighbors.
We introduce the following definition.

Definition 1.7.1. If the individual blocks of a partition of the set {1, 2, . . . , n}


20 This section is based on an article of Anisse Kasraoui [322].
Set partitions and permutation cycles 19

contain elements with pairwise distances ≥ d, then this partition is called d-


regular partition21 .

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, 10|3|4, 8|5|7, 11 (1.15)

This partition has 5 arcs, namely,

1, 9; 2, 6; 6, 10; 4, 8; 7, 11

Hence, we have to place 5 rooks, exactly as in the configuration of the table


above.
This example shows clearly that n − k rooks belong to every k-partition.
Set partitions and permutation cycles 21

This correspondence is unique because there is no arc between blocks (there


are k − 1 places between k blocks). If we list the elements in the blocks in
increasing order, then there are at most n−1 arcs. That is, there are n−1−(k−
1) = n − k arcs (or, equivalently, rooks) to be placed. It can also be seen that
from a given rook placement one can decipher the partition unambiguously.
The d-regularity will have a very nice interpretation if we apply it to rook
placements. To see this interpretation in an example, we take the partition
(1.15), which is 2, 3, 4-regular. Set, say, d = 4. By d-regularity the smallest
element in the block of a bigger than a must be a + 4. In the language of
rook placements: the fourth column can contain rooks only in the positions
8, 9, 10, 11. Repeating this for each element in the partition (or each column in
the table), we can see that the first three cells counting from above are never
used:
1

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

Leaving out the non-used cells, we get an equilateral triangle of size n −


(d−1) = n−d+1 (together with the lengthened lines), where we can place the
rooks. Since there is a bijection between the rook placements and partitions
(n−k rooks belong to k partitions), there are k−(d−1) blocks on an n−(d−1)-
set with the same number of rooks. Hence, we have proven that (1.14) is really
the number of d-regular k-partitions on n elements.
Setting n = 6, d =
 2, and k =55 we see one more time that the gendarmerie
of the mad king has 6−2+1
5−2+1 = 4 = 10 possibilities to separate the 6 rebels.
Finally, summing on k, we have that the total number of d-regular parti-
tions on an n-set is the Bell number Bn−d+1 .

1.8 Zigzag permutations


Applying some restriction on the combinatorial structures at hand often
gives interesting constructions. We saw one example already, the d-regular
partitions. In that instance, the restriction (that the elements must have some
distance greater than one in between, resulted in no new number sequence
22 Combinatorics and Number Theory of Counting Sequences

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

is a “zigzag” permutation (more precisely, a down-up zigzag), because the


elements in the bottom line can be ordered in a zigzag form:

3 > 1 < 4 > 2 < 5.

Here goes the general definition.


Definition 1.8.1. A permutation
 
1 2 3 ··· n
i1 i2 i3 ··· in
is called up-down zigzag if

i1 > i2 < i3 > · · · .

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

Let us see a simple recursion satisfied by these numbers.

A basic recurrence for the Euler numbers

For any n ≥ 1
n  
X n
2En+1 = Ek En−k . (1.16)
k
k=0

To see the validity of this recursion, choose an arbitrary subset of k elements


from the set {1, 2, . . . , n} (in nk ways). Then choose a π1 up-down zigzag on


these k elements, and a π2 down-up zigzag on the remaining n − k elements.


From the former, there  are Ek ; from the latter, there are En−k , so up to this
point we are given nk Ek En−k possibilities. If we construct a permutation π
by concatenating the π1r reverse of π1 , the fixed point one element permutation
n + 1, and π2 , we see that π is either a down-up or an up-down zigzag on n + 1
elements. To see this in an example, let n = 7 and we choose three elements
for π1 . Let them be, say, 2, 5, 7; while the rest goes into π2 . Then we form
an up-down on 2, 5, 7: 5, 7, 2, and a down-up on the other elements: 3, 1, 6, 4.
Concatenating these with 8 in between, π will be 2, 7, 5, 8, 3, 1, 6, 4.
In fact, π uniquely encodes π1 and π2 ; these can be decoded from π, with
the aid of n + 1. In our example n + 1 = 8, so we split up π: 2, 7, 5 and 3, 1, 6, 4.
The first is the reverse of π1 , the second is π2 .
This uniqueness gives that we have constructed all two types of zigzag
permutations (letting k run from zero to n); altogether there are 2En+1 of
these. This gives that the recursion is indeed correct.

1.8.1 Zigzag permutations and trees


The Euler numbers appear in many combinatorial contexts, not only in the
problem of zigzags. We refer to [573] for a survey. Here we work out one specific
example which has multiple connections to our combinatorial numbers.
Let us take a zigzag permutation:
 
1 2 3 4 5 6 7 8 9
π=
6 3 4 1 5 2 8 7 9

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

confirming our above observation.


Collecting the above facts, our statement is the following. If n is odd, En
counts the number of labeled increasing plane 2-trees on n edges. If n is even,
En counts the labeled increasing plane trees which have two children except
the rightmost edge which has only one child (stemming to the left).
A similar bijective proof can be found in [112].
26 Combinatorics and Number Theory of Counting Sequences

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

(Note that this is only another form of (1.5).)


5. By using the recursion (1.4), calculate the first six lines in the second
kind Stirling triangle.
6. Decompose the permutation
 
1 2 3 4 5 6 7 8
8 1 4 2 7 6 5 3

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

15. Look for the arcs in the partition

1, 2, 6, 7, 8|3, 4, 9|5.

16. What partition belongs to the below rook placement?

6 R
7 R
8 R
9 R
10 R
11

1 2 3 4 5 6 7 8 9 10 11

What is the maximal level d of regularity?


17. In how many ways can we place rooks on an 8 × 8 chessboard (avoiding
attacks)?
18. Solve the previous problem for a general n × m chessboard and k rooks.
(The answer is k! nk m
 
k , where, of course, k cannot be greater than the
minimum of n and m.)
19. Determine the tree corresponding to the zigzag 725491638.
20. Decipher the zigzag permutation encoded in the below tree.

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

proof is not so easy, it was done by R. Donaghey [207]. A simpler proof


can be done by generating a function technique. This technique will be
detailed in Chapter 2. The proof via generating a function method can
be found in [536] (Theorem 3.2) or in [83] (Exercises (14-16) on p. 471,
and solutions on p. 478-479.)
Set partitions and permutation cycles 29

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.

2. Relation (1.10) can be proven combinatorially, without relying on recur-


sion (as we did). Not only (1.10), but a wealth of other identities for the
Stirling numbers of the first kind and harmonic numbers are presented
in [63]. We can learn from this paper, for example, that the expected
number of cycles in a randomly and uniformly chosen permutation on n
elements is Hn . This is equivalent to the pretty formula
n  
1 X n
k = Hn .
n! k
k=1

The reader is called to verify this statement by himself/herself. The ex-


pected number of blocks in a partition is among the exercises of Chap-
ter 3.
3. Some recent papers are devoted to study the number of permutations
and partitions where the smallest or largest fixed point or singleton is
given. See [191] for permutations and [547, 549] for partitions.
4. The Stirling and Bell numbers can be extended to graphs. Let S(G, k)
be the number of partitions of the vertices of the graph G into k non-
empty, independent sets. Then, quite obviously, for the
 graph En with
n vertices and no edges we have that S(En , k) = nk . According to
the research of D. Galvin and Do T. Thanh [241], the quantity S(G, k)
was introduced by I. Tomescu [562]. Reasonably, the S(G, k) numbers
are called graphical Stirling numbers by B. Duncan and R. Peele [209].
The sequence (S(G, k))k≥0 is related to colorings, and it is called the
chromatic vector of G [256]. See [46, 331] and the literature therein for
more sources, and also [407] for related investigations.
5. The Stirling and Bell numbers can be applied in the enumeration of
certain types of forests (forests are collections of trees) [581].
6. Symbolic summation methods are algorithms which automatize the find-
ing of recursions for sequences which are defined by finite sums with
terms of specific type. Such methods are available when the summands
are hypergeometric, holonomic, nested sum-product expressions, and
some others. Recently, symbolic summation methods were developed by
M. Kauers and C. Schneider for Stirling numbers. See [326, 327] for the
details, and for a collection of citations for the other above-mentioned
algorithms.
30 Combinatorics and Number Theory of Counting Sequences

7. There is a surprising integral representation for the Bell numbers which


was discovered in 1885 by Cesàro [131] and holds for all n ≥ 1:
2n! π ecos θ cos(sin θ)
Z
sin ecos θ sin(sin θ) sin nθdθ.

Bn = e
πe 0
This integral appeared in an editorial remark to a Monthly problem
[102]. An easily available proof is due to Callan [111].
8. The Stirling numbers of the first kind can be represented by integrals
[7, 473], by moments of some properly defined random variable [6], and
by the hypergeometric function [3] (see also the Outlook of Chapter 8).
9. A simple Mathematica code was written by Robert M. Dickau [194] to
construct lists of all the partitions of an n element set.
10. Those who would like to know more about computer-aided combina-
torics should consult the book of S. Pemmaraju and S. Skiena [458] in
which the use of the combinatorics features of the Mathematica software
are described in great detail.
11. See a reprint of Stirling’s tables and a short introduction to Stirling
numbers in [93].
d
12. The nth power of the differential operator xD = x dx is a linear combi-
k k
nation of x D with Stirling number coefficients:
n  
X n k k
(xD)n = x D .
k
k=0

This is a result from 1823 by H. Scherk [509]. In general, the possibility


to write down polynomials of xD as a sum of the monomials xk Dk is
known as the normal ordering problem. This problem was generalized
by Scherk himself, and later further generalized by a number of authors.
Schwatt [513] shows the utility of (xD)n in the summation of powers
and like series. Carlitz, inspired by the work of Schwatt [128, 129] stud-
ied, among others, (xλ Dλ )n , Comtet [159] and Lang [355] considered
(xr D)n . All these operators are expressible as a linear combination of
xk Dk , only the coefficients alter. The above-mentioned studies, however,
did not consider the combinatorial properties of the arising coefficients.
The first who gave a presentation on a possible interpretation of these
numbers was Navon [451] in 1973. He did actually even more, considered
an arbitrary finite word w over the alphabet {x, D}, and showed that
w can be expressed as a linear combination of xk Dk with Stirling-like
number coefficients, denoted by Sw (k), and gave a description of these
numbers for arbitrary w (the parameter n does not appear explicitly, be-
cause the length n of the linear combination depends on the length of the
word w). Codara et al. [154] connected the Sw (k) numbers with graph
Set partitions and permutation cycles 31

coloring in the particular case when w = (xs Ds )n . The newest graph


theoretic achievements with respect to the normal ordering problem are
detailed in [214]. Interpretation and calculations of Sw (k) via tree struc-
tures was achieved by a number of authors, see [37, 80, 356, 402]. Rela-
tions to Feynman diagrams was discovered by Solomon et. al. [526]. The
operator (xλ Dλ )n was studied in [325] for non-integer λ.
See also [394] for a modern treatise where historical remarks on the
Stirling and related numbers can also be found. A so-called q-analogue
of the Stirling numbers was defined by Garsia and Remmel [242], from
which a whole theory of q-Stirling numbers has been growing out. See
again [394], and [512]. Also, the book [392] of T. Mansour contains a
great deal of historical information about set partitions, and it is a good
introduction to the so-called pattern avoidance.
13. The Euler numbers are very widely studied in the literature, see the
survey [536] for references and [282] for some simple proofs of basic
properties of the Euler numbers and some refinements.
14. For an interesting connection between permutations and RNA, see [145].
15. Let (an ) and (bn ) be two sequences such that a1 = b1 , and

bn + a1 bn−1 + · · · + an−1 b1 = nan (n > 1).

We then say that the pair (an , bn ) is a Newton-Euler pair . Further,


we say that (bn ) is a Newton-Euler sequence if an is integer (positive,
negative, or zero) for all n ≥ 1. T. Lengyel proved that k! nk

is a
Newton-Euler sequence [368].
16. Henry Gould (an American mathematician, born in 1928) has a famous
and huge register of combinatorial formulas. These were compiled into a
book [474] by J. Quaintance. The Foreword and Preface paints a lovely
story about the workstyle and deep knowledge of Gould. Also, [474] con-
tains a large number of formulas not only for the Stirling numbers but
for the binomial coefficients, Bernoulli numbers, and many other com-
binatorially interesting number sequences. The first chapters introduce
methods that are worth to be known by everyone who is interested in
the symbolic derivation of combinatorial formulas.
Chapter 2
Generating functions

The method of generating functions is extremely useful in enumeration prob-


lems. With the aid of generating functions we can discover a host of new
identities, divisibility properties and asymptotical behavior1 of our counting
sequences. This chapter needs some knowledge from the reader’s side in ana-
lyis, especially differential and integral calculus, and some basics from differ-
ential equations. In a non-essential way, some matrix algebra will also be used.
An excellent book which contains a detailed discussion of generating functions
is [262]2 .

2.1 On the generating functions in general


For a while we leave our study of partitions and permutations. Later –
having the strong tool of generating functions in our hand – we turn back to
combinatorics.

Examples

Let an be a sequence of (real) numbers (with n = 0, 1, 2, . . . ). Then we can


form a function

f (x) = a0 x0 + a1 x1 + a2 x2 + a3 x3 + · · ·

which is called the generating function of the sequence an .


In particular, all the polynomials are generating functions. For example,
the polynomial
f (x) = 2 + 4x − 3x2 + 5x3
1 Asymptotic investigations reveal how rapidly grows (or decreases) a sequence of num-

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

is the generating function of the sequence a0 = 2, a1 = 4, a2 = −3, a3 = 5,


and an = 0 if n > 3.
In other words, the polynomial s are generating functions of finite sequences.
Now let a0 = a1 = a2 = · · · = an = 1. Then

f (x) = 1 + x + x2 + x3 + · · · + xn .

Let us multiply both sides with x:

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

f (3) = 1 + 3 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 310 = 88 573.

Applying (2.1) we have that

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 really true, because 1.11 = 1 19 = 10


9 , a high school fact.
Complicating a bit, we set an = 1, if n is even and 0 if n is odd. Thus,
1
f (x) = 1 + x2 + x4 + x6 + · · · = (x2 )0 + (x2 )1 + (x2 )3 + · · · = ,
1 − x2
if we write x2 in place of x in (2.2).

Exponential generating functions

We introduce an important class of generating functions. If an is a sequence


of numbers, then the function
a0 0 a1 1 a2 2 a3 3
f (x) = x + x + x + x + ···
0! 1! 2! 3!
is called the exponential generating function 3 of an (or, which is the same,
f is the generating function of an /n!). Hence, for example, the exponential
1
generating function of an = n! is 1−x . In the simplest case, when an = 1, the
exponential generating function is
1 0 1 1 1
f (x) = x + x1 + x2 + x3 + · · · (2.3)
0! 1! 2! 3!
which is denoted by ex , and called exponential function (this is where the
name “exponential generating function” comes). Here e ≈ 2, 718 is the base
of the natural logarithm 4 .

2.2 Operations on generating functions


2.2.1 Addition and multiplication
One can introduce operations on generating functions to construct new
generating functions from older ones.
If we have two sequences like an and bn , and their generating functions are
f (x) and g(x), respectively, then the generating function of an + bn is simply
f (x) + g(x), because

(a0 + b0 )x0 + (a1 + b1 )x1 + · · · = a0 x0 + b0 x0 + a1 x1 + b1 x1 + · · · =


a0 x0 + a1 x1 + · · · + b0 x0 + b1 x1 + · · · =
f (x) + g(x).
3 By convention 0! = 1.
4 The letter “e” is chosen to remember Leonhard Euler (1707-1783), Swiss mathematician
and physicist, one of the greatest scientists in the history of science.
36 Combinatorics and Number Theory of Counting Sequences

It can similarly be seen that if the generating function of an is f (x), then


the generating function of c · an is simply c · f (x) (here c is an arbitrary
constant).
If we need the generating function of cn an just take f (cx) in place of f (x):

X ∞
X
f (cx) = an (cx)n = (cn an )xn .
n=0 n=0

Life is not so easy if we would like to construct the generating function of


an bn from f (x) and g(x). Let us first consider the finite case. For example, if
the only non-zero terms are a0 , a1 , a2 and b0 , b1 , b2 , then

f (x)g(x) =(a0 + a1 x + a2 x2 )(b0 + b1 x + b2 x2 )


=(a0 b0 + a0 b1 x + a0 b2 x2 ) + (a1 b0 x + a1 b1 x2 + a1 b2 x3 )
+ (a2 b0 x2 + a2 b1 x3 + a2 b2 x4 ). (2.4)

(From now on, in place of x0 we simply write 1.)


From the application point of view, this product is not so useful as another
product in which we “forget” the terms with degree greater than the degree
of the factors. Applying this rule to the above product, we leave the terms of
degree ≥ 2:

(a0 b0 + a0 b1 x + a0 b2 x2 ) + (a1 b0 x + a1 b1 x2 ) + (a2 b0 x2 ) =

a0 b0 + (a0 b1 + a1 b0 )x + (a0 b2 + a1 b1 + a2 b0 )x2 .


In a more compact form:
2 n
!
X X
n
x ak bn−k .
n=0 k=0

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

We demonstrate in a simple example how Cauchy product works in prac-


1
tice. Let an = bn = 1. Then f (x) = g(x) = 1−x , and
1
f (x)g(x) = .
(1 − x)2
On the other hand, by (2.5)
∞ ∞
n
!
X X X
n
x 1·1 = (n + 1)xn . (2.6)
n=0 k=0 n=0

Hence, the Cauchy product of the generating functions of an = bn = 1 is


cn = n + 1.
Now we study the exponential generating function of the same sequences
an and bn . Their exponential generating functions are ex (see (2.3)).
∞ n
!
x x
X
n
X 1 1
e ·e = x .
n=0
k! (n − k)!
k=0
1 n 1

The members of the inner sum are n! k , we carry out n! . Hence, the entire
sum equals to
∞ n  
!
X 1 n X n
x .
n=0
n! k
k=0
It is known that the inner sum equals to 2n (see the binomial theorem in the
Appendix for a simple proof); thus the final form is
∞ ∞
X 1 n n X 1
2 x = (2x)n = e2x .
n=0
n! n=0
n!

(This shows that the function ex behaves as we expect: ex · ex = ex+x = e2x .)


It is now easy to find a formula for the Cauchy product of two exponential
generating functions in general. Let
∞ ∞
X an n X bn n
f (x) = x and g(x) = x .
n=0
n! n=0
n!
Then their Cauchy product is
∞ n
!
X X ak k bn−k n−k
f (x)g(x) = x · x .
n=0
k! (n − k)!
k=0

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

2.2.2 Some additional transformations


We describe three important observations that help in the determination
of generating functions.

1. If f (x) is multiplied by x, we get the generating function of an−1 :



X ∞
X
xf (x) = an xn+1 = an−1 xn ,
n=0 n=1

2. If f (x) is divided by x, we get the generating function of an+1 :


∞ ∞
f (x) X X
= an xn−1 = an+1 xn .
x n=1 n=0

(To eliminate negative powers of x, we supposed that a0 = 0.)


3. Let an be a sequence and f (x) be its generating function. Multiplying
1
f (x) by 1−x (which belongs to bn = 1) we have that

∞ 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.

2.2.3 Differentiation and integration


In this subsection we need to know a bit about differential and integral
calculus.
Generating functions 39

Manipulations of the ordinary generating function

Let an be an arbitrary sequence and f (x) be its generating function. By


using differentiation and integration we can introduce some additional tricks
in order to construct new generating functions from older ones.
1. The derivative of f (x) is6

!′ ∞ ∞
X X X

f (x) = an x n
= an (xn )′ = an nxn−1 .
n=0 n=0 n=1

Multiplying by x we have that the generating function of nan is xf ′ (x).


an
2. Integrating and dividing by x, we have the generating function of n+1 :

∞ ∞
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

3. If we divide by x before integrating, we get the generating function of


an
n :
∞ ∞ ∞
Z Z X ! Z
f (x) n−1
X X an n
dx = an x = an xn−1 dx = x .
x n=0 n=0 n=0
n

Manipulations of the exponential generating function

1. The derivative of f (x):


∞ ∞ ∞
X an n ′ X an X an+1 n
f ′ (x) = (x ) = xn−1 = x .
n=0
n! n=1
(n − 1)! n=0
n!

Hence, f ′ (x) is the exponential generating function of the sequence bn =


an+1 .
2. By integration, we get the exponential generating function of bn = an−1
(n > 0), and b0 = 0:
Z ∞ Z ∞ ∞
X an X an X an−1 n
f (x)dx = xn dx = xn+1 = x .
n=0
n! n=0
(n + 1)! n=1
n!
6 It is not true in general that the derivative of an infinite sum of functions can be taken

termwise. The series must converge uniformly. However, inside the radius of convergence
this always satisfies.
40 Combinatorics and Number Theory of Counting Sequences

3. If we divide by x before integration we have the exponential generating


function of ann :
∞ ∞
an xn
Z Z
f (x) X an X
dx = xn−1 dx = .
x n=0
n! n=0
n n!

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 .

2.2.4 Where do the name generating functions come from?


After introducing the generating functions and their most basic operations,
we show where their name comes from.
Let us take the function

X
f (x) = an xn ,
n=0

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

is the generating function. a0 must simply be the zeroth derivative at x = 0,


divided by 0! = 1:

1 (0)
1
a0 = sin (x) = sin 0 = 0.
0! x=0 0!

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

T. Benjamin. His presentation can be read here: math.nist.gov/mcsd/Seminars/2008/2008-


01-11-Benjamin.html. See also [60, 236].
42 Combinatorics and Number Theory of Counting Sequences

2.3 The binomial transformation


As we noted during deducing (2.8), the binomial transform of a sequence
an is defined by
n  
X n
bn = ak
k
k=0

We also know that if the exponential generating function of an is f (x), then


the exponential generating function of bn is ex f (x).
We had actually met with a binomial transform at the very beginning.
This was the recursion (1.1). This recursion says that for the Bell numbers the
binomial transform is bn = Bn+1 . In other words, the binomial transformation
acts on the Bell number sequence as an index shifting.
Let us take another example. The binomial theorem (see the Appendix)
says that
n  
X n k n−k
(x + y)n = x y .
k
k=0
If here we substitute y = 1 we have that
n  
n
X n
(x + 1) = xk .
k
k=0

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 matrix form of the binomial transformation

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

and the vector  


a0
 a1 
v= . 
 
 .. 
an
then their product Bn v is the right-hand side of (2.11), indeed. Hence, one
can write (2.11) as    
b0 a0
 b1   a1 
 ..  = Bn  ..  .
   
. .
bn an
The binomial inversion theorem is nothing else, but the realization that
the multiplication by the inverse of Bn gives v:
   
a0 b0
 a1   b1 
 ..  = Bn−1  ..  .
   
. .
an bn
10 Blaise Pascal (1623-1662), French philosopher, physicist, and mathematician.
44 Combinatorics and Number Theory of Counting Sequences

The inversion theorem yields that the inverse of the matrix Bn is


 0 
0  0 0 ··· 0
− 1 1
0 ··· 0 
 20 1 
− 21 2

Bn−1 =  0

2 ··· 0  .
 . . .. .. .. 
 .. .. . . . 
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).

The binomial transform and ordinary generating functions –


Euler’s theorem

It was easy to get the exponential generating function of the binomial


transformed sequence. Can we deduce the ordinary generating function for bn
in general? This question was answered by Euler in 1755. Euler stated11 that
if f (x) is the generating function of an , then the generating function of the
binomial transform is  
1 x
f (2.14)
1−x 1−x
Let us verify this. We rewrite the above function in more details:
∞ ∞
xn xn
 
1 x 1 X X
f = an n
= an .
1−x 1−x 1 − x n=0 (1 − x) n=0
(1 − x)n+1
n
x
The denominator of (1−x) n+1 is the generating function of a well-known se-

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

where nk = n(n + 1)(n + 2) · · · (n + k − 1). See Exercise 23 for the details. We


can now proceed as follows:
∞ ∞
1 X xk X xk
n+1
= (n + 1)k = (n + 1)(n + 2) · · · (n + k) =
(1 − x) k! k!
k=0 k=0
∞ ∞ 
(n + k)! xk

X X n+k
= xk .
n! k! n
k=0 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

Writing this back to the former expression, we get


∞ ∞ ∞ 
xn

X X X n + k n+k
an = an x .
n=0
(1 − x)n+1 n=0
n
k=0

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

The right-hand side is the binomial transform of an , so we have verified the


statement of Euler.

2.4 Applications of the above techniques


2.4.1 The exponential generating function of the Bell
numbers
We are now endowed with sufficient knowledge to turn back to our com-
binatorial numbers and study them from a new point of view. Many new
identities can be deduced with the generating function technique.
In the first chapter, firstly we met with the Bell numbers. Recall (1.1) and
(2.8). Based on these, and letting f (x) be the generating function of Bn ,
∞ ∞
n  
!
x
X xn X n X xn
f (x)e = Bk = Bn+1 .
n=0
n! k n=0
n!
k=0

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.

2.4.2 Dobiński’s formula


A beautiful expression from the year 1877 for the Bell numbers is presented
now. This is called the Dobiński12 formula. The following transformations are
made:
∞ ∞ ∞ ∞
!
1 ex 1 X (ex )k 1 X ekx 1 X 1 X (kx)n
e = = = .
e e k! e k! e k! n=0 n!
k=0 k=0 k=0

Changing the order of the summation,


∞ ∞
!
1 ex X x n 1 X kn
e = .
e n=0
n! e k!
k=0

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].

2.4.3 The exponential generating function of the second kind


Stirling numbers
We continue with the determination of the exponential generating function
of the second kind Stirling numbers. Let us denote this function by
∞   n
X n x
fk (x) = .
n=0
k n!

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

can be seen by successive derivation.


Generating functions 47

For every k we have a separate exponential generating function. Summing


on k
∞ ∞ X∞   n ∞ ∞  
!
X X n x X xn X n
fk (x) = = . (2.18)
n=0
k n! n=0
n! k
k=0 k=0 k=0

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

On the right-hand side, we have the exponential generating function of the


Bell numbers (after carrying the factor 1/e to the power):

X x
−1
fk (x) = ee .
k=0

By the (2.3) definition of the exponential function



x
−1
X (ex − 1)k
ee = ,
k!
k=0

which helps us make a guess about the final form of fk (x). It is


∞   n
(ex − 1)k X n x
fk (x) = = . (2.19)
k! n=0
k n!

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

Multiplying by xn and dividing by n! and then summing over n:


∞   n ∞  ∞ 
n − 1 xn n − 1 xn
 
X n x X X
= +k .
n=0
k n! n=0
k−1 n! n=0
k n!

Considering the operations for the exponential generating functions (especially


the fact that decreasing the index is done by integration) this is equivalent to
the equation Z Z
fk (x) = fk−1 (x) + k fk (x).

Or, taking the derivative on both sides,

fk′ (x) = fk−1 (x) + kfk (x).


48 Combinatorics and Number Theory of Counting Sequences

Substituting (2.19), we get that our conjecture was correct, indeed:


′
(ex − 1)k (ex − 1)k−1 (ex − 1)k

= +k
k! (k − 1)! k!
(ex − 1)k−1 x (ex − 1)k−1 (ex − 1)k
k e = +k
k! (k − 1)! k!
(ex − 1)k−1 x x
(e − 1) k−1
(e − 1)k
x
e = +
(k − 1)! (k − 1)! (k − 1)!
ex = 1+e −1x

ex = ex

As for the Bell numbers, it is possible to give another representation for


the Stirling numbers. Applying the binomial theorem from the Appendix:
k  
(ex − 1)k 1 X k
= (ex )l (−1)k−l .
k! k! l
l=0

We know that (ex )l = elx is the exponential generating function of ln :


k   k   ∞ n
1 X k x l k−l 1 X k X l n
(e ) (−1) = (−1)k−l x .
k! l k! l n=0
n!
l=0 l=0

Carrying everything under the sum over n:


k   ∞ n ∞ k  
1 X k X l n X xn 1 X k
(−1)k−l x = (−1)k−l ln .
k! l n=0
n! n=0
n! k! l
l=0 l=0
n
Since we started with the exponential generating function of k , on the right-
xn
hand side we must have these numbers as the coefficients of n! . Our result is
therefore that
  k  
n 1 X k n
= l (−1)k−l . (2.20)
k k! l
l=0

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

An alternative proof of Dobiński’s formula

Having (2.20) at our disposal, we can give an alternative proof of Dobiński’s


formula. As Bn is the sum of the Stirling numbers, we have that
n k   n n
X 1 X k n X ln X 1
Bn = l (−1)k−l = (−1)k−l .
k! l l! (k − l)!
k=0 l=0 l=0 k=l
Since k − l runs from 0 to n − l, we can write the following:
n n−l
X ln X (−1)k
Bn = .
l! k!
l=0 k=0
Note that l can run from any number greater or equal to n if we modify the
inner sum such that it runs from 0 to this number minus l. Thus, it remains
true that
n+m
X ln n+m−l
X (−1)k
Bn = (m ≥ 0). (2.21)
l! k!
l=0 k=0
This formula is interesting in itself, and it can even be used to deduce the
Dobiński formula; just take m → ∞:
∞ n X ∞ ∞
X l (−1)k 1 X ln
Bn = = .
l! k! e l!
l=0 k=0 l=0

Identity (2.21) appears in the following sources: [467, Eq. (21)], [597, Sec-
tion 1.6].

2.4.4 The ordinary generating function of the second kind


Stirling numbers
The recursion for the Stirling
 numbers will be helpful in the determination
of the generating function of nk . Multiplying by xn and summing over n we
have
∞   ∞   ∞  
X n n X n−1 n X n−1 n
x = x +k x .
n=0
k n=0
k−1 n=0
k
Hence, the generating function must satisfy the equation
fk (x) = xfk−1 (x) + kxfk (x);
see the operations on p. 38. Thus,
1
fk (x) = xfk−1 (x).
1 − kx
This is a recursion; it expresses fk in terms of fk−1 . Knowing the first function
f0 (x) we know all the others. f0 (x) is simply
∞  
X n n
f0 (x) = x =1
n=0
0
50 Combinatorics and Number Theory of Counting Sequences

(this is so, because n0 = 0 if n > 0). Hence,




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)

2.4.5 The generating


 function of the Bell numbers and a
formula for nk
The above leads to the generating function of the Bell numbers – at least
to a preliminary form of it. Remembering the step we made in (2.18):
∞ ∞ ∞   ∞ ∞   ∞
! !
X
n
X X n n
X X n n X
Bn x = x = x = fk (x).
n=0 n=0
k n=0
k
k=0 k=0 k=0

Thus, the function we were looking for is


∞ ∞
X X xk
Bn x n = .
n=0
(1 − x)(1 − 2x) · · · (1 − kx)
k=0

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.


To do a trick, we pretend that we know the binomial transform of nk , and




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

The first factor is almost the geometric series (2.2):



x X
= (−1)n xn+1 ,
1 + x n=0

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

This is the formula we wanted to prove.


14 x 1
1+x
is the functional inverse of 1−x
.
52 Combinatorics and Number Theory of Counting Sequences

2.4.6 The exponential generating function of the first kind


Stirling numbers
To deduce the exponential generating function of the first kind Stirling
numbers, we can follow the same approach as in the second kind case. Recall
Equation (2.18). Let us suppose that for the exponential generating function
belonging to the fixed lower parameter k is fk (x):
∞   n
X n x
= fk (x).
n=0
k n!

Summing on k – and remembering (1.8) – we have that


∞ X ∞   n ∞ ∞   ∞ ∞
X n x X xn X n X X
= = xn = fk (x).
n=0
k n! n=0
n! k n=0
k=0 k=0 k=0
1
The penultimate sum is 1−x , so fk (x) must be an expression such that its sums
1 k
to 1−x . Of course fk (x) = x could be a candidate, but this is obviously not
the generating function of the Stirling number sequence. Another candidate
is  k
1 1
fk (x) = ln . (2.23)
k! 1−x
This function sequence already gives the correct answer. We leave the verifi-
cation as an exercise for the reader. (Hint: show that  fk satisfies a recursion
corresponding to the basic recursion (1.9) of the nk numbers.)

2.4.7 Some particular lower parameters of the first kind


Stirling numbers
We have already seen that the n2 Stirling numbers can be expressed by
 

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

Comparing the coefficients we get that


  n−1
n n! X 1 1
=
2 2 kn−k
k=1

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

hence the more compact identity


 
n
= (n − 1)!Hn−1
2
follows. We have already proved this on page 14.
For k = 3 we have that
∞   n  3
X n x 1 1
= ln .
n=0
3 n! 3! 1−x
The function on the right-hand side can be decomposed as
 3    2
1 1 1
ln = ln ln .
1−x 1−x 1−x
We know that the two factors are the generating functions of an = 1/n (n ≥ 1)
and bn = n2 Hn−1 (see (2.24)), respectively. Then by Cauchy’s product, it is
not hard to see that   n−1
n n! X Hk−1
= . (2.25)
3 3 k(n − k)
k=1
This is valid for n ≥ 3, for smaller n these Stirling numbers are zero.
We leave to the reader to verify rigorously the special value
  n−1
n n! X Hk−1 Hn−k−1
= .
4 6 k n−k
k=1

See [582] for similar relations.

2.5 Additional identities coming from the generating


functions
n
In
nthe
previous sections, we have not extracted all the information on k
and k from the generating functions. In this section,
  we gain
 more identities
and we encounter additional similarities between nk and nk .
54 Combinatorics and Number Theory of Counting Sequences

Our first results are the following identities.


 
n n! X 1
= , (2.26)
k k! j +j +···+j =n j1 j2 · · · jk
1 2 k
 
n n! X 1
= . (2.27)
k k! j +j +···+j =n j1 !j2 ! · · · jk !
1 2 k

(The ji s are positive; hence the denominator is never zero.)


In particular,
  n−1
n n! X 1 n! X 1
= = =
2 2 j +j =n j1 !j2 ! 2 k!(n − k)!
1 2 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

Two other representations will be proven:


   j 1  j 2  jn
n X n! 1 1 1
= ··· , (2.28)
k j1 +2j2 +···+njn =n
j1 !j2 ! · · · jn ! 1 2 n
j1 +j2 +···+jn =k
   j1  j 2  jn
n X n! 1 1 1
= ··· (2.29)
.
k j1 +2j2 +···+njn =n
j1 !j2 ! · · · jn ! 1! 2! n!
j1 +j2 +···+jn =k

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

First let k = 2. Then


  
∞ j ∞ j ∞ Xj−1 l j−l
X x X x =
X x x
  =
j=1
j j=1
j j=1
l j−l
l=1

∞ 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

We look for the coefficient of xn . It is


j 1  j 2 jn
x1 x2 xn
 
1 X k!
··· .
k! j1 !j2 ! · · · jn ! 1 2 n
j1 +j2 +···+jn =k

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

We offer a combinatorial proof for this result. By definition, Bn counts the


partitions of an n-set. Any partition can be constructed by the following algo-
rithm. We put the n elements in an order (this is a permutation) and then we
count the different blocks with i elements (1 ≤ i ≤ n). Let ji be the number
of the i-blocks in the partition. It must hold true that

j1 + 2j2 + · · · + njn = n.

Let a j1 , . . . , jn sequence be fixed, and we group the first 1 · j1 elements in a


separate class (in which all elements form singletons). Then put the next 2 · j2
elements in another class, where two-two elements are in a block, and so on.
In general, there are i · ji elements in the ith class, and there are ji blocks of
size i:
i|i| · · · |i .
| {z }
ji

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.

Partition patterns and permutation patterns

The above considerations use the notion of patterns 15 If we look for a


grouping of n elements such that we want to prescribe how many 1-blocks,
2-blocks etc. are there, we then prescribe a partition pattern. If we decide that
there must be j1 pieces of 1-blocks, j2 pieces of 2-blocks, etc. then the number
of partitions with this pattern is
n!
. (2.31)
j1 !(1!)j1 · j2 !(2!)j2 · · · jn !(n!)jn
Of course the condition 1j1 + 2j2 + · · · + njn = n must be satisfied.
In other words, a (j1 , j2 , . . . , jn ) number sequence identifies a partition
pattern.
Patterns can be introduced for permutations, too. The only one difference
is that in permutation cycles the order of the elements is not indifferent;
however, right shifts do not alter the cycle. A cycle of length i can be shifted
i times. Hence, we must divide by i and not by i! as we did for partitions.
Hence, the number of permutations with a given pattern (j1 , j2 , . . . , jn ) is
n!
. (2.32)
j1 !1j1 · j2 !2j2 · · · jn !njn
This leads to the combinatorial proof of (2.28).

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

inverses of each other. If, in place of


 
1
ln
1−x

we take  
1
− ln (2.33)
1+x
then this is already the inverse of ex − 1:

e− ln( 1+x ) − 1 = eln(1+x) − 1 = 1 + x − 1 = x.


1
(2.34)

The function (2.33) is the generating function of a sequence which is easy to


find (see the exercises). Now we need to use the function
  k
1 1
− ln . (2.35)
k! 1+x

If we consider the identity


∞   n  k
X n x 1 1
= ln
n=0
k n! k! 1−x

with (−1)k and in place of x we write −x we get (2.35):


∞ ∞ k
n (−x)n
    n  
n−k n x 1 1
X X
k
(−1) = (−1) = − ln . (2.36)
n=0
k n! n=0
k n! k! 1+x

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

The right-hand side is the exponential generating function of the sequence


an = 1 if k = n and an = 0 otherwise. Hence, on the left-hand side, the
m
coefficient of xm! is 1 if m = k and 0 otherwise. This is indeed a very simple
sum of one single non-zero term! We have the fundamental identity
m    
X m n 1, if m = k;
= . (2.38)
n k 0, otherwise
n=k

This property is called orthogonality and the formula is called inversion for-
mula.

The orthogonality in matrix form

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

By the orthogonality, these matrices are inverses of each other. Since


S1 S2 = S2 S1 = E, another inversion formula comes:
n    
X n k 1, if n = m;
= .
k m 0, otherwise
k=m

The Stirling transform

Orthogonality permits us to introduce an interesting notion, which is


similar to the binomial transform. This is the Stirling transformation. Let
a0 , a1 , . . . be a given sequence. If we construct b0 , b1 , . . . via
   
b0 a0
b1  a1 
  = S2   ,
.. ..
. .
then, by orthogonality, one can recover a0 , a1 , . . . from b0 , b1 , . . . .
     
a0 b0 b0
a1  −1 b1  b1 
= S 2   = S 1 .
.. .. ..
 
. . .
Considering sums in place of matrix equations, we have the following connec-
tion between two arbitrary sequences an and bn .
n  
X n
bn = ak , (2.39)
k
k=0
n  
X n
an = bk . (2.40)
k
k=0

The sequence b0 , b1 , . . . is called the Stirling transform of a0 , a1 , . . . .


An easy particular case is ai = 1. Then (2.39) gives the sequence of Bell
numbers: bn = Bn . In other words, the Bell number sequence is the Stirling
transform of the sequence an = 1.
Orthogonality will be used in the following section.

2.7 Horizontal generating functions and polynomial


identities
So far we have studied generating functions formed by sums on the upper
parameter of the Stirling numbers. If we consider the Stirling triangles, fix the
60 Combinatorics and Number Theory of Counting Sequences

parameter k (the index of columns) and run n, we move downwards in the


triangle. The generating functions for a fixed k can then be called vertical . In
turn, if we fix n (the row) and we form the generating functions of the arising
numbers, we get the so-called horizontal generating functions. In a given row
there are only finitely many elements, thus these generating functions will be
polynomials.
Beginning with the second kind Stirling numbers, we fix n and run k:
n  
X n k
x .
k
k=0

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

The proof is by induction16 . It is obvious that for n = 1 the statement is true:


1  
X 1 k
x = 0 · 1 + 1 · x = x.
k
k=0

We suppose that (2.41) holds up to n and we try to prove it for n + 1 by


induction:
n  
!
X n k
x(x + 1)(x + 2) · · · (x + n − 1)(x + n) = x (x + n) =
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

Hence, (2.41) is indeed correct. As an example, we take the polynomial x(x +


1)(x + 2)(x + 3):

x(x + 1)(x + 2)(x + 3) = x4 + 6x3 + 11x2 + 6x,

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

On the other hand, the second inversion formula yields


m   X n  
! n m   
!
X m n k X
k
X m n
x = x = xm .
n=0
n k n=0
n k
k=0 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

The polynomials like xn , xn or xn are connected by the Stirling numbers,


as we see here. Using fancy vocabulary, we say that the Stirling numbers
are the connecting coefficients among the appropriate monomials, falling and
rising factorials18 .
Note that the dual of (2.46) is (2.45) and not (2.44).
The second and third polynomial identities can be rewritten by the matri-
ces introduced above:
 0  0
x x
 x1   x1 
S1  .  =  .  ,
   
 ..   .. 
n
x xn
 0  0
x x
 x1   x1 
S2  .  =  .  .
   
 ..   .. 
xn xn

(Of course, in S1 and S2 we must take the first n lines only.)


Note that if we apply S2 one more time on both sides of the second identity
we get the Bell polynomials.
It is also worth to note that xn can be expanded by the rising (or falling)
factorials and vice versa. Based on this observation, we might think that the
rising and falling factorials can be expanded by each other with some connect-
ing coefficients, too. This is so, and we deal with this question in Section 2.8.
18 The polynomials with real coefficients form an infinite dimensional vector space. This

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 .


2.7.1 Special values of the Stirling numbers of the first kind


- second approach
After having known the horizontal generating function of the nk numbers,
 

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

Here Hn,k denotes the generalized harmonic number :


n
X 1
Hn,k = k
. (2.47)
j=1
j

These numbers appear


  very often in analysis, so it is good to know about them.
Here we express nk in terms of generalized harmonic numbers. Actually, it
can already be seen by the above transformation of the horizontal generating
function that it is enough to extract the corresponding power of x in

!
X (−1)k+1 k
n! exp x Hn,k
k
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.

2.8 The Lah numbers


As we noted before, one can expand the rising factorial with respect to the
falling factorial and vice versa by some connecting coefficients. In this
 section
we are going to determine the connecting coefficients, denoted by nk , such
that
n  
X n k
xn = x , (2.48)
k
k=0

and
n  
n
X n k
x = x . (2.49)
k
k=0

These numbers are called Lah numbers 19 . The notation nk is a Karamata-


 

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

in [350], see also [351].


20 Knuth and his co-authors propagated the notations of Karamata in the famous book

Concrete Mathematics [262]. Therefore, such notations are called Karamata-Knuth.


Generating functions 65

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

This is a famous theorem of Vandermonde 21 , called Vandermonde convolu-


tion 22 . The proof of (2.52)
 is as follows. Fix a set of x women and y men.
The left-hand side x+y n gives the number of ways we can choose n person
from the whole group of x + y members. This selection can be performed by
selecting k women from x and n − k men from y, where k is between 0 and n.
For a fixed k this offers   
x y
k n−k
possibilities. Summing over k, we get the Vandermonde convolution formula.
Having (2.50) in our hand, we continue with the determination of the Lah
numbers. Note that
xn = (x + n − 1)n .
On the right-hand side, we apply (2.50):
n  
n
X n
(x + n − 1) = xk (n − 1)n−k .
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

21 Alexandre-Théophile Vandermonde (1735-1796), French mathematician, violin player

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

we get a simple expression for nk :


 

   
n n
= (n − 1)n−k .
k k

This can be rewritten:


   
n n−k n
(n − 1) = (n − 1)(n − 2) · · · (n − 1 − (n + k) + 1) =
k k
 
n
(n − 1)(n − 2) · · · k.
k
(Remember that 0 ≤ k ≤ n.) One more step to arrive at a compact expression:
     
n n n! n − 1
= (n − 1)(n − 2) · · · k = . (2.53)
k k k! k − 1
n
Finally, since (−1)n (−x)n = xn , k can be expressed easily:
   
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.

2.8.1 The combinatorial meaning of the Lah numbers

Ordered lists

The Stirling numbers of both kinds are connecting coefficients of certain


polynomials, and, in the same time they have a well-defined combinatorial
meaning. This – and
 the presence of the binomial coefficients in (2.53) –
suggest that the nk Lah numbers also have some combinatorial interpretation.
We dedicate this section to explain this meaning in more details. We begin
with a definition.

Definition 2.8.1. Let a k-partition of an n-set be given. If we take into ac-


count the order of the elements in the individual blocks, we say that this par-
tition is an ordered list.

For example, in the usual sense, the following 2-partitions of {1, 2, 3, 4, 5}


are identical:
1, 2|3, 4, 5 and 2, 1|4, 5, 3
Generating functions 67

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).

Two identities for the Lah numbers

The basic recursion follows from the above combinatorial definition:


     
n+1 n n
= (n + k) + . (2.54)
k k k−1

An ordered list of n + 1 elements with k blocks can be constructed from an


ordered list of n elements. (1) The last element can form a singleton n and
 the
remaining n elements form an ordered list with (k − 1)-blocks in k−1 ways.
(2) If the last element is not in a singleton, then first we form an ordered list
of k blocks on the n other elements in nk ways and then we insert the last
 

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

The construction of an ordered list with k blocks on n elements can be done


in a different way than above, so that we arrive at (2.55). If we put the n
elements into a permutation with j cycles and then we group these cycles into
k groups, we get an ordered list with k blocks. Summing over j we get the
formula.
68 Combinatorics and Number Theory of Counting Sequences

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 ,

which is the matricial equivalent of (2.55).


More information on the linear algebraic properties of the Lah matrices is
accessible in [557].

2.9 The total number of ordered lists and the horizontal


sum of the Lah numbers
Once we have the Lah number triangle (see also the table at the end of
the book), we can form the horizontal sum of these numbers as we did for the
Stirlings to obtain n! and Bn .

Definition 2.9.1. Let


n  
X n
Ln = (n = 0, 1, 2, . . . ). (2.56)
k
k=0

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

To form a partition counted by Ln+1 we can choose k elements to put in the


23 As far as we know, these numbers do not have widely accepted names.
Generating functions 69

ordered block of n + 1 ( nk choices), then we order this block in (k + 1)! ways.




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

This result was proved recently in [472].

A Spivey-like formula for Ln

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 sets of lists of n + m elements.


 We can construct any of these as follows:
we pick k element from n in nk ways and put these into an ordered  list:
 Lk
possibilities. From the other m elements, we form j ordered lists in mj ways.
However, there are n − k elements already out of the ordered lists. We put
these among the m elements. The first element, say a, can go to m+j positions:
among the m elements, there are m − 1 positions but we must be careful:
there are two positions between two elements if they separate blocks. Among
j blocks there are j−1 places. Hence, up to now, we have m−1+j−1 = m+j−2
places. In addition, there are two more places at the beginning of the list and
at the end. Thus, in total, there are m + j − 2 + 2 = m + j positions, as we
stated.
Then the next element can be placed into m + j + 1 positions, because the
former element a has created a new space. And so on. Finally, if we would like
to put down the last (n − k)th element, we have (m + j)(m + j + 1) · · · (m +
j + n − k − 1) possibilities.
Summing over the possible values of k and j, we are done.
Identity (2.57) was given in a slightly different form by Xu and Cen [605,
606].

2.10 The Hankel transform


The so-called Hankel transform of sequences leads to a nice theory. As
this transform is based on generating functions, and is related to the binomial
transform, we include it in this chapter. The content of this section is not
indispensable to understand the later chapters.
The Hankel24 -matrices of the sequence an are
 
a0 a1 a2 . . . an
 a1 a2 a3 · · · an 
Hn =  .
 
 ..


an an+1 an+2 ··· a2n
(n + 1) × (n + 1) matrices (n = 0, 1, 2, . . . ).
The indices of the rows and columns start from zero; hence we get the
simple correspondence:
(Hn )i,j = ai+j .
For instance, the H2 Hankel matrix of an = n is
 
0 1 2
H2 = 1 2 3 .
2 3 4
24 Hermann Hankel (1839-1873), German mathematician.
Generating functions 71

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.

2.10.1 The Euler-Seidel matrices


An interesting thing happens when we multiply a Hankel matrix with a
Pascal matrix (see (2.13)):
 0  
0 0 0 0  
 1 1 a 0 a 1 a 2 . . . a n
0 0  
 02 1
2 2
  a1 a2 a3 · · · an+1  
[Bn Hn ]i,j =  0

1 2 0  .
 
.

 =

 . . . . .
. . .

. . . .
   
 . . . .  
n
 n n an an+1 an+2 · · · a2n
0 1 · · · n i,j

i  
X i
al+j .
l
l=0

For a given sequence the Bn Hn matrices are called Euler-Seidel25 matrices.


Thus, the (i, j)-th element of the n × n Euler-Seidel matrix is
i  
X i
al+j .
l
l=0

Note that in the first column (j = 0) the binomial transform of an appears.


The Euler-Seidel matrices are very useful proving new identities. We have
already seen one example when we talked about the Euler formula (2.14).

The invariance of the Hankel transform under the binomial trans-


formation

There is an important fact we need later: the Hankel transform is invariant


under the binomial transform. In other words, a sequence and its binomial
transform have the same Hankel determinant sequence26 .
25 Philipp Ludwig von Seidel (1821-1896), German mathematician who also worked on

optical lenses and astronomy.


26 This is a theorem of J. W. Layman [358] from 2001.
72 Combinatorics and Number Theory of Counting Sequences

Taking Bn Hn BnT , where, as before, T stands for the transpose, we have


that
 0   0
 1
 2
 n 

0 0 0 0   0 0 0 ··· 0
1 1 a0 a1 ... an  1 2 n 
 0 0  0 ···
 02 1
2 2
 a 1 a2 · ·· an+1  1 1
2
1 
n 

 0 1 2 0  
 .. .
 0 0 2 ··· 2 .
 . .. .. ..  . .. 
.. .. .. .. 
 ..

. . .   . . . ··· . 
n
 n n an an+1 · · · a2n n
0 1 ··· n 0 0 ··· ··· n

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

It often happens that a sequence we are studying is the binomial transform


or the more general transform (2.58) of a simpler sequence. If we can determine
the Hankel transform of this simpler sequence, we know the Hankel transform
of our sequence, too. An example of this observation is the sequence of r-Bell
polynomials in Section 8.3.
In the following two subsections, we show two tools, a simpler and a more
advanced one, to find the Hankel transform.

2.10.2 A generating function tool to calculate the Hankel


transform
Let an be a sequence with exponential generating function f (x). If there
is a sequence fk (x) of functions and a dk sequence of numbers such that
(n)
fk (0) = 0 if k > n,
and

X
dk fk (x)fk (y) = f (x + y), (2.59)
k=0
then the Hankel determinants of an are determined as
n
(k)
Y
hn = dk [fk (0)]2 . (2.60)
k=0
(k)
Here fk (0) is the kth derivative of fk at x = 0.

The proof of (2.60)

The proof of this theorem is not hard27 . First we have that


∞ ∞ n  
!
X (x + y)n X an X n k n−k
f (x + y) = an = x y =
n=0
n! n=0
n! k
k=0
∞ ∞ X ∞
n
!
X X xk y n−k X xn y m
an = an+m .
n=0
k! (n − k)! n=0 m=0
n! m!
k=0
On the other hand, by (2.9):
∞ (n)
X fk (0) n
fk (x) = x .
n=0
n!
Hence,
∞ ∞ X

X X (n) (m) xn y m
dk fk (x)fk (y) = dk fk (0)fk (0) .
n! m!
k=0 k=0 n,m=0

27 The statement, together with the proof can be found in [311].


74 Combinatorics and Number Theory of Counting Sequences

By our assumptions, this must be equal to f (x+y). Comparing the coefficients


we have that

(n) (m)
X
an+m = dk fk (0)fk (0).
k=0

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

The Hankel determinants (which now depend on x) take the form:


n
Y
hn (x) = dk (x)[∂xk pk (x)]2 .
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

f (x, y) = exp(x(ey − 1)),

and (2.61) becomes:


∞ ∞
X X y z
−1) −1)
dk (x)∂xk f (x, y)∂xk f (x, z) = dk (x)ex(e (ey − 1)k ex(e (ez − 1)k =
k=0 k=0

28 This decomposition is called LDLT decomposition in numerical mathematics.


Generating functions 75

y
−1) x(ez −1)
X
ex(e e dk (x)[ey+z − ey − ez + 1]k
k=0

This must be equal to


y+z
−1)
f (x, y + z) = ex(e .

Dividing by the exponential factor in the penultimate line, we get



y+z
−1)−x(ey −1)−x(ez −1) y+z
−ey −ez +1)
X
dk (x)[ey+z −ey −ez +1]k = ex(e = ex(e .
k=0

This equality satisfies if we choose


xn
dk (x) = .
n!
The Hankel determinants thus become
n n n n
Y xk 2 Y k Y Y
hn (x) = k! = x k! = x0+1+2+···+n k! = xn(n+1)/2 k!.
k!
k=0 k=0 k=0 k=0

Setting x = 1, we get a beautiful result for the Bell numbers:


 
B0 B1 ... Bn
 B1 B2 · · · Bn+1  n
 Y
det  . = k!. (2.62)

 .. .. 
. 
k=0
Bn Bn+1 ··· B2n

The sequence on the right-hand side is called superfactorial 29 . This result


appears in Aigner [12], in [243, p. 35], and the polynomial form
 
B0 (x) B1 (x) ... Bn (x)
 B1 (x) B2 (x) · · · Bn+1 (x) n
(n+1
2 )
Y
det  . = x k!.
 
 .. .. 
. 
k=0
Bn (x) Bn+1 (x) · · · B2n (x)

was proven in [477]. See also [211], where a combinatorial connection between
the Hankel determinants and specific permutation-partition pairs is given.

2.10.3 Another tool to calculate the Hankel transform


involving orthogonal polynomials
We show another useful but more advanced way to calculate Hankel de-
terminants. This approach uses the theory of orthogonal functions – a theory
29 The superfactorials are the special values of the Barnes G function. If we take the kth

powers of k and not its factorials, we get the hyperfactorial function.


76 Combinatorics and Number Theory of Counting Sequences

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

with some non-zero sequence cn . Favard32 proved [226] that a polynomial


sequence (pn (x))n≥0 is orthogonal if and only if for all n ≥ 1 these polynomials
satisfy a second order recurrence
pn+1 (x) = (an + x)pn (x) − bn pn−1 (x) (2.65)
with some sequences (an )n≥1 and (bn )n≥1 , with the initial condition p0 (x) = 1
and p1 (x) = x + a0 . (See also [579, Theorem 50.1].)
30 The general theory of continued fractions connected to generating functions can be

found in Chapter XI of [579].


31 Roughly speaking, a linear functional map functions to numbers such that L(cf (x)) =

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

pn+1 (x) = (x − (2n + 1))pn (x) − n2 pn−1 (x),

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)!

Nice result, is this not it?


What about the continued fraction expansion (2.63)? It is obvious that
the sum
X∞
n!xn
n=0

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

4. To which sequence does the generating function cos(x) belong?


5. To which sequence does the exponential generating functions − ln(1−x)
and − ln(1 + x) belong?
6. Let us suppose that the generating function of an is f (x). What is the
an
generating function of n+2 ?
7. If f (x) is the generating function of an , then for which sequence does
the generating function f (x2 ) belong?
8. Verify the
∞   n  k
X n x 1 1
= ln
n=0
k n! k! 1−x
n
generating function identity by using the standard recursion for k .

34 Fibonacci (≈1170-≈1250), Leonardo de Pisa or Leonardo Pisano, Italian mathemati-

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

(The definition of the generalized harmonic numbers is on p. 63.)


10. Show without referring to the Stirling numbers that
n−1
n! 2 n! X Hk−1
(Hn − Hn,2 ) =
2 3 k(n − k)
k=1

11. Calculate 42 by taking the derivative of the exponential generating




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!

This is a famous result of D. André [26], and it is actually very sim-


ple once we have the recurrence (1.16). This recurrence, together with
the initial condition E0 = 1, is equivalent to the differential equation
2f ′ (x) = f 2 (x) + 1 with f (0) = 1. The solution of this equation with
the said initial value is sec x + tan x.) Note that sec x is an even func-
tion, and tan x is an odd function. So the even-indexed Euler numbers
are determined only by sec x, and the odd-indexed Euler numbers occur
only in tan x. By this very reason, sometimes the numbers E2n are called
secant numbers and E2n+1 are called tangent numbers.
13. Show by explicit calculation that the 3 × 3 Stirling matrices are inverses
of each other, as it follows from the orthogonality.
14. Write (1.5) into matrix form.
15. Use the (2.14) Euler formula to obtain (1.5).
16. Express the determinant of Bn in terms of the superfactorial.
17. Verify (2.42) for the signed first kind Stirling numbers.
18. Calculate
n  
X
k n
(−1) .
k
k=0
Generating functions 81

19. Let an be a sequence such that



X xn
an = f (x),
n=0
n!

and let bn be the Stirling transform of an . Show that the exponen-


tial generating function of bn is f (ex − 1). (For more information on
transformation sequences, see the paper of M. Bernstein, N. J. A. Sloane,
[72].)
20. Show that
n  
X n (−1)k
=0 (n ≥ 2).
k (k − 1)!
k=1

21. Let the pattern (j1 , j2 , . . . , j8 ) = (0, 2, 2, 0, 0, 0, 0, 0) be given. How many


permutations are there on 8 elements with this given pattern?
22. Solve the previous exercise for partitions.
23. Prove that the exponential generating function of the xn rising factorial
is
∞ x
yn

X 1
xn = .
n=0
n! 1−y
(Hint: apply the sum
∞ n  
!
X X n k yn
x .)
n=0
k n!
k=0

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

(Apply the xn = (−1)n (−x)n transformation both to x and y, then use


(2.50).)
27. Calculate the Hankel transform of an = 1.
82 Combinatorics and Number Theory of Counting Sequences

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

29. Let Ln be defined as in (2.56). Prove that the exponential generating


function of Ln is

X xn x
Ln = e 1−x .
n=0
n!

30. Prove the following recurrence for Ln :

Ln = (2n − 1)Ln−1 − (n − 1)(n − 2)Ln−2 (n ≥ 2)

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

This was later generalized and extended in [324].


2. P. Flajolet [234] established continued fraction representations of sev-
eral generating functions of combinatorial numbers – including the Bell
numbers, Stirling numbers of the second kind, factorials, derangement
numbers, involutions, etc. – combinatorially. These are identical to those
continued fractions we can get by using the orthogonal polynomial ap-
proach (with our an and bn sequences). His approach is purely combi-
natorial. See the work of P. Barry [48] for some more examples in the
intersection of the theory of counting sequences, orthogonal polynomials,
and Hankel determinants.
3. Liu and Ma [379] studied the continued fraction representation of the
Bell polynomials and some of their generalizations like the ordered Bell
polynomials, the r-Bell polynomials (we will discuss these two polyno-
mial sequences in Chapters 6 and 8), the Dowling polynomials, among
others.
4. M. Merca [405] discovered the following determinantal identities
  k  
i+k X
n j−1 1 k
det = k! (−1) n
,
j+1 1≤i,j≤n j=1
j j
  n+1  
i+k k−1
X
j−1 1 n+1
det = (n + 1)! (−1) .
j+1 1≤i,j≤n j=1
j k−1 j

5. The Hankel transform of the horizontal sum of Lah numbers is not


presented in the On-Line Encyclopedia of Integer Sequences (OEIS).
It would therefore be interesting to do a study on this problem. More
generally, we can define the Lah polynomials
n  
X n
Ln (x) = xk ,
k
k=0

and then ask for the Hankel determinants of this sequence. The first
84 Combinatorics and Number Theory of Counting Sequences

Hankel determinants are

h1 (x) = 1
h2 (x) = 2x
h3 (x) = 4x2 (3 + 4x)
h4 (x) = 48x3 16x3 + 48x2 + 45x + 12


h5 (x) = 4608x4 (90 + 648x + 1710x2 + 2175x3 + 1440x4 + 480x5 + 64x6 )

Can one give a description of the coefficient of these polynomials?


(The Ln (x) Lah polynomials will reappear in Section 4.4. They can be
related, via their generating function, to the so-called Laguerre polyno-
mials. For Hankel determinantal results for these and other orthogonal
polynomials, see, for example, the older [321], and the newer [296].)
6. Interestingly, the Lah numbers appear in the expression of the higher
order derivatives of e1/x [183]. For other, combinatorial (concretely Dyck
path) interpretations for the Lah numbers, see [109].
7. We defined the Fibonacci numbers among the exercises. A similar se-
quence, the Lucas sequence can be defined as follows: Ln = Ln−1 +Ln−2
(this is exactly the same recurrence as for the Fibonacci numbers), but
the initial values are L0 = 2, L1 = 1. It can be shown [377] that
n    
X Lv1 · · · Lvk k! X j−k n j j
= (−1) (n − j)! .
v1 · · · vk n! j n−j k
v1 ,...,vk ≥1 j=k
v1 +···+vk =n

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

3.1 Basic properties of the Bell polynomials


3.1.1 A recursion
The Bell polynomials have many nice and useful properties that are rela-
tively easy to prove. Moreover, we can introduce and practice many important
techniques which we can apply later in more general situations. This chap-
ter is not only on the Bn (x) polynomials, but it contains results regarding a
generalization of Bn (x) such that we meet some new counting sequences, too.
Let us recall the definition of the Bell polynomials:
n  
X n k
Bn (x) = x . (3.1)
k
k=0

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

Now apply the recursion of the nk numbers:




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.

3.1.2 The exponential generating function


If we fix an x, then Bn (x) will be a real sequence for which the genera-
ting function is determinable. The resulting function will, of course, depend
on x, so it will be a two-variable generating function or bivariate generating
function.
From (3.1) we readily get the exponential generating function after multi-
n
plying by yn! and summing over n (in (3.1) the sum can be extended to infinity
as if k > n the terms are simply zero):
∞ ∞ ∞  
!
X yn X X n k yn
Bn (x) = x
n=0
n! n=0 k=0
k n!
∞ ∞   n ∞
!
X
k
X n y X (ey − 1)k
= x = xk
n=0
k n! k!
k=0 k=0
The Bell polynomials 87

X [x(ey − 1)]k y
−1)
= = ex(e .
k!
k=0

That is, the exponential generating function of the Bell polynomials is



X yn y
Bn (x) = ex(e −1) . (3.3)
n=0
n!

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!

The right-hand side is a product of two exponential generating functions,


one of them belongs to Bn (x), while the other belongs to Bn (z). Hence, the
exponential generating function of the product – by (2.7) – is
∞ n  
!
n
y y X y X n
ex(e −1) ez(e −1) = Bk (x)Bn−k (z) .
n=0
n! k
k=0

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!

from which the generalization of (1.1) already follows:


n  
X n
Bn+1 (x) = x Bk (x).
k
k=0

The ordinary generating function of the Bell polynomials is a bit more


complicated to deduce. We return to this problem later in a more general
situation (see Section 8.4).
88 Combinatorics and Number Theory of Counting Sequences

3.2 About the zeros of the Bell polynomials


In the following subsections, we present some information about the zeros
of the Bell polynomials. Some of them are quite remarkable.

3.2.1 The real zero property


We are going to prove that the Bell polynomials have only real zeros. The
importance of this fact will be revealed in subsequent sections.
The recursion

Bn (x) = x(Bn−1 (x) + Bn−1 (x))
will be extremely useful to prove our claim. A simple corollary of this recursion
is the equality
Bn (x) = e−x x(ex Bn−1 (x))′ . (3.4)
To see that this equality indeed holds, take the derivative on the right-hand
side and note that the exponentials cancel out.
We are going to prove the real zero property by induction. B1 (x) = x and
this polynomial satisfies our claim. Now let us suppose that all the zeros of
Bn−1 (x) are real. Then the function ex Bn−1 (x) has the same set of zeros,
because the exponential function is always positive. Hence, the zeros of the
derivatives of ex Bn−1 (x) are among the zeros of ex Bn−1 (x) by Rolle’s1 the-
orem2 . Since Bn−1 (x) has n − 1 zeros, from which n − 2 is strictly negative
and one is x = 0, the derivative must have n − 2 negative zeros (left to 0
but right to the greatest negative zero, and among the negative zeros). On
the other hand, ex is asymptotically 0 in −∞; therefore (ex Bn−1 (x))′ has an
additional zero between −∞ and the leftmost zero of Bn−1 (x). We have found
n − 2 + 1 = n − 1 negative zeros on the right-hand side of (3.4). There is one
zero on the right by the factor x: x = 0. Altogether we have found n − 1
negative zeros and x = 0. This is n in total so we have found that all the zeros
of Bn (x) are real and non-positive.
Reading the above proof carefully, we see that we proved more of what we
actually stated: the zeros of Bn (x) are not only negative (except x = 0), but
the negative zeros are simple and located among the zeros of Bn−1 (x) except
the leftmost one: this is on the left-hand side of the leftmost zero of Bn−1 (x).
This is an interesting and rather common phenomenon among combinatorially
relevant polynomials, and it is called interlacing property.
The real-zero property of the Bell polynomials was first noted by Harper
in 1967 [279].
1 Michel
Rolle (1652-1719), French mathematician.
2 This
theorem roughly says that if a differentiable function has zeros in two different
points x1 and x2 , then it surely has a stationary point between x1 and x2 where the
derivative is zero. This theorem was proven by Rolle in 1691; however, it was known earlier
by the Indian mathematician Bhāshkara (1114-1185).
The Bell polynomials 89

3.2.2 The sum and product of the zeros of Bn (x)


We know from the last section that we can write
(n) (n)
Bn (x) = (x − t1 )(x − t2 ) · · · (x − t(n)
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

and (taking Bn (x)/x instead)


n
(n)
t2 · · · t(n)
n = − n1 = −1 (n ≥ 2).
n

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

3.2.3 The irreducibility of Bn (x)


Whether the Bell polynomials ever have rational zeros (n ≥ 3) other than
(n)
the trivial t1 = 0 is unknown. If a non-constant polynomial has no rational
zeros, we say that it is irreducible over the rationals.
In 1983 J. W. Layman and C. L. Prather [360] gave five different statements
equivalent to the irreducibility of the Bell polynomials Bn (x)/x. One of these
is the non-vanishing property of the Bell polynomials at x = −1. This is
actually easy to see once we recall the rational root theorem [574, p. 109].
The rational root theorem says that if a polynomial
p(x) = an xn + an−1 xn−1 + · · · + a1 x + a0
has a rational zero x∗ , i.e., it is of the form x∗ = ab (where a and b have no
divisors in common), then a must divide a0 , and b must divide an .
Since the constant coefficient and the highest order coefficient in Bn (x)/x
are both one, the only possible rational zeros are ±1. Of course, Bn (x) > 0
if x > 0, so the only possible rational root is minus one. Thus, we arrive at
the following statement: Bn (x)/x is irreducible over the rationals if and only
if Bn (−1) ̸= 0. Since B2 (x) = 1 + x, we have that B2 (−1) = 0, but this seems
to be the only one case. In [360] this was checked up to n ≤ 110 (up to 900
in [359]), and we checked by computer up to n = 10 000 but none of Bn (−1)
numbers vanishes (n ̸= 2). Layman further studied the arithmetical properties
of the Bn (−1) numbers [359].
After these initial studies, many achievements have been made. It is known
now, due to T. Amdeberhan, V. De Angelis, and V. H. Moll [18], that there
is at most one n > 2 such that Bn (−1) = 0. See [29] for an “economical
account” of the proof, and for historical remarks. The paper [589] contains
many additional arithmetical properties of this sequence. The conjecture that
Bn (−1) ̸= 0 for all n > 2 is attributed to H. Wilf, and it is often referred to
as Wilf ’s conjecture. The source of this attribution is seemingly the paper of
Y. Yang [608]. In this paper and also in [572], a detailed asymptotic analysis
is carried out for this sequence. Among others, it is known that
log |Bn (−1)|
lim sup = 1.
n→∞ n log n

3.2.4 The density of the zeros of Bn (x)


Yet another interesting topic is the distribution of the zeros of the Bell
polynomials. One question is the following: knowing that the leftmost zero
grows with n (see Section 3.2.1), how rapidly does this leftmost zero grow?
We study this question later in Section 7.6.5.
Another question is the distribution of the all zeros of all the Bell polyno-
mials on the negative real line. This question is hard, like the irreducibility,
but in this case a very nice result is known. The statement is described as
follows.
The Bell polynomials 91

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

Let f be a function, so that we can take its successive derivatives at any


real or complex point except maybe zero. Then
n  
X n (k) iz ikz
(f (eiz ))(n) = in f (e )e .
k
k=0

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

We proceed by induction. Supposing that the statement holds up to n − 1, we


prove it for n:
" n−1
#′
h i′ X n − 1
(f (eiz ))(n) = (f (eiz ))(n−1) = in−1 f (k) (eiz )eikz =
k
k=0

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

the statement is proved.


92 Combinatorics and Number Theory of Counting Sequences

Setting f = exp, we know that exp(k) = exp, and thus


(n) n  
 iz iz X n iz
ee = in ee (eiz )k = in ee Bn (eiz ). (3.8)
k
k=0

This derivative formula is interesting in itself, let alone its consequence:


iz
the zeros of the derivatives of the double exponential ee are the same as the
zeros of the Bell polynomials composed by the exponential function (indeed,
iz
ee has no zeros at all on the right-hand side, so all the vanishing points come
from the zeros of Bn (eiz )).

iz
The zeros of the derivatives of ee

These points are determined by writing


(n)
eiz = tk
(n)
for appropriate k and n. Taking logarithm carefully (tk is a negative real
number, so we must use the complex logarithm with complex branches) we
get that
(n)
z = −i log |tk | + (2l + 1)π (l = 0, ±1, ±2, . . . ). (3.9)
Let us introduce now a notion which originates from the work of Pólya5
[468]. The final set of a (complex, entire6 ) function f is constituted by those
points z which, in any neighbor of themselves contain zeros of infinitely many
derivatives of f .
It is, in general, very hard to determine the final set of an entire function.
A result from 1980 [210] is the following: the final set of the entire function
z
e−e consists of the horizontal lines y = 2lπ (l runs through the integers).
iz iz
One can see that ee = e−i(z+π) , thus the final set of ee is the collection of
the vertical lines with abscissa (2l + 1)π. Now recall (3.9). We see that the
abscissas agree, so the logarithms of the absolute values of the elements of T
must be dense on the real line. Since the logarithm is a continuous function,
it must be true that T is dense in ] − ∞, 0[.

3.2.5 Summation relations for the zeros of Bn (x)


Although the zeros of the Bell polynomials are hard to determine one by
one7 , several interesting summation relations for the zeros can be found.
5 György Pólya (1887-1985), Hungarian mathematician. He worked on many branches

of mathematics, most notably in function theory, probability, combinatorics, and number


theory.
6 A function mapping the complex plane to itself is entire if its Taylor series has infinite

radius of convergence.
7 Numerical approximations can be applied, however.
The Bell polynomials 93

The sum of the reciprocals of the zeros

We deduce the formulas in this section for general polynomials. Let

p(x) = an xn + an−1 xn−1 + · · · + a1 x + a0

be a polynomial, and let α1 , . . . , αn be its zeros (multiple zeros appear in the


list as many times as their multiplicity). Then it is possible to write pn (x) as

pn (x) = (α1 − x) · · · (α2 − x) · · · (αn − x) =


    
x x x
α1 α2 · · · αn 1 − 1− ··· 1 − .
α1 α2 αn
Let us denote the product of the zeros by α:

α = α1 α2 · · · αn .

(Remember that this product is easy to determine by (3.7).) Thus,


    
1 x x x
pn (x) = 1 − 1− ··· 1 − . (3.10)
α α1 α2 αn

The coefficient of x on the right-hand side is


1 1 1
− − − ··· − ,
α1 α2 αn
while on the left-hand side it is a1 /α. Thus,
n
X 1 a1
=− .
αk α
k=1

If we want to apply this to the Bell polynomials, we should be careful a bit,


because one zero of the Bell polynomials is α1 = 0. Therefore, in place of
Bn (x), we apply the above to Bn (x)/x, and we finally get that
n  
X 1 n
(n)
=− = 1 − 2n−1 .
2
k=2 tk

The quadratic sum of the reciprocals of the zeros

If we take (3.10) again and apply it for pn (−x), we get

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

Comparing the coefficients of x2 on both sides, we arrive at the nice quadratic


summation formula for the zeros of a polynomial:
n
X 1
= a21 − 2a2 a0 .
αk2
k=1

For the Bell polynomials (analyzing again Bn (x)/x)) this gives


n  2  
X 1 n n
(n) 2
= − 2 .
2 3
k=2 (tk )

The general power sum of the reciprocals of the zeros

Taking the logarithm of both sides of (3.10), we have


n n
p′n (x) X 1 X 1 1
− = = . (3.11)
pn (x) αk − x αk 1 − αxk
k=1 k=1
1
The innermost expression, 1− αx , is a geometric sum, and (supposing that
k
|x| < |αk | for all k) we have that
n ∞ ∞ n
p′n (x) X 1 X xl X
l
X 1
− = l
= x l+1
.
pn (x) αk α α
k=1 l=0 k l=0 k=1 k

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

(Here we used that Bn′ (1) = Bn+1 − Bn . See the Exercises.)


The Bell polynomials 95

3.3 Generalized Bell polynomials


Interestingly enough, there is a function which incorporates all of the num-
bers and polynomials we have studied so far and many others. It is worth to
study this function in more detail.

Definition 3.3.1. Let a sequence z1 , z2 , . . . be given. The function of in-


finitely many variables defined by the exponential generating function
∞ ∞
n
! " !#
X X
k yn X yn
Bn,k (z1 , z2 , . . . )x = exp x zn (3.13)
n=0
n! n=1
n!
k=0

is called generalized Bell polynomial.

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

3.4 Idempotent numbers and involutions


We introduce two more combinatorially interesting sequences which also
appear as particular cases of the generalized Bell polynomials.

Idempotent numbers

One can verify that


 
n n−k
Bn,k (1, 2, 3, . . . ) = k . (3.16)
k

These numbers will appear in the following combinatorial problem. Let ın 8 be


the nth idempotent number which gives that how many functions f are there
on an n element set (say, on {1, 2, . . . , n}) such that

f : {1, 2, . . . , n} → {1, 2, . . . , n}, and f (f (x)) = f (x) for any x.

We will prove that


n  
X n n−k
ın = k . (3.17)
k
k=1

Let us see in more detail what the assumption f (f (x)) = f (x) means. If

f (x) = y, then y = f (x) = f (f (x)) = f (y).

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

The proof of (3.16) is left to the reader.

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

so we now determine the exponential generating function of In . Invoking the


above recursion,

X xn x2
In = ex+ 2 . (3.19)
n=0
n!
From this, it is already obvious how the generalized Bell polynomials cover
the involutions:
Xn
In = Bn,k (1, 1, 0, . . . ). (3.20)
k=0

Another proof of (3.18)

It is known that the set of permutations on n elements can be identified


by those n × n matrices which have exactly one 1 in each row and column,
and zeros elsewhere. In fact, such matrices are called permutation matrices.
For instance, the permutation
 
1 2 3 4 5 6
3 5 1 6 4 2

corresponds to the matrix


 
0 0 1 0 0 0
0 0 0 0 1 0
 
1 0 0 0 0 0
 .
0 0 0 0 0 1
 
0 0 0 1 0 0
0 1 0 0 0 0

One can try to act this matrix on a vector a1 a2 a3 a4 a5 a6 to see
that the resulting vector is a3 a5 a1 a6 a4 a2 .
To see the validity of (3.18), we first observe that the inverse of a permu-
tation matrix is its transpose (this corresponds to the fact that the inverse of
a permutation is the permutation in which we swap the first and second line,
and reorder the columns so that the first line elements are in increasing or-
der). Therefore, there are as many involutions as many self-adjoint matrices.
We proceed by induction. It is easy to see that the unique 1 ×  1 and 2 × 2
0 1
self-adjoint permutation matrices are the identity matrices and , re-
1 0
flecting the fact that I1 = 1 and I2 = 2. Now let n > 2. If 1 happens to be in
the top left corner, the (n − 1) × (n − 1) submatrix not including the first row
and column must be self-adjoint, and there are In−1 of these by the induction
hypothesis. Now let us suppose that 1 appears somewhere in the first row
but not in the first column. By symmetry, this 1 appears in the transposed
position, too, so after deleting the corresponding rows and columns we have
The Bell polynomials 99

an (n − 2) × (n − 2) matrix which must be self-adjoint; there are In−2 of these.


Since the 1 in the first row can appear in n − 1 positions, we have that in this
case the total number of matrices is (n − 1)In−2 . Summing the two disjoint
cases, we are done. This proof comes from [151].

3.5 A summation formula for the Bell polynomials


In this short section, we prove a summation formula for the Bell polyno-
mials which we will use later. By (3.13),


! ∞ ∞
!k
X ym X xk X ym
exp x zm = zm .
m=1
m! k! m=1
m!
k=0

The polynomial theorem helps to expand the inner power:


 
∞ j  j
xk  X z1 y 1 1 z2 y 2 2

X k!
···.
k! j1 !j2 ! · · · 1! 2!
k=0 j1 +j2 +···=k

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

This is nothing else but Bn,k (z1 , z2 , . . . ):

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).

3.6 The Faà di Bruno formula


The generalized Bell polynomials have applications outside of combina-
torics. Now we show such an application.
100 Combinatorics and Number Theory of Counting Sequences

If we have two exponential generating functions corresponding to an and


bn (we suppose that b0 = 0),
∞ ∞
X xn X xn
f (x) = an , g(x) = bn ,
n=0
n! n=1
n!

then it is interesting to ask what is the exponential generating function of


f (g(x)).
Let us denote f (g(x)) by h(x) and its coefficients by cn . Then
∞ ∞
X g(x)k X xn
f (g(x)) = ak = h(x) = cn .
k! n=0
n!
k=0

Applying the polynomial theorem

∞ ∞ ∞
!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

By our assumption this must be equal to h(x); therefore, the coefficients of


xn must be equal to cn!n for all k. This holds only if j1 + 2j2 + · · · = n, that is,
n  j1  j2
X X n! b1 b2
cn = ak ··· .
j1 !j2 ! · · · 1! 2!
k=1 j1 +j2 +···=k
j1 +2j2 +···=n

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

This is the formula of Faà di Bruno9 .


Faà di Bruno’s formula tells us how to calculate the coefficients in the
composition of two functions: first, put the coefficients of the inner function
(here g(x)) into the generalized Bell polynomial with parameters n, k; then
multiply this with the kth coefficient ak of the outer function (here f (x));
finally sum on k = 1, 2, . . . , n.

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

Hint: use the (3.2) recursion for the Bell polynomials.


4. The previous exercise can be phrased in terms of the Bell polynomials
and their derivatives:

Bn′ (1) = Bn+1 − Bn ,


Bn′′ (1) = Bn+2 − 3Bn+1 + Bn .

Prove these statements.


5. Let ξ be a random variable taking on the values k = 1, 2, . . . , n; such
that P (ξ = k) is the probability that a randomly and uniformly chosen
partition on n elements contain exactly k blocks. Determine the expected
value and variance of ξ.
6. Give a proof for the general derivation formula for the Bell polynomials:
n   
X n i
Bn(k) (x) = k! Bn−i (x).
i k
i=k

(Hint: The exponential generating function of the Bn (x) polynomials


y (k)
is ex(e −1) , whence the exponential generating function of Bn (x) is
k y

∂xk
ex(e −1) , which has a simple form. Then use (2.19).)
7. Prove the (3.2) recursion by combinatorial means. Hint: fix x to be a
positive
n k integer and consider it as a number of colors. Then the term
k x is the number of partitions of n elements into k blocks such that
each block is colored with one of the x colors independently.
102 Combinatorics and Number Theory of Counting Sequences

8. Calculate the first five idempotent numbers.


9. Show that the exponential generating function of the idempotent num-
bers is

X xn x
ın = exe .
n=0
n!

10. Verify the following representation of the ex exponential function:



X W n (x)
ex = ın .
n=0
n!

Here W (x) is the Lambert W function, see on p. 110.


11. Show that
∞ ∞
X X xn
ın xn = .
n=0 n=0
(1 − nx)n+1
(This example is taken from the On-Line Encyclopedia of Integer Se-
quences (OEIS) and was given by Vladeta Jovović. See http://oeis.org/
A000248.)
12. Show that
n  
X n−1
ın = kın−k .
k−1
k=1
(This example is taken from The On-Line Encyclopedia of Integer Se-
quences (OEIS) and was given by James East. See http://oeis.org/
A000248.)
13. What is the value of Bn,k (1, 0, 0, . . . )?
14. Prove that the nk Lah numbers (see (2.53)) belong to the generalized
 

Bell polynomial class with arguments 1!, 2!, 3!, . . . :


 
n
= Bn,k (1!, 2!, 3!, . . . ).
k

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!

Here In (y) can be considered as the involution polynomial.)


The Bell polynomials 103

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

4.1 “Global behavior” of combinatorial sequences


It is often useful and interesting to know how a combinatorial sequence
looks like “globally.” How rapidly does it grow/decrease? Can we find simple
uniform bounds for it? Where are its maxima and minima? The first two of
these questions will be studied in Chapter 7. Regarding the third question, it
turns out that many two-parameter counting sequences grow, reach an index,
then decrease, so the localization of the maxima is a well-motivated question.
The most simple example is of the Pascal triangle. We fix the upper param-
eter n and let the lower parameter k run over the set {1, . . . , n}. For instance,
if n = 6, then n1 , . . . , n6 is


6, 15, 20, 15, 6, 1.

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 :

120, 274, 225, 85, 15, 1,


6
and k :
1, 31, 90, 65, 15, 1;
both grow, reach a maximum, then decrease. Where are the maxima exactly
for all n? This is a very hard problem; even today we do not know the answer
in the second kind case. To be able to put our question in an exact form, we
need some definitions.

105
106 Combinatorics and Number Theory of Counting Sequences

4.2 Unimodality and log-concavity

Unimodality, log-concavity, peak and plateau

Definition 4.2.1. A not necessarily finite sequence a0 , a1 , . . . is unimodal1


if it increases, reaches its maximum (or maxima), and then decreases. More
precisely, a0 , a1 , . . . is unimodal if there is an index n and a non-negative
integer k such that
a0 ≤ a1 ≤ · · · ≤ an = an+1 = · · · = an+k ≥ an+k+1 ≥ · · ·
For example, the following sequences are all unimodal.
4, 4, 4, 4; 1, 2, 4, 8, 10, 10, 10, 10, 6, 3, −2; 7, 9, 9, 9; −3, −1, 5, 7, 6, 5, 4, 3.
If there are more than one maximal members in the unimodal sequence
(i.e., k ≥ 1), then these members are called plateau. If the maximal element
is unique (k = 0), it is called peak .
There is a stronger property than unimodality, called log-concavity.
Definition 4.2.2. The sequence a0 , a1 , . . . is log-concave if for all k ≥ 1
a2k ≥ ak−1 ak+1 (4.1)
If it is also true that
a2k > ak−1 ak+1 (4.2)
then the sequence is called strictly log-concave.
Before we proceed, we have to remark that we will be covering in this
chapter only the basics of the theory of log-concavity and log-convexity of
counting sequences. This particular area of combinatorics could itself fill a
book. Please see the Outlook at the end of this chapter for further references.

Where does the term “log-concavity” come?

In convex analysis, a positive function f is called log-concave if log f is


concave2 . This means that
log f (tx + (1 − t)y) ≥ t log f (x) + (1 − t) log f (y) (0 < t < 1).
1 This expression comes from probability theory and statistics. The noun mode in statis-

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

In particular, for t = 1/2:


 
x+y log f (x) + log f (y)
log f ≥ .
2 2
Taking exponential, and then taking square, we have the equivalent inequality
 
x+y
f2 ≥ f (x)f (y).
2
Now we see the similarity between this and (4.1).

Log-concavity is stronger than unimodality

Why log-concavity is stronger than unimodality? To see this, let us rewrite


(4.1):
ak ak+1
≥ .
ak−1 ak
ak
This means that the fraction ak−1 decreases as k grows. Therefore, it is first
greater than one, reaches or jumps over 1, and then it is smaller than one.
In these cases our sequence strictly grows, has a peak or a plateau and then
strictly decreases.
ak
If we have strict log-concavity, then the fraction ak−1 strictly decreases.
Hence, for at most one index k, the fraction can be 1. This yields that the
plateau of the sequence a0 , a1 , . . . contains maximum two members.

A way of testing log-concavity

There is a theorem which is often useful to check log-concavity. Since we


work with combinatorial sequences, we suppose that all the ak coefficients are
positive. The statement3 is as follows. If the polynomial

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.

The log-concavity of the binomial coefficients

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

The log-concavity of the Stirling numbers of the first kind


n
Turning to the Stirling numbers of the first kind, set ak = k . By (2.41)

n  
X n k
p(x) = x = x(x + 1)(x + 2) · · · (x + n − 1),
k
k=0

which has only


n real zeros. This results in the important observation that the
sequence nk k=0 is strictly log-concave: it strictly increases, has at most two
maxima and then strictly decreases. While (4.5) can easily
  be proven by simple
algebra without relying on (4.5), the log-concavity of nk cannot be proven in
a so simple way – the real zero test is a useful tool.
 n
In fact, more than log-concavity is true: nk k=0 has a unique peak if
n > 2 as was shown by Paul Erdős4 [218]. For a given n we denote the index
of this unique peak by Kn . It can be proven that
 
1
ln n − < Kn < [ln n] (n > 188),
2

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.

The proof of (4.4)


4 Paul Erdős (1913-1996), Hungarian mathematician. He was one of the most productive

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

q(x, y) = a0 y n + a1 xy n−1 + · · · + an−1 xn−1 y + an xn .

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).

4.3 Log-concavity of the Stirling numbers of the second


kind

The log-concavity via the Bell polynomials


110 Combinatorics and Number Theory of Counting Sequences

By the application of the theorem of the last section, it is not hard to


show that the second kind Stirling numbers form a log-concave sequence. To
do this, we only need to know that the
n  
X n k
Bn (x) = x
k
k=0

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].

Estimations for the maximizing index

There is a long standing conjecture about thesecond


n kind Stirling numbers:
it is conjectured to be true that the sequences nk k=0 always have a peak if
n > 2. This conjecture is verified up to n = 106 [119].
For the maximizing index (or indices), there are some estimations. For
example, it is true [592] that if the maximizing index is Kn , then
n n
< Kn < (n ≥ 13).
ln n ln n − ln ln n
It was shown by statistical tools [279] that for big n the maximizing index Kn
asymptotically equals lnnn . We shall prove this later in Section 7.3.
Another interesting fact about the index Kn was given by R. Canfield
and C. Pomerance [119] in 2002. Let W (n) be the (unique) solution of the
transcendental equation
xex = n. (4.6)
Then for sufficiently large n, and also for 2 ≤ n ≤ 1200

Kn ∈ {⌊eW (n) − 1⌋, ⌈eW (n) − 1⌉}

(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:

⌊eW (n) ⌋ − 2 ≤ Kn ≤ ⌊eW (n) ⌋ + 1.

A statement about the growth of Kn

We give a statement about Kn . Remember: we do not know whether Kn


is unique or not, so now we choose the smallest maximizing index to be Kn
(by log-concavity, there are at most two consecutive maxima). We state that

Kn+1 = Kn or Kn+1 = Kn + 1 (n ≥ 1).

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

Now let Kn + 2 ≤ k ≤ n + 1. Then we use


 the recursion (1.5). We rewrite
n n

this recursion by invoking the symmetry m = n−m :
  n+1
X  n n + 1 − m
n+1
= =
k m=1
m−1 k−1

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

Since Kn + 2 ≤ k it follows that Kn + 1 ≤ k − 1, and that the quantity in the


parenthesis is negative:
   
n+1 n+1
− < 0.
k k−1

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.

This, together with (4.7), is what we stated before.

4.4 The log-concavity of the Lah numbers


Thanks to the simple formula
   
n n! n − 1
= (4.8)
k k! k − 1

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

By (4.8), this inequality holds if and only if

k(k − 1)(n − k) < (k + 1)k(n − k + 1).


Unimodality, log-concavity, and log-convexity 113

And this inequality is clearly true.


We now locate the maxima of the Lah numbers. The relations
   
n n

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).

The zeros of the Lah polynomials

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

We proceed by induction. The L1 (x) = x and L2 (x) = x2 + 2x polynomi-


als certainly satisfy the statement. Let us suppose that we have proven the
statement up to a given n. Now invoke (4.9). By our assumption, the function
xn ex Ln (x) has a zero at x = 0 of multiplicity n + 1, and it has n − 1 negative

zeros as well. By Rolle’s theorem, we infer that (xn ex Ln (x)) has zeros among
the zeros of Ln (x) (there are n − 2), it has a zero between the rightmost neg-
ative zero of Ln (x) and x = 0. And, because ex tends to zero as x → −∞,
there must be another extremum of xn ex Ln (x) somewhere on the left-hand
side of the leftmost zero of Ln (x). This gives that the derivative has a zero in
this place. These are n negative real zeros. That Ln+1 has a zero at x = 0 also
can be seen: the already mentioned zero of multiplicity n + 1 of xn ex Ln (x) at
x = 0 reduces to a zero of multiplicity n after taking the derivative, and the
xn−1 in the denominator cancels out all of these except one. This will be the
zero of Ln+1 (x) at x = 0. The proof is complete.

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].

The proof of log-convexity of Bn

The proof we are going to show is due to Spivey [532].


The total number of blocks in all the partitions of an n-element set is
n  
X n
k .
k
k=1

In Exercise 3 of Chapter 3, the reader was asked to prove that


n  
X n
Sn := k = Bn+1 − Bn .
k
k=1
Unimodality, log-concavity, and log-convexity 115

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

Clearly, it is enough to show that An is an increasing sequence7 . Each


partition of {1, 2, . . . , n + 1} can be associated with a partition of {1, 2, . . . , n}
by removing the element n + 1 from the set containing it. Under the inverse
of this mapping, each partition of {1, 2, . . . , n} consisting of k sets maps to k
partitions consisting of k sets (if n + 1 is placed in an already-existing set) and
one partition consisting of k + 1 sets (if n + 1 is placed in a set by itself) out of
the partitions of {1, 2, . . . , n + 1}. Thus, partitions of {1, 2, . . . , n} with more
sets map to more partitions of {1, 2, . . . , n + 1} containing the same number
of sets as well as one partition with one more set. This raises the average
number of sets as we move from n elements to n + 1 elements, and thus An is
increasing. The proof is therefore done.
See other proofs in [36] (in this paper the Bell numbers agree with the
sequence b2 (n)), where it is also proved that
Bn−1 Bn+1 1
1≤ ≤1+ ,
Bn2 n
and even the fact that Bn /n! is log-concave (for this statement, see the below
subsection). Another (probabilistic and more general) proof is presented in
[92].

4.5.2 The Bender-Canfield theorem


There is a condition for real sequences which is often useful to prove log-
convexity or log-concavity. The statement is the following. Let 1, t1 , t2 , . . .
be a log-concave sequence of real numbers, and define an via the generating
function
∞  
X t1 1 t2 2 t3 3
an xn = exp x + x + x + ··· . (4.11)
n=0
1 2 3
Then an is log-concave and n!an is log-convex.
This theorem was proved in [59] by E. A. Bender and R. Canfield. Let us
see how to use it.
7A Bn+1 Bn 2 ≤
≥ An−1 if and only if
n Bn
−1 ≥ Bn−1
− 1, and this holds if and only if Bn
Bn−1 Bn+1 .
116 Combinatorics and Number Theory of Counting Sequences

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)!

the sequence ti is log-concave. Then the Bender-Canfield theorem results that


Bn /n! is log-concave, and n!Bn /n! = Bn is log-convex.

The log-convexity of the involutions

We met the sequence In counting involutions in Section 3.4. We saw that



X xn x2
In = ex+ 2 .
n=0
n!

Putting x1 = x2 = 1, and xi = 0 for i > 2 in (4.11), we see that we just


get the result for the involutions. Since this xi sequence is log-concave, In is
log-convex, while In /n! is log-concave.

The log-convexity of the Ln numbers

The horizontal sum Ln of the Lah numbers is studied in Section 2.9. In


Exercise 28 of Chapter 2, the reader was asked to prove that

X xn x
Ln = e 1−x .
n=0
n!

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

for all n ≥ 1. (See [423] for the details.)


2. According to the previous example, there is a number Ωn (the smallest
of maximum two indices) such that
n n
Ωn
n
 ≥ nk  (k = 1, . . . , n).
Ωn k

Determine the asymptotic behaviour of Ωn . Yous should get, as a first


approximation, that
n
Ωn ∼ .
log(n)
A bit more careful analysis could lead to
n
Ωn ∼  .
n
log n + 1 − log(n+1)

(See again [423].)


3. Show that if the coefficients of p(x) and q(x) form log-concave sequences,
then the same statement holds true for the coefficients of p(x)q(x).
Pn i
4. Show that ifPthe polynomial i=0 ai x has only real zeros, then the
n ai i
polynomial i=0 i! x has the same property [96, Theorem 2.4.1].
5. Give an example of a short sequence which is log-concave but the at-
tached polynomial p(x) has complex zeros. (One is 3x3 + 5x2 + 7x + 3.)
6. Show that an an sequence of positive numbers is log-convex if and only
if an+1 /an is increasing.
7. The counterpart of the previous exercise is as follows: show that an an
sequence of positive numbers is log-concave if and only if an+1 /an is
decreasing.

8. Show that the solution of Equation (4.6) is unique if n is a positive


integer and x is real.
118 Combinatorics and Number Theory of Counting Sequences

9. Let x be a positive number and let an be recursively defined as

a1 = x, an = xan−1 (n > 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:

L′n (1) = Ln+1 − (n + 1)Ln ,


L′′n (1) = (2n + 1)Ln − Ln+1 .
Unimodality, log-concavity, and log-convexity 119

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

Tn,k = (a1 k 2 + a2 k + a3)Tn−1,k + (b1 k 2 + b2 k + b3 )Tn−1,k−1 ,

together with the initial condition Tn,k = 0 unless 0 ≤ k ≤ n, and


T0,0 = 1.
5. Log-concavity is preserved by the binomial transform. This fact is useful
in the theory of stochastic processes [320]. Standard reference for this,
related, and more general results is the book of Brenti [96]. It was rela-
tively recently proven [583] by Yi Wang that the more general transform
n  
X n+a
bn = ak
k+b
k=0

still preserves the log-concavity of the sequence an for arbitrary non-


negative integer a and b.
These can be extended from binomial transform to binomial convolution.
Having two sequences ak and bn , then their binomial convolution is
n  
X n
cn = ak bn−k .
k
k=0
120 Combinatorics and Number Theory of Counting Sequences

If both an and bn are log-concave, then so is the sequence cn . Moreover,


Yi Wang’s result extends to binomial convolution: the sequence
n  
X n+a
cn = ai bn−k
k+b
k=0

is log-concave if both an and bn are log-concave. For these results, see


[584, Corollary 3.4-3.5].
6. Log-convexity is studied in great detail in the paper [380]. See also [535].
In [380] it was shown that if an and bn are log-convex sequences, then
so is an + bn . Moreover, the log-convexity is preserved under binomial
convolution, i.e., if an and bn are log-convex sequences, then
n  
X n
cn = ak bn−k
k
k=0

is also log-convex. It is also preserved by the binomial and Stirling trans-


formations of both kinds: the
n  
X n
bn = ak ,
k
k=0
n  
X n
cn = ak ,
k
k=0

and
n  
X n
dn = ak
k
k=0

sequences are all log-convex given that an is itself log-convex.


For deeper results on this topic, see Chapter 7 in [84]. This book is
worth to be studied not only if one is interested in log-cancavity of se-
quences, but also because it basically covers all the basics of enumerative
combinatorics. [84] could actually be cited in each Outlook in this book.
7. By many transformations, the real zero property of polynomials is pre-
served. More on this topic can be found in Brenti’s book [96].
8. Log-convexity can be generalized to polynomials. A polynomial f (q) is
said to be q-log-convex , if
fn+1 (q)fn−1 (q) ≥q fn2 (q),
where f (q) ≥q g(q) means that the difference f (q) − g(q) has only non-
negative coefficients. Log-concavity is defined similarly. Maybe the most
elementary treatment is of Sagan [504]. See also [140, 378, 614, 615] on
q-log-convexity.
Unimodality, log-concavity, and log-convexity 121

9. The binomial coefficients bisection problem (BCBP) is the following.


Find all the vectors δ0 , δ1 , . . . , δn ∈ {−1, 1} such that
n  
X n
δk = 0.
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

5.1 Power sums


The Stirling numbers can be used to calculate sums of powers of con-
secutive integer numbers. Let us first recall the well-known formulas from
elementary mathematics:
1 2
1 + 2 + 3 + ··· + n = (n + n).
2
The sum of the squares of the first n numbers is
1
1 2 + 2 2 + 3 2 + · · · + n2 = (2n3 + 3n2 + n).
6
For the third powers we have that
1 4
1 3 + 2 3 + 3 3 + · · · + n3 = (n + 2n3 + n2 ).
4
We can easily recognize a rule: the sums of the powers of the first n positive
integers can be expressed as polynomials of n. It would be interesting to know
what are the coefficients of these polynomials in general. The sums on the
left-hand sides will be called power sums.
The Stirling numbers pop up in this problem via the relation (2.46):
p  
p
X p k
x = x . (5.1)
k
k=0

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

If we could find a simple polynomial expression for the right-hand side we

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

or its equivalent, the rather simple


p   
p p p
X p n
1 + 2 + · · · + (n − 1) = k! . (5.3)
k k+1
k=0

The falling factorials can be expressed by the signed Stirling numbers as we


have seen in (2.45):
k+1
X k + 1
k+1
n = nm .
m=0
m
Substituting this into the above, we get that
p   k+1 p   k+1  
X p n X p 1 X k+1 m
= n
k k+1 k k + 1 m=0 m
k=0 k=0

This is already a polynomial of n! To get the final form, we sum inside up to


p + 1 in place of k + 1 (we can do this, because the new terms are all zero).
Why p + 1? Because m can be at most k + 1, and k can be at most p. Hence,
p     X p+1 p    !
X p 1 k+1 m
X p 1 k+1
= n .
k k+1 m m=0
k k+1 m
k=0 k=0

Or, together with the initial-left hand side


p+1 p    !
p p p
X
m
X p 1 k+1
1 + 2 + · · · + (n − 1) = n . (5.4)
m=0
k k+1 m
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].

Combinatorial proof of the power sum formula (5.3)

For convenience, on both sides we write n in place of n − 1, and on the


right-hand side we run the sum from k = 1:
n p+1   
X X p+1 n
ip = (k − 1)! . (5.5)
i=1
k k
k=1

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

5.1.1 Power sums of arithmetic progressions


The power sum formula (5.5) can easily be generalized so that we are
summing arithmetic progressions’ powers. Arithmetic sequences are of the
form r, r + m, r + 2m, . . . , r + nm. We will prove very briefly that
n p+1      
X
p p
X p+1 n + r/m r/m
(r + im) = m (k − 1)! − ,
i=1
k k k
k=1

given that m is not zero2 .


Applying (5.5) with n = n + t and n = t, and subtracting the second
expression from the first, it comes that
n p+1      
X
p
X p+1 n+t t
(t + i) = (k − 1)! − .
i=1
k k k
k=1

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

This is exactly the formula that we wanted to verify.

5.2 The Bernoulli numbers


In the previous section, we have reached our aim and have found an ex-
pression for the power sum polynomials. We can go even further because it is
possible to express the coefficients of the power sum polynomials in another
way using the Bernoulli numbers. These numbers are important in many areas
of mathematics and even in physics.
The Bn Bernoulli3 numbers are usually defined by the exponential gene-
rating function

X xn x
Bn = x . (5.6)
n=0
n! e −1

2 This result was presented in [353], too.


3 Jacob Bernoulli (1654-1705), Swiss mathematician and member of the famous Bernoulli
family. The Bernoulli numbers appear in the book Ars Conjectandi. This book was posthu-
mously published in 1713.
The Bernoulli and Cauchy numbers 127

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

First determine the generating function of


 
1 k+1
:
k+1 m

∞ ∞  ∞   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

from which one can infer



k + 1 xk 1 lnm (1 + x)
 
X 1
= . (5.8)
k + 1 m k! x m!
k=0

We consider the exponential generating function of (5.7). This is an often


used shortcut: if we are lucky, the generating function of the sequence we are
studying has a simple form and we can connect it to other, already known
p
generating functions. Multiplying (5.7) with xp! and summing over p, we have
∞ p   ∞  ∞
xp X p k + 1 X xp p
  X   
X 1 k+1 1
= =
p=0
p! k k+1 m k + 1 m p=0 p! k
k=0 k=0


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

With this information we can rewrite (5.4) as follows:


p+1  
p p 1 X m p+1
p
1 + 2 + · · · + (n − 1) = n Bp+1−m . (5.11)
p + 1 m=1 m

5.2.1 The Bernoulli polynomials


Expression of power sums via the Bernoulli polynomials

The Bernoulli polynomials are defined as


n  
X n m
Bn (x) = x Bn−m .
m=0
m

Clearly, Bn = Bn (0). The Bernoulli polynomials are of high importance in


the analytic theory of numbers4 .
From our present viewpoint, the Bernoulli polynomials are useful, because
(5.11) can be expressed in a very compact form with them. Note that the
right-hand side of (5.11) is almost a Bernoulli polynomial:
p+1  
X
m p+1
n Bp+1−m = Bp+1 (n) − Bp+1 .
m=1
m

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.

Power sums of arithmetic progressions and the Bernoulli poly-


nomials

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

One sees that this indeed looks like (5.4).


Then we invoke formula (6) in [418],
p
mp p + 1
   
X 1 k+1 r
mk Wm,r (p, k) = Bp+1−i ,
k+1 i p+1 i m
k=0

to express that result in terms of the Bernoulli polynomials:


p+1
mp X i p + 1
  r
p p p
r + (r + m) + · · · + (r + (n − 1)m) = n Bp+1−i .
p + 1 i=1 i m

5 These numbers were discovered by several authors independently, see [167, 418].
130 Combinatorics and Number Theory of Counting Sequences

A bit of transformation on the right-hand side is as follows:


p+1
mp X i p + 1
  r
n Bp+1−i =
p + 1 i=1 i m

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.

5.3 The Cauchy numbers and Riordan arrays


There are two other interesting sequences we would like to study in this
chapter. These are the Cauchy numbers of the first and second kind.
Also, we present an extremely powerful tool to prove combinatorial iden-
tities – the Riordan array technique.

5.3.1 The Cauchy numbers of the first and second kind


Definition 5.3.1. The Cauchy numbers of the first and second kind6 are
defined, respectively, by the definite integrals
Z 1
cn = x(x − 1)(x − 2) · · · (x − n + 1)dx,
0
Z 1
Cn = x(x + 1)(x + 2) · · · (x + n − 1)dx.
0
6 The numbers cn /n! are sometimes called Laplace numbers.
The Bernoulli and Cauchy numbers 131

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

The generating function of cn and Cn comes easily:



X xn x
cn = , (5.15)
n=0
n! log(1 + x)

X xn x
Cn = . (5.16)
n=0
n! (x − 1) log(1 − x)

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

Applying the (2.36) exponential generating function of the signed Stirlings we


can finalize the proof:
∞ ∞   ∞
X 1 X n xn X 1 1 x
= logk (1 + x) = ,
k + 1 n=0 k n! k + 1 k! log(1 + x)
k=0 k=0
132 Combinatorics and Number Theory of Counting Sequences

as we stated.
Now we deduce additional identities for cn and Cn by using the Riordan
array method.

5.3.2 Riordan arrays


The Riordan arrays are extremely useful if we would like to calculate sums
of the form
n
X
dn,k ak , (5.17)
k=0

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

dn,k = [xn ]d(x)(x · h(x))k (n ≥ 1), (5.18)

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

R(dn,k ) = (d(x), h(x)) = (d, h),

and we say that dn,k is a Riordan array or Riordan matrix. It is determined


by d and h via (5.18).
7 John Riordan (1903-1988), American mathematician.
The Bernoulli and Cauchy numbers 133

The following examples are easy to establish:


     
k! n 1 1
R = 1, log ,
n! k x 1−x
 !  
k! n 1
R = 1, log(1 + x) ,
n! k x
ex − 1
    
k! n
R = 1, , (5.19)
n! k x
    
k! n 1
R = 1, ,
n! k 1−x
    
k! n 1 1
R = , . (5.20)
n! k 1−x 1−x
k! n
 
For example, let us take the first Riordan array R n! k . We know that

X n xn
   
1 1
= logk ;
k n! k! 1−x
n=k

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

where f (x) is the generating function of the sequence an .


To prove this identity, we need only to find the generating function of the
left-hand side. It will be d(x)f (x · h(x)) as our identity suggests.
∞ ∞ ∞
n
! !
X X X X
xn dn,k ak = ak xn dn,k =
n=0 k=0 k=0 n=0

X
ak d(x)(x · h(x))k = d(x)f (x · h(x)),
k=0
as we stated.
134 Combinatorics and Number Theory of Counting Sequences

5.3.3 Some identities for the Cauchy numbers


Three more identities for the Cauchy numbers are added here. Two of
them are applications of the Riordan method. This short subsection is added
to show additional applications of this useful tool. The results of this section
are taken from [406].
The first identity that we are going to prove is
n  
X n 1
ck = (n ≥ 0). (5.22)
k n+1
k=0

A trivial transformation first:


n   n  
X n X k! n ck
ck = n! .
k n! k k!
k=0 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

The reader is called to prove this result.

Recurrence for the Cauchy numbers

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

(Note that this is indeed a recurrence, because it expresses cn by ck where


k < n. This recurrence, in fact, uses all the former members up to cn−1 .)
To prove the recurrence, we use a very simple trick. We sum on k = 0, . . . , n
and then we separate the term k = n. Thus, rewriting the recurrence, we see
that it is equivalent to
n
X ck (−1)n−k+1
n! = 0,
k! n − k + 1
k=0

unless n = 0. Hence, the generating function of this sequence must be f (x) =


1, and so
x log(1 + x)
1=
log(1 + x) x
with
∞ ∞
x X cn n log(1 + x) X (−1)n n
= x , and = x ,
log(1 + x) n=0 n! x n=0
n+1

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.

A relation between the Cauchy and Bernoulli numbers

Finally, we give a relation between the Cauchy and Bernoulli numbers:


n  
Bn X
k n Ck
− = (−1) (n ≥ 1). (5.24)
n k k
k=1

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

(See p. 232, Exercise 24 for a generalization to polynomials. Hint: spe-


cialize (5.10).)
7. Verify the identity
n  
X
k n+1
Bn = (−1) k! Hk+1
k+1
k=0

which connects the Bernoulli, Stirling and harmonic numbers.


8. Applying the orthogonality, prove the dual of the previous formula:
n  
1 X n+1
Hn+1 = (−1)k Bk .
n! k+1
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

which is just Euler’s transformation formula, see (2.14). (Euler’s formula


was established with special tricks on p. 45. This result shows in itself
why the general framework of the Riordan method is so useful.)
138 Combinatorics and Number Theory of Counting Sequences

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

16. Prove that


n−1
X Ck 1
Cn = n!
k! (n − k)(n − k + 1)
k=0
holds for n ≥ 1. This identity is the dual of (5.23).
17. Prove the dual formula of (5.24):
n  
X n Bk Cn
=− (n ≥ 1).
k k n
k=1

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

Prove this by using the Riordan technique (see [533, p. 288]).


19. Prove the orthogonality property of the signed first kind and second kind
Stirling numbers discussed in Section 2.6 via the Riordan array method.
(See p. 285 in [533].)
20. Prove the following interesting relation between the Bernoulli numbers
and Euler numbers:
2n
B2n = (−1)n−1 2n E2n−1 (n > 0).
4 − 22n
(Hint: use the exponential generating function of the Bernoulli numbers
and André’s generating function result on p. 80.)
The Bernoulli and Cauchy numbers 139

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

of squares was studied in detail.


3. The finite sum of consecutive powers of a fixed positive integer m were
studied by B. Sury [553], who found that
 
X n−j
1+m+m2 +· · ·+mn = (−1)j mj (1+m)n−2j (m > 0, n ≥ 0).
j
j≥0

In [396] this is proved combinatorially, using tiling with dominoes.


4. A good reference for the Riordan array method is a paper by R. Sprug-
noli [533] where a large number of examples is available. The Riordan
arrays first appeared in [514]. A basic survey was written by P. Barry
[47]. In [141] one can encounter nice formulas with Stirling numbers, like
n   r  
X n X
r r k n−k
k = n 2 ,
k k
k=0 k=0

and many others.


5. The history of the formula in Exercise 6 can be found in [259]. More con-
nections between Stirling and Bernoulli numbers is contained in [517].
Both of these sources contain, for example, the relation
n
(−1)k n+1
 
X k+1 n+k
Bn = n+k
 .
k
k
k=1

See also [270].


6. The following sequence of polynomials, here we defined them by their
exponential generating function, often appears in the literature:

X tn 2ext
En (x) = t .
n=0
n! e +1
140 Combinatorics and Number Theory of Counting Sequences

Unfortunately, here we have a clash: these polynomials are called Euler


polynomials, and the numbers En = 2n En 12 are Euler numbers, which


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

6.1 Ordered partitions and the Fubini numbers


6.1.1 The definition of the Fubini numbers
The number of partitions of an n element set is given by the nth Bell
number. If the elements in the block are ordered, we get the Ln numbers –
the horizontal sums of the Lah numbers. If, in turn, the order of the blocks is
taken into account, we arrive at another counting sequence: that of the Fubini
numbers. In this chapter we study this sequence; it will turn out that it is
connected also to some interesting counting problems regarding permutations.
Without taking the order of the blocks into account, the 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.

Definition 6.1.1. Let Fn denote the number of all the partitions of an n-


set such that we take the order of the blocks in the individual partitions into
account. Fn is the nth ordered partition number, or nth Fubini1 number. The
Fubini numbers are also called ordered Bell numbers2 .

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

This argument is valid for any finite size of sets, so


n  
X n
Fn = k! . (6.1)
k
k=1

We set F0 = 1.

6.1.2 Two more interpretations of the Fubini numbers


There are other ways we can look at the ordered partitions. We give here
some examples.

Surjective functions

Going back to p. 17, we seethere


that the number of surjective functions
from an n-set to a k-set is k! nk . Summing over k, we infer that the Fu-
bini numbers count all the surjective functions on an n-set onto some set (of
cardinality necessarily between one and n).

Competitions with ties

Another interpretation comes if we consider a competition of n people


where draws (or ties) are allowed. The nth Fubini number Fn gives the number
of the possible outputs in such a competition. This is so because an ordered k-
partition on n people can be considered as an output of a competition where
the n people (better to say, their indices) in the same blocks are classified
equal (draws).
This interpretation offers a recursive formula for the Fubini numbers. To
enumerate all the outputs of our competition, we can choose k competitors
from n, and these go to the first position. This can be done in nk ways. Then
the remaining n − k competitors can be considered as competitors of a new
competition for the second, third,. . . position. They can be classified in Fn−k
ways. Summing over k, put these into a formula:
n  
X n
Fn = Fn−k . (6.2)
k
k=1
Ordered partitions 143
n n
 
Applying the k = n−k symmetry,

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.

6.1.3 The Fubini numbers count chains of subsets


Let us fix a set S of n elements. We say that a sequence

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 .

6.1.4 The generating function of the Fubini numbers


In order to find the exponential generating function of the Fubini numbers,
n
we use (6.1). Summing over n after multiplying with xn! we get that
∞ ∞ n  ! n
X xn X X n x
Fn = k! .
n=0
n! n=0
k n!
k=1
144 Combinatorics and Number Theory of Counting Sequences

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.

6.1.5 The Hankel determinants of the Fubini numbers


To determine the Hankel determinants of the Fubini numbers, we use the
just proven ordered Dobiński formula and the orthogonal polynomial theory
tool we got to know in Subsection 2.10.3.
We are looking for an orthogonal polynomial sequence such that the at-
tached functional L is such that

L(xn ) = Fn .

The Meixner polynomials are the corresponding polynomials we are looking


for. In Section 1.9 of [338], we see that for the Mn (x; β, c) polynomials

X (β)x c−n n!
cx Mn (x; β, c)Mm (x; β, c) = δnm
x=0
x! (β)n (1 − c)β
Ordered partitions 145

for β > 0 and 0 < c < 1. Here



1, if n = m;
δnm =
0, otherwise
is the Kronecker delta symbol .
We read out the functional L which is3

X (β)t t
L(f (x)) = c f (t).
t=0
t!
1
Setting β = 1 and c = 2 we have that

X 1 n
L(xn ) = t
t = 2Fn ,
t=0
2

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.

6.2 Fubini polynomials


It is worth it to introduce the Fubini polynomials because they will have
interesting connections to permutations. The Fubini polynomials are defined
3 The functional L is not an integral as in our example in Subsection 2.10.3 but an infinite

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

F4 (x) = 24x4 + 36x3 + 14x2 + x.

In this section we study the main properties of these polynomials. First,


we note that the exponential generating function of Fn (x) can be deduced
similarly as we did for (6.5):

X xn 1
Fn (y) = . (6.7)
n=0
n! 1 − y(ex − 1)

A recurrence for Fn (x)

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

For the first sum


n   n   !′
X n−1 k X n−1 k ′
k!k x =x k! x = xFn−1 (x),
k k
k=1 k=1

while for the second


n   n   !′
X n−1 k X n−1 k
k! x =x (k − 1)! x = x(xFn−1 (x))′ =
k−1 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

Fn (x) = x((1 + x)Fn−1 (x))′ . (6.8)


Ordered partitions 147

The real zero property of Fn (x)

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

whence the nice inequality


 2   
n k n n
≥ (6.10)
k k+1 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.

6.3 Permutations, ascents, and the Eulerian numbers


In this section we study ascents, descents, and runs of permutations. Later
we shall see that these are connected to ordered partitions.
148 Combinatorics and Number Theory of Counting Sequences

6.3.1 Ascents, descents, and runs


Definition 6.3.1. Let a permutation
 
1 2 3 ··· n
π=
i1 i2 i3 ··· in

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.

Definition 6.3.2. The consecutive maximal increasing subsequences of per-


mutations are called runs.

In the above example, there are three runs: 3; 1, 4, 6; and 2, 5.


Next we study how the ascents, descents and runs are related. If we want
to count the ascents and descents in a permutation, we go from left to the
right and compare two consecutive elements: the first with the second, then
the second with the third, and so on, and finally we compare the penultimate
with the last element. Altogether, we have n − 1 comparisons and in each
position we have two alternatives: we can have an ascent or a descent. Hence,

ascents + descents = n − 1. (6.11)

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.

The above two results together yield that

runs = n − ascents. (6.12)

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

6.3.2 The definition of the Eulerian numbers


Definition 6.3.3. The number of n-permutations which contain exactly k as-
cents is given

by the Eulerian number with parameters n and k, and it is
denoted by nk 5 .
There is a table for the first Eulerian numbers at the end of the book. For
now, let us see a simple example. All the permutations on the 3-set {1, 2, 3}
are listed here:
     
1 2 3 1 2 3 1 2 3
, , ,
1 2 3 2 1 3 3 1 2
     
1 2 3 1 2 3 1 2 3
, , .
1 3 2 2 3 1 3 2 1
As it is easy to see, the numbers of ascents in these permutations are
2, 1, 1, 1, 1, 0, respectively. Therefore
     
3 3 3
= 1, = 4, = 1.
0 1 2
(The numbers of runs are 1, 2, 2, 2, 2, 3, respectively, while the numbers of
descents are 0, 1, 1, 1, 1, 2.)
If a permutation  
1 2 3 ··· n
i1 i2 i3 · · · in
contains k ascents, then its reverse
 
1 2 3 ··· n
in in−1 in−2 ··· i1
contains n − k − 1 ascents, so
   
n n
= (6.13)
k n−k−1
holds, which is similar to the symmetry of the binomial coefficients.
Since any n-permutation contains at least 0 and at most n − 1 ascents, it
is also obvious that
n−1
X n
= n!.
k
k=0

5 This notation is not so common as the notation for the Stirling numbers. It was in-

troduced

n by Donald E. Knuth, American mathematician, in 1973 [335, Section 5.1.3]; but


k
counted there the permutations with k runs. The signs ⟨ and ⟩ refer to the relation
signs, and the relation signs refer to the comparisons when we are looking for ascents and
descents. It is also important to note that the number of permutations with k − 1 descents
(or, equivalently, k runs) is also often called Eulerian number, and for these numbers the
notation
An,k is common. By the relation (6.12) between runs and ascents we have that
n
An,k = n−k .
150 Combinatorics and Number Theory of Counting Sequences

6.3.3 The basic recursion for the Eulerian numbers


If we introduce a new counting sequence, one of the first tasks is to find a
6
recursion for the sequence if
possible .
n

To find a recursion for k , which is the number of n-permutations with
k ascents, we can insert the last element n into an (n − 1)-permutation. We
then have two possibilities:
(1) The existing (n − 1)-permutation already has k ascents. Then, we must
insert our new element n to keep the number of ascents unchanged. So we can
insert n into the first position, or right after an ascent position. We had k
ascents
and these, together with the first position, give k + 1 possibilities,
(k + 1) n−1
k in total.
(2) Once we insert n, it is possible that we get a new ascent. In this case,
the initial permutation must have k − 1 ascents (we cannot have more than
one new ascent inserting one element). Now we can insert n right after any
descent position, or in the last position. The number of descents on
n − 1
elements is n − 2 − (k − 1) = n − k − 1, plus the last position: (n − k) n−1
k−1 .
Hence,      
n n−1 n−1
= (k + 1) + (n − k) . (6.14)
k k k−1
We set 00 = 1 and n0 = 0 if n ≥ 1.


The Eulerian numbers are connected to the binomial coefficients, Stirling


numbers and Fubini numbers. Now we describe these relations.

6.3.4 Worpitzky’s identity


The Worpitzky7 identity 8 is a combinatorial equality which connects the
Eulerian numbers and binomial coefficients:
n   
n
X n m+k
m = . (6.15)
k n
k=0

A proof is as follows. We take all the functions of the form

f : N → M,

where |N | = n and |M | = m. There are mn such functions. We show that the


right-hand side equals this number.
6 The sequences appearing in this book are “easy enough” to find recursions for. But this

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

Such a function f can be represented by a list: we prescribe the images of


1, 2, . . . , n by f and put the images into a list

(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

To see how this works in practice, take m = 3 and n = 6, and let f be


given by the list
(2, 3, 3, 1, 2, 2).
(Hence, f (1) = 2, f (2) = 3, and so on.) In increasing order

(1, 2, 2, 2, 3, 3). (6.16)

The corresponding permutation reads as


 
1 2 3 4 5 6
.
4 1 5 6 2 3

(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

1 ≤ ai1 ≤ ai2 ≤ · · · ≤ ain ≤ m (6.17)

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

increasing modification will be

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 .

6.3.5 A relation between Eulerian numbers and Stirling


numbers
There are several relations connecting the Eulerian and Stirling numbers
(see also Section 6.5), but the following is the simplest one.
  Xm   
n n k
m! = . (6.18)
m k n−m
k=0

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

9 This proof was presented to the author by Gábor Nyul.


Ordered partitions 153

where in the last equality we used the binomial theorem. Substitute x − 1 in


place of x and apply the binomial theorem once again:
n   n   n−m  
X n X n X n−m
m! (x − 1)n−m = m! (−1)n−m−k xk =
m=0
m m=0
m k
k=0
! (6.19)
n n    n  
X X n n − m X n
xk m! (−1)n−m−k = xk .
m=0
m k 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

In the following section, we prove this identity combinatorially.

6.4 The combination lock game


In this section we present a special construction which helps to prove
the combinatorial relation (6.20) between the Eulerian numbers and Fubini
numbers. The section is based on a paper of D. J. Velleman and G. S. Call
[571].
Let us consider a combination lock with n numbered buttons. To open the
lock, we have to push the buttons in a given order. Of course, if there is no
simultaneous button pressing allowed, there are n! possibilities. Therefore, to
make the situation more interesting, we permit simultaneous button pressings.
Then, for example, a possible combination on 8 elements is

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

are different but


3 − 7 − 8, 4 − 6, 1 − 2, 5
and
3 − 8 − 7, 6 − 4, 1 − 2, 5
are the same. We suppose that in a given step the simultaneously pressed
buttons are listed in increasing order. How many combinations are there? Let
us denote this number by Fn for a fixed number n of buttons. It is obvious
that F1 = 1. To open the lock we push some buttons first, simultaneously. Let
the number of the firstly pushed buttons be k. We can choose these buttons
on nk ways. Then the remaining n − k buttons can be handled as buttons of


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

contains three steps but only two runs; while in


1, 2; 3, 4; 5
the three steps result only in one run.
The runs and steps can be related in the reverse way. Having an n-
permutation with k runs, our goal is to find a unique process to map this
permutation to a combination lock. We can form new combination locks from
a permutation of k runs. This combination lock will contain at least k steps,
by the above argument. Therefore, we have to separate the k runs into more
parts if the combination contains more steps. We perform this in the following
way. We put marks among the elements of the runs which indicate the end
of the sequence of simultaneously pushed buttons11 . Among n elements there
are n − 1 places to put the mark, but we do not put marks at the end of the
k runs. So from n − 1 we lose k − 1 places, remains n − 1 − (k − 1) = n − k
places. In each place, we can choose whether we put a mark or not. This gives
2n−k possibilities.
Finally, remembering that k runs give n − k ascents, we have
n  
X n
Fn = 2n−k ,
n−k
k=1

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!

6.5 Relations between the Eulerian and Fubini polyno-


mials
Identity (6.20) is a particular case of the important result (6.19). To put
(6.19) into a short form, we introduce the Eulerian polynomials:
n  
X n k
En (x) = x .
k
k=0
 
11 For 1 2 3 4 5
instance, to get 1, 2; 3, 4; 5 from , we put marks between two
1 2 3 4 5
and three, and four and five.
156 Combinatorics and Number Theory of Counting Sequences

Note that En (x) is a polynomial of degree n − 1 and not of degree n.


We immediately have a relation for En (x) by (6.19):
n  
X n
En (x) = k! (x − 1)n−k . (6.21)
k
k=0

This is a theorem of Frobenius12 . Substituting x = 2, we get (6.20). On the


other hand, taking the Fubini polynomials into account, (6.21) is equivalent
to  
n 1
(x − 1) Fn = En (x). (6.22)
x−1
The inverse of this relation is
 
n x+1
Fn (x) = x En .
x

The exponential generating function of En (x)

These transformation formulas directly lead us to the exponential genera-


ting function of the Eulerian polynomials:

X yn x−1
En (x) = .
n=0
n! x − e(x−1)y

Indeed, knowing the exponential generating function of the Fubini polyno-


mials (see (6.7)) and (6.22) we have that
∞ ∞
yn [(x − 1)y]n
 
X X 1
En (x) = Fn =
n=0
n! n=0
x−1 n!

1 x−1
1 = .
1− x−1 (e
(x−1)y − 1) x − e(x−1)y

The exponential generating function of En (x)

The following recursion holds true for the Eulerian polynomials:



En (x) = (1 + (n − 1)x)En−1 (x) + (x − x2 )En−1 (x). (6.23)

The proof is left to the reader.


It is not a novelty that recursions sometimes help us find some information
on the root structure of polynomials (see pages 147 and 88). We could proceed
12 Ferdinand Georg Frobenius (1849-1917), German mathematician.
Ordered partitions 157

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

Since the Eulerian polynomials are positive when x > 0, x = 1 is not a


solution, so only the second case remains. The zeros of the Fubini polynomials
are real and belong to ] − 1, 0], hence x ∈] − ∞, 0[. Thus, all the zeros of the
Eulerian polynomials are real and negative.
It follows from this property that the Eulerian numbers are strictly log-
concave (see Section 4.2). For a fixed n, the Eulerian numbers increase, attain
at most two maxima and then decrease. By the symmetry (6.13) there are
two maxima in the middle of the sequence when n is even (we have a plateau
here), and there is one maximum if n is odd (this is called peak).
Moreover, the following inequality holds by the strict log-concavity (see
(4.2)):
 2   
n n n
≥ .
k k−1 k+1

Combinatorial proofs of this log-concavity property were presented in [86,


244]. See also [83, p. 17-21].

6.6 An application of the Eulerian polynomials


In this section we show how to apply the Eulerian numbers to evaluate
some interesting infinite sums. The bridge between these infinite sums and
the Eulerian numbers is the Worpitzky identity (6.15).
The infinite sums the Eulerian polynomials help to evaluate are of the form

X
in xi ,
i=0

where n is a fixed positive integer. The evaluation reads as



xn
 
X 1
i n xi = En . (6.25)
i=0
(1 − x)n+1 x
158 Combinatorics and Number Theory of Counting Sequences

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 last equality comes from Worpitzky’s identity.

6.7 Differential equation of the Eulerian polynomials


The recursion of the Eulerian numbers results in an interesting differential
equation for the exponential generating function.
Denote the two variable exponential generating functions of the Eulerian
polynomials by f :
x−1
f (x, y) := .
x − e(x−1)y
Then it can be seen that f satisfies the following partial differential equation:
∂f ∂f
(x − x2 ) + (yx − 1) + f = 0. (6.26)
∂x ∂y
Let us analyze the members from left to right. The first term is
∞ n  
!′ ∞ n   ! n
∂f X X n k yn X X n k y
x =x x = k x .
∂x n=0
k n! n=0
k n!
k=0 k=0

The second term is


∞ n
!
n k+1 y n
 
2 ∂f
X X
−x =− k x ,
∂x n=0
k n!
k=0
Ordered partitions 159

the third
∞ n  
!
∂f X X n k+1 yn
yx = x n ,
∂y n=0
k n!
k=0

while the fourth has the form


∞ n  
!
∂f X X n k y n−1
− =− x .
∂y n=0
k (n − 1)!
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

Comparing the coefficients of y and then of x we get that


         
n n n n n+1
k − (k − 1) +n + = .
k k−1 k−1 k k
This, after collecting the corresponding terms, is nothing else but the (6.14)
recursion.

6.7.1 An application of the Fubini polynomials


There is a surprising application of the Fubini polynomials and of the
relation (6.25). We are going to prove that the derivatives of the cotangent
function are the Fubini polynomials of the cotangent itself:
 
(n) n i cot(z) − 1
cot (z) = (2i) (cot(z) − i)Fn .
2

Here i = −1. To prove this interesting fact, first note that
 
2
cot(z) = i 1 + 2iz . (6.27)
e −1

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

then we convert this into the Fubini polynomials by (6.24):


n
y 2n y 2n 1 − y2
  
1
−(2i)n+1 En = −(2i) n+1
(1 − y 2 )n+1 y2 (1 − y 2 )n+1 y2

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

By changing z → iz we get the hyperbolic function counterparts:


 
(n) n coth(z) + 1
coth (z) = 2 (coth(z) − 1)Fn − ,
2
 
tanh(z) + 1
tanh(n) (z) = 2n (tanh(z) − 1)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

4. Calculate the first five lines of the Eulerian triangle.


5. Let A(n, k) be the number of n-permutations with k runs. Prove that

A(n, k) = (k + 1)A(n − 1, k + 1) + (n − k)A(n − 1, k).

These numbers are also called Eulerian numbers, as we noted in the


footnote on p. 149. For more on this kind of definition see the book of
M. Bóna [83]. There, on p. 8., one can find that
k  
i n+1
X
A(n, k) = (−1) (k − i)n
i=0
i

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

8. Calculate the infinite sum


∞ 4
X i
.
i=0
2i

9. Demonstrate that the following particular values of the derivative of


En (x) are as follows:
 
n
En′ (1) = (n − 1)! ,
2
   
n n
En′′ (1) = 2(n − 2)! +3 .
3 4

10. Prove that for the Fubini polynomials


Fn+1 − Fn
Fn′ (1) = .
2

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

Use combinatorial arguments or apply the Riordan method. See p. 286-


287 in [533].
13. Show that the Fubini numbers form a log-convex sequence. (This is a
consequence of (6.1) plus the fact that the Stirling transform preserves
log-convexity, together with the log-convexity of the factorial sequence.
See the Outlook of Chapter 4, and directly Example 2.6 in [380]. The
log-convexity was studied in [616], too.)
 n
14. We have seen in (6.9) that the sequence k! nk k=0 is log-concave. Thus,
it has a peak or a plateau. Let us denote the index of the peak (or the
leftmost of the two edges of the plateau) by Mn . Show that
n
Mn ∼ .
2 log 2
(The details can be found in [424].)
15. Prove that the n × n Hankel determinants of the Fubini polynomials is
n−1
n n
x( 2 ) (1 + x)( 2 )
Y
k!2 .
k=1
Ordered partitions 163

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

(Hint: use (6.25) together with the Meixner polynomials mentioned in


Subsection 6.1.5.)

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

(Hint: by symmetry and log-concavity of the


Eulerian numbers we infer
that if n is odd, the maximizing index for nk is n := n−1

2 , while for
even n it is n2 − 1 and n2 . Then the exercise is equivalent to
     
n n−1 n−1
= (n + 1) = (n + 1) .
n n−1 n

Applying the basic recurrence of the Eulerian numbers for nn we can



see now that these equations are indeed valid.)


164 Combinatorics and Number Theory of Counting Sequences

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

were studied in [460].


4. Ascents, descents, runs can be defined on infinite permutations (bijec-
tions of the positive integers), too. Let Lk denote the average length
of the kth run in a uniformly taken infinite random permutation. Here
“uniformly taken” means that each of the n! possible relative orderings
of the first n elements are equally likely. Then, it can be proven that,
for all k,
∞  
X n 1
Lk = .
n=1
k − 1 n!
In particular,

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

5. An attractive symmetrical identity is known for the Eulerian numbers


[152]:
a+b    a+b   
X a+b k X a+b k
= ,
k a−1 k b−1
k=a−1 k=b−1

which is valid for all positive integers a and b. Here, 00 = 0, instead of





0
the usual 0 = 1.
Chapter 7
Asymptotics and inequalities

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 .

For example, if an = (n + 2)2 , and bn = (n + 7)2 , then an ∼ bn .


In the second part of the chapter, we provide some inequalities which are
often useful in many contexts when some estimation of a given sequence is
enough for our purpose. Such inequalities may provide more tractable expres-
sions to work with.
1 What
 1012 
method would the reader use to calculate, say, 43527 ? Even computer could not
calculate this number in a manageable timeframe.
2 In this section, some notions will appear that we have not considered so far, like conver-

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

7.1 The Bonferroni inequality


One way to study how rapidly the second kind Stirling numbers grow is
through the Bonferroni3 inequality which is a set theoretical relation interest-
ing in itself.
Let Ω be a non-empty finite set, and let A1 , . . . , An some non-empty sub-
sets of Ω. Moreover, let
( )
\
m = max |T | : T ⊂ {1, 2, . . . , n}, Ai ̸= ∅ , (7.1)
i∈T

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.

A modern presentation of this result was published by Horst Wegner


German mathematician, see [592] (in one step his argument is simplified in
the below text). In the particular case, when l = m = n, (in this case there is
at least one common element in all the Ai sets), the inequality is actually an
equality: n
Xn X \ [
j−1
(−1) Ai = Ai .



j=1 T ⊂{1,2,...,n} i∈T i=1
|T |=j

This is the famous inclusion-exclusion principle. In particular, for n = 2:

|A1 | + |A2 | − |A1 ∩ A2 | = |A1 ∪ A2 |,

while for n = 3 it is

|A1 | + |A2 | + |A3 | − |A1 ∩ A2 | − |A1 ∩ A3 | − |A2 ∩ A3 |

+|A1 ∩ A2 ∩ A3 | = |A1 ∪ A2 ∪ A3 |.

The proof of the Bonferroni-inequality

To prove Bonferroni’s inequality, we need to introduce the characteristic


3 Carlo Emilio Bonferroni (1892-1960), Italian probability theorist.
Asymptotics and inequalities 169

function. The function χA takes the value 1 on elements belonging to A, while


any other elements not belonging to A are mapped to 0:

1, if ω ∈ A;
χa (ω) =
0, if ω ̸∈ A.
To prove Bonferroni’s inequality in the spirit of Wegner we still need an in-
gredient in the form of the following lemma.
Let Ω beTa set as above, and let A1 , . . . , An be subsets
Sn of Ω that their
n
intersection i=1 Ai is non-empty. Moreover, for all ω ∈ i=1 Ai let us define
m(ω) = |{i : ω ∈ Ai }|. Then m(ω) ≥ 1, and
l  
l m(ω) − 1
X X
j−1
(−1) χ∩i∈T Ai (ω) = 1 − (−1)
j=1
l
T ⊂{1,2,...,n}
|T |=j

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

Hence, the left-hand side of our lemma can be written as


l l  
j−1 m(ω)
X X X
(−1)j−1 χ∩i∈T Ai (ω) = (−1) =
j=1 j=1
j
T ⊂{1,2,...,n}
|T |=j
 
l   l  
X m(ω) X m(ω)
(−1) (−1)j = (−1)  (−1)j − 1 =
j=1
j j=0
j
l    
X m(ω) m(ω) − 1
1− (−1)j = 1 − (−1)l .
j=0
j l

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

Now let us recall the meaning of m. We see that m = maxω∈Sni=1 Ai m(ω).


Hence, if l = m, then  
m(ω) − 1
= 0,
l
since the upper parameter is smaller than the lower. If l < m, then
 
m(ω) − 1
>0
l

for at least one ω. This S


positive number is added (when l is odd) or subtracted
n
(when l is even) from | i=1 Ai |. This yields Bonferroni’s inequality.
Later in Subsection 10.2.2, we further use these results.

7.2 The asymptotics of the second kind Stirling numbers


7.2.1 First approach

n
An under- and overestimation for k via the Bonferroni inequal-
ity

We have proven already (see (2.20)) that


  k   k−1  
n 1 X k n k−j 1 X j k
= j (−1) = (−1) (k − j)n (7.2)
k k! j=0 j k! j=0 j

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.

The proof is as follows. Multiplying with k!, k! nk is the number of surjective




functions mapping an n element set into a k element set (remember Section


1.6). These functions can be counted in the following way. Let the sets X, Y
Asymptotics and inequalities 171

be of cardinality n and k, respectively. Moreover, let Ay be the set of functions


that do not have y in their co-domain:

Ay = {f : X → Y | y ̸∈ f (X)} (y ∈ Y ).

By this definition each non-surjective function belongs to some Ay , so



  [
n
k n − k!

= Ay .
k 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

This, substituted into the Bonferroni-inequality and rearranged, yields the


above given statement.
n
The asymptotics of k

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


and multiply by k! then we have


 n  
k−1 k! n
1−k < n < 1.
k k k

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 .

7.2.2 Second approach


We now show another approach that is simpler but, at the same time, it
gives a weaker result. Begin with the (2.43) horizontal generating function:
n  
X n
x(x − 1)(x − 2) · · · (x − m + 1) = xn .
m=0
m

Substitute x = k and rewrite the falling factorial so that


k  
X n k!
= kn .
m=0
m (k − m)!

From here, by separating the last term, and dividing by k! we get


k−1
kn
   
X n 1 n
+ = .
m=0
m (k − m)! k k!

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)!

This is nothing else but the left-hand side of (7.3).


That this is indeed weaker than the Bonferroni inequality comes from the
fact that it is equivalent to (7.3), and this is the l = 0 and l = 1 particular
cases of Bonferroni. Higher values of lgive
better approximations.
More about the approximation of nk can be found in the Outlook of this
chapter.

7.3 The asymptotics of the maximizing index of the Stir-


ling numbers of the second kind
Once we know that the nk numbers behave like k n /k! if n is “big”, we can


run k from 0 to n. It looks that the sequence k n /k!grows,


n reaches a maximum
then decreases – like the log-concave sequence nk k=0 itself! Here is the
graph5 for n = 10:

Therefore, if we could find the maximum of the function xn /x!, we could


find an approximation for the maximizing index Kn for the Stirling numbers.
5 The graph was drawn in Mathematica 10.
174 Combinatorics and Number Theory of Counting Sequences

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.

7.3.1 The Euler Gamma function and the Digamma function

The Euler Gamma function

The Euler Gamma function generalizes the n! function to real numbers


(and even to complex numbers if one wants).

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 .

The Digamma function

Definition 7.3.2. The Digamma function, ψ(x), is the logarithmic derivative


of the Euler Gamma function:

Γ′ (x)
ψ(x) = (log Γ(x))′ = .
Γ(x)

A straight consequence of (7.5) is the functional equation for the Digamma


function:
1
ψ(x + 1) = + ψ(x).
x
We will not prove it, but it is interesting to know that ψ(1) is a well-known
constant:
ψ(1) = −γ,
where γ is the so-called Euler-Mascheroni8 constant, or simply Euler constant.
Its numerical value is
γ = 0, 5772156649 . . . .
There is a whole book dedicated to the constant γ [281]. See also Section 1.5
in the excellent book [230].
What we will particularly need from the theory of the Digamma function
is its asymptotics for large positive real x:
1
ψ(x) ∼ log x − + ··· . (7.6)
2x
Here we use the ∼ symbol in an extended sense: the ratio of the two sides
tends to one as x tends to ∞.

7.3.2 The asymptotics of Kn


We are now ready to derive the asymptotics
n
Kn ∼
log n
7 There are different functions that are extensions of the factorial, in the sense that they

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!

we suppose that Kn approximately equals to the maximum of the function9


xn
x! . Rewrite this function by using the Γ function:

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)

Substitute now the (7.6) approximation of the Digamma function. It follows


that the maximum must satisfy the approximative equation
1
n− = x log x. (7.8)
2
We know better the log function than the ψ but it still does not lead to a
solvable equation like the quadratics, for example. But not everything is lost.
Take the logarithm of both sides:
 
1
log n − = log x + log log x.
2

Substituting log x = t (so that x = et ), we have the equivalent equation


 
1
log n − = t + log t. (7.9)
2

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,


x = exp t = expW (n− 2 ) .


1

Now, again by (4.6),


W (a)eW (a) = a
kn
9 It
n
seems to be suspicious to use the only asymptotically valid k
∼ k!
relation.
n
Fortunately, kk! is close to n

k
for moderately large n, too.
Asymptotics and inequalities 177
a
for any a, thus eW (a) = W (a) and the exponential function can be eliminated:

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


If n is large, the term −1/2 can be neglected and we get


n
Kn ∼ .
log n
This is what we wanted to prove.
If we would use a second approximation in the defining equation of W , we
could get that
W (n) ∼ log n − log log n.
This would lead to
n
Kn ∼ .
log n − log log n
These ideas were published in [175]. The study of the higher order approxi-
mations of the Lambert function was presented in the paper [176].
See also Section 4.3 for further results on Kn .

7.4 The asymptotics of the first kind Stirling numbers


and Bell numbers
The estimation of the first kind Stirling numbers and the Bell numbers
cannot be given as easily as we did for the second kind Stirling numbers.
178 Combinatorics and Number Theory of Counting Sequences

Therefore, we restrict ourselves to merely present the results without giving


proofs.
!
logk−1 n logk−2 n logk−2 n
 
1 n
= γ1 + γ2 + · · · + γk + O .
(n − 1)! k (k − 1)! (k − 2)! n
 
logk−2 n
Here n → ∞ and k is fixed, O n encodes10 an entity which is bounded
k−2
divided by log n n , and the constants γn are the Taylor series coefficients of
the reciprocal Gamma function:

1 X
= γn xn .
Γ(x) i=n

Thus, in particular, γ1 = 1, γ2 = γ is the Euler-Mascheroni constant we have


just met with as the special value of the Digamma function11 . A proof of this
result and some extensions to the polynomial
n  
1 X n+1 k
x
n! k+1
k=0

can be found in the work [598].


For the Bell numbers, it is even more complicated to develop good approx-
imations. By the so-called saddle point method, the following asymptotical
result can be shown.
 2  
log Bn log log n 1 1 log log n log log n
= log n−log log n−1+ + + +O .
n log n log n 2 log n log2 n
(7.10)
A detailed proof of this approximation can be found in the book of de Bruijn
[190] (pp. 102-109).
It follows from deBruijn’s result that for all ε > 0 there exists an n0
(depending on the concrete value of ε) such that for all n > n0
 n  n
n n
< Bn < . (7.11)
e log n e1−ε log n
The drawback of these inequalities is that there is no simple way to deter-
mine the value of the index n0 from which the approximation is valid. A 2010
10 The first term in the approximation is the  dominant,
k−2
 the other terms only slightly
contribute to the main term. The last term O log n n has the least contribution, as it
tends to zero when n tends to infinity.
11 Interestingly, there is a nice and recently discovered integral representation for the γ
n
constants [228]: Z ∞
1 (−1)n
γn = e−t ℑ[(log t − iπ)n ]dt.
π n! 0
Asymptotics and inequalities 179

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

n 500 1000 5000


Bn  1.06 · 10843 2.99 · 101927 7.98 · 1012 543
 n
0.792n
log(n+1) 1.18 · 10902 2.12 · 102059 8.76 · 1013 336

An asymptotical formula for the Bn sequence using the Lambert W func-


tion is in the Problem book of L. Lovász [382, p. 17]:
 n+1/2  
1 n n
Bn ∼ √ exp −n−1 .
n W (n) W (n)

7.5 The asymptotics of the Fubini numbers


Luckily enough, the case of the Fubini numbers is easier to manage than
that of the Bell numbers. We are going to prove the below inequalities:
n! n!
≤ Fn ≤ n (n ≥ 0). (7.12)
2 lnn (2) ln (2)

Recall recursion (6.2):


n  
X n
Fn = Fn−k .
k
k=1

Write out the terms explicitly:


 
Fn−1 Fn−2 F0
Fn = n! + + ··· + .
1!(n − 1)! 2!(n − 2)! n!0!

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

We use this equality to prove (7.12) by induction. For n = 0 the statement


clearly holds. Supposing that the statement holds true for numbers smaller
than n, we prove the statement for n.
Gn−1 Gn−2 G0 1 1 1
Gn = + +···+ ≤ n−1 + +···+ =
1! 2! n! ln (2) 2! lnn−2 (2) n! ln0 (2)

!
ln2 (2) lnn (2) lnk (2)
 
1 1 X
ln(2) + + ··· + ≤ n =
lnn (2) 2! n! ln (2) k!
k=1
1 1
(eln(2) − 1) = n ,
lnn (2) ln (2)
which confirms the right-hand side of (7.12).
To confirm the left-hand side inequality, we use the same induction hy-
pothesis (substituting G0 = 1 in the last term):
Gn−1 Gn−2 G0
Gn = + + ··· + ≥
1! 2! n!
1 1 1 1
+ + ··· + + =
2 lnn−1 (2) 2!2 lnn−2 (2) (n − 1)!2 ln1 (2) n!
ln2 (2) lnn−1 (2) 2 lnn (2)
 
1
ln(2) + + ··· + + .
2 lnn (2) 2! (n − 1)! n!
One simple observation must be made: it is possible to find a 0 < c < ln(2)
such that
ln2 (2) lnn−1 (2) ec lnn (2)
eln(2) = 1 + ln(2) + + ··· + + ,
2! (n − 1)! n!
that is smaller than the same expression substituting the maximal ln(2) in
place of c. So
ln2 (2) lnn−1 (2) 2 lnn (2)
eln(2) ≤ 1 + ln(2) + + ··· + + .
2! (n − 1)! n!
Rearranging:
ln2 (2) lnn−1 (2) 2 lnn (2)
ln(2) + + ··· + + ≥ eln(2) − 1 = 1.
2! (n − 1)! n!
Now let us put this into the expression for Gn . Taking into account that
Fn = Gn /n!, we have proven inequality (7.12).
It can be shown by integral approximation methods that [571]
n!
Fn ∼ .
2 lnn+1 (2)
General approximation methods are available and can be used for many
sequences known in set partition theory and permutation theory. Such meth-
ods are the saddle point method and Hayman’s method. More can be read
about these powerful tools in [190, 235, 597].
Asymptotics and inequalities 181

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.

7.6.1 Polynomials with roots inside the unit disk


12
Let
p(x) = a0 + a1 x + a2 x2 + · · · + an xn
be a polynomial such that all of its zeros are less than one in absolute value.
It is a result of D. J. Newman13 that in this case the following inequality is
valid:
n
k|ak |2
P
k=0 n
n > .
P 2
|ak |2
k=0
Knowing that the Fubini polynomials have all their zeros in ] − 1, 0], it imme-
diately comes that
n  2
kk!2 nk
P
k=0 n
Pn n 2 > 2 .
k!2 k
k=0
Computer calculations show that the sequence
P n  2 
kk!2 nk
1  k=0 n
an =  n − 
n  P 2 n 2
 2
k! k
k=0

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

possibly tends to a positive finite limit:

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?

7.6.2 Polynomials and interlacing zeros


Let two real14 polynomials be defined such that

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

ak−1 bk > ak bk−1 (k = 1, . . . , n),

and, if m = n − 1, then

ak−1 bk < ak bk−1 (k = 1, . . . , n − 1).

These inequalities were presented by Constantinescu [161].


In the case of our sequences, the interlacing property is often present.
Taking the Bell polynomials,
 for example, such that p(x) = Bn (x), and q(x) =
Bn−1 (x), we have ak = nk and bk = n−1 k , with m = n − 1. The second
inequality of Constantinescu results in the following:
     
n n−1 n n−1
< .
k−1 k k k−1

7.6.3 Estimations on the ratio of two consecutive sequence


elements
There are some variants on the theme of the estimations for
|p′ (x)|
.
max |p(x)|
a≤x≤b

14 Real polynomial that the coefficients of the polynomial are real.


Asymptotics and inequalities 183

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)

For example, by the fact that Bn′ (1) = Bn+1 − Bn ,

Bn+1
< en + 1.
Bn

Such exact15 estimations can be handy sometimes.


Fn+1 −Fn
Similarly, since L′n (1) = Ln+1 − (n + 1)Ln , and Fn′ (1) = 2 , we get
that
Ln+1
< en + (n + 1) = (e + 1)n + 1,
Ln
Fn+1
< 2en + 1.
Fn

We remark, that a result of Soble [525] permits us to delete the constant e


under some conditions which our polynomials surely meet. Schoble’s theorem
says that if p(x) has only real and non-negative coefficients, then

p′ (x) n
≤ (x > 0).
p(x) x

Hence, it is also true that


Bn+1 Ln+1 Fn+1
≤ n + 1, ≤ 2n + 1, ≤ 2n + 1. (7.14)
Bn Ln Fn
It would be interesting to find better estimations.
15 We use the noun “exact” here as the opposite of asymptotic estimation.
184 Combinatorics and Number Theory of Counting Sequences

7.6.4 Dixon’s theorem


By log-concavity we know that in many triangles of counting sequences
there is a peak or plateau in each row. We have also seen that it is not
always easy to localize this maximum/maxima. Therefore, we might want to
get estimations to these indices. Dixon’s theorem [199] helps to do this16 . It
says that if
p(x) = a0 + a1 x + · · · + an xn
is a polynomial of degree n with only real zeros, then the following two esti-
mations are valid:

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

gave similar result for a general second degree polynomial [446].


Asymptotics and inequalities 185

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).

7.6.5 Colucci’s theorem and the Samuelson–Laguerre theo-


rem and estimations for the leftmost zeros of polyno-
mials
Again we mention that many of our polynomials Bn (x), Fn (x), En (x), etc.
have only real and negative zeros. It is interesting to ask where the leftmost of
these roots is located either by giving asymptotical results or by giving exact
estimations.
To address these questions, a theorem of Colucci [157] will be useful. This
theorem states that if

p(x) = a0 + a1 x + · · · + an xn

is a polynomial with real or complex coefficients, and the absolute values of


186 Combinatorics and Number Theory of Counting Sequences

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 .

Estimation for the leftmost zero of the Bell polynomials

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

It was proved in [175] that for large n


r
∗ 1 5 3
|zn | < n2 .
2 3
By this and the above result, we conclude17 that there is a real number
 
3
α ∈ 1, ,
2
and a positive real number c such that
|zn∗ |
lim = c.
n→∞ nα

Numerical calculations show [175] that α = 1 is a probable value, and it is


also possible that, for this α, c = e. A proof of these two statements would be
welcome.

Estimation for the leftmost zero of the Eulerian polynomials

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

works, and [471, Chapter 1] for a compilation.


19 This theorem was first discovered by E. Laguerre [349] in 1880, and P. Samuelson

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

If n is large, these give that


   
n n
∼ 2n , ∼ 3n ,
n−2 n−3

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,

while (7.18) predicts −964.48.


One can check that the Colucci estimation would give the lower bound
2n 2
|x∗n | > −1− .
n−1 n−1
These make us wondering about a constant β ∈ [0, 1] and a constant d > 0
such that
nβ |x∗n |
lim = d.
n→∞ 2n
Asymptotics and inequalities 189

7.6.6 An estimation between two consecutive Fubini num-


bers via Lax’s theorem
The property of the Fubini polynomials that their zeros concentrate on
[−1, 0] results in an interesting relation, thanks to a theorem of P. Lax [440,
3.3.31]. This theorem states the following. Let p be a polynomial of degree n
having the bound |p(x)| ≤ 1 on the closed unit disk, and having no zeros on
the open unit disk, then
n
|p′ (x)| ≤ (for |x| ≤ 1). (7.19)
2
The Fubini polynomials have only real zeros, all belonging to ] − 1, 0].
Therefore, the polynomial xn Fn x1 has zeros only outside of the unit interval.
One additional requirement we still have to meet, and this is the normalization:
the polynomial must have absolute value at most one for |x| < 1. We can reach
this aim by dividing xn Fn x1 with its maximal value on the unit disk, which


is certainly Fn . Thus, the polynomial we will use is


 
1 n 1
p(x) = x Fn .
Fn x

The derivative of p is
      
1 1 1 1
p′ (x) = nxn−1 Fn + xn Fn′ · − 2 .
Fn x x x

We employ (7.19) with x = 1:



1
(nFn − Fn′ (1)) ≤ n .

Fn 2

Recall that Fn′ (1) = Fn+1 − Fn . After multiplying by 2Fn this gives that

|(2n + 1)Fn − Fn+1 | ≤ nFn .

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 .

Putting this and (7.14) together, we get the nice result

(n + 1)Fn ≤ Fn+1 ≤ (2n + 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

which results in the upper bound above.

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

lim (Hn − log n)


n→∞

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

(This is Problem 11957 in a 2017 issue of The American Mathematical


Monthly [466].)
4. Show that
kn
Bn ≥ (k = 0, 1, . . . ).
k!
This is Theorem 2 in [599], which seems to be surprising at first sight.
Note that, however, the sequence on the right-hand side has a peak when
k runs; therefore, it is always bounded from above. One bound is the nth
Bell number. Thus, it might be more interesting to read the inequality
“from right to left.”
5. Prove (7.5) by using the integral definition of Γ.
6. Why can’t the Gamma function be defined at zero and at the negative
integers?
7. Show that
Bn+1 n+1
∼ .
Bn log(n + 1)
(Hint: use (7.11).)
192 Combinatorics and Number Theory of Counting Sequences

8. Prove the following asymptotics for the Eulerian numbers:


 
n
∼ (k + 1)n ,
k

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

based on (2.44). Show that


n−1
X 1
A′n (x) = An (x) .
x+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,

which is definitely not the best, since Hn grows logarithmically. Schoble’s


theorem gives the still very weak Hn < n.
Asymptotics and inequalities 193

Outlook
1. For more on the asymptotics of the sequences appearing in this book,
see also the Outlook of Chapter 10.

2. Hsu [291] proved that, as n tends to infinity and k is fixed, then

n2k
    
n+k f1 (k) f2 (k) ft (k) 1
= k 1+ + + · · · + + O ,
n 2 k! n n2 nt nt+1

where fi (k) is a polynomial of degree 2i. In particular,


1 1
f1 (k) = (2k 2 + k), f2 (k) = (4k 4 − k 2 − 3k).
3 18
By a change of indices,

n2k
    
n k(4k − 1) 1
= k 1− +O .
n−k 2 k! 3n n2

See also [365].


3. The asymptotics of the Ln horizontal sum of the Lah numbers was
recently studied in a manuscript of Mező [430]:
r

  
1 2 1 1 3
Ln ∼ exp n log(n) − n + 2 n + √ 1 − √ .
2 e n1/4 12 n 16 n

4. A profound analysis of the asymptotics of the Bell polynomials was


carried out in [212, 213].
5. Inequalities can be found for the Fubini numbers in [616]. It is found
there that
2n < Fn < (n + 1)n ,
the left-hand side is valid for n ≥ 3, and the right-hand side is for all
n ≥ 1. These inequalities are not better than (7.12), but sometimes√they
might be more easy to use. In the same paper it was shown that ( n Fn )
is a strictly increasing sequence.
Part II

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.

8.1 Partitions with restrictions – second kind r-Stirling


numbers
Going back to a former example, let us imagine that we need to put six
prisoners in four cells. But there are two of them who are accomplices and
cannot be put into the same cell. How many ways are there to perform this
task? If we had no restriction, we could know the answer immediately: 64 =


65. But the restriction complicates things a bit. Before solving the problem,
we continue with a definition.

Definition 8.1.1. The number of those k-partitions of  an


n element set in
which r elements are in different blocks is denoted by nk r , and we call this
number the r-Stirling number of the second kind2 with parameters n and k.
1 Even Quantum Field Theory inspired some Stirling-like numbers. See [394] where it is

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

different initial values:


 
n
= 0 if n < r,
k
 r
n
= 1 if n = k = r,
k
 r
n
= 0 if n = r and k ̸= r
k r
If n > r, then (8.1) applies.

Minimal elements in blocks

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.

A relation connecting second kind Stirling and r-Stirling


numbers

We present a simple formula between the ordinary and r-Stirling numbers.


Let us suppose that we want to distribute n + r elements into k + r blocks
such that the first r elements are restricted to be in different blocks (that
200 Combinatorics and Number Theory of Counting Sequences

is, they are block leaders). By definition, there are n+r



k+r r many of these.
Such partitions can also be formed as follows. First we construct k blocks
containing no distinguished elements by filling them
 with j elements from
that of n (j ≥ k). Choose these j elements in nj ways. These j elements
can be put into the k blocks in kj ways. Now we consider the remaining


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

8.2 Generating functions of the r-Stirling numbers


Many of the formulas given for the Stirling numbers can be transferred to
the r-Stirling case with tiny modifications. To avoid superfluous arguments,
we try to prove the formulas of the subsequent sections in another way.

A formula splitting up the distinguished elements into two groups

In Chapter 2, we gave a large number of evidence proving that the genera-


ting functions are so useful. Now we present additional results proven by the
generating
n function technique. We thus need the generating functions of the
k r numbers. To have it, we first prove a nice identity:
  n−r
X n − rn − p − m
n
= pm (r ≥ p ≥ 0). (8.4)
k r m=0 m k−p r−p

We choose m elements greater than r to put them besides the first p ≤ r


elements. We construct p-partitions
p+m such that the first p elements belong to
separate blocks. We get n−r
m p different cases. The remaining n − p − m
p
elements go to k − p blocks such that p + 1, . . . , r distinguished elements go
to separate blocks. This results in n−p−m
k−p cases. We then multiply this
r−p
number by the above because the allocations are independent of each other.
Thus, for a fixed m there are
    
n−r p+m n−p−m
m p p k−p r−p
Prohibiting elements from being together 201

cases. As m is arbitrary, we must sum on it. Finally, taking into account the
straightforward special value formula
 
p+m
= pm ,
p p

identity 8.4 is proven.


n+r
The exponential generating function of k+r r

How do we get the generating function from (8.4)? Let us substitute p = r


and write n + r, k + r in place of n, k:
  n   
n+r X n n+r−r−m
= rm =
k + r r m=0 m k+r−r r−r

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

Having the exponential generating function in our hand, we can determine


the generalization of
n  
n
X n k
y = y ,
k
k=0

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

Combinatorial argument can be used to determine the ordinary generating


function as well. To this end, we need another identity.
 
n+m X
= i1 i2 · · · im . (8.8)
n r r≤i1 ≤···≤im ≤n

Taking the set {1, 2, . . . , n, n + 1, . . . , n + m} we count the n-partitions


when the usual restriction on special elements is considered. As there are n
blocks, there are n minimal elements. The remaining n + m − n = m elements
are not minimal. Temporarily, we introduce the x1 , . . . , xm notation for these
elements. We suppose that by this indexing the elements are in ascending
order, that is, x1 < x2 < · · · < xm . Let ij denote the number of minimal
elements smaller than xj (j = 1, . . . , m). As the xj s are ordered, the chain of
relations i1 ≤ i2 ≤ · · · ≤ im also holds. Therefore, once the minimal elements
are fixed, the non-minimal xj s can be put into blocks that already contain
minimal elements smaller than they are. The number of these is i1 , i2 , . . . , im ,
respectively. For example, x1 can go to i1 different blocks. The total number
of cases is then i1 i2 · · · im . Still, we have not taken into account that 1, . . . , r
are minimal elements. This restriction can be fulfilled by supposing simply
that i1 ≥ r. (Clearly, xj is not minimal while 1, . . . , r is, so xj must be bigger
than r for all possible js. Having at least r minimal elements smaller than xj ,
we know that ij ≥ r. But, as the ij s are increasing, it is enough to put this
restriction only on i1 .) Summing all over the possible set of minimal elements,
we are done.
Note one interesting thing. If we drop the restriction that 1, . . . , r are
minimal, we stay with the i1 ≥ 1 restriction and we get back the original
Stirling numbers. This new relation was not presented in the first part:
 
n+m X
= i1 i2 · · · im . (8.9)
n
1≤i1 ≤···≤im ≤n

Finally, we can deduce the ordinary generating function we were looking


for:
∞  
X n xk
xn = . (8.10)
k r (1 − rx)(1 − (r + 1)x) · · · (1 − kx)
n=k
Prohibiting elements from being together 203

This can be gotten from (8.8) after dividing by xk and re-parametrization:


∞  
X n+k 1
xn = .
n=0
k r (1 − rx)(1 − (r + 1)x) · · · (1 − kx)

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).

Some consequences of the previous results

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

The same trick of splitting can be performed in the exponential generating


function case, too:
1 rx x 1 (k + m)! 1 (r+s)x x
e (e − 1)k esx (ex − 1)m = e (e − 1)k+m =
k! m! (k + m)! k!m!
 
k+m 1
e(r+s)x (ex − 1)k+m .
m (k + m)!
The expansion of the initial product does not cause difficulty, and the last
n+r+s
expression is the exponential generating function of k+m+r+s r+s
times a
binomial coefficient. If we write all of these out, we should arrive at this
identity:
   n     
k+m n+r+s X n l+r n−l+s
= . (8.12)
m k + m + r + s r+s l k+r r m+s s
l=0
204 Combinatorics and Number Theory of Counting Sequences

This nice formula can be proven combinatorially as follows. First, we deci-


pher the meaning of the left-hand side. Take the set {1, . . . , n+r +s}. We look
for the decomposition of this set that contains k + m + r + s blocks, and the
first r + s elements are in different blocks. Distinguish the blocks containing
the first r elements and the blocks of the r + 1, . . . , s elements by painting
them, say, blue and red. Paint the remaining blocks also with one of these
colors independently such that altogether there are k + r blue and m + s red
blocks. To perform this latter painting, take the k + m + r + s − r − s = k + m
unpainted blocks.
 We need to choose the blocks to be painted blue. We have
k+m
= k+m

k m choices. So the left-hand side counts all of such blue-red-
painted partitions. On the other hand, the number of such partitions can be
gotten by determining which l elements go to the blue  blocks. We need to
choose these l elements from n + r + s − r − s = n: nl possibilities. As r ele-
ments are already in
 l+r the blue blocks, and there are k + r blue blocks in total,
these constitute k+r r
cases. The remaining n + r + s − (l + r) = n − l + s ele-
ments will go to the red blocks from which there are m + s, resulting n−l+s

m+s s
cases. We get the right-hand side by summing over l.

8.3 The r-Bell numbers and polynomials


The Bell numbers gave us the number of partitions on n elements. If we
constrain ourselves to put r distinguished elements into different blocks, then
we get a new notion: the notion of the r-Bell numbers.

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

The r-Bell polynomials are defined as usual:


n  
X n+r
Bn,r (x) = xk .
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.

Basic properties of the r-Bell polynomials

We shortly summarize the most basic properties of the r-Bell polynomials.


The results of this short summary are taken from [412] where the proofs are
also presented. Since these proofs do not need new techniques or ideas, we
omit them.
The exponential generating function can be determined from (8.6) (chang-
ing x to y to keep x for the polynomial variable, multiplying by xk /k! and
sum over k). The result is

X yn y
Bn,r (x) = ex(e −1)+ry .
n=0
n!

A corollary of this is the representation


n  
X n
Bn,r (x) = Bk (x)rn−k . (8.13)
k
k=0

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

Two recursions are of importance:


 
d
Bn,r (x) = x Bn−1,r (x) + Bn−1,r (x) + rBn−1,r (x),
dx
d
ex xr Bn,r (x) = x (ex xr Bn−1,r (x))
dx
from the first, for example, it can be seen that
Bn,r (0) = rn .
The other can be used to show that all the zeros of the Bn,r (x) polynomials
are real (and, of course, non-positive as the coefficients of Bn,r (x) are posi-
tive). This real zero property is an important one: remember Chapter 4 which
implies that the second kind r-Stirling numbers are strictly log-concave. The
location of the maximum can be estimated (see [414] for the details):
n n
< Kn+r,r < (n > max{18, ln(2)/ ln(1 + 1/r)}).
ln(n) ln(n) − ln(ln(n))
Here Kn+r,r is the smallest of those one or two parameters5 for which
   
n+r n+r
≥ for all k = 0, 1, . . . , n.
Kn+r,r r k+r r
From the recursion (8.2) it follows that
Bn,r (x) = xBn−1,r+1 (x) + rBn−1,r (x).
The Dobiński-formula can also be generalized:

1 X (k + r)n k
Bn,r (x) = x .
ex 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

8.4 The generating function of the r-Bell polynomials


The only proof we present in detail is the deduction of the generating
function of the r-Bell polynomials. To this end, we need a new notion.

8.4.1 The hypergeometric function


The function

an1 an2 · · · anp xn
 
a1 , a2 , . . . , ap X
p Fq
x =
b1 , b2 , . . . , bq bn bn · · · bnq n!
n=0 1 2

is called hypergeometric function. We shall see that this function is not as


abstract as it looks. In fact, most of the known functions are hypergeometric.
Let us see some examples! The exponential function

X xn
ex =
n=0
n!

is the simplest instance of a hypergeometric function: it contains no rising


factorials in its expansion, so p = q = 0:

ex = 0 F0

x .

If a1 = 1 and there are no other parameters, then by 1n = n!


∞ ∞
 X xn X 1
1 F0 1 x = n! = xn = .
n=0
n! n=0
1−x

1
So the simple 1−x function is also hypergeometric.

The sine function is a hypergeometric function

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

Now let us go back to the definition of the hypergeometric function. If we take


the ratio of two consecutive members of their defining series, then we see that
the initial scary fraction can be simplified considerably:

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

This is almost a hypergeometric ratio! To gain full similarity we rewrite the


right-hand side:

−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

The sin(x) function – more precisely sin(x)/x – is another instance of a hy-


pergeometric function!

The generating function of the r-Bell polynomials

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)

The denominator can be written in terms of falling factorials:

(1 − rz)(1 − (r + 1)z) · · · (1 − (k + r)z) =


1 k+r+1

(1 − z)(1 − 2z) · · · (1 − (k + r)z) z k+1 z
= 1 r
.
(1 − z)(1 − 2z) · · · (1 − (r − 1)z)

z
Hence,
∞    r
X n+r 1 n 1 1
z = .
k+r r z z 1 k+r+1

n=k z
The
xn = (−1)n (−x)n
reflection formula is applied to the falling factorials to turn them into rising
factorials:
 k+r+1  k+r+1
1 k+r+1 1
= (−1) −
z z
 r+1  k
1 1
= (−1)k+r+1 − − +r+1 .
z z
Consequently,
∞  1 r

(−1)k+r+1

X n+r n1 z
z =  .
k+r r z −1  r+1 rz+z−1 k
n=k z 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

Multiplying by xk and summing over k,


∞ ∞
(−x)k
 
X −1 X −1 1
Bn,r (x)z n =

−x .
rz − 1  = rz − 1 1 F1
rz+z−1 k
rz+z−1
n=0 k=0 z
z

This is already what we wanted (expressing the generating function with the
210 Combinatorics and Number Theory of Counting Sequences

hypergeometric function) but we perform another transformation. Applying


the    
−x a b − a
e 1 F1 x = 1 F1 −x
b b
Kummer6 -formula with b = rz+z−1z and a = rz−1
z we get the ultimate form
of the generating function.
Putting r = 0 we get the generating function of the Bell polynomials:
∞  −1 
X
n 1 z

Bn (x)z = x 1 F1 z−1 x .
n=0
e z

8.5 The r-Fubini numbers and r-Eulerian numbers


It is an interesting question what kind of counting sequence we get when
we take the order of the blocks into account in partitions where the usual
restriction on special elements is applied. This question leads to the definition
of the r-Fubini numbers; generalizing the Fubini numbers of Chapter 6.

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

while the r-Fubini polynomials are defined as


n  
X n+r
Fn,r (x) = (k + r)! xk .
k+r r
k=0

Note that Fn,r counts partitions on n + r elements and not on n elements,


similarly to the r-Bell numbers.

The exponential generating function of the r-Fubini polynomials

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

The last sum can already be given in closed form:



X (n + r)! r!
(xv)n = .
n=0
n! (1 − xv)r+1

Substituting v = et − 1, the statement is proven. From the (6.7) exponential


generating function, we justify the rightmost equality, too.
If you would like to know more on polynomial bases and operators on
them, the very well written and interesting book of Martin Aigner who is an
Austrian mathematician [10] is a good source.

Results coming from the generating function

We deduce some important consequences of the above exponential gene-


rating function. Of course, the most straightforward of all these is the expo-
nential generating function of the r-Fubini numbers:

X tn r!ert
Fn,r = . (8.15)
n=0
n! (2 − et )r+1

It can also be verified that

Fn,r (−1) = r!(−1)n . (8.16)

The Cauchy product gives another result:


n  X
k  
X n k
Fn,r+1 (x) = (r + 1) Fl (x)Fk−l,r (x).
k l
k=0 l=0

The proof of this goes as follows:



X tn (r + 1)et r!ert
Fn,r+1 (x) = =
n=0
n! (1 − x(et − 1)) (1 − x(et − 1))r+1

∞ 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

Then we compare the coefficients to finalize the proof.


Prohibiting elements from being together 213

We prove the following recursion in details:



Fn,r (x) = x[(r + 1)Fn−1,r (x) + (1 + x)Fn−1,r (x)] + rFn−1,r (x). (8.17)

By using the recursion of the r-Stirling numbers,


n   n  
X n−1+r k
X n−1+r
Fn,r (x) = (k + r)!(k + r) x + (k + r)! xk .
k+r r k−1+r r
k=0 k=0

For the first sum


n  
X n−1+r
(k + r)!(k + r) xk =
k+r r
k=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

rFn−1,r (x) + xFn−1,r (x).


(The prime denotes derivation with respect to the variable x.) For the second
sum
n  
X n−1+r
(k + r)! xk =
k−1+r r
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)).

The real root property of the r-Fubini polynomials

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

From this point, we prove our statement by induction. The statement is


true for the polynomial F1,r (x) = (r+1)!x+rr!. Let us suppose that Fn−1,r (x)
has zeros that all satisfy the statement. If so, the polynomial xr (x+1)Fn−1,r (x)
has a zero in x = 0 of multiplicity r, and x = −1 is another zero of multiplicity
one. Moreover, it has n − 1 zeros in the interval ] − 1, 0[ . It follows from the
Rolle theorem that the derivative has n roots in ] − 1, 0[ : there are n − 2 zeros
among the zeros of Fn−1,r (x); because of the factor x + 1, there is a zero on
the left-hand side of the zeros of Fn−1,r (x), but to the right of −1. In addition,
because of the factor xr , there must be another zero to the right of all the
zeros of Fn−1,r (x), but to the left of 0. These are n zeros in the interval ]−1, 0[
as we stated.

“Ordered” Dobiński formula

At the end of this section, we present an interesting infinite sum represen-


tation for the r-Fubini numbers that can be considered as an “ordered version”
of Dobiński’s (2.17) formula:

X (k + r)n (k + r)!
Fn,r = .
2k+r+1 k!
k=0

Upon setting r = 0, we get the already known formula (6.6)



X kn
Fn = .
2k+1
k=0

To prove this, we cannot apply (6.6) because the exponential generating


function is more complicated. Thus, we start with the Dobiński-formula given
for the r-Bell numbers.
n  ∞
(k + r)n xk

X n+r X
Bn,r (x) = xk = .
k+r r k! ex
k=0 k=0
r
x
Multiply by ex and integrate from 0 to infinity:
n  ∞ ∞ ∞
xk+r X (k + r)n xk+r
 Z Z
X n+r
= . (8.19)
k+r r 0 ex k! 0 e2x
k=0 k=0

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

Substituting these into (8.19) we are done.


Prohibiting elements from being together 215

8.6 The r-Eulerian numbers and polynomials


In Sections 6.3-6.5 we showed that the Fubini numbers are closely related
to the Eulerian numbers. This can lead to the conjecture that, once we have
the r-Fubini numbers, there should be some generalization of the Eulerian
numbers, too, such that these are related in a similar fashion as the Fubini
and Eulerian numbers are related. In this section we prove this conjecture9 .
The most important identities of the above-cited sections are the following:
n  
X n k
Fn = 2 , (8.21)
k
k=0

and its polynomial version


n  
X n
Fn (x) = (x + 1)k xn−k . (8.22)
k
k=0

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

together with the Frobenius theorem:


n   n  
X n n−k
X n m
k! (x − 1) = x . (8.24)
k m=0
m
k=0

Symbolic generalization of the Eulerian numbers

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

By the definition of the Fn,r (x) polynomials


n   n  
X n+r k
X n
(k + r)! x = (x + 1)m xn−m .
k+r r m=0
m 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

Dividing by xn and making the substitution x → 1/x:


n   n  
X n+r n−k
X n
(k + r)! x = (x + 1)m . (8.26)
k+r r m=0
m r
k=0

To rewrite the right-hand side, we use the binomial theorem:


n   n   X n  
X n X n m
(x + 1)m = xn−k .
m=0
m r m=0
m r n − k
k=0

Substituting this into the above,


n   n   Xn  
X n+r X n m
(k + r)! xn−k = xn−k .
k+r r m=0
m r n − k
k=0 k=0

Comparing the coefficients we have


  n    
n+r X n m
(k + r)! = .
k + r r m=0 m r n − k

This is the generalization of (8.23).


Frobenius theorem (8.24) also follows. In the intermediate equation (8.26)
put x − 1 in place of x:
n   n  
X n+r n−k
X n
(k + r)! (x − 1) = xm .
k+r r m=0
m r
k=0

After the above considerations, it is quite fair to call the nk r numbers as



r-Eulerian numbers. Soon we find them a combinatorial meaning.


Our last identity can be transformed easily to find another relation. Just
apply the binomial theorem to expand (x−1)n−k and compare the coefficients:
  n    
n X n+r n−k
= (k + r)! (−1)n−k−m . (8.27)
m r k+r r m
k=0
From this, it is immediate to see that
   
n n+r
= r! = r!rn ,
n r r r
 
n
= r! .
0 r
To verify the first, just set m = n and then note that the only surviving non-
zero term is k = 0, thanks to the binomial coefficient. For the second, we set
m = 0 and realize that n−k 0 = 1, thus
  n  
n X n+r
= (−1)n (k + r)! (−1)k = (−1)n Fn,r (−1) = (−1)n (−1)n r!,
0 r k+r r
k=0
Prohibiting elements from being together 217

by (8.16).

The r-Eulerian polynomials

Definition 8.6.1. We define the r-Eulerian polynomials10 as


n  
X n
En,r (x) := xm .
m=0
m r

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!

Here En (x) = En,0 (x) is the usual Eulerian polynomial.


This generating function can be determined by (8.28). Namely,
∞ ∞
tn [(x − 1)t]n r!er(x−1)t
 
X X 1
En,r (x) = Fn,r =h ir+1 .
n! n=0 x−1 n! 1 (x−1)t
n=0 1− x−1 (e − 1)
 r+1
r(x−1)t x−1
= r!e . (8.29)
x − e(x−1)t

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

Generating function and recursions

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.

8.7 The combinatorial interpretation of the r-Eulerian


numbers
To find the combinatorial description of the r-Eulerian numbers, we go
back to the combination lock of Section 6.4.
Prohibiting elements from being together 219

The generalized combinatorial lock problem

In the combination lock problem, there is a connection between simulta-


neous button presses and permutation runs, so it seems to be beneficial to
go this direction again. It also seems obvious that – taking into consideration
the restriction on our special elements – the simultaneously pressed buttons
cannot contain more than one button indexed by a special element. Hence, it
seems to be a good idea to modify the notion of a run as follows.

Definition 8.7.1. A run is called r-run if in this run there is at most one
distinguished element.

For example, in the permutation


 
1 2 3 4 5 6 7 8
1 2 3 6 4 5 7 8

there are four 4-runs: 1; 2; 3, 6; 4, 5, 7, 8. (Hence, not any classical run is an


r-run; classical runs must be broken where special elements appear.)
To keep the addition rules of the classical runs, ascents and descents valid
(see (6.11) and the other two rules) we need to modify the latter two notions,
too.

Definition 8.7.2. An ascent is called r-ascent if not both of the members


of the ascent are special elements. Moreover, every classical descent is an r-
descent, and, in addition, the position between ij , ij+1 is also an r-descent, if
both ij and ij+1 are special.

If in a permutation on n elements there are k r-runs, then there are k − 1


r-descents, because an r-run ends when the element is bigger than the next or
both elements are special. As there are n − 1 comparisons among n elements,
there are n − 1 − (k − 1) = n − k r-ascents. Thus,

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.

We must have a separator between 1 and 2, and between 2 and 3. This is


automatized by the introduction of r-runs.
220 Combinatorics and Number Theory of Counting Sequences

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

and set r = 4. The 4-ascents are the following: 3, 6; 4, 5; 5, 7; 7, 8, while the


4-descents: 1, 2; 2, 3; 6; 4. (Unusual, but it follows from the definition that 1, 2
is a descent whenever r > 1.) The 4-runs were already determined above.
We introduce the following definition.

Definition 8.7.3. The number of permutations that act on n + r elements


and contain k r-ascents is given by the r-Eulerian number of parameters n
and k. The notation for these numbers is nk r (0 ≤ k ≤ n + r).

If in the combination lock we do not permit distinguished buttons pressed


simultaneously and in the resulting permutations runs are meant r-runs, then
we get the generalization of the celebrated identity (6.20):
n  
X n
Fn,r = 2k .
k r
k=0


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

8.8 Permutations with restrictions – r-Stirling numbers


of the first kind
Once we have second kind r-Stirling numbers, it is natural to consider the
first kind Stirling numbers. It is obvious how these numbers should be defined.
Later, it turns out that the first and second kind r-Stirling numbers are dual
in the sense of Chapter 2.

Definition 8.8.1. The number of k-permutations   on n elements when r ele-


ments belong to separate cycles is given by the nk r r-Stirling number of the
first kind.

Minimal elements and cycle leaders – The Riordan representa-


tion of a permutation

Another definition can be given by considering the notion of minimal ele-


ments. Cycles can always be written in a form that the smallest element of the
cycle becomes the first (see p. 11.). Then this smallest element is called cycle
leader . After putting the smallest elements in front of the cycles, we order the
cycles according to the cycle leaders in decreasing order. In the resulting form,
the permutation has k elements that are smaller than all the elements on their
left-hand side. These elements are called left-to-right minima. Obviously, the
leftmost element and 1 are always left-to-right minima. We will call such a
rearrangement of a permutation a Riordan representation because it appeared
in the classical book of Riordan [495].
Let us take an example. Below in the first step we do the cycle decompo-
sition, then we shift the elements in the second cycle to have 2 in the cycle
leader position, then we order the cycles according to the cycle leaders.
 
1 2 3 4 5 6 7 8 9    
= 1 3 5 4 2 7 6 8 9 →
3 7 5 2 1 4 6 8 9
       
1 3 5 2 7 6 4 8 9 → 9 8 2 7 6 4 1 3 5 .
   
Even the parentheses can be removed from 9 8 2 7 6 4 1 3 5 .
Indeed, writing simply 982764135, we can determine where were the parenthe-
ses. Write a left parenthesis in front of every element which is a left-to-right
minima
982764135 → (9(8(2764(135,
then close the parentheses appropriately:

(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.

Definition 8.8.2. The number of those permutations of 1, . . . , n in which


there are k left-to-right minima and, in addition, the first r elements are left-
to-right minima is counted by nk r .


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

First rewrite this as


     
n n n
(r − 1) = − .
k r 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

while the initial conditions are the following:


 
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

We give another proof, however, in which we use left-to-right minima. To


count the permutations with k cycles on n elements, we can also count the
permutations with k left-to-right minima. If we take a permutation on n − 1
elements which already has k left-to-right minima, then nothing changes when
we insert n after any element (in n − 1 ways). On the other hand, we can  take
permutations in which there are k − 1 left-to-right minima (there are n−1

k−1 r
such permutations). To get another minimum, n needs to be a fixed point
(otherwise, n is not a cycle leader), and this is only one possibility, giving the
second term in the recursion.

The analogues of (8.8) and (8.3)

A representation similar to (8.8) is


 
n X
= i1 i2 · · · im .
n − m r r<i <···<i
1 m <n

The lower parameter n − m means that there are m non-left-to-right minima.


Denote them in increasing order by i1 < i2 < · · · < im (≤ n). Moreover, write
the left-to-right minima in decreasing order as we did at the beginning of
the section. The number of left-to-right minima smaller than i1 is i1 − 1, the
number of left-to-right minima smaller than i2 is i2 −2 and, finally, the number
of left-to-right minima smaller than im is im − m. Now put the i1 , . . . , im
elements into the existing cycles. Begin with i1 . One can put these after the
i1 − 1 minima, so there are i1 − 1 choices. Now insert i2 . There are i2 − 2
minima and one can put i2 after any of these (i2 − 2 cases), and it can go
after i1 also (one case). Altogether i2 − 1 cases. Do the same for i2 , . . . , im−1 .
At the end, im can be inserted in im − 1 places. As 1, 2, . . . , r are left-to-
right minima we have that i1 > r. We must sum all the possibilities when
r < i1 < i2 < · · · < im ≤ n and then the statement follows.
We show an example: let n = 10, and let the left-to-right minima be
1, 2, 4, 5, 6, 8, 9. Then (i1 , i2 , i3 ) = (3, 7, 10). To the side of 9 and 8, only 10 can
be inserted; by the elements 6, 5, 4 we can insert 10, 7, and by 2, 1 we can put
3, 7, 10:
      
9 . 8 . 6 . . 5 . . 4 . . 2 . . 1 . . .
224 Combinatorics and Number Theory of Counting Sequences

We insert 3 by the side of, say, 2:


      
9 . 8 . 6 . . 5 . . 4 . . 2 3 . 1 .

Item 7 can go by the side of 1, 2, 4, 5, 6 or after 3. We insert it in this example


after 5:       
9 . 8 . 6 . 5 7 4 . 2 3 . 1 .
10 can go after any cycle leader or after 3 or 7. Inserting it after 3, we have a
full permutation on 10 elements:
      
9 8 6 5 7 4 2 3 10 1 .

Three more identities

We prove the “first kind version” of (8.3):


  n   
n+r X n j n−j
= r .
k+r r j k
j=k

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

The horizontal generating function and the exponential generating function


are
n  
X n
xk = xr (x + r)(x + r + 1) · · · (x + n − 1) = xr (x + r)n−r ,
k r
k=r

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

8.9 The hyperharmonic numbers


At the very beginning of the book, we showed that the Stirling numbers
of the first kind are related to the harmonic numbers, see p. 14. 
This relation was easy to establish by the basic recursion of nk . To gener-
alize that result for the r > 0 case via combinatorial arguments, we need some
new ideas. This section is based on the work of A. T. Benjamin, D. Gaebler,
and D. Gaebler [61].

The hyperharmonic numbers

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

is the nth hyperharmonic number of order r. The hyperharmonic numbers are


(r)
often denoted by Hn to distinguish the order r from exponents11 . For the
case of harmonic number, we simply leave the order 1, and write Hn .

A relation between hyperharmonic numbers and first kind Stir-


ling numbers

Our main goal is to show that


 
1 n+r
Hnr = . (8.31)
n! r + 1 r

First factor out a factorial in the denominator of Hnr ; and write it as


an,r
Hnr =
n!
As H0r = 0, we have a0,r = 0. Moreover – since Hn0 = n1 – it also comes that
an,0 = (n − 1)!. If, instead, both n and r are greater than 0, then, by the
recursion

Hnr = H1r−1 + H2r−1 + · · · + Hn−1


r−1
+ Hnr−1 = Hn−1
r
+ Hnr−1

we infer
an,r an−1,r an,r−1
= + .
n! (n − 1)! n!
This results in the recursion

an,r = nan−1,r + an,r−1 . (8.32)

This recursion will be important later on.


To proceed, we turn to the r-Stirling numbers of the first kind and prove
a new recursion:
     
n+r n+r−1 n+r−1
=n + .
k r k r k − 1 r−1

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

Numbers by J. H. Conway and R. K. Guy – independently of the r-Stirling numbers, but


incidentally the authors were using the same letter r for the order [162].
Prohibiting elements from being together 227

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

An,r = nAn−1,r + An,r−1 ,

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.

An expression for the hyperharmonic numbers

We prove another identity12 :


 
r n+r−1
Hn = (Hn+r−1 − Hr−1 ). (8.33)
r−1

It is interesting that this is a relation connecting two non-integer sequences13


but the proof still can be done combinatorially. We introduce the following
notation. Let Tn,k,r be the set in which there are k-permutations of an n-
set such that r elements are in different cycles. By definition, there are nk r


elements in Tn,k,r . Cycles containing distinguished elements are also called


distinguished.
Another fact is necessary to see. If r + 1 ≤ t ≤ n + r, then the number
of permutations belonging to Tn+r,r+1,r such that t is in the (unique) non-
distinguished cycle and t is minimal equals to

(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

t − 1 non-distinguished elements go to the distinguished blocks. There are


t−1 (t−2)!
r r = (r−1)! such allocations. Still we need to insert t + 1, t + 2, . . . , n + r
somewhere. Rewriting the permutation such that the smallest elements in the
cycles become the first elements in their cycles, the t + 1, t + 2, . . . , n + r
elements can go to the right-hand side of the already inserted items. (All of
them are greater than r so they cannot be cycle leaders.) Hence, t + 1 can go
into t positions, t + 2 has t + 1 places to go, and finally the last element n + r
can go into n + r − 1 positions. These result in the product

(t − 2)! (t − 2)! (n + r − 1)! (n + r − 1)!


t(t + 1) · · · (n + r − 1) = = .
(r − 1)! (r − 1)! (t − 1)! (r − 1)!(t − 1)

This is just the statement we gave.


We are one step away from (8.33). Recalling that
 
n+r
|Tn+r,r+1,r | = ,
r+1 r

and noting that in the unique non-distinguished cycle any element t (r + 1 ≤


t ≤ n + r) can be minimal we need to sum on these values of t. By (8.31)
  n n
1 n+r 1 X (n + r − 1)! (n + r − 1)! X 1
Hnr = = = =
n! r + 1 r n! t=r+1 (r − 1)!(t − 1) n!(r − 1)! t=r+1 t − 1
 
n+r−1
(Hn+r−1 − Hr−1 ).
r−1

Another proof of (8.33)

Identity (8.33) can be proven in another, equally interesting way. Consid-


ering (8.31) and (8.33) we may write
 
n+r (n + r − 1)!
= n!Hnr = (Hn+r−1 − Hr−1 ),
r+1 r (r − 1)!

from which
 
n+r
(r − 1)! = (n + r − 1)!(Hn+r−1 − Hr−1 )
r+1 r

follows. Applying again (8.31) we have


     
n+r n+r (n + r − 1)! r
(r − 1)! = − . (8.34)
r+1 r 2 1 (r − 1) 2 1

This is a statement equivalent to (8.33). If we can prove (8.34) we have another


Prohibiting elements from being together 229

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).

2. Prove that r r = rn , and that n+r


n+r   n
r r =r .

3. Determine 64 2 by (8.8).


4. Decompose the generating function of the r-Stirling numbers of the


second kind into three factors and give the corresponding analogue of
(8.11).
5. Verify the r-Stirling version of (2.20):
  k  
n+r 1 X k
= (l + r)n (−1)k−l .
k+r r k! l
l=0

6. How many surjective functions are there from an n-set to a k-set (n ≥ k)


such that the first r elements in the n-set are mapped into pairwise
different values? That is, we ask for the cardinality of the set

{f : {1, . . . , n} → {1, . . . , k} | f is surj. and

f (i) ̸= f (j) if i, j ∈ {1, . . . , r}, i ̸= j}.


What is the number of not necessarily surjective functions?
7. Prove (8.11) by combinatorial arguments.
8. Let ten balls be given. How many ways are there to put these into four
boxes such that three boxes have capacity three and one has capacity
four? How many possibilities are there if we suppose that from the ten
balls seven is blue, three is red, and the red balls cannot share a box?
9. Express the polynomial x2 + x + 1 in the base (xk ).

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

13. Prove that the generating function of the hyperharmonic numbers is



X ln(1 − x)
Hnr xn = − .
n=0
(1 − x)r

(The exponential generating function is more complicated, see [181, 185]


for the details with respect to the ordinary harmonic numbers and
[425, 421] for the exponential generating function of the hyperharmonic
numbers.)
14. Based on Section 7.2, prove the inequality

(k + r)n (k − 1 + r)n (k + r)n


 
n+r
− < <
k! (k − 1)! k+r r k!

for all n ≥ m > 0.


15. Show the validity of the identity
  Xk   
n+r r n+r
= .
k l k−l+r r
l=0

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 ).

(Take the proof of (3.8) as a hint.)


232 Combinatorics and Number Theory of Counting Sequences

18. Prove the generalization of Touchard’s congruence (the Touchard con-


gruence is studied in Section 11.7.2) with respect to the r-Bell numbers:

Bn+p,r ≡ rBn,r + Bn,r+1 + Bn,p+r (mod p)

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

What is the difficulty if we try to prove the corresponding identities for


the first kind case?
24. Prove the following identity, where Bn (x) now refers to the Bernoulli
polynomials:
n  
X k! n+r
Bn (r) = (−1)k .
k+1 k+r r
k=0

(The paper [269] contains a generating function proof.)


25. Calculate the (8.20) integrals by partial integration.
26. Write 4732561w into Riordan and standard representations.
Prohibiting elements from being together 233

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 .

Hence, in this case h(z) = (−1)r erz is an admissible14 function, so we


get that the zeros of the r-Bell polynomials for any fixed non-negative
integer r form a dense set on the negative real line.
9. An application of the r-Stirling numbers of the first kind appears in
the study of permutation patterns. See [187] for the details. In this pa-
per, some new formulas are also given for the first kind r-Stirling num-
bers. The reader needs extra caution during reading, because, strangely
enough,
n in this paper the first kind r-Stirling numbers are denoted by
k r .
10. There exists the notion of generalized Stirling numbers, due to Hsu
and Shiue [292]. These generalized Stirling numbers unify the binomial
coefficients, Stirling numbers, r-Stirlings and many other numbers. The
asymptotic behavior of the generalized Stirling numbers of the second
kind is described in [165].
11. The hypergeometric function of Section 8.4 can be used to represent the
first kind Stirling numbers:

(−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

trivially satisfies, because the exponential is never zero.


Prohibiting elements from being together 235

Defined this way, we can calculate, for example, that


1

 
2 = 1
π log .
2 4

These interesting representations were all given by V. Adamchik [3].


12. Lattices [10, 265] are special algebraic structures with many applica-
tions in combinatorics, number theory, geometry, linear algebra and even
physics. Their structures are partially studied via the attached Whitney
numbers. The Stirling numbers of the second kind are just the Whitney
numbers of the set partition lattice (see p. 69-70. in [10]). Dowling lat-
tices [203] are a particular family of lattices and their Whitney numbers
are very similar to the Stirling numbers. Although their original motiva-
tion is not set partition theoretical, but it is possible to interpret them
this way [417, 490]. The Whitney numbers of Dowling lattices were also
studied in [64, 65, 66].
13. An interesting problem is the enumeration problem of not necessarily
maximal chains in the partition lattice. This problem was first considered
by T. Lengyel [367]. See [352] for a recent review and references.
14. The size of the largest antichain in the partition lattice is known, at
least asymptotically. See [117, 118].
15. Modifications of the partition lattices are studied in [107, 215, 537, 503,
576] where the sizes of the blocks are congruent to a given fixed positive
integer i modulo another integer k. Such partition lattices with (i, k) =
(0, 2) (that is, when the block sizes are even) were found to be useful in
the theory of Ising ferromagnets [554].
16. The r-Whitney numbers Wr,m (n, k) are generalizations of the Stirling
and r-Stirling numbers and the above-mentioned Whitney numbers of
the Dowling lattices. The quickest way to define them is via the con-
necting coefficients approach:
n
X
(mx + r)n = mk Wm,r (n, k)xk
k=0
Xn
mn xn = wm,r (n, k)(mx + r)k .
k=0

The coefficients Wm,r (n, k) and wm,r (n, k) give back the Stirling,
236 Combinatorics and Number Theory of Counting Sequences

r-Stirling, and Whitney numbers, respectively:


 
n
W1,0 (n, k) = ≡ S 2 (n, k),
k
 
n+r
W1,r (n, k) = ,
k+r r
Wm,0 (n, k) = Wm (n, k).
Note that (mx + r) is a generalization of the first degree monomial x to
a general first degree polynomial.
The r-Whitney numbers appeared under this name in [418] where they
were used to study the Bernoulli polynomials and, independently, in
[167] under the name (r, β)-Stirling number, and also in [500]. It is worth
to note that the r-Whitney numbers belong to the Hsu-Shiue generalized
Stirling number class. The asymptotics of the Wr,m (n, k) and wr,m (n, k)
numbers was studied in [166, 168, 172, 173], lattice theoretical connec-
tions can be found in [142], polynomial identities and real zero studies of
r-Whitney-Fubini polynomials were done in [170], r-Whitney-Lah num-
bers were studied in [142, 273, 428]. In [273] a new combinatorial inter-
pretation is also given for the r-Whitney and r-Whitney-Lah numbers.
Generalization via partition statistics can be found in [393, 486, 487].
Further generalizations and identities for these numbers are contained
in [56, 204, 388, 389, 390, 391, 404, 429, 436, 480, 607].
17. There exists a generalization of the r-Stirling numbers when r1 numbers
are restricted to be in different blocks, r2 other elements are restricted
to be in separate blocks (but can be mixed with the first r1 elements),
and so on. This generalization was studied in [385].
18. Recall that the Eulerian numbers help to evaluate some infinite sums:
(6.25) says that

xn
 
X 1
in xi = E
n+1 n
.
i=0
(1 − x) x

This can be generalized to the r-Eulerian number case [419, 420]:



xn+r
 
X 1
in ir xi = E
n+r+1 n,r
.
i=0
(1 − x) x

Here En,r is the r-Eulerian polynomial


n  
X n
En,r (x) = xk .
k r
k=0

Even more general polynomials, the r-Whitney-Eulerian polynomials


were studied in [488].
Prohibiting elements from being together 237

19. The Hankel transform of the r-Fubini polynomials cannot be as simply


related to the Hankel transform of the classical Fubini polynomials as
we did for the r-Bell and Bell polynomials. Indeed, for the latter the
Hankel determinants coincide (see the end of Section 8.3); but it is not
known how to express the Hankel transform of the r-Fubini numbers and
polynomials in closed form at least when r > 2. By simple inspection, for
r = 2 the hn,2 (x) determinants for Fn,2 (x) and the hn (x) determinants
of Fn (x) are seemingly easily related:

hn,2 = n!(n + 1)!hn

(for the form of hn (x) see Exercise 15 of Chapter 6).


For r = 3 we have that

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

Thus, hn,r (x) supposedly has the form


n n
hn,r (x) = in,r x( 2 ) (1 + x)( 2 ) .

J. L. Ramı́rez suggests that


n−1
Y n−1
Y
in,r = r! k! (k + r)!.
k=1 k=1
Chapter 9
Avoidance of big substructures

In this and the next chapter, we start to study those partitions and permuta-
tions where the blocks/cycles are limited in size.

9.1 The Bessel numbers


We go back to the prison problem. Let us suppose again that a guard must
put six prisoners into four cells. But now the size of the cells is limited: one
cell can host a maximum of two prisoners. Under this restriction, there is only
one partition pattern: two cells host two prisoners, and the other two host one
and one. This gives   
6 4
= 90
2 2
possibilities for the guard, but, it must also be taken into account that the
order of the cells does not count. The binomial coefficients already guaranteed
that the order of the prisoners in the cells does not matter, so the order of the
one-sized cells is already considered. We divide only by the order of the two
two-sized cells which is 2! = 2. Hence, the final result is 45.
If the guard knows about the Bessel numbers, he could say: the solution
to my problem is the Bessel number of parameters 6 and 2, i.e., 45. We do
not know the Bessel numbers yet, so the time has come to introduce them.

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.

As far as we know, Bessel had nothing to do with the restricted partition


problem above. The Bessel numbers are related to the Bessel polynomials and
these are what Bessel was interested in. See Section 9.5 for this polynomial
1 Friedrich Wilhelm Bessel (1784-1846), German astronomer and mathematician. He was
the first who managed to measure the distance between the Earth and a star (the 61 Cygni).
2 Usually the notation, B(n, k) is used for the Bessel numbers but we think that the

above notation is more expressive. And it is apt for further generalization.

239
240 Combinatorics and Number Theory of Counting Sequences

relation. These numbers were relatively recently studied by a number of au-


thors [146, 147, 148, 149, 215], see also [225] for an application and [416] for
divisibility questions.

Closed formula for the Bessel numbers

If an n element set is partitioned into k blocks with the above restriction,


then, obviously, there are 2k − n singletons and n − k blocks of size two,

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.

9.2 The generating functions of the Bessel numbers

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!

If we truncate this series drastically, then we get the horizontal generating


function of the Bessel numbers:
x
t2

f (t) = 1 + t + .
2!

Our statement, to be proven below, is that


n  
(n)
X n
f (0) = xk . (9.3)
k ≤2
k=1

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⌉

In the last step, we re-indexed such that k + l = n. Since



X tn
f (t) = f (n) (0) ,
n!
k=0

Our statement (9.3) indeed holds by (9.1).


n
The exponential generating function of k ≤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

Let us determine f (x). Rewrite the recursion (9.2):


     
n+1 n n−1
= +n .
k + 1 ≤2 k ≤2 k ≤2

This shifting is useful to avoid second order derivatives. By the observations


made on p. 38, it can be seen that thismodified recursion holds true only if
the exponential generating function of nk ≤2 satisfies the equation

f k (x) ′ f k (x) f k (x)


f (x) = +x .
k! k! k!
We can simplify to end up with
f ′ (x) = 1 + x.
Thus,
x2
f (x) = x + +c
2
As f (x) does not contain constant term (as it is seen from (9.4)) we have that
c = 0. Therefore,
2k   k
xn x2

X n 1
= x+ . (9.5)
k ≤2 n! k! 2
n=k
This is the first case when we encounter a polynomial exponential gene-
rating function of a counting sequence. Observe that on both sides we have a
2k-degree polynomial of x.

9.3 The number of partitions with blocks of size at most


two
The Bessel numbers are very similar to the second kind Stirling numbers,
except the restriction on the size of the blocks. Summing over the number of
Avoidance of big substructures 243

the blocks we got the Bell numbers before. Summing now the Bessel numbers
we get another interesting counting sequence.

Definition 9.3.1. A number of partitions of an n element set where the blocks


are restricted to be singletons or size two are given by the 2-restricted Bell
numbers. These numbers are denoted3 by Bn,≤2 .

Exponential generating function of the 2-restricted Bell numbers


and polynomials

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!

Compare this to (3.19), the exponential generating function of involutions.


The two functions are the same. This results in the – otherwise obvious – fact
that the number of involutions is equal to the number of 2-partitions (on the
same set). In short,
Bn,≤2 = In .
The involutions are constituted by fixed points and transpositions. These cor-
respond to singletons and 2-blocks, respectively.
These numbers appear in many contexts, see the definitions given in the
Sloane On-Line Encyclopedia of Integer Sequences http://oeis.org/A000085,
and also [600] for connection with matrix theory. We now show another inter-
esting appearance of the Bn,≤2 (and In ) numbers.
3 There is no standard notation for these numbers, although they already appeared in

the literature no later than in 1800! See some historical details in [438].
244 Combinatorics and Number Theory of Counting Sequences

9.4 Young diagrams and Young tableaux


The Young4 diagram often pops up in different contexts, not only in com-
binatorics but also in physics. Young diagrams are very easy constructions
but lead to highly non-trivial results.
We put some squares in a row and then we repeat this process in new
rows such that the squares touch each other in the rows and columns and,
in addition, the number of the squares decreases row-by-row. A permitted
configuration is

The following is also a correct configuration:

However,

is not permitted. These diagrams are often used to describe partitions of


positive integers into sums [25].
Young diagrams become Young tableaux 5 when we fill in the squares with
positive integers such that the rows from left to right and the columns from the
top down contain the numbers increasingly. Take the very first Young diagram
4 Alfred Young (1873-1940), British mathematician.
5 The word “tableaux” comes from the French word meaning “board”, and it is the plural
form of “tableau”.
Avoidance of big substructures 245

above which contains 17 squares, and fill it to make it a Young tableau6 :

1 3 5 6 8 9
2 4 7 10
11 13 15
12 14 16
17

There are many solutions, another one is the following:

1 4 6 7 8 10
2 5 9 11
3 12 14
13 15 17
16

This enjoyable simple game is not as innocent as it looks; it is applied in


Quantum Theory, for example7 Here we are interested in the number of Young
tableaux pairs to be introduced soon.
We study now the so-called bumping algorithm through an example. Let
the number of squares in the Young tableau be fixed: n = 10 in our example.
Let us give an arbitrary permutation on these 10 numbers.
 
1 2 3 4 5 6 7 8 9 10
.
6 8 5 2 3 9 7 4 1 10
The bumping algorithm assigns a Young tableau to this permutation in the
following manner. We start the tableau with the first element of the permu-
tation (the first in the second line):

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

The following permutation element is 2 which bumps 5 out. Hence, 5 would


go to the next line, but 6 > 5 is already there so 6 is bumped out:

2 8
5
6

The rest of the steps is here:

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

and so on. The final result is the Young tableau pair

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.

9.5 The differential equation of the Bessel polynomials


In physical problems, the

x2 yn′′ (x) + (2x + 2)yn′ (x) = n(n + 1)yn (x) (9.6)

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

Bessel polynomials. It is easy to show that they indeed satisfy Equation


(9.6)11 . The terms of the equation, taking the explicit form of yn (x) into
8 Gilbert de Beauregard Robinson (1906-1992), Canadian mathematician.
9 Craige Eugene Schensted (1927), physicist. He described the above insertion algorithm
23 years after Robinson, but it was Schensted who made the correspondence widely known.
Interestingly, Schensted changed his name to Ea Ea in 1999. Ea comes from the name of
the Sumerian god Enki.
10 And the Bessel functions are named so by H. L. Krall and O. Frink [344].
11 If we would not have the explicit coefficients of the polynomials provided, still we could

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

9.6 Blocks of maximal size m


There is an obvious way for the generalization of the Bessel numbers.

Definition 9.6.1. The number of those k-partitions of n elements which con-


tain blocks of size 
at most m is given by the m-restricted Stirling number of
the second kind13 nk ≤m .

Note that the number k cannot be smaller than ⌈n/m⌉.


For the 2-restricted second kind Stirling numbers (i.e., the Bessel numbers)
we could easily give a closed form (see (9.1)) but when the blocks can be longer
than two,things get complicated. Therefore, we cannot expect a simple closed
form for nk ≤m for a general m.

The notation nk ≤m is still not very widely known and accepted, but we


insist to be the advocates of this notation as we feel it very expressive.


We postponed the proof of (9.2)) saying that it will be proven in a more
general form later. The time has now come. The m-restricted second kind
Stirling numbers satisfy the recursion
        
n n−1 n−1 n−1 n−m−1
= +k − . (9.7)
k ≤m k − 1 ≤m k ≤m m k−1 ≤m

It is worth it to compare this to the recursion (1.4) of the classical Stirling


numbers. Here we have a third term. A set of n elements can recursively be
partitioned into k blocks of maximal size m such that (1) either we construct
a (k − 1)-partition on n − 1 elements, and we put the last element n into a new
block ( n−1

k−1 ≤m cases); or (2) the element n goes to an already existing block,
which results k n−1

k ≤m
cases. But in the second case we must be careful as
putting down n we can exceed the size limit of the block where n goes. This
can happen only when there are k − 1 blocks on n − 1 − m elements of size not
exceeding m and another block of size m. This latter block can be formed
in
n−1
 n−1−m
m ways, and the rest of the partition can be constructed in k−1 ≤m
ways. The number of these unwanted cases must be subtracted from the above
possibilities.
The initial conditions are, for n ≥ 1,
     
0 n 0
= 1 and = = 0.
0 ≤m 0 ≤m n ≤m

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

The analogue of (1.5) and the exponential generating function

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

The m-restricted version is


  m−1
X nn − i
n+1
=
k + 1 ≤m i=0
i k ≤m

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

Note the following: if m tends to infinity, we get ex − 1 in the parenthesis and


we arrive at the exponential generating function of the classical second kind
Stirling numbers.
n
Some special values of k ≤m

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].

9.7 The restricted Bell numbers


n
The next step after studying the k ≤m numbers is to define the horizontal
sum of nk ≤m :

n  
X n
Bn,≤m = .
k ≤m
k=⌈n/m⌉

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.

Two recursions for Bn,≤m

Taking an n element set, the last element – if it is not in a singleton – can


go to a block of size k ∈ {2, 3, . . . , m − 1}. Choose these k elements in n−1k
ways and put the rest of the elements (there are n − 1 − k) into a partition
taking into account the restriction of the block size. We have n−1 k Bn−1−k,≤m
possibilities. If our element is in a singleton, then the rest of the elements can
be partitioned into Bn−1,≤m different configurations. Summing over k we get
that
   
n−1 n−1
Bn,≤m = Bn−1,≤m + Bn−2,≤m + · · · + Bn−m,≤m (9.9)
1 m−1

Another way of counting such partitions leads to another formula. Let us


suppose that s blocks are full, that is, they contain m elements (0 ≤ s ≤
252 Combinatorics and Number Theory of Counting Sequences

⌊n/m⌋). To fill these blocks, we have


     
n n − m n − 2m n − (s − 1)m
···
m m m m

different possibilities. We need to divide by s!, as the order of these blocks


does not matter:
     
1 n n − m n − 2m n − (s − 1)m n!
··· = s
.
s! m m m m s!m! (n − (s − 1)m)!

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)!

The exponential generating function of the m-restricted Bell numbers


comes immediately by (9.8):

xn x2 x3 xm
X  
Bn,≤m = exp x + + + ··· + .
n=0
n! 2! 3! m!

Or, for the polynomials


n  
X n
Bn,≤m (y) = yk
k ≤m
k=⌈n/m⌉

it reads as

xn x2 x3 xm
X   
Bn,≤m (y) = exp y x + + + ··· + .
n=0
n! 2! 3! m!

9.8 The gift exchange problem


The m-restricted Stirling numbers of the second kind appear in an inter-
esting context – in the so-called gift exchange problem. This problem (and
the description in the below paragraph verbatim) is taken from [33] (see also
the newer version [30]).
We have an evening party with n guests. Each guest brings a wrapped gift,
the gifts are placed on a table (this is the “pool” of gifts), and slips of paper
containing the numbers 1 to n are distributed randomly among the guests.
Avoidance of big substructures 253

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

still describes the game flow uniquely.


The game would be uninteresting if m = 0 as there was only one out-
put (taking into account the simplifications we have made so far). Hence, we
suppose that m > 0. The following considerations can be given. The output
lists always begin with 1 and always terminate with n. The length of a list is
always at least n and at most (n − 1)(m + 1) + 1. Each element between 1 and
n − 1 appears at least once, at most m times; n always appears only once (at
the end of the list). Because of the claim on the order a gift i can appear in
a list only if i − 1 has already appeared. We get the following simplified list
after leaving out the last element.

1 2
1 2 1
1 2 1 2
1 2 2
1 2 2 1
1 1 2
1 1 2 2

For concreteness, we fix the length of the list to be k (so that n − 1 ≤


k ≤ (n − 1)(m + 1)). From this list one can construct an (n − 1)-partition on
k elements in the following way: the first block contains the positions of 1,
the second block contains the positions of 2, and so on. Finally, the last block
contains the positions of the penultimate gift n − 1.
In the above example, we get the below 3 − 1 = 2-partitions:

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

possible gift exchange game outputs.

9.9 The restricted Stirling numbers of the first kind

Problems with duality

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

while the corresponding inverse matrix is

 −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

behavior [149]. This behavior is an obstacle for direct combinatorial interpre-


tations of these sequences of the rows in the inverses. Although it is obvious
how to define the nk ≤m numbers or, better, the signed version (−1)n−k nk ≤m
   

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.

Definition 9.9.1. The number of permutations of an n element set where


all the k cycles are restricted to be of length at most m is given by the m-
restricted (or simply
  restricted) Stirling number of the first kind. We denote
these numbers by nk ≤m (k ≥ ⌈n/m⌉).

After reaching this point in the text, you might


 have sufficient routine to
determine the exponential generating function of nk ≤m :

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

and the elements are the Bessel numbers.


Avoidance of big substructures 257

Two recursions for nk n,≤m


 

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
 

insert the last element


  among the other elements. There are n different places,
so this results in n nk ≤m cases. We must be careful not to exceed the maximal
cycle size m. Therefore, we have to subtract the number of the cases  when
n n−m

the last element goes into a cycle of m elements. There are m! m k−1 ≤m
permutations with one m-sized cycle, and this number must be subtracted
(the binomial coefficient does not count the order of the m elements but we
must consider this (m − 1)! order; moreover, the last element can go into m
places and this explains the (m − 1)!m = m! factor).
(2) This case is simple: the last element goes into a singleton, and the rest
n

of the elements form a permutation with k − 1 cycles: k−1 ≤m
.
Another identity is the following, for k > 0:
  m−1  
n+1 X n! n−i
= . (9.12)
k ≤m i=0
(n − i)! k − 1 ≤m

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

holds true (exercise), relation (9.12) reduces to the basic recursion of nk if


 

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

The simplest way to present a proof is via generating functions. If k = 2 and


2 ≤ n ≤ m + 1, (9.11) simplifies to
2m   2
xn x2 x3 xm

X n 1
= x+ + + ··· + .
n=2
2 ≤m n! 2! 2 3 m

We need to find the coefficient of xn on the right-hand side. During squaring


we multiply every member in the first factor by every member of the second
factor. But now we need only those factors which result in the nth power of
n−k
x. If a term in the first factor is xk /k, then the second term must be xn−k .
Thus,
  n−1
n 1 1X 1
= .
2 ≤m n! 2 k(n − k)
k=1
 
1
Hence, by the decomposition k(n−k) = n1 k1 + n−k
1
we infer that

  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 ).

The restricted factorials An,≤m

Summing all the nk Stirling numbers of the first kind we simply


 
  get n!, the
total number of permutations on n elements. If we sum the nk ≤m restricted
Stirling numbers, the result is far from being so simple. The number
n  
X n
An,≤m =
k ≤m
k=⌈n/m⌉
260 Combinatorics and Number Theory of Counting Sequences

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,≤m = An−1,≤m + (n − 1)An−2,≤m + (n − 1)(n − 2)An−3,≤m + · · · +

+(n − 1)(n − 2) · · · (n − (m − 1))An−m,≤m . (9.14)


As the Bn,≤m numbers are “restricted versions” of the Bell numbers, the
An,≤m numbers are the “restricted versions” of the factorials. Indeed,

An,≤n = n!.

Therefore, we call these numbers as m-restricted factorials or simply restricted


factorials 15 .
Note that
An,≤2 = Bn,≤2 = In .
The exponential generating function of these numbers is

xn x2 x3 xm
X  
An,≤m = exp x + + + ··· + .
n=0
n! 2 3 m

See the Outlook of the next chapter to get information about the newest
results with respect to the restricted Stirling and related numbers.

15 There is no commonly used name for these sequences.


Avoidance of big substructures 261

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

3. Take the Young tableau pair

1 4 6 7 1 2 3 4
2 3 5 8 5 7 8 9
9 6

and decode the original permutation by the Robinson-Schensted corre-


spondence. (Hint: observe from the second table that the last element
we put down is 8, and 8 was bumped out necessarily by 7. As 7 is in
the first row, we infer that 7 is the last element in the permutation. The
other steps are similar.)
4. By using (4.1) show that the Bessel numbers form log-concave sequences
(n ≥ 1). Hint: let

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).

10. The same task as above for the special values


  
n n

n
  4 2  (m ≥ 4);

= 5(n+3)
2
n
5 (m = 3);
n − 3 ≤m   n
15 6 (m = 2).

11. Define the m-restricted Fubini numbers as it should be:


n  
X n
Fn,≤m = k! .
k ≤m
k=0

Using (9.8), determine the exponential generating function of Fn,≤m ,


and the convergence radius for m = 2, 3. (What is the proper lower limit
for k in the summation?) One can find some determinantal identities for
Fn,≤m in [342].
12. Prove that the above-defined restricted Fubini numbers are always even
when n > m ≥ 1.
13. Prove the recursion
     
n n n
Fn,≤m = Fn−1,≤m + Fn−2,≤m +· · ·+ Fn−m,≤m (n > m).
1 2 m

(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

15. Prove combinatorially that


Bm+1,≤m = Bm+1 − 1 (m > 1),
Bm+2,≤m = Bm+2 − 1 − (m + 2) (m > 1).

16. By combinatorial reasoning, show that for any m > n2


 
 
n
Bn,≤m = Bn,≤m−1 + Bn−m,≤m .
m

17. Generalize the formulas of the previous exercise:


n−m
X n 
Bn,≤m = Bn − Bn−m−k (m < n ≤ 2m).
m+k
k=1

(See [416] for the details.)


18. By using (9.9), justify that
Bn+p,≤m ≡ Bn,≤m (mod p).
Prove also that the congruences
Bp,≤m ≡ 1 (mod p)
are valid for any prime p for m < p. (The last two results can be found
in [438].)
19. Based on (1.11) in Chapter 1, we can look for a sequence N m (n, k) such
that
N m (n, k) = (−1)n+k M2m (−k, −n),
to
n insist duality. Prove that in this case, by using the recursion (9.7) for
k ≤m , we have
N m (n − 1, k − 1) =
 
k+m−1
N m (n, k) + (n − 1)N m (n − 1, k) − N m (n, k + m).
m
(See (1.10) in [149].)
20. Prove that
⌊n/2⌋  
X n (2j)!
An,≤2 = ,
j=0
2j j!2j

and
⌊n/3⌋  
X n (3j)!
An,≤3 = An−3j,≤2 .
j=0
3j j!3j

(See the online short note of Dennis Walsh [580].)


264 Combinatorics and Number Theory of Counting Sequences

21. Research problem: Is it possible to modify the combination lock problem


of

n Section 6.4

n to find m-restricted and m-associated Eulerian numbers
k ≤m and k ≥m such that

n  
X n
Fn,≤m = ,
k ≤m
k=0

and
n  
X n
Fn,≥m = ?
k ≥m
k=0

(For the associated partitions, see the next chapter.)


Avoidance of big substructures 265

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

10.1 Associated Stirling numbers of the second kind

n

A binomial representation of n−k

To introduce the associated Stirling numbers of the second kind, we do


not follow the usual way of the book (enumeration problem, then definition,
then recursion). That has been done sufficiently many times. Instead, we first
show an interesting representation of the classical Stirling numbers and then
we prove that the occurring sequence enumerates what we expect – partitions
of a given number of blocks where the size of the blocks is limited from below.
Gazing back to the recursion (1.4) of the second kind Stirling numbers, we
can easily have a formula for the parameter pair n, n − 1:
       
n n−1 n−1 n−1
= + (n − 1) = + (n − 1)
n−1 n−2 n−1 n−2
   
n−2 n−2
= + (n − 2) + (n − 1)
n−3 n−2
 
n−2
= + (n − 2) + (n − 1) = · · ·
n−3
 
n
= 1 + 2 + · · · + (n − 2) + (n − 1) = (n ≥ 2).
2
For the pair n, n − 2:
         
n n−1 n−1 n−1 n−1
= + (n − 2) = + (n − 2) ,
n−2 n−3 n−2 n−3 2
or, rolling back to the lowest parameter values,
       
n n−1 n−2 2
= (n − 2) + (n − 3) + ··· + 1 =
n−2 2 2 2
n−2  
X k+1
k .
2
k=1

267
268 Combinatorics and Number Theory of Counting Sequences

Can we simplify this sum? It is very useful for us to note that


     
k+1 k+1 k+1
k = +3 .
2 2 3
This observation results in
n−2
X k + 1 n−1X k  n−1
X k 
k = +3 .
2 2 3
k=1 k=2 k=3

Both sums are of the same form:


n  
X k
c
k=c

It is worth it to remember this often occurring sum. It can be proven (exercise!)


that
n    
X k n+1
= . (10.1)
c c+1
k=c
By making use of this formula, we get the ultimate form
     
n n n
= +3 (n ≥ 4).
n−2 3 4
We will see immediately that it is always true that the Stirling numbers of the
second kind with parameters n, n − k can be expressed as a sum of binomial
coefficients. The coefficients of the binomials will be studied soon. For the
moment, let us write this representation in the following form:
  X k    
n k+j n
= (n ≥ k + 1). (10.2)
n−k j=0
j ≥2 k + j

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

With small effort we can find the exponential generating function of nk ≥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

Multiplying both sides by tk xn /n! and sum over k = 0, 1, . . . , n and over


n = 0, 1, . . . . The left-hand side is simply the exponential generating function
of the Bell polynomials (see (3.3)), and so
∞ X
n X
k 
n k xn
  
x
−1)
X n−j
et(e = t .
n=0 k=0 j=0
k − j ≥2 j n!

Change the order of the summation:


∞ n   n 
xn X n j X n − j
X 
t tk−j =
n=0
n! j=0
j k − j ≥2 k=j

∞ ∞ n 
(xt)j X xn−j X n − j
X 
tk−j .
j=0
j! n=j
(n − j)! k − j ≥2 k=j

By the (2.7) multiplication rule of generating functions (Cauchy product), we


see that the right-hand side is a product of two functions:
∞ n  
!
xt
X xn X n k
e · t . (10.4)
n=0
n! k ≥2
k=0
x
Recalling that the left-hand side is et(e −1) , we divide both sides by ext to get
∞ n  
X xn X n x
tk = et(e −1−x) . (10.5)
n=0
n! k ≥2
k=0

This is the exponential generating function of the polynomials made up by


the nk ≥2 numbers. From this the exponential generating function of nk ≥2
can also be recovered. The function on the right is represented as

x
−1−x)
X [t(ex − 1 − x)]k
et(e = ,
k!
k=0

and we extract the coefficients of t:


∞  
X n xn 1 x k
= (e − 1 − x) . (10.6)
k ≥2 n! k!
n=k

It is very interesting to compare this to (9.5). We have


k k
x2 x1
 
1 1 x
x+ and e −1− ,
k! 2! k! 1!
so that these are “complement” of each other. Indeed, continuing the sum on
the left-hand side parenthesis, or truncating the sum on the right parenthesis
we get the same function ex − 1.
270 Combinatorics and Number Theory of Counting Sequences
 1
k 2
1
Note also that the series in k! ex − 1 − x1! starts with x2! and, after
raising to the kth power the smallest power of x will be 2k. Thus, nk ≥2 = 0


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

The functional equalities also


show us that this relation is valid for n ≥ mk,
for n smaller than this nk ≥m = 0. Except that 00 ≥m = 1.


We close this section by the combinatorial proof of this recursion. If the


last element, n, goes into an already existing block where there are at least
m elements, then there are n − 1 elements going to k blocks and we insert n
into some of the k blocks. This explains the first term. If, in turn, the block
where n goes is still not having m elements, then it must have m − 1 elements,
not less. To form such a block, we must choose m − 1 elements from n − 1
n−1

such that the order of the elements does not count ( m−1 cases), and we put
n into this block. The n − (m − 1) − 1 = n − m other elements must form
k − 1 blocks with the restriction that the blocks contain at least m elements:
n−m

k−1 ≥m possibilities. This explains the second term.
Other formulas as well as special values can be found among the exercises.

10.1.1 The associated Bell numbers and polynomials


Definition 10.1.1. The Bn,≥m number gives that how many partitions are
there on n elements such that the partitions do not contain blocks smaller than
of size m. They are called m-associated Bell numbers or simply associated Bell
numbers2 .

The associated Bell numbers are related to the nk ≥m numbers via




⌊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

And similarly we define the associated Bell polynomials:


⌊n/m⌋  
X n
Bn,≥m (x) = xk .
k ≥m
k=0

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.

Two relations between the associated and classical Bell numbers

In the particular case when m = 2 we have a simple way to relate Bn,≥2


to the classical Bell numbers:

Bn = Bn,≥2 + Bn+1,≥2 .

Any partition on n or n + 1 elements without singletons can be identified with


a partition on n elements. The partitions counted by Bn,≥2 are identified with
themselves, and from the partitions counted by Bn+1,≥2 we remove n + 1 and
the elements of the block of n + 1 are separated into singletons. This process
can be reversed, so the equality follows. This idea comes from M. Bóna [87,
Proposition 2.].
It is possible to relate the Bell and 2-associated Bell numbers in another
way:
n  
X n
Bn = Bk,≥2 .
k
k=0

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

where the previous identity comes from by re-indexing.


The associated Bell numbers are far less known than the classical Bell
numbers. See an appearance of these numbers in [217].

10.2 The associated Stirling numbers of the first kind


The process of how we get the associated Stirling numbers of the first kind
can be performed as we did at the beginning of the previous section, so we
can have shortcuts. In the first kind case, it is similarly true that
   
n n
= .
n−1 2

Applying (10.1) we conclude that


     
n n n
=2 +3 .
n−2 3 4
In general,
  X k    
n k+j n
= (n ≥ k + 1).
n−k j=0
j ≥2 k + j

Re-indexing this,
  X k    
n n−j n
= . (10.10)
k j=0
k − j ≥2 j

Multiplying by tk and summing over k = 0, 1, . . . , n we get the rising factorials


on the left-hand side, see (2.41). Then multiplying by xn /n! and summing over
n, we get the (1 − x)−t exponential generating function of the rising factorial
(use Exercise 23 in Chapter 2). The right-hand side is structurally the same
as in the second kind case (10.4). Hence, the counterpart of (10.5) is
∞ [n/2]  
X xn X n
tk = (1 − x)−t e−xt .
n=0
n! k ≥2
k=0

The right-hand side can be rewritten by applying a simple trick:

(1 − x)−t e−xt = et[− ln(1−x)−x] .


274 Combinatorics and Number Theory of Counting Sequences

Expanding the exponential, we get the counterpart of (10.6):


∞  
X n xn 1 k
= (− ln(1 − x) − x) .
k ≥2 n! k!
n=2k

From Exercise 5 of Chapter 2 we know that − ln(1 − x) is the generating


function of 1/n:

X 1 n
− ln(1 − x) = x .
n=1
n
How can we put this into a generalized form? Subtract more terms from the
series expansion of − ln(1 − x). These lead to the associated Stirling numbers
of the first kind :
∞   k
xn xm−1

X n 1 x
= − ln(1 − x) − x − − · · · − . (10.11)
k ≥m n! k! 2 m−1
n=mk

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].

10.2.1 The associated factorials An,≥m


The associated factorials are defined as follows.

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

And similarly we define the associated factorial polynomials:


⌊n/m⌋  
X n
An,≥m (x) = xk . (10.13)
k ≥m
k=0

3 Sometimes generalized derangements are also used.


Avoidance of small substructures 275

The recursion corresponding to (10.9) reads as


n−m
X
An+1,≥m = n! + nk An−k,≥m .
k=m−1

From (10.12) it is immediate that

An,≥m (x) = (n − 1)An−1,≥m (x) + (n − 1)m−1 · x · An−m,≥m (x),

while the consequence of (10.11) is the exponential generating function of the


associated factorial polynomials:

yn y m−1
  
X y
An,≥m (x) = exp x − ln(1 − y) − y − − · · · − . (10.14)
n=0
n! 2 m−1

When m = 2 we get a particular case of the associated factorials which is,


for some reason, much more known in the literature than the general case. The
An,≥2 numbers are called “derangement numbers” or simply “derangements”,
and commonly denoted by Dn . In what follows, we also apply this notation
to shorten the formulas and not carry “≥ 2” in the lower index.

10.2.2 The derangement numbers


It comes from (10.11) that the exponential generating function of the se-
quence An,≥2 = Dn is

X xn e−x
Dn = exp (− ln(1 − x) − x) = .
n=0
n! 1−x

This offers a simple way of calculating Dn . Multiplying e−x by 1/(1 − x) it


is easy to see by Cauchy’s product and by the comparison of the coefficients
that
n
X 1
Dn = n! (−1)i . (10.15)
i=0
i!
A consequence of this fact is the nice and simple asymptotic relation:
Dn 1
∼ . (10.16)
n! e
Pn i1 i −x
This can be seen by noting that i=0 (−1) i! x is the partial sum of e .
Substituting x = 1 and tending to infinity with n we get (10.16).

The proof of (10.15)

Now we prove (10.15). The inclusion-exclusion principle of Section 7.1 will


276 Combinatorics and Number Theory of Counting Sequences

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

is not empty (there is a permutation such that i = 1, 2, . . . , n are all fixed


points), we have that m = n, where m is introduced in (7.1) on p. 168. We
determine
\
Ai ,



i∈T

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

This is so because we do not move those prescribed j points, indexed by T ,


and the rest of the elements, n − j, goes to a permutation in (n − j)! ways.
By the inclusion-exclusion principle,
n l
l
[ X X \ X X
Ai = (−1)j−1 Ai = (−1)j−1 (n − j)!.



i=1 j=1 T ⊂{1,2,...,n} i∈T j=1 T ⊂{1,2,...,n}
|T |=j |T |=j

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

And this is the same as (10.15)

The recurrence Dn = nDn−1 + (−1)n and its combinatorial proof


Avoidance of small substructures 277

Let us scrutinize (10.15) a bit further. Applying it to nDn−1 , we have


n−1 n
X (−1)i X (−1)i
nDn−1 = n(n − 1)! = n! − (−1)n .
i=0
i! i=0
i!

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 · · · .

Notice that when n is even, there is


 only
 one permutation of type n/2−1, which
is the permutation σn/2−1 n − 1 n . This permutation has two fixed points
so it does not belong to F or D; it is out of consideration of our mapping.
Also, still when n is even, there is one permutation of type n/2, namely σn/2
itself. This permutation belongs to D but not F . Therefore, when n is even,
the bijection is only an “almost” bijection between F and D: it is a bijection
from F onto D \ {σn/2 }. In this case, therefore, Dn = nDn−1 + 1.
Avoidance of small substructures 279

When n is odd, there is only one permutation which is of type (n − 1)/2:


σ(n−1)/2 n . This is an element of F but not of D. So our map, for odd n, is
a bijection between F \ {σ(n−1)/2 n } and Dn . Hence, Dn = nDn−1 − 1. The
proof is now complete.

10.3 Universal Stirling numbers of the second kind


During studying the restricted and associated Stirling numbers, we saw
that the exponential generating functions reflected in a very clear way what
kind of restrictions were applied. For example,
∞   k
xn x1 x2 x3 xm−1

X n 1 x
= e −1− − − − ··· −
k ≥m n! k! 1! 2! 3! (m − 1)!
n=mk

shows that from the partitions belonging to nk ≥m we subtract the blocks




having 1, 2, . . . , m − 1 elements. To the contrary,


mk   k
xn x2 x3 xm

X n 1
= x+ + + ··· +
k ≤m n! k! 2 3 m
n=k

belongs to numbers counting permutations. Note that the numbers in the


denominators (with or without factorial) reflect the fact that in one structure
(partition) the elements in an individual block are of arbitrary order, while in
the other structure (permutation) the order is fixed, up to order-preserving
shifting.
These observations suggest a far reaching generalization of the Stirling
numbers. We can decide whether we permit the existence of j pieces of blocks
of size i. If we permit we set ai,j = 1, otherwise we set ai,j = 0. Clearly, j
can be 0 (it makes sense to avoid blocks of size 0) but i > 0 is necessary (it
makes no sense to talk about 0 sized blocks). We collect these ai,j numbers in
an (infinite) matrix.
 
a1,0 a1,1 a1,2 · · ·
a2,0 a2,1 a2,2 · · ·
A = a3,0 a3,1 a3,2 · · ·
 
.. .. .. ..
 
. . . .
We also introduce the sets

Ki = {j | ai,j = 1}.

This simply contains the permitted number of the blocks of size i.


We are ready to introduce the universal Stirling numbers.
280 Combinatorics and Number Theory of Counting Sequences

Definition 10.3.1. Given a matrix A, the universal Stirling number of the


second kind is denoted by nk A and gives that how many k-partitions there
are on n elements such that the number of the blocks of size i is contained in
the set Ki .

Definition 10.3.2. The


n  
X n
Bn,A =
k A
k=0

numbers are the universal Bell numbers, and the polynomials


n  
X n
Bn,A (x) = xk
k A
k=0

are the universal Bell polynomials.

Examples

If all the elements of Aare


1 (this matrix will be denoted by A1 ), then we
have no restriction at all: nk A = nk .

1
How can we get back already known cases like, for example, the m-
restricted Stirling numbers? All the blocks contain maximum m elements,
so blocks of size m + 1, m + 2, . . . are not permitted. It does not matter how
many blocks there are as far as there is zero number of oversized blocks. We
can transfer this restriction to the A matrix if the Ki sets are defined as
follows.

Ki = {0, 1, 2, . . . } (i ≤ m)
Ki = {0} (i > m)

The corresponding matrix is


 
1 1 1 1 ···
1 1 1 1 · · ·
 ..
 

. 
 
A≤m 1
= 1 1 1 · · ·
.
1
 0 0 0 · · ·

1
 0 0 0 · · ·

..
.

The first row in which zero appears is the (m + 1)-th. Hence,


   
n n
= .
k A≤m k ≤m
Avoidance of small substructures 281

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 universal generating functions

We are going to determine the generating functions of the universal Stirling


numbers relying on (2.30). It can be transformed into a formula which is more
useful for the present purpose:

X yn
Bn,A (x) =
n=0
n!
282 Combinatorics and Number Theory of Counting Sequences
 
∞ X
 n
j 1  j2 jn 
xj 1 xj 2 · · · xj n y1 y2 yn
X X  

 ··· 

n=0 k=0 j1 +2j2 +···+njn =n
j1 !j2 ! · · · jn ! 1! 2! n! 

j1 +j2 +···+jn =k
ji ∈Ki

The assumption that ji ∈ Ki can be eliminated if we apply the elements of


A. If some ji s do not belong to Ki , then those members – regardless of the
values of the other j indices – do not appear in the sum. This cancellation is
achieved by putting the product of ai,ji in the nominator:
 
∞ n j j
ai,j1 · · · ai,jn xj1 +···+jn y 1 1 yn n 
X    
X X
=  · · · .
n=0

j +2j +···+nj =n
j 1 !j2 ! · · · j n ! 1! n! 
k=0 1 2 n
j1 +j2 +···+jn =k
Q
To shorten the formula, we use the symbol inside the sum, and the summa-
tion over the condition j1 +j2 +· · ·+jn = k can be relaxed: j1 +j2 +· · ·+jn ≥ 0,
and so  

X X n
Y ai,j x i yj
 i
 ji
i

=  .
n=0

j +2j +···+nj =n i=1
j i ! i! 
1 2 n
j1 +j2 +···+jn ≥0

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!

Application of the universal generating functions to the former


examples

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

By the functional identity ex ey = ex+y


∞  i
y2 y m−1
  
Y xy y
exp = exp x e − 1 − y − − ··· − .
i=m
i! 2 (m − 1)!
n
Where the exponential generating function of k ≥m also follows (after setting
x = 1 and renaming the variable y to x):
∞   k
xn x1 x2 x3 xm−1

X n 1
= ex − 1 − − − − ··· − .
k ≥m n! k! 1! 2! 3! (m − 1)!
n=mk

The proof of (9.8) is very similar.

Partitions with blocks of even size

Another interesting application of the universal generating functions is the


case when we permit only blocks of even size. The matrix is already calculated,
see (10.18), whence
∞ ∞
yn
 i
X Y xy
Bn,Ap (x) = exp =
n=0
n! i=1
i!
2|i
  2
y4 y6

y
exp x + + + ··· .
2! 4! 6!
The inner sum is the cosh (hyperbolic cosine function) (more exactly cosh(y)−
1):

X y 2i
cosh(y) =
i=0
(2i)!
It is equally correct to say that cosh is the exponential generating function of
the sequence 
0, if n is odd;
an =
1, if n is even.
(Compare this to Exercise 1 of Chapter 2.) The cosh function helps to simplify
the result:

X yn
Bn,Ap (x) = exp [x (cosh(y) − 1)] .
n=0
n!
We show how this equality leads to a recursion for the Bn,Ap = Bn,Ap (1)
numbers. Substitute x = 1 and take the derivative of both sides (cosh′ = sinh,
where sinh is the hyperbolic sine function):

X y n−1
Bn,Ap = exp(cosh(y) − 1) sinh(y).
n=1
(n − 1)!
284 Combinatorics and Number Theory of Counting Sequences

The hyperbolic sine is the exponential generating function of



1, if n is odd;
an =
0, if n is even.
Thus,
∞ ∞
! ∞ !
X y n−1 X yn X y 2n−1
Bn,Ap = Bn,Ap =
n=1
(n − 1)! n=0
n! n=1
(2n − 1)!
 
∞ [n/2] 
X X n−1 y n−1
 Bn−2k,Ap  .
n=1
2k − 1 (n − 1)!
k=1

Comparing the coefficients, the wanted recursion follows:


[n/2] 
X n−1
Bn,Ap = Bn−2k,Ap (10.21)
2k − 1
k=1
The initial values are B0,Ap = 1, B1,Ap = 0.

10.4 Universal Stirling numbers of the first kind


We know already very well that the only essential difference in the gener-
ating functions when we turn from partitions to permutations is the k! → k
change in the denominators. Therefore, the universal Stirling numbers of the
first kind do not give much surprise in the formalism5 .
The set Ki and the matrix A are similarly defined as in the previous
section.
Definition 10.4.1. The universal Stirling number of the first kind is denoted
by nk A and it gives that how many permutations there are on n elements which
 

contain k cycles and the number of cycles of length i is in the set Ki .


Definition 10.4.2. The
n  
X n
An,A =
k A
k=0
numbers are called universal factorials, while the polynomials
n  
X n
An,A (x) = xk
k A
k=0
are the universal factorial polynomials.
5 This statement does not mean, however, that the underlying number sequences and

polynomials are similar. It is enough to rememberthat


the horizontal generating function of
the n numbers is the rising factorial, while of n
 
k k
is the Bell polynomial, and these are
by no means similar to each other.
Avoidance of small substructures 285

The exponential generating function of these polynomials can be deduced


as we did in the second kind case:
∞ ∞ X ∞  j
X yn Y ai,j xj y i
An,A (x) = . (10.22)
n=0
n! i=1 j=0
j! i

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?

2. Give a combinatorial interpretation for the (10.1) binomial sum.


3. How many surjective functions are there from an n-set to a k-set such
that each image is taken at least m times?
4. Give a combinatorial interpretation for (10.3) and (10.10).
5. Generalize (10.3) and (10.10) identities by following the pattern of Ex-
ercises 6 and 7 in Chapter 9.
6. Show that    
mk 1 mk
=
k ≥m k! m, m, . . . , m
| {z }
k

(see the Appendix for the definition of the multinomial coefficient).


7. Prove the validity of  
mk (mk)!
= .
k ≥m k!mk
(It is fun to note that this yields that (mk)! is divisible by k!mk for any
m. Try to prove this latter fact without using combinatorics.)
8. Prove the following identity:
  n−(k−1)m   
n 1 X n n−k
= (n ≥ km).
k ≥m k k k − 1 ≥m
k=m

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

Here n ≥ 4, 6, 8, respectively. (Hint: the first can easily be proven com-


binatorially. The other two can be established by using the first together
with the previous exercise.)
11. Prove that the above special values are valid:
   
n n
= (n ≥ 2, m ≥ 2),
n − 1 ≤m 2
(
3n−5 n
  
n 4 3 (n ≥ 4, m ≥ 3);
= n

n − 2 ≤m 3 4 (n ≥ 4, m = 2),
 
n n−2

   4 2
 (n ≥ 4, m ≥ 4);
n n n

= 15 6 + 10 5 (n ≥ 4, m = 3);
n − 3 ≤m   n
15 6 (n ≥ 4, m = 2).

(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

(Hint: check (2.21).)


288 Combinatorics and Number Theory of Counting Sequences

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

in the case when we permit only even number of cycles.


17. Use the generating function interpretation of sinh and cosh given in the
text to prove that
1 x 1 x
sinh(x) = (e − e−x ) and cosh(x) = (e + e−x ).
2 2

18. Prove that


Bn,≥2 ≡ 1 (mod p)
for any prime p. (See [87, Corollary 3.])
19. Let h(n) be the number of fixed point free involutions on 2n elements
(clearly, there are no such permutations on odd number of elements).
2
Show that the exponential generating function of h(n) is ex /2 , and also
that
(2n)!
h(n) = n .
2 n!
(This is Example 3.54 in [83].)
20. Let S be a subset of the positive integers. Moreover, let Ki be the set of
positive integers for i ∈ S, and Ki = {0} otherwise. Show that for this
setting
   
n+1 X n! n−s+1
= ,
k A (n − j + 1)! k−1 A
s∈S
  X  n n − s + 1
n+1
= .
k A s−1 k−1 A
s∈S
n n
(See [578] for these results and more on k A , k A , An,A , Bn,A for this
particular A.)
Avoidance of small substructures 289

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!

The Dn,k numbers are called rencontres numbers.


25. From (10.15) it follows that

Dn = (n − 1)(Dn−1 + Dn−2 ) (n ≥ 2).

Find a combinatorial proof of this simple recursion. (The initial values


are D0 = 1 and D1 = 0.)
290 Combinatorics and Number Theory of Counting Sequences

26. A signed permutation is an ordinary permutation with optional bars on


each of the elements (equally, as if we painted all the elements black or
white, independently). Show that the number of signed derangements,
which is denoted in the literature by DnB , can be calculated as
n
X (−1)k
DnB = n! 2n−k .
k!
k=0
 
1 2 3 4
Note that, for example, is not a signed derangement as
1 3 4 2
 
1 2 3 4
one is a fixed point, while is, because one is not a fixed
1 3 4 2
point anymore, it is mapped to its barred counterpart.
27. Give a proof for the derivative formula
n−1
X 1 Ak,≥2 (x)
A′n,≥2 (x) = −nAn−1,≥2 (x) + n! (n ≥ 1).
k! n − k
k=0

In particular,
n−1
X 1 Dk
A′n,≥2 (1) = −nDn−1 + n! (n ≥ 1).
k! n − k
k=0

(Hint: it comes from (10.14) that the exponential generating function


x
e−y
of An,≥2 (x) is 1−y . Taking the derivative with respect to x, we get
the exponential generating function of A′n,≥2 (x). The rest is a simple
calculation.)
28. Show that for any n ≥ 0

xBn,≥2 (x) = Bn+1,≥2 (x) − nxBn−1,≥2 (x),

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

7. The asymptotics (10.16) of the derangement or associated factorial num-


bers can be generalized for arbitrary m. It is true that
An,≥m 1
→ Hm−1 (n → ∞).
n! e
Here Hm−1 is the m − 1st harmonic number. See [235, p. 261].
8. The asymptotic behavior of the associated Bell numbers and the as-
sociated first and second kind Stirling numbers was studied in [585].
The asymptotics of the restricted Bell numbers, factorials, and first and
second kind Stirling numbers was considered in [586]. However, there
is an incorrect statement in [585] which was subsequently corrected in
[179], where even more general statements can be found. We had known
before the paper [586] that An,≤2 , the number of involutions, behave
asymptotically like

n! 1 exp n2 + n − 41

An,≤2 ∼ √ √ as n → ∞
2π 2n nn/2

(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

Stirlings eventually become zero). In [586] it is proven that for fixed


positive integers m and a, there holds
a − 2a2
    
n 1 2a 1
lim = a n 1+ +O ,
n→∞ n − a
≤m 2 a! n n2
a − 2a2
    
n 1 1
lim = a n2a 1 + +O 2
.
n→∞ n − a 2 a! n n
≤m

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

See also [332, 397].


12. The derangement numbers (associated factorials) can be generalized
such that we consider the restriction we had in the r-Stirling number
case, i.e., some elements are forced to be in different cycles. If we con-
sider permutations without fixed points such that the first r elements are
in separate cycles, we get the r-derangement numbers. These numbers
were studied in detail [587].
13. Restricted and associated Lah numbers and their horizontal sums were
recently defined and studied in [55, 215]. In [215] a combinatorial inter-
pretation is
 given for the absolute values of the elements in the inverse
matrix of nk A , where A is as in Exercise 20.

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 .

In [136] one finds a combinatorial proof which employs skew derange-


ments.
Relative derangements can be defined for signed permutations just as
standard derangements can be (see Exercise 26). Denoting the number
of signed relative derangements by QB
n , it can be shown [138] that

QB B B
n = Dn + Dn−1 .

Signed permutations are also, and often, called type B permutations.


Accordingly, signed derangements are also called type B derangements.
These were originally introduced in 2006 by C.-O. Chow [150].
Part III

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.

11.1 The notion of congruence


We introduce some notations first. The fact that the integer a divides the
integer b is denoted as
a | b.
In other words, a divides b means that there exists an integer c such that
ac = b.
This fact1 equivalently means that b is an integer multiple of a.
If this is not the case (in symbols, a ∤ b), then we can look for the remainder
of the division b/a. In any circumstances, b can be expressed as
b = ak + r,
k is a non-negative integer, and r (0 ≤ r < a) is the remainder or residue.
If two numbers, say b1 and b2 , have the same residue if we divide them by
a, then we say that b1 and b2 are congruent modulo a. This fact is denoted as
follows:
b1 ≡ b2 (mod a).
The number a is called modulus. For instance, 5 and 8 are congruent with
respect to the modulus 3, because the residue is 2 in both cases. In symbols,
5≡8 (mod 3).
1 That a divides b is often also expressed as a is a factor of b.

297
298 Combinatorics and Number Theory of Counting Sequences

It is particularly important when the modulus is a prime number.

b≡0 (mod p),

means that b is an integer multiple of p.

Congruence of fractions

It is often useful to generalize the congruence notation to rational numbers.


The rational numbers will be written in reduced form, that is, the nominator
and denominator have no factor in common. For fractions, the congruence is
understood to be taken on the nominators. For example,
3 8
≡ (mod 5).
7 7
Taking another example,
a
≡ 0 (mod c2 )
b
means that a is divisible by the second power of c (and, by our reduced form
agreement, b is not divisible by c).

11.2 The parity of the binomial coefficients


The theorem on the parity (modulo 2 behavior) of the binomial coefficients
is interesting in itself, and it is good to know about it because it can be applied
in many situations. This question was first studied in detail by Glaisher2 . The
following statement can be proven for non-negative integers n and k:
  (
n 0 (mod 2), if n is even and k is odd;
≡ ⌊n
2⌋
 (11.1)
k ⌊k⌋
(mod 2), otherwise.
2

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

Thus, for example, there are 8 odd numbers among 14


 14 14

0 , 1 , . . . , 14 ,
because
14 = 23 + 22 + 21 = 11102 ,
thus w = 3 and so a(14) = 2w = 8.

11.2.1 The Stolarsky-Harborth constant


There is an interesting function f (n) counting the number of odd elements
in the first n rows of the Pascal triangle:
n−1
X
f (n) = a(i). (11.2)
i=0

We have that f (0) = 0, f (1) = 1, and for n ≥ 2



3f (m), if n = 2m;
f (n) = (11.3)
2f (m) + f (m + 1), if n = 2m + 1.
The function f (n) can be approximated by using the constant θ =
log(3)/ log(2) such that
f (n)
lim inf = λ,
n→∞ nθ
f (n)
lim sup θ = 1.
n→∞ n
The constant λ is known as the Stolarsky-Harborth constant, and its numeric
value is
λ = 0.8125565590 . . . .
More on the function f and the liminf-limsup relations, see [278, 357, 540].
See also [230, Section 2.16].

11.3 Lucas congruence for the binomial coefficients


A strikingly powerful modulo p reduction is possible by the congruence of
Lucas. First let us see an example, how it can be applied before we give its
proof.
Let n = 637 899, and k = 77 681. Let us determine nk modulo p. Note that

637 899

77 681 has 102 625 digits, so some trick and theorem is necessary, indeed.
The method of Lucas is as follows. First let us write n and k in base p:
n = 3 + 2 · 7 + 5 · 72 + 4 · 73 + 6 · 74 + 2 · 75 + 5 · 76 ,
k = 2 + 2 · 7 + 3 · 72 + 2 · 73 + 4 · 74 + 4 · 75 .
300 Combinatorics and Number Theory of Counting Sequences

Then we reduce the binomial coefficient modulo p according to the digits of


n and k (typeset in bold) as follows:
         
637 899 3 2 5 4 6 2 5
≡ (mod 7).
77 681 2 2 3 2 4 4 0

The penultimate binomial coefficient, 24 is zero, so we have that 637 899


 
77 681 is
divisible by 7:  
637 899
≡ 0 (mod 7).
77 681

The proof of Lucas’s theorem

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

To proceed, we need the following statement with respect to the binomial


coefficients. If 0 < k < p, then kp is divisible by p, that is,


 
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

Whence, by induction, it follows that


i i
(1 + x)p ≡ 1 + xp (mod p).
Congruences 301

Continuing our original calculation, we get


n   a
X n k Y i
x ≡ (1 + xp )ni (mod p).
k i=0
k=0

Applying the binomial theorem in each term on the right-hand side,


n   a ni  
X n k YX ni pi si
x ≡ x . (11.5)
k i=0 s =0
si
k=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 its final form, Lucas’s theorem therefore reads as


      
n n0 n1 na
≡ ··· (mod p).
k k0 k1 ka
We will see that theorems similar to Lucas’s can be proven with respect
to the Stirling numbers, but first we need some additional results.

11.4 The parity of the Stirling numbers


First, we study the parity of the Stirling numbers. It will turn out that the
test whether a given Stirling number (let it be of the first or second kind) is
even or odd can be traced back to the parity check of the binomial coefficients.

Parity of the Stirling numbers of the first kind

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

On the right-hand side, we clearly have this congruence:


x(x + 1)(x + 2) · · · (x + n − 1) ≡ x(x + 1)x(x + 1) · · · (mod 2),
moreover,
x(x + 1)x(x + 1) · · · = x⌈ 2 ⌉ (x + 1)⌊ 2 ⌋ .
n n

Now we apply the binomial theorem:


⌊X
2 ⌋  n 
n

x⌈ 2 ⌉ (x + 1)⌊ 2 ⌋ = xm+⌈ 2 ⌉ .
n n n
2

m=0
m

To compare the coefficients of the powers of x here and in (11.6), we have to


substitute m = k − n2 . Since the congruence has been preserved in all the
 

steps, we have that    n 


n 2 
≡ (mod 2).
k k − n2
In other words, the quantities on the two sides
  are even or odd simultaneously.
If we are only interested in the parity of nk , then it is easier to calculate the
binomial coefficient and its parity.

Parity of the Stirling numbers of the second kind

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

11.5 Stirling numbers with prime parameters


There is a nice property of both kinds of Stirling numbers: if the upper
parameter is a prime number p, then all the Stirling numbers in this line of
the triangle are divisible by p except the leftmost and rightmost elements:
   
p p
≡ ≡ 0 (mod p) (1 < k < p). (11.7)
k k
The proof we give is combinatorial and can be carried out in both kinds of
Stirling numbers at the same time. We have to count the k-partition (or k-
cycle decomposition) of the set {1, 2, . . . , p}. We pick up an arbitrary partition
(permutation) to start the process. If a block or cycle decomposition is given,
then we map every element to the subsequent element, and to p we map 1. In
the next step, we do the same mapping to our new partition (or permutation),
and so on. For example, if p = 5, then we have a possible sequence of partitions
(permutations) like
1, 2, 3|4, 5 → 2, 3, 4|5, 1 → 3, 4, 5|1, 2 → 4, 5, 1|2, 3 → 5, 1, 2|3, 4 → 1, 2, 3|4, 5
We have a sequence of p different partitions (permutations), and in every step
the resulting partition (permutation) is different.
Next, we pick a new partition (permutation) of {1, 2, . . . , p} which we have
not covered so far, and repeat the algorithm. We will get another p partition
(permutation). We follow this process until we have partition (permutation)
to choose from. At the end of the process, we will have ap partitions (permuta-
tions). This means that the total number of k-partitions or (k-permutations)
is a multiple of p. This is what we wanted to prove. Note that this algorithm
cannot be applied when k = 1 or k = n, because in this case the algorithm
does not result in new partitions (permutations).
Hence, for instance, in the seventh line of the Stirling matrices of both
kinds, every element except the first and last one is divisible by 7.
Let us consider the recursion of the first kind Stirlings:
     
p+1 p p
=p + .
k k k−1
The first term on the right-hand side is automatically divisible by p. By our
previous theorem, the same is true for the second term at least if 1 < k−1 < p.
The same argument applies for the second kind Stirlings. Hence,
   
p+1 p+1
≡ ≡ 0 (mod p) (2 < k ≤ p). (11.8)
k k
The same reasoning gives that
   
p+2 p+2
≡ ≡0 (mod p) (3 < k ≤ p) (11.9)
k k
304 Combinatorics and Number Theory of Counting Sequences

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

11.5.1 Wilson’s theorem


Wilson’s 3 theorem [305, p. 70] states that
(p − 1)! ≡ −1 (mod p). (11.13)
This statement is very easy to prove once we have (11.12) at hand. Recall
(2.41):
n  
X n k
x = x(x + 1)(x + 2) · · · (x + n − 1).
k
k=0
Substituting x = 1 and n = p − 1, we have
p−1   p−1
X p − 1 (11.12) X
(p − 1)! = ≡ 1 = p − 1 ≡ −1 (mod p).
k
k=0 k=1
3 John Wilson (1741-1793), English mathematician. Wilson’s theorem is named after him;

however, this result was reportedly known around 1000 by Ibn al-Haytham (c. 965-1040),
Arab mathematician.
Congruences 305

11.5.2 Wolstenholme’s theorem


We have seen that kp is divisible by p for 1 < k < p. In the particular case
 

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
 

is the content of the Wolstenholme theorem.

11.5.3 Wolstenholme’s theorem for the harmonic numbers


Recalling (1.10), we know that the first kind Stirlings and the harmonic
numbers are related in a simple way. Fixing n = p to be a prime, we have that
 
1 p
Hp−1 = .
(p − 1)! 2
We have just seen that p2 ≡ 0 (mod p2 ) (for primes greater than three). What
 

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.

11.5.4 Wolstenholme’s primes


p 2
phave to note 3that 2 ≡ 0 (mod p ) is not always strict, it can happen
We
that 2 ≡ 0 (mod p ) is still true. Indeed,
 
16 843
≡ 0 (mod 16 8433 )
2

and
 
2 124 679
≡0 (mod 2 124 6793 ),
2

thus, for these two primes,


a
Hp−1 = p3 ,
b
for some a and b which are not divisible by the respective primes. There are
no more known primes with this cubic divisibility property.
The primes for which the above cubic divisibility holds are called Wol-
stenholme primes. There are no more known Wolstenholme primes up to 109
[400], although it is believed that there are infinitely many such primes [399].

11.5.5 Wolstenholme’s theorem for Hp−1,2


The generalized harmonic numbers
n
X 1
Hn,k =
j=1
jk

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

This is a polynomial of degree n in λ, so there must exist some coefficients


e1 , e2 , . . . en depending on x1 , . . . , xn such that
n
Y
(λ−xj ) = e0 (x1 , . . . , xn )λn −e1 (x1 , . . . , xn )λn−1 +e2 (x1 , . . . , xn )λn−2 +· · · +
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 .

The coefficient of λn is one; therefore,

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)

These functions are called elementary symmetric polynomials [386].


Now consider the following expression:
     
λ−1 1 λ λ
= (λ − 1)(λ − 2) · · · (λ − n) = (λ − 1) − 1 ··· −1 =
n n! 2 n
n   n  
Y λ n n
Y 1 1
− 1 = (−1) λ − .
j=1
j j=1
λ j

We apply the symmetric polynomial decomposition for the last expression


(with λ ⇝ λ1 and xj = 1/j (j = 1, . . . , n)) to get
  n  
λ−1 Y 1 1
= (−1)n λn − =
n j=1
λ j
    
1 1 1 1 1 1
(−1)n λn λ−n − λ−n+1 e1 , ,..., + · · · + (−1)n en , ,..., =
1 2 n 1 2 n
308 Combinatorics and Number Theory of Counting Sequences
    
n 1 1 1 n n 1 1 1
(−1) 1 − λe1 , ,..., + · · · + (−1) λ en , ,..., .
1 2 n 1 2 n
Setting λ = p > 2 and n = p − 1 we get, in particular,
   
1 1 1 1 1 1
1 = 1 − pe1 , ,..., + · · · + (−1)p−1 pp−1 ep−1 , ,..., .
1 2 p−1 1 2 p−1
3
We will consider
 this expression  modulo p . One can easily see that in the
1 1 1
denominator of ek 1 , 2 , . . . , p−1 the prime p does not appear, thus
   
1 1 1 1 1 1
1 ≡ 1 − pe1 , ,..., + p2 e2 , ,..., (mod p3 ). (11.20)
1 2 p−1 1 2 p−1

Let us express these symmetric functions in familiar terms. Recalling (11.18)-


(11.19),  
1 1 1
e1 , ,..., = Hp−1 ,
1 2 p−1
while
  p−1 Xp−1
1 1 1 X 1
e2 , ,..., = .
1 2 p−1 i=1 j=i+1
ij

The reader may easily verify that


p−1 Xp−1
X 1 1
Hn2 − Hn,2 .

=
i=1 j=i+1
ij 2

Hence, from (11.20) we get

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].

11.6 Lucas congruence for the Stirling numbers of both


kinds
The Stirling numbers are known since 1730, and Lucas’s theorem for the
binomial coefficients was born in 1878. However,
n it was not earlier than 1985
when Lucas’s theorem was transferred to k ([502], later [288, 457]), and 2000
when it was presented for nk [508].

11.6.1 The first kind Stirling number case


The idea of Fine can easily be transferred from the binomial coefficients
to the first kind Stirling numbers. For the first, we started from
n  
X n
xk = (1 + x)n ,
k
k=0

and for the second, we will depart from


n  
X n k
x = x(x + 1) · · · (x + n − 1) = xn .
k
k=0

Let us fix a prime p and write n as

n = n′ + n0

such that n′ = 0 or it is divisible by p, and 0 ≤ n0 < p. Then



n   nY−1 0 −1
nY
X n k
x = (x + ap)(x + ap + 1) · · · (x + ap + p − 1) (x + n′ p + b) ≡
k a=0
k=0 b=0


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

number theory, special primes and congruences.


310 Combinatorics and Number Theory of Counting Sequences

We can simplify xp modulo p by (11.7), and by Wilson’s theorem (11.13).


That is, modulo p,
p      
X p k (11.7) p p p (11.13)
xp = x ≡ x+ x = (p − 1)!x + xp ≡ xp − x.
k 1 p
k=0

Hence, we have that


n  
X n k ′
x ≡ (xp − x)n xn0 (mod p).
k
k=0

Expanding the polynomials on the right-hand side,


 ′  !
n   n  ′ n0  
X n k  X n pj ′
n −j 
X n0 i
x ≡ x (−x) x (mod p). (11.22)
k j=0
j i=0
i
k=0

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)

There is an interesting corollary of (11.24),


 noted by Peele et al. [457]: for
any fixed k, the set A of those n for which nk is not divisible by p is finite.
The greatest element of A is pk, the smallest is k.
Indeed, if n > pk, then j < 0 in (11.23); therefore, nk ≡ 0 (mod p). That
 

is, A cannot have any element greater than pk.


If n = pk, then n′ = n0 = i = j = 0 and
 
pk
≡ (−1)k (mod k). (11.25)
k

Thus, the maximalelement of the set A is pk, as we stated.


If n = k, then kk = 1 ≡ 1 (mod p). If, finally, n < k, then nk = 0 ≡ 0
  

(mod p). So, the smallest element in A is k indeed.


Congruences 311

11.6.2 The second kind Stirling number case


The easiness of the proof of the Lucas congruence both for the binomial co-
efficients and for the first kind Stirling numbers came from the fact that their
horizontal generating functions are simple. In the case of the second kind Stir-
ling numbers, the horizontal generating functions (the Bell polynomials) have
no simple product form (we do not have closed-form description of the roots
of Bn (x) in general). Thus, we cannot expect a simple Lucas-type congruence.
The following result was found by Roberto Sánchez-Peregrino [508]. Let
n = n0 + n1 p + · · · + nm pm ,
k = k0 + k1 p + · · · + km pm .
Then we have
 
n X X X
≡ ···
k n 10 +n11 =n1 n20 +n21 +n22 =n2 nm0 +nm1 +···+nmm =nm
     
n1 n2 nm N
··· (mod p),
n10 , n11 n20 , n21 , n22 nm0 , nm1 , . . . , nmm K
where
N = n0 + n10 + n20 + · · · + nm0 ,
K = k0 +(k1 −nm1 −· · ·−n21 −n11)p+(k2 −nm2 −· · ·−n22)p2 +· · ·+(km −nmm)pm.
The proof is not much less complicated than the expression itself, so we do
not give a discussion of it here, we refer to the original paper [508]. We note,
however, the following two propositions which were used in the proof and are
interesting in themselves:
     
n+p n+1 n
≡ + (mod p).
k k k−p
From this it comes that
  X t   
n0 + tp t n0 + i
≡ (mod p).
k0 + tp i=0
i k0 + ip

11.7 Divisibility properties of the Bell numbers


11.7.1 Theorems about Bp and Bp+1
Let p be a fixed but arbitrary prime as before. By (11.7) every term of the
sum
p  
X p
Bp =
k
k=0
312 Combinatorics and Number Theory of Counting Sequences

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

(The reader can verify that


 the Stirling
p+1 number sum representation also offers
something like Bp+1 ≡ p+1 1 + 2 (mod p). The details are among the
exercises.)
Applying our (11.4) divisibility for the binomial coefficients we have that
   
p p
Bp+1 ≡ + Bp = 1 + Bp ≡ 3 (mod p),
0 p
knowing that Bp congruent to 2 modulo p.
Some interesting remarks about Bp−1 modulo p will be given in Section
11.9.

11.7.2 Touchard’s congruence


We can prove even more with respect to the Bell numbers. Touchard7
proved in 1933 that, in general [563],

Bn+p ≡ Bn+1 + Bn (mod p), (11.26)

where p is an arbitrary prime and n ≥ 0.


This results in our former congruences Bp ≡ 2 (mod p) and Bp+1 ≡ 3
(mod p) when we choose n = 0 and n = 1, respectively.
The congruence of Touchard can be proven with a minor effort if we apply
a nice identity of M. Z. Spivey8 from 2008 [531]:
n X
m   
X m n
Bn+m = j n−k Bk (11.27)
j k
k=0 j=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


7 Jacques Touchard (1885-1968), French mathematician.


8 Michael Z. Spivey (1960-), American mathematician.
Congruences 313

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

In the last sum all the terms k = 0, . . ., n − 1are


divisible by p so only
Bn does not cancel. The special values p1 = pp = 1 and the recursion
Pn n

k=0 k Bk = Bn+1 now result in the congruence of Touchard.
A generalization of Touchard’s congruence is presented among the exer-
cises. See the Outlook of this chapter for more information.

11.8 Divisibility properties of the Fubini numbers


11.8.1 Elementary congruences
Thanks to the k! in their definition, the Fubini numbers
n  
X n
Fn = k! ,
k
k=0

satisfy some simple congruence relations. For example,


     
n n n
Fn = 1! + 2! + ··· ≡ 1 = 1 (mod 2), (11.28)
1 2 1

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]:

Fn+1 ≡ Fn (mod 32)

for n ≥ 5.
It is easy to prove that

Fp ≡ 1 (mod p)
314 Combinatorics and Number Theory of Counting Sequences

for any prime p. Indeed,


     
p p p
Fp = 1! + 2! + · · · + p! ≡1 (mod p),
1 2 p
since all the non-extremal terms in the sum are divisible by p as we have
shown on p. 303. The last term is divisible by p for any p prime, so we get the
statement.

11.8.2 A Touchard-like congruence


The Touchard congruence for Bell numbers says that
Bn+p = Bn+1 + Bn .
It is not hard (actually, even easier) to prove the corresponding congruence
for the Fubini numbers:
Fn+p ≡ Fn+1 (mod p).
To present the one-line proof, we need Fermat’s9 little theorem. It states that
for any integer a and any prime p
ap ≡ a (mod p),
or, equivalently, if a ̸≡ 0 (mod p),
ap−1 ≡ 1 (mod p). (11.29)
This theorem can be found in any introductory textbook on number theory,
see for example [305]. Once we know this theorem of Fermat, we can use the
ordered Dobiński formula (6.6). Let p be an odd prime. Then
∞ ∞ ∞
X k n+p X k n p X k n+1
Fn+p = = k ≡ = Fn+1 (mod p).
2k+1 2k+1 2k+1
k=0 k=0 k=0

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

11.8.3 The Gross-Kaufman-Poonen congruences


A very nice congruence property of the Fubini numbers was noted by Gross
in 1962 [267]:
Fn+4 ≡ Fn (mod 10).
The proof of Gross is short but uses finite differences. It might be more ap-
parent what is going on if we use only the definition of the Stirling numbers
and their special values. The proof presented here is from [416].
Let n > 4. By the definition,
n+4   Xn  
X n+4 n
Fn+4 − Fn = k! − k! =
k k
k=0 k=0

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.
 

The remaining terms are divisible by two, so it is enough to prove that


           
n+4 n+4 n+4 n n n
5 +3 + 12 − −3 − 12 .
2 3 4 2 3 4
We need the special values
   
n n 1 n−1
= 2n−1 − 1, − 2n + 1 ,

= 3
2 3 2
 
n 1 1 1
= 4n−1 − 3n−1 + 2n−2 − ,
4 6 2 6
from which the first was proven on p. 8, and the others can be seen by using
(1.5). We then have that
   
n+4 n
− = 2n+3 − 1 − (2n−1 − 1) = 15 · 2n−1 ,
2 2
   
n+4 n 3 n−1 4
(3 − 1) − 2n (24 − 1) ,

3 −3 = 3
3 3 2
     
n+4 n 12 1 n−1 4 n−1 4 n−2 4
12 − 12 = 4 (4 − 1) − 3 (3 − 1) + 2 (2 − 1) .
4 4 2 3
All of these numbers – independently of n – are divisible by 5, so we proved
Gross’s result.
316 Combinatorics and Number Theory of Counting Sequences

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.

Generalized Gross congruence

Kauffman generalized Gross’s congruence and showed that such periodicity


property holds for the last two, three and four digits [328]! Her results read as
Fn+20 ≡ Fn (mod 100) (n > 1),
Fn+100 ≡ Fn (mod 1 000) (n > 2),
Fn+500 ≡ Fn (mod 10 000) (n > 3).
This, together with Gross’s congruence,
Fn+4 ≡ Fn (mod 10)
suggests that there might be some general statement saying that the last k
digits of Fubini numbers form periodic sequences for all k. Surprisingly, this
statement is indeed true. This is a result of Poonen from 1986; it states that
Fn+m(k) ≡ Fn (mod 10k )
for all k ≥ 1, where the function m(k) is
m(k) = 4 · 5k−1 (k = 1, 2, 3, 4),

and

m(k) = 2k−4 5k−1 (k > 4).


In other words, the last k digits of the sequence Fn form a recurring sequence
with period m(k). It is worth it to note that even more is true: the last digits
form a period sequence in any number base. Poonen’s result was originally
phrased in this general form.

11.9 Kurepa’s conjecture


To close the chapter of the elementary congruences, we show an interesting
consequence of some of our results so far.
Kurepa10 conjectured that the so-called left factorial function
!n = 0! + 1! + · · · + (n − 1)!
10 Ðuro Kurepa (1907-1993), Yugoslav mathematician.
Congruences 317

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)

The first part: !p ≡ Dp−1 (mod p)

By (10.15) we can write that


p−1 p−1 
(−1)k

X X p−1
Dp−1 = (p − 1)! = (−1)k (p − 1 − k)! =
k! k
k=0 k=0

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).

The second part: !p ≡ Bp−1 − 1 (mod p)

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

[248] which uses p-adic analysis.


318 Combinatorics and Number Theory of Counting Sequences

(Here we added the term m = 0 and compensate this addition by subtracting


Dp−1 .) Appealing to the symmetry of the binomial coefficients, and multiply-
ing by minus one, we get that
p−1  
X p−1
Bp−1 ≡ − Dm + Dp−1 .
m=0
m

It is an easy exercise to verify that the derangement number sequence is the


inverse binomial transform of the sequence k!; therefore,
p−1  
X p−1
Dm = (p − 1)!.
m=0
m

(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)

Alternative formulations of Kurepa’s conjecture

Congruences (11.31) give another way to formulate Kurepa’s conjecture:


there is no odd prime p for which Bp−1 − 1 or Dp−1 would be divisible by p.

11.10 The non-integral property of the harmonic and


hyperharmonic numbers
We are now going to prove that the harmonic numbers and some of their
sums are non-integer numbers. To shorten our formulas, we will introduce
some notations. Let u be a rational number. After fixing a prime p, u can
always be written in the form
a
u = pα ,
b
where a and b are not divisible by p and α is an integer. α is called the p-adic
valuation of u, and we often use the notation νp (u) = α.
For example, if u = 352
475 , and we fix, say, p = 5, then

352
u = 5−2 .
19
352
That is, the 5-adic valuation of u = 475 is −2:
 
352
ν5 = −2.
475
Congruences 319

It is an easy exercise to see that


νp (ab) = νp (a) + νp (b), (11.33)
νp (a + b) ≥ min{νp (a), νp (b)}. (11.34)
In the latter, we have equality if νp (a) ̸= νp (b).
The p-adic absolute value or p-adic norm of a rational number u is denoted
and defined as
|u|p = p−α = p−νp (u) .
Thus,
352 2
475 = 5 = 25.

5

From (11.33)-(11.34) it follows that


|ab|p = |a|p |b|p , (11.35)
|a + b|p ≤ max{|a|p , |p|p }. (11.36)
The latter of these two properties is called strong triangle inequality.
We will mainly use these because of notational conveniences, but the theory
of p-adic valuations is a non-trivial, beautiful, and profound area of mathe-
matics. See the book of F. Gouvêa [261] or of Koblitz [337] for an introduction,
and Robert [497] for a rich and detailed material both on the algebraic and
analytic aspects of the theory.

11.10.1 Hn is not integer when n > 1


As a first and simplest application of the p-adic machinery, we will study
the non-integer property of the harmonic numbers and then of the hyperhar-
monics. One way to prove the non-integerness of Hn (when n > 1) is to show
that (when it is written as a reduced fraction) its denominator is always di-
visible by some positive power of 2. The exact statement that we will prove
reads as follows:
1 an
Hn = ⌊log n⌋ ,
2 2 bn
where an and bn are odd integers, and log2 is the logarithm of base 2. Having
the p-adic norm introduced, the statement can be rewritten in an equivalent
form:
|Hn |2 = 2⌊log2 n⌋ . (11.37)
First, let n be even. Since |x|2 = | − x|2 for all rational x, by the strong
triangle inequality we get
 
1 1 1
max {|Hn |2 , |1|2 } = max |Hn |2 , |1|2 , , , . . . ,

3 2 5 2 n − 1 2

Hn − 1 − 1 − 1 − · · · − 1 =

3 5 n − 1 2
320 Combinatorics and Number Theory of Counting Sequences

1 1
+ + ··· + 1 + 1 =

2 4 n − 2 n 2

1
1 + 1 + 1 + · · · + 1 = 2 Hn/2 .

2 2 3 n/2 2
2 2
If n is odd, the situation is the same, as the reader can check:

max {|Hn |2 , |1|2 } ≥ 2 H(n−1)/2 2 .
So we get that the 2-adic
norm of the harmonic numbers is monotone in-
creasing. Since |H2 |2 = 32 2 = 2, the 2-adic norm of all the harmonic numbers
are greater than 1. As a corollary, this means that the harmonic numbers are
not integers, which is the statement that we wanted to show.
We can continue the calculations on Hn/2 (or on H(n−1)/2 , depending on
the parity of n) instead of Hn . For instance, let us consider that n/2 is even.
Then the method described above gives that

1
|Hn/2 |2 ≥ |Hn/4 |2 = 2|Hn/4 |2 .
2 2
This and the previous estimation implies that

1 1 1
|Hn |2 ≥ |Hn/2 |2 ≥ |Hn/4 |2 = 4|Hn/4 |2 ,

2 2 2 2 2 2
and so on. If n/2 is odd, then we choose (n/2 − 1)/2 instead of n/4. We can
perform these steps exactly ⌊log2 (n)⌋ times. (Note that the greatest power of
two occurring between 1 and n is ⌊log2 (n)⌋.)
After all, we shall have the following:

1
|Hn |2 ≥ ⌊log (n)⌋ |H1 |2 = 2⌊log2 (n)⌋ .

2 2 2

On the other hand,


 
1 1 1
, = ⌊log (n)⌋ = 2⌊log2 (n)⌋ .

|Hn |2 ≤ max |1|2 , , · · ·
2 2 n 2 2 2
2

The inequalities detailed above give the statement.


Another approach can be found in [101] and in [262] among the exercises
of Chapter 6.
Finally, note that if we want to prove only the non-integer property (and
not the stronger statement about the exact 2-adic evaluation), less effort is
enough. Since
n  
X n (−1)k−1
Hn = ,
k k
k=0
(this is an exercise at the end of this chapter), and a sequence is integer if
and only if its binomial transform is integer, it is immediate that Hn is not
an integer.
Congruences 321

11.10.2 The 2-adic norm of the hyperharmonic numbers


We are going to prove that the sums of harmonic numbers are never in-
tegers either. To this end we shall need a statement which is interesting in
itself. This statement gives the exact valuation of the factorials for an arbitrary
prime p.

The exact valuation of the factorials

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 .

We want to determine Ap (n). If a0 < p − 1 then

Ap (n) = Ap (n − 1) + 1.

If, in turn, a0 = p − 1, then adding one to n − 1, involve carries. Supposing


that
a0 = a1 = · · · = at−1 = p − 1, but at < p − 1, (11.39)
it is then clear that

Ap (n) = Ap (n − 1) − (p − 1)t + 1.
322 Combinatorics and Number Theory of Counting Sequences

It is therefore necessary to distinguish two cases: (1) a0 < p − 1, and (2)


a0 = p − 1.
In the first case n is not divisible by p and thus |n|p = 1; whence

|n|p = |n(n − 1)!|p = |(n − 1)!|p .

By the induction hypothesis,


n−1−Ap (n−1) n−(Ap (n−1)+1) n−Ap (n)
|(n − 1)!|p = p− p−1 = p− p−1 = p− p−1 .

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.

The exact valuation of the hyperharmonic numbers

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

|Hn(r) |2 = 2A2 (n+r−1)−A2 (n)−A2 (r−1)+l2 (n+r−1) ,

otherwise

|Hn(r) |2 = 2A2 (n+r−1)−A2 (n)−A2 (r−1)+max{| r |2 ,| r+1 |2 ,...,| n+r−1 |2 } .


1 1 1

The proof is as follows.


 

(r) n+r−1
Hn = (Hn+r−1 − Hr−1 ) =
2 r−1 2
 
n+r−1 a c
− l (r−1) =

r−1 l (n+r−1)
2 2 b 2 d 2
2 2

n + r − 1 2l2 (r−1) ad − 2l2 (n+r−1) bc


 
2l2 (n+r−1)+l2 (r−1) bd .

r−1 2 2

Because of the condition l2 (n + r − 1) > l2 (r − 1) we get

n + r − 1 ad − 2l2 (n+r−1)−l2 (r−1) bc


 
(r)
Hn = .
2 r−1
2 2l2 (n+r−1) bd
2
Congruences 323

Since the nominator is odd, we get the following:


ad − 2l2 (n+r−1)−l2 (r−1) bc

= 2l2 (n+r−1) .
2l2 (n+r−1) bd
2

To compute the 2-adic norm of the binomial coefficient, we use (11.38).


 
n+r−1
= (n + r − 1)! =


r−1
2
(r − 1)!n! 2

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

times. The result:


 
1 1 1
|Hn+r−1 − Hr−1 |2 ≥ max ,
,...,
.
r 2 r+1 2
n + r − 1 2

On the other hand, by the strong triangle inequality


 
1 1 1
|Hn+r−1 − Hr−1 |2 ≤ max , ,..., .
r 2 r+1 2 n + r − 1 2

The proof is therefore complete.

11.10.3 H1 + H2 + · · · + Hn is not integer when n > 1


We are ready to prove that H1 + H2 + · · · + Hn is not integer.
(2)
By definition, H1 + H2 + · · · + Hn = Hn . The condition with respect to
the order of n and r holds because l2 (n + 2 − 1) > l2 (2 − 1) = 0 for all n ≥ 1.
Furthermore,
(2)
Hn = 2A2 (n+1)−A2 (n)−A2 (1)+l2 (n+1) .
2

Let m = l2 (n+1). Our goal is to minimize the power of 2. l2 (n+1) = m implies


that n + 1 < 2m+1 ; therefore, 1 ≤ A2 (n + 1) ≤ m + 1 and 1 ≤ A2 (n) ≤ m.
324 Combinatorics and Number Theory of Counting Sequences

The minimum in the power is taken when A2 (n) = m and A2 (n + 1) = 1. It


is possible if and only if n = 2m − 1. In this case,

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,
 

(b) nk is divisible by the odd part of k.




(The odd part of a number n is n divided by the maximal power of two


which still divides n. These statements were proven in [455]. See the
Outlook of this chapter for sharper statements.)
5. Let n > lp for some integer l and prime p. Show that
 
n
≡ 0 (mod p)
k

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

(This is (41) in [502].)


7. Confirm the following mod p2 congruences where k is odd and belongs
to the respective intervals:
 
p+1
≡ 0 (mod p2 ) (3 ≤ k ≤ p − 2),
k
 
2p
≡ 0 (mod p2 ) (3 ≤ k ≤ p).
k

(These results were proven in [247].)


8. Show the validity of the recursion (11.3).
9. Deduce that f (2r + x) = f (2r ) (0 ≤ x ≤ 2r ), and from here, prove that
f (2n ) = 3n . Here f (n) is the function which we defined by (11.2). (See
[278].)
326 Combinatorics and Number Theory of Counting Sequences

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

15. Confirm that  


p−1
p −1 (0 ≤ k < p).
k
16. Generalize the (11.26) Touchard congruence as follows:
k  
X k
Bn+kp ≡ Bn+i (mod p) (k ≥ 0).
i=0
i

Hint: use induction based on (11.26).


17. Prove the Touchard congruence in the more general form
Bn+pm ≡ mBn + Bn+1 (mod p),
where n is a non-negative integer, m is a positive integer, and p is an
arbitrary prime. In particular,
Bpm ≡ m + 1 (mod p).
Hint: use induction based on (11.26), or see the paper [293] for a proof.
The particular n = 0 form was proven by Touchard [564], and rediscov-
ered by Tsumura [568].
Congruences 327

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

which we required in the proof of Gross’s congruence. Hint: use (1.5).


21. Show that
Fp+1 ≡ 3 (mod p)
for all prime p > 3.
22. Show that
Fp+2 ≡ 13 (mod p)
for all prime p > 13. Hint: use (11.8) and (11.9), respectively.
23. Show that
Fn+apk ≡ Fn+a (mod p) (k, a ≥ 0).
(You can successively apply (11.30).)
24. With the aid of (2.57) show that

Lm+p ≡ Lm (mod p),

and deduce its consequence

Lmp ≡ 1 (mod p)

for any m ≥ 0.

25. Show that Dp ≡ −1 (mod p).


328 Combinatorics and Number Theory of Counting Sequences

26. Show that the derangements satisfy the following congruence:


Dn+m ≡ Dm Dn (mod n).
Thus, in particular (by using the previous exercise), Dn+p ≡ −Dn
(mod p). (This was shown by group actions in [252].)
27. Deduce from the previous two exercises that
Dn+m ≡ (−1)m Dn (mod m).

28. Present a proof for the identity


n  
1 X n
Bn,r = (m + r)n Dn−m .
n! m=0 m

(Hint: see the proof of (2.21).)


29. Show that the last digits of Ln form a periodic sequence of period 5. In
other words,
Ln+5 ≡ Ln (mod 10).
(See the table of Ln for numerical evidence. This result was proven in
[430].)
30. Prove that
n  
X n (−1)k−1
Hn = .
k k
k=0
(Use Euler’s (2.14) theorem on the binomial transform.)
31. Prove that Hn3 is not integer when n > 1 (see [415]).
32. Prove that p is a Wolstenholme prime if and only if
p−1
X H
k−1
p .

k(p − k)
k=1

(Hint: in view of (11.14), p is a Wolstenholme prime if and only if p2


Pp−1 Hk−1
divides p3 . Now recall (2.25): p3 = p!
   
3 k=1 k(p−k) . The p! factor is
responsible only for one power of p, and thus it is necessary that p
divides the sum, too.)
33. Show that the p-th Lah polynomial (p is a prime), if it has rational zero,
it must belong to the set
{−p, −2p, . . . , −(p − 1)!p}.
Hint: Use the rational root theorem to show that any rational root must
be a divisor of p!. Then fix d > 0 such that p ̸| d and prove that Lp (−d) ≡
d ̸≡ 0 (mod p), so such a −d cannot be a zero of Lp (x).
Congruences 329

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:

This diagram is self-similar, as we see. Cellular automata is an algo-


rithm where the evolution of black and white dots in a row, or on a
plane or in higher dimension is governed by some rules. Elementary cel-
lular automata operates on dots in one dimension, and there are only
256 possible elementary automaton13 . These are identified by a number
called Rule. The above parity diagram of the binomial coefficients can
be constructed by the Rules 18, 22, 26, 82, 90, 146, 154, 210 and 218. (It
is not possible, however, to represent the modulo 2 first or second kind
Stirling triangle with cellular automata. Do you see why?) More on this
fascinating topic can be found in [601].
It is also interesting to note that the infinite fractal version of the above
self-similar diagram is called Sierpiński triangle [601].
2. An instance of the few multinomial-coefficient congruences is due to
Rota and Sagan [499]:

pm pm−1
   
≡ (mod pm ).
i1 , . . . , in i1 /p, . . . , in /p

(Here the convention is used which says that a multinomial coefficient


having a fraction is zero.)
13 The plural form of automata is automaton.
330 Combinatorics and Number Theory of Counting Sequences

3. Lucas’s theorem of Section 11.3 can be generalized to arbitrary powers of


p. This was worked out by A. Granville [263], and – in a slightly restricted
form – by K. S. Davis and W. A. Webb [188], see also [189, 523]. In
his work, he gave connections to cellular automata, mentioned in the
previous point. One can read more on the long and rich history of the
divisibility properties of the binomial coefficients in [409].
4. The parity of the Stirling numbers of the second kind was thoroughly
studiedby L. Carlitz [122, 123, 124]. If we define θ(n) to be the number
n+1
of odd 2r+1 (0 ≤ 2n < r), then the generating function of the sequence
θ(n) is
∞ ∞
X Y n n+1
θ(n)xn = (1 + x2 + x2 ).
n=0 n=0

θ(n) is also the number of odd binomial coefficients of the form ab ,




where a + b = n. A number of relations for θ(n) are discovered in [123].


The sequence θ(n) is strongly related to the so-called Stern sequence
[492, 493].
The paper [124, 125] contains congruences modulo primes in general.
Bondarenko et al. [88] study the distribution of the Stirling and Euler
numbers modulo primes.
5. Divisibility of the Stirling numbers by small primes was studied by a
number of authors [19, 153, 362, 363, 613]. Divisibility via algebraic
methods was  studied by Sagan [502]. See also [343] on the p-adic val-
uation of nk for general primes. A whole chapter is devoted to this
question in [441]. The congruence
   
n p−k
≡ (mod p) (1 ≤ k ≤ n < p)
k p−n
was discovered by Hoffman via multiple harmonic sums [284]. A gener-
alization to prime powers can be found in [248]:
 ν   
p −j i
= (mod pν )
pν − i j
when 1 ≤ i, j ≤ p − 1, and for all ν ≥ 1.
6. The modulo 4 description of the Stirling numbers of the second kind
was described in [132].
7. If n and k are positive integers such that n + k is odd, then
    
n n
≡0 mod ,
k 2
    
n k+1
≡0 mod .
k 2
Congruences 331

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

8. Higher prime power congruences were considered by a number of math-


ematicians. Rota and Sagan [499] used group theory to prove that if
k = ⌊a/p⌋, then
 m   m−1 
p p
≡ (mod pm−k ).
a a

Note that this gives the following particular for 1 < a < p:
 m
p
≡ 0 (mod p) (j ≥ 1).
a

9. It is known that if pj ≤ k < pj+1 , then

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

Ln+10k ≡ Ln (mod 10k ).

Better can be said when k = 1:

Ln+5 ≡ Ln (mod 10).

It can happen that the above periodicity results can be improved. It is


conjectured in [430] that the minimal period mod m is
(
k
, if k ≡ 2 (mod 4);
m(k) = 2
k, otherwise.

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

12. Touchard’s congruence can be extended not only as it is given in Exercise


17, but also to polynomials. See [249, 308, 475, 476] for the details.
Touchard’s congruence was rediscovered right after Touchard by Hall in
1934 [275].
13. Another congruence, due to Comtet, says that for any prime p

Bnp ≡ Bn+1 (mod p).

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

is divisible by pr . Here δij = 1 if i = j, otherwise it is zero.


Similar divisibility properties are given for both kinds of Stirling num-
bers in the same paper. Both
r  Xi   j   
X
i r i i−j
X j − 1 + δij n + (r − i)p + l
(−1) (−p(p − 1)) ,
i=0
i j=0 j l k − (j − l)p
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]:

B2p − 2Bp+1 − 2Bp + p + 5 ≡ 0 (mod p2 ).

Another one was deduced in [384, 502]:

[(E p − E − 1)2 − p(p − 1)]Bn ≡ 0 (mod p2 ).


Congruences 333

Here Ean = an+1 is the right shift operator.


An interesting higher power congruence is due to Junod [309]:
n  
X n n−j
Bm+nps ≡ s Bm+j (mod pk+1 ).
j=0
j

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

was studied in [387].


18. For sums with Stirling numbers and arithmetic functions, like
X n
µ(d) d ≡ 0 (mod n),
a
d|n

see [499, 502].


19. A large number of results is known for k! nk , see the citations on pp.


496-499 in [306].
20. Howard [289] studied congruences of nk in terms of Bernoulli numbers.
 

He got, among others, that


   
n n n−1
≡− B2r (mod p2 t),
n − 2r 2r 2r
where p is an odd prime, t is the highest power of p dividing n, and
0 < 2r < 2p − 2 plus 1 < 2r + 1 < 2p − 2.
Using Howard’s results, Adelberg [4] proved additional congruences for
the first kind Stirling numbers, like the following one:
n − 1 n2
   
n
≡ (mod pn2 ),
n−p p 2
where n is divisible by p, and p is odd.
334 Combinatorics and Number Theory of Counting Sequences

21. For each positive n, there are integers a0 , a1 , . . . , an−1 such that for all
m≥0

Bm+n + an−1 Bm+n−1 + · · · + a0 Bm ≡ 0 (mod n!).

In other words, it is possible to form a linear combination of n + 1


consecutive Bell numbers such that this linear combination is a multiple
of n!. This is a result of Gessel [250]. Minimal length linear combinations
modulo an integer were studied in [384].
22. Z.-W. Sun and D. Zagier [552] gave the interesting rational congruence
p−1
X Bk
≡ (−1)m−1 Dm−1 (mod p)
(−m)k
k=1

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 :

In+pr ≡ In (mod pr ) (p ≥ 3),


In+m ≡ In (mod m) (m is odd),
In ≡ 0 (mod 2r ) (n ≥ 4r − 2).

26. Some congruential properties of the Eulerian numbers can be found in


[334]. See [488] for generalizations to the r-Whitney number case we
mentioned in the Outlook of Chapter 8.
27. An analogue of Wolstenholme’s 1862 theorem says that the congruence
n
X 1
≡0 (mod n2 )
i
k=1
(k,n)=1

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

H p−1 ≡ −2qp (2) (mod p).


2

Lehmer [361] gave the stronger modulo p2 relation

H p−1 ≡ −2qp (2) + 2qp (2)2 (mod p2 ).


2

This was later extended to modulo p3 by Zhi-Hong Sun [544]:


2 7
H p−1 ≡ −2qp (2) + 2qp (2)2 − p2 qp (2)3 − p2 Bp−3 (mod p3 ).
2 3 12
Another direction of research is the shortening of the sum H p−1 to ex-
2
press the Fermat quotient qp (2) modulo a prime. It is known [254] that

−3qp (2) ≡ H⌊p/4⌋ (mod p),

and [196, 361]


⌊p/3⌋
X 1
2qp (2) ≡ (mod p).
k
k=⌊p/6⌋+1

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

This was later (much later) generalized to [264]


p−1 j
X 2
gp (2)2 ≡ − (mod p),
j=1
j2

and to the cubic formula [198, 411]


p−1 j p−1
3
X 2 7 X (−1)j
gp (2) ≡ −3 + (mod p).
j=1
j3 4 j=1 j 3

Quartic formula, although it is more complicated, still exists [9].


The Fermat and Wilson quotients are connected via Lerch’s formula
[370, 527, 528]:
p−1
X
qp (j) ≡ wp (mod p).
j=1

(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

which, thanks to Lerch’s formula, is an integer number.


Connections of these quotients and the Euler numbers were found in
[298].
The primes p for which qp (a) ≡ 0 (mod p) are called Wieferich primes
(of base a). 1 093 and 3 511 are the only known base 2 Wieferich primes,
although it is conjectured that there are infinitely many [178]. This no-
tion can be extended, and one can define Wieferich numbers in base a.
338 Combinatorics and Number Theory of Counting Sequences
ϕ(m)
The integer m is a Wieferich number in base a if a m −1 is divisible
by m. Here ϕ(m) is the Euler totient function. It gives that how many
co-prime positive integers are there to m in the set {1, . . . , m − 1}. For
the newest reference to Wieferich numbers, see [13].
The primes p for which wp ≡ 0 (mod p) are called Wilson primes (see
[8] and the references therein). The only known Wilson primes are 5, 13,
563. It is conjectured that there are infinitely many Wilson primes.
Similarly, the primes p for which the Lerch number ℓp is divisible by p are
called Lerch primes. Up to three million, there are four Lerch primes:
3; 103; 839; 2 237 [527]. The generalized Lerch primes were introduced
and studied in [272].
The websites “Prime Pages” (http://primes.utm.edu) and the “Prime
Curios!” (http://www.primecurios.com/) are rich and entertaining
sources of facts about primes. See the printed compilation [108], too.
On the Prime Pages you can learn, among others, that 2 237 is not only
the greatest known Lerch prime up to now, but it is also the next prime
year in which Pluto is closer to the Sun than Neptune.
31. It is a result of Kürschák from 1918 that Hn − Hm are not integers [347].
Pk−1 1
This was later extended by Nagell [448] and Erdős [219]: j=0 md+j ̸∈ N
if m and d have no common prime factors. Erdős’s
Pk−1 result was further ex-
1
tended by Belbachir and Khelladi [57]: j=0 (md+j) αj ̸∈ N for arbitrary

α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 ,

where c is a fixed non-negative integer. The powers ∆kc of ∆c are defined


by using the composition of operators. P. T. Young [611] studied con-
gruences of the Bernoulli, Euler and Stirling and r-Stirling numbers of
the second kind (the latter he calls “weighted Stirling number”) under
the effect of the D∆kc operators.
Congruences 339

35. The nested sum


X 1
H(n, k) = ,
i1 · · · ik
1≤i1 ≤···≤ik ≤n

which is a generalization of the harmonic numbers is integer only for


(n, k) ∈ {(1, 1), (3, 2)} [139]. The p-adic properties of these numbers
were studied in [369].
36. (The Lengyel-Wannemacker formula.) It was conjectured by T. Lengyel
in 1994 [363] that
 h 
2
ν2 = S2 (k) − 1 (1 ≤ k ≤ 2h ),
k
where S2 (k) is the sum of the digits of k written in base two. This
conjecture was proven to be true by S. de Wannemacker in 2005 [588].
In [588] it is also proved that
 
n
ν2 ≥ S2 (k) − S2 (n).
k

Later Lengyel, by using Wannemacker’s proof, strenghtened the state-


ment above and proved that [364]
 h 
c2
ν2 = S2 (k) − 1 (1 ≤ k ≤ 2h )
k
for all integer c ≥ 1.
A related result, due to Hong et al. [286] is that
 h 
2 +1
ν2 = S2 (h) − 1.
k+1

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.

12.1 An application of the Hankel matrices


The modulo p properties of the counting sequences can be studied in the
framework of finite fields. It turns out that our counting sequences satisfy
linear congruences modulo p, and the linear congruences over finite fields have
a well-developed theory.
In this chapter, some preliminary knowledge is supposed. Familiarity with
the arithmetic in finite fields, polynomials and splitting fields will be necessary.
The field of p elements will be denoted by Fp .
The Hankel matrices were defined in Section 2.10. We now show an in-
teresting application of these matrices in the modulo p theory of counting
sequences. Let us imagine that we are looking for a congruence in the form

An+k ≡ a0 An + a1 An+1 + · · · ak−1 An+k−1 (mod p). (12.1)

This is a recurrence relation1 of order k. We have already seen some special


cases of such congruences. Taking An = Bn , the Bell number sequence, we
know that
Bn+p ≡ 1 · Bn + 1 · Bn+1 ;
this is just Touchard’s congruence, see (11.26). In this case a0 = a1 = 1, and
all the other ai s are zero. For the Fubini numbers, Fn+p ≡ Fn+1 (mod p),
so a1 = 1, and the other coefficients are zero. Thus, it makes sense to look
for a general approach to prove such congruences. Consider again the general
Equation (12.1), but now take a collection of these, say, for n = 0, n = 1, until
1 More exactly, it is a homogeneous linear recurrence relation, because there is no constant

additive term and the sequence members are all on the first power.

341
342 Combinatorics and Number Theory of Counting Sequences

n = p − 1:

Ak ≡ a0 A0 + a1 A1 + · · · ak−1 Ak−1 (mod p)


Ak+1 ≡ a0 A1 + a1 A2 + · · · ak−1 Ak (mod p)
..
.
Ak−1+k ≡ a0 Ak−1 + a1 Ak−1+1 + · · · ak−1 Ak−1+k−1 (mod p).

This is a linear system of equations, which can conveniently be written in


matrix form:
    
A0 A1 ... Ak−1 a0 Ak
 A1 A2 ... Ak   a1   Ak+1 
 =  ..  ,
    
 .. .. .. ..   ..
 . . . .  .   . 
Ak−1 Ak ... A2k−2 ak−1 A2k−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.

The Touchard congruence – once again

If we would like to find the coefficients a0 , a1 , . . . , ak−1 such that

Bn+k ≡ a0 Bn + a1 Bn+1 + · · · ak−1 Bn+k−1 (mod p),

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

The inverse of the matrix on the right-hand side is


1
   
1 −1 2 1 2 2
−1 −1 0  ≡ 2 2 0 (mod 3).
1
2 0 − 14 2 0 2

To complete Equation (12.2), we still calculate


     
B3 5 2
B4  = 15 ≡ 0 (mod 3).
B5 52 1

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.

A simple congruence for the involutions

For another example, we take the In involutions of Section 3.4. Let


2 Note that the (p + 1) × (p + 1)-size Hankel matrix would have zero determinant modulo

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

k = p = 5, and the Hankel matrix of this order modulo 5 is


 
1 1 2 4 0
1 2 4 0 1
 
2 4 0 1 1
 ,
4 0 1 1 2
0 1 1 2 4

and the vector on the right-hand side of our equation is


   
I5 1
I6  1
   
I7  = 2 (mod 5).
   
I8  4
I9 0

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).

12.2 The characteristic polynomials


The characteristic polynomials play a prominent role in the modulo p
theory of recurrence sequences. Now we define and study these polynomials
in details.
3 Gabriel Cramer (1704-1752), Swiss mathematician.
4 This rule says that an equation Ax = b having as many variables as equations, and
the coefficient matrix A is regular, then the ith solution xi can be given as follows: change
the ith column of A by the vector b, and divide the determinant of this new matrix by the
original determinant of A.
Congruences via finite field methods 345

Definition 12.2.1. Let us suppose that we are given a sequence satisfying a


modulo p recurrence of the form (12.1) with a0 , . . . , ak−1 coefficients being in
Fp . Then the characteristic polynomial of the sequence An is

f (x) = xk − ak−1 xk−1 − ak−2 xk−2 − · · · − a1 x − a0 .

For example, the characteristic polynomial of the modulo p Bell number


sequence is
f (x) = xp − x − 1,
due to the Touchard congruence.
There are some good reasons why these polynomials are so useful. These
reasons will be explained in the below subsections.

12.2.1 Representation of mod p sequences via the zeros of


their characteristic polynomials
Let An be a linear recurrence of order k in Fp (that is, modulo p). More-
over, we suppose that its characteristic polynomial is f (x) such that all the
α1 , . . . , αk zeros of f (x) are distinct. Then we can express the terms of our
sequence as follows:
k
X
An ≡ βj αjn (mod Fp /f (x)) (n ≥ 0), (12.3)
j=1

where the βj numbers are uniquely determined by the sequence and belong
to the splitting field of f (x).

The proof of (12.3)

First we show that the βj coefficients are uniquely determined by An . In


fact, βj can be calculated from the system of equations
k
X
βj αjn = An (n = 0, 1, . . . , k − 1).
j=1

Note that the coefficient matrix is of Vandermonde type, and it is invertible


because of the imposed conditions on the zeros of f (x). Moreover, the deter-
minant of this matrix is the product of factors of the form (αi − αj ), it follows
that the βj coefficients (the solutions) are found in the splitting field of f (x).
It still remains to see that (12.3) indeed holds. It suffices to show that the
right-hand side satisfies the same recurrence as An , namely

An+k = a0 An + a1 An+1 + · · · ak−1 An+k−1 (n ≥ 0).


346 Combinatorics and Number Theory of Counting Sequences

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

since αj s are the zeros of f (x). The proof is therefore complete.

12.2.2 The Bell numbers modulo 2 and 3


Let us apply our theorem to the Bell numbers, giving them a new repre-
sentation mod 2 and mod 3. As we said before, their characteristic polynomial
mod p is xp −x−1. Its zeros are all different. If this were not the case, xp −x−1
and its derivative pxp − 1 ≡ −1 (mod p) would have common zeros which is
impossible, because the derivative is simply −1 which has no zeros at all.

The Bell numbers mod 2

Taking p = 2 first, the splitting field of x2 − x − 1 is

F2 /(x2 − x − 1) = {0, 1, x, 1 + x}.

One zero of an irreducible polynomial in its splitting field is always x. As 0


and 1 are not zeros of x2 − x − 1, the only remaining possibility is 1 + x.
(Indeed, (1 + x)2 − (1 + x) − 1 = 0 in F2 /(x2 − x − 1).) Our theorem above
therefore says that there are two constants β1 and β2 such that

Bn ≡ β1 xn + β2 (1 + x)n (mod 2).

To determine these coefficients take n = 0 and n = 1. Then, respectively,

1 = β1 + β2
1 = β1 x + β2 (1 + x)

It comes readily that β1 = x, β2 = 1 + x thus

Bn ≡ xn+1 + (1 + x)n+1 (mod F2 /(x2 − x − 1)). (12.4)

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,
..
.

We conclude at the following fact in our field:



 x, if n ≡ 0 (mod 3);
xn+1 = x + 1, if n ≡ 1 (mod 3);
1, if n ≡ 2 (mod 3).

Considering the first term, similar calculation results in



 x + 1, if n ≡ 0 (mod 3);
(1 + x)n+1 = x, if n ≡ 1 (mod 3);
1, if n ≡ 2 (mod 3).

Since x + (x + 1) = 1, and 1 + 1 = 0, we have the following conclusion modulo


2: 
 1, if n ≡ 0 (mod 3);
Bn ≡ 1, if n ≡ 1 (mod 3);
0, if n ≡ 2 (mod 3).

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,

Bn + Bn+1 + Bn+2 ≡ 0 (mod 2)

was discovered by Williams [599].

The Bell numbers mod 3

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.

The βj coefficients of (12.3) are still missing. Taking n = 0, 1, 2 in (12.3)


we respectively get

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:

Bn ≡ (2x2 + 2x + 2)xn + 2x2 (1 + x)n + (2x2 + x + 2)(2 + x)n .

12.2.3 General periodicity modulo p


Can we say something similar as we said in the case p = 2, namely, that
there is some periodicity modulo 3 of Bn ? Let us put the question in its most
general form: knowing that representation of the form (12.3) exists, what can
we say about the period k such that

An+k ≡ An (mod p)? (12.5)


Congruences via finite field methods 349

A straightforward observation is that if k is a period, then multiples of k are


periods also. Under period we, from now on, mean shortest period.
We saw, for example, that Bn+3 ≡ Bn (mod 2), which is another recur-
rence for the Bell numbers apart of the Touchard recurrence (and it is even
simpler, involving two terms in place of three!). Our above question with re-
spect to periodicity can then be put into another form: is it possible to find
the simplest recurrence of the form (12.5) having only two terms?
If we have a characteristic polynomial, we can find such a simple recur-
rence. It is so, because in
Xk
An = βj αjn
j=1

α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:

xk ≡ 1 (mod f (x)), (12.6)

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

that the characteristic polynomial f (x) divides xk − 1. This k is called the


order of f (x).
If xn+k ≡ xn (mod f (x)) satisfies only from a given n on, the sequence is
periodic from that n onward. The elements until n−1 are from the pre-period .
For example, the sequence 3, 2, 1, 0, 1, 0, 1, 0, . . . is periodic from n = 2, and
the part 3, 2 is the pre-period. Note also that the pre-period is zero when
f (0) ̸= 0. Moreover, by the reasons said above, the pre-period is of length h
if f (x) is of the form xh g(x), when g(x) ̸= 0.

12.2.4 Shortest period of the Fubini numbers


We saw in Subsection 11.8.2 that for all prime p

Fn+p ≡ Fn+1 (mod p),

and thus the characteristic polynomial of the Fubini sequence modulo p is

f (x) = xp − x = x(xp−1 − 1).

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, . . . .

Indeed periodic of length p − 1 = 4 with the pre-period 1 at the beginning.

12.3 The minimal polynomial


If a modulo p sequence satisfies some linear recurrence, it satisfies many
others, too. For example, if An is a sequence such that5 An+k = An , then it
follows that An+2k = An . In this case the respective characteristic polynomials
are f1 (x) = xk − 1 and f2 (x) = x2k − 1. Note that f2 (x) is a multiple of f1 (x).
The most extreme case is of the identically zero sequence: it satisfies any
homogeneous recurrence relation. In this case the simplest characteristic poly-
nomial is f (x) = 1; this polynomial divides any polynomial.
We might think that there is, in some sense a minimal recurrence that our
sequence satisfies. Also, based on the above examples, we might think that
the characteristic polynomial belonging to this minimal recurrence divides the
5 From now on we leave the ≡ sign and add mod p. Instead, we simply write equality

sign, and the modulus is understood to be a prime number.


Congruences via finite field methods 351

characteristic polynomials of the other, non-minimal recurrences. We therefore


take the following definition.

Definition 12.3.1. The monic6 m(x) polynomial of positive degree7 is the


minimal polynomial of the linear recurrence sequence A0 , A1 , . . . if it divides
all the charateristic polynomials of this sequence.

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.

Suppose that we have a sequence An satisfying a recurrence of the form


(12.1). Then the characteristic polynomial is of degree k, so the minimal poly-
nomial must be of degree ≤ k. This degree can be bounded from above in
another way, too. The size of the maximal non-zero Hankel determinant (if it
exists8 ) is a bound, indeed, by what we have said in Section 12.1.
Supposing that this bound is k, to solve Equation (12.2) we needed the first
2k terms of the sequence to determine the a0 , . . . , ak−1 coefficients which are
the coefficients of the characteristic polynomial. Therefore, ideally, we might
think that these first 2k terms can be used to find the minimal polynomial, too.
This is true, and the construction goes by the Berlekamp – Massey algorithm.

12.3.1 The Berlekamp – Massey algorithm


The Berlekamp – Massey algorithm (see [71, 398] for the original works, and
[202, Chapter 9], [373, Section 8.6]) is a recursive algorithm which produces
the minimal polynomials in finitely many steps once we know an upper bound
for the degree of the minimal polynomial.
Let A0 , A1 , . . . be a sequence, and
2k−1
X
G(x) = An xn
n=0

6A polynomial is monic if its leading coefficient is one.


7 This is a necessary condition because the constants always divide any polynomial in a
field.
8 If there are mod p non-zero Hankel determinants of arbitrary size, the sequence is not

a linear recurrence, see the Outlook.


352 Combinatorics and Number Theory of Counting Sequences

be the generating function of the first 2k terms.


We recursively define the polynomials gj (x) and hj (x), and numbers mj ,
bj (j = 0, 1, . . . ) as follows.

g0 (x) = 1, h0 (x) = x, m0 = 0.

Then let bj be the coefficient of xj in gj (x)G(x), and set

gj+1 (x) = gj (x) − bj hj (x),


 1
bj xgj (x), if bj ̸= 0 and mj ≥ 0;
hj+1 (x) =
xhj (x), otherwise,

and

−mj , if bj ̸= 0 and mj ≥ 0;
mj+1 =
mj + 1, otherwise.

If the degree of the m(x) minimal polynomial is k, then


 
1
m(x) = xk g2k .
x

If we only know that the degree of m(x) is bounded by k, then set


 
1 1
r = k + − m2k ,
2 2
and in this case  
1
m(x) = xr g2k .
x
In any cases, it is seen that the algorithm uses only the first 2k terms of An ,
and thus G(x) indeed suffices, we do not need the generating function in its
totality.
The proof that the algorithm indeed yields the minimal polynomial after
the indicated number of steps can be found on pp. 441-444. of [373].

Mathematica code for the Berlekamp – Massey algorithm

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

therefore, we set for our algorithm


p:= 5
G[ x ] : = 1 + 1x + 2x ˆ2 + 2x ˆ5 + 3x ˆ6 + 2x ˆ7 + 2x ˆ9
Running the algorithm, the output (which is printed out be the last line of
the above code) will be
4 + 4 x + x ˆ5
This is the minimal polynomial: m(x) = x5 + 4x + 4 ≡ x5 − x − 1 (mod 5).
In congruence terms
Bn+5 + 4Bn+1 + 4Bn ≡ 0 (mod 5).
Rearranging,
Bn+5 ≡ −4Bn+1 − 4Bn ≡ Bn+1 + Bn (mod 5).
We know more now than Touchard proved: we have that his congruence is
minimal in the sense of our definition, at least for p = 5.
With respect to the period of Bn (mod 5) we can do the following calcu-
lation having the minimal polynomial: we determine k (which is the order of
m(x) as well as the minimal period Bn (mod 5). By computer check, it can
be seen that the remainder of the division
x781 − 1
x5 − x − 1
is zero, but for any other exponent smaller than 781, the remainder is non-zero
modulo 5. Thus, the minimal period for the sequence is k = 781 and because
m(0) ̸= 0 there is no pre-period. In formulas,
Bn+781 ≡ Bn (mod 5) (n ≥ 0),
and there is no k < 781 such that
Bn+k ≡ Bn (mod 5) (n ≥ 0).
354 Combinatorics and Number Theory of Counting Sequences

12.4 Periodicity with respect to composite moduli


Having information on the periodicity modulo primes, we can deduce pe-
riodicity properties with respect to composite moduli.
For example, we know from the previous sections that the Bell numbers
are periodic modulo 2, and the period length is three, and we also know that
they are periodic modulo 5 with period length 781.

12.4.1 Chinese remainder theorem


It seems to be reasonable to say that once we know how the sequence
behaves modulo 2 and 5, we should know how it behaves modulo 2 · 5 = 10.
The certainty is provided by the Chinese remainder theorem. This theorem
says that if we know the remainders of a number a with respect to some
relative prime numbers n1 , n2 , . . . nk , then we know the remainders of a with
respect to n1 · n2 · · · nk . In the language of formulas, we have the congruences

a ≡ a1 (mod n1 ),
a ≡ a2 (mod n2 ),
..
.
a ≡ ak (mod nk ),

and the solution a to the congruences is determined uniquely modulo


n1 n2 · · · nk .
We now show the general solution to the above congruence system when
k = 2, then we apply this knowledge to determine the periodicity of the last
digits of the Bell numbers.

Bézout’s lemma

We shall need Bézout’s9 lemma. It says that d is the common divisor of


the integers n1 and n2 (which are not both zero), then there exist integers x
and y such that
d = n1 x + n2 y.
In other words, the greatest common divisor of n1 and n2 can always be
expressed as an integer linear combination of n1 and n2 .
In the particular case when n1 and n2 are co-primes, then

n1 x + n2 y = 1 (12.7)
9 Étienne Bézout (1730-1783), French mathematician.
Congruences via finite field methods 355

for some integers x and y.


The proof of this theorem can be found in any basic number theory text-
book (see, for instance, [31, Theorem 1.2], [224, Theorem 1.23], or [305, Section
1.2]).

The solution of a system of two congruences

We state that, having the congruences

a ≡ a1 (mod n1 ),
a ≡ a2 (mod n2 ),

we consequently also have that

a ≡ a1 n2 y + a2 n1 x (mod n1 n2 ).

Here x and y are the numbers taken from (12.7).


To check the validity of this solution for a, we substitute, again by (12.7),
1 − n1 x in place of n2 y:

a ≡ a1 n2 y + a2 n1 x = a1 (1 − n1 x) + a2 n1 x ≡ a1 (mod n1 ),

as it should be. The modulo n2 case is similar.


The reader can convince herself/himsef, that if, for example, a number a is
one modulo two and two modulo five, then its last digit is uniquely determined.
In formulas, we fix that a satisfies the congruences

a≡1 (mod 2),


a≡2 (mod 5).

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

a≡7 (mod 10).

12.4.2 The Bell numbers modulo 10


It is now straightforward to get our periodicity result with respect to the
last decimal digit of the Bell number sequence. This sequence is periodic of
356 Combinatorics and Number Theory of Counting Sequences

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.

12.5 Value distributions modulo p


One can ask the following question: which values can a linear recurrence
attain modulo a prime number10 ?
For the Fubini numbers, for instance, the sequence Fn (mod p) does not
attain all the possible values, since, when p = 5 Fn (mod 5) starts as
1, 1, 3, 3, 0, 1, 3, 3, 0, . . .
(periodic of length four with pre-period of length one), so 2 and 4 do not
occur. For p = 7 the avoided value is 4.
Let us take now the Bell numbers, say, modulo 5. We have just seen that
this sequence is periodic modulo 5 with a relatively huge period, 781. Still, it
is enough to go until B17 so that we cover all the possible values modulo 5:
the values of B1 , B2 , . . . , B17 are
1, 2, 0, 0, 2, 3, 2, 0, 2, 0, 0, 2, 2, 2, 0, 2, 4.
Indeed, 0, 1, 2, 3, 4 all appear among these values. This is not a coincidence,
Bn (mod p) always attains all the numbers 0, 1, . . . , p − 1. We dedicate the
following pages to prove this statement.

12.5.1 The Bell numbers modulo p


Is it always possible to solve the congruence
Bn ≡ λ (mod p)
10 This question with respect to some of our combinatorial sequences other than linear

recurrences and not modulo p but among the integers is treated in Chapter 13.
Congruences via finite field methods 357

for any fixed λ, where the unknown is n?


We split this question into two parts: when λ = 0 and when λ ̸= 0.

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:

Bmp +k ≡ 0 (mod p) (k = 0, 1, . . . , p − 2),

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,

Bpn ≡ Bn+1 (mod p) (n = 0, 1, 2, . . . ).

We now prove another auxiliary statement. Let M be an integer and p


be a prime. Then BM +k ≡ 0 (mod p) for k = 0, 1, . . . , p − 2 if and only if
BM +k ≡ BM +pk (mod p) for k = 1, 2, . . . , p − 1.
Again, by Exercise 16 of Chapter 11 we have
k  
X k
BM +kp ≡ BM +i (mod p) (k = 0, 1, 2, . . . ). (12.8)
i=0
i

If BM +k ≡ 0 for k = 0, 1, . . . , p−2 then BM +pk ≡ 0 and thus it is also true that


BM +k ≡ BM +pk . When k = p − 1 (and still BM +k ≡ 0 for k = 0, 1, . . . , p − 2)
the above congruence reduces to BM +(p−1)p ≡ BM +p−1 (mod p). Thus, the
“if” statement is proved.
We continue by proving the “only if” part. If BM +k ≡ BM +pk (mod p)
for k = 1, 2, . . . , p − 1, then (12.8) is the same as
k−1
X 
k
BM +k ≡ BM +k + BM +i (mod p) (k = 1, 2, . . . , p − 1).
i=0
i

11 The proof is taken from [359], another proof can be found in [312].
358 Combinatorics and Number Theory of Counting Sequences

From here, after canceling out BM +k we get a system of equations:


 
1
0≡ BM ,
0
   
2 2
0≡ BM + BM +1 ,
0 1
..
.
     
p−1 p−1 p−1
0≡ BM + BM +1 + · · · + BM +p−2 .
0 1 p−2
The coefficient matrix is triangular, and non-singular (its diagonal contains
k

the binomial coefficients k−1 ̸= 0 (k ≥ 1)). We get that the solution is
BM +i ≡ 0 (mod p) (k = 0, 1, . . . , p − 2).
This is what we stated.

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

in the splitting field of the characteristic polynomial xp − x − 1 of the Bell


numbers. (Here α1 , . . . , αp are
 the zeros of this characteristic polynomial.)
The sum contains 2p−1p−1 terms. For two different sets of indices, say l0 +
· · · + lp = p − 1 and r0 + · · · + rp = p − 1 the products

α1l1 · · · αplp and α1r1 · · · αprp


are different. This must be so; otherwise, the polynomial xp − x − 1 and the
multi-variable polynomial
q(x1 , . . . , xp ) = xl11 · · · xlpp − xr11 · · · xrpp
Congruences via finite field methods 359

would have common zeros. In fact, the polynomial q is single-variable, because


if α1 is a zero in the splitting field, then the other zeros are α1 + k, where k
runs from zero to p − 1. Thus, the polynomial q is equal to

q(x) = xl1 · · · (x + p − 1)lp − xr1 · · · (x + p − 1)rp .

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 !

for any λ ̸= 0. Thus, Wn (as a linear combination of terms of the powers of


k
α1k1 · · · αpp ) is a non-zero linear recurrence sequence of order 2p−1

p−1 . By this
non-zero property there is an
 
2p − 1
n≤
p−1

such that Wn ̸= 0. This, as we said, is equivalent to the congruence Bn ≡ λ.


360 Combinatorics and Number Theory of Counting Sequences

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

An = αn+1 + (1 + α)n+1 (n ≥ 0).

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

Therefore, the period of Bn modulo m is the least common multiple of


p
p i −1
the periods modulo pi . The latter is, as we have just seen is Npi = pii −1 .

2. The modulo p periodicity of the r-Bell numbers was studied in [427].


p
−1
3. Carlitz [121] proved that the Bell numbers have a period pk pp−1 modulo
pk . Note that when k = 1 this gives back Hall’s result.
362 Combinatorics and Number Theory of Counting Sequences

4. Linear recurrence sequences may not be periodic at all. It can be seen


that a sequence is a linear recurrence sequence if and only if there exists
(r)
a positive integer n such that hn = 0 for all but finitely many r ≥ 0.
Here hn (r) is the Hankel determinant of the sequence An+r of size n×n.
(See Theorem 8.74 in [373].)
5. See the Notes after Chapter 8 in [373] for the interesting historical re-
marks on linear recurrence sequences.

n+k
∞
6. The mod p periodicity of the sequence k was studied by Ni-
n=0
jenhuis and Wilf [455]. Results for composite modulus periodicity of the
Stirling numbers of the second kind can be found in [348].
Chapter 13
Diophantic results

In this chapter we will study diophantic-type questions regarding our combi-


natorial numbers.
Taking a triangle of numbers, like the Pascal, Stirling, and Euler triangle,
it is an interesting question whether all the numbers appear in these triangles;
and if a given number a appears, how many times does it do so?
Since n1 = n, it is obvious that every positive integer appears in the
Pascal triangle. How many times they do is another question. We study these
problems in this section regarding some of our combinatorial triangles.

13.1 Value distribution in the Pascal triangle


As we have just seen, every positive integer appears in the Pascal triangle.
How many times a given integer is present? One appears infinitely often, as it
appears in every
 line twice (and once in the zeroth line). In turn, two appears
only once, 21 = 2. In addition, by the symmetry of the Pascal triangle, every
number (except 2) appears at least twice. What is more, there are infinitely
many numbers  appearing even four times: let a be the value of the nbinomial
coefficient nk . Then, by symmetry, a can appear once again as n−k

, and
twice more as a1 and a−1 a
 
. To make easier the reference to these cases, we
will say that such values are trivially related.
We show now that there are infinitely many numbers which appear six
times among the binomial coefficients.

13.1.1 Lind’s construction


The above-described numbers, which appear at least six times, interest-
ingly, can be parametrized by the Fibonacci and Lucas sequences. The Lucas
sequence is defined similarly as the Fibonacci sequence: Ln = Ln−1 + Ln−2 ,
except that the initial values are L0 = 2, L1 = 1.
The construction was first made by Lind [375] in 1968, then Singmaster
[522] gave another proof in 1975. Tovey [565] arrived at the same discovery

363
364 Combinatorics and Number Theory of Counting Sequences

independently in 1985. As Tovey’s proof is the simplest, we present that one


here.
For any positive even integer i, let

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

n(k + 1) = (n − k)(n − k − 1).

Setting
x = n − k − 1, (13.4)
we have that (13.3) is equivalent to

n(n − x) = x(x + 1).

Solving this quadratic equation for n, we get that



x + 5x2 + 4x
n= . (13.5)
2
(As n is positive, the positive sign is taken.) We need to find x such that the
above expression is an integer. To reach this aim, 5x2 + 4x must be a perfect
square (i.e., of the form m2 for some integer m). Since 5x2 + 4x = x(5x + 4), it
is natural to claim that both x and 5x + 4 are perfect squares (although this
is a stronger condition than simply requiring 5x2 + 4x to be a perfect square).
Here is the point where the Fibonacci numbers enter into the picture. The
following equality will be used:

5Fi2 + 4(−1)i = (Fi−1 + Fi+1 )2 , (13.6)


Diophantic results 365

more precisely, its version when i is even:

5Fi2 + 4 = (Fi−1 + Fi+1 )2 (i = 2, 4, 6, . . . ), (13.7)

The proof of (13.6) is based on the equality

(Fi+1 + Fi−1 )2 − 5Fi2 = 4(Fi−1


2
+ Fi Fi−1 − Fi2 ) = −4(Fi2 + Fi+1 Fi + Fi+1
2
),

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):

Fi2 + Fi (Fi−1 + Fi+1 )


n= ,
2
Fi (Fi−1 + Fi+1 ) − Fi2
k= − 1.
2
The basic identity
Li = Fi−1 + Fi+1 (13.8)
shows that (13.1)-(13.2) indeed hold.
One more form can be given by using another standard identity:

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:

5x2 + 4x ≡ 5x2 ≡ x2 ≡ x (mod 2).

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

13.1.2 The number of occurrences of a positive integer


In the preceding subsections, we constructed numbers which occurred mul-
tiple times in the Pascal triangle. In turn, one can easily show that every num-
ber greater than one can only finitely many times occur in the Pascal triangle:
an upper bound for the row index of the last occurrence is found below. What
is more, an estimation can also be given for the number of occurrences.

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


smallest elements are the neighboring elements to ones ( n1 = n−1 n


= n).
Therefore, a given number a > 1 can appear only up to the ath line. By this
very reason, each number a > 1 can occur only finitely many times in the
Pascal triangle.
Let us denote the number of occurrences of a given a by N (a). We know
already that N (1) = ∞, N (2) = 1, and that there are infinitely many a such
that N (a) ∈ {2, 4}. We are going to give an upper bound for N (a). We saw
that there are infinitely many a with N (a) = 6.

The estimation N (a) ≤ 2 + 2 log2 (a)

We will need an elementary fact about the sequences of binomial coeffi-


cients of the form i+j

i : such sequences are monotonically increasing both in
i and in j. Indeed, appealing to the basic recurrence
     
n n−1 n−1
= + ,
k k k−1

we get that
       
i+j i+j−1 i+j−1 i−1+j
= + ≥ ,
i i i−1 i−1

and similarly with respect to j.


2b

To proceed, we consider the central binomial coefficient sequence b . It is
2b
strictly increasing if b ≥ 0; therefore, there is a smallest b such that b > a.
By the above-described monotonicity property,
     
b+i+b+j b+b+j 2b
≥ ≥ >a
b+i b b

for all non-negative i and j.


Diophantic results 367

Since every binomial coefficient can be written in the form i+j



j , to localize
a in the Pascal triangle we need to find those i and j for which
 
i+j
= a. (13.9)
j
Because of the definition of b, it is not possible that both i and j be greater
than b. Thus, there are at most 2b solutions of (13.9): N (a) ≤ 2b. Still, b is a
kind of implicit quantity, we would like to express N (a) in terms of a. To this
end, note that  
2b
≥ 2b (b ≥ 0). (13.10)
b
So,  
2(b − 1)
a≥ ≥ 2b−1 ,
b−1
thus b ≤ 1 + log2 (a). By the above estimation, N (a) ≤ 2b = 2 + 2 log2 (a), and
this is what we wanted to prove.
The above proof was presented by D. Singmaster.

13.1.3 Singmaster’s conjecture


Subsequently, better bounds were found for N (a), see [1, 315, 316]. The
best bound up to now is [316]
 
(log a)(log log log a)
N (a) = O .
(log log a)3
It can even be true that N (a) is finite for all a > 1, that is, N (a) = O(1).
This is Singmaster’s conjecture from 1971 [521].
There are some values occurring non-trivially (in the sense of p. 363) as
common values of two or three binomial coefficients [590]:
       
16 10 56 22
= = 120, = = 1540,
2 3 2 3
       
153 19 221 17
= = 11 628, = = 24 310,
2 5 2 8
       
21 10 120 36
= = 210, = = 7 140.
2 4 2 3
These values therefore appear six times in the Pascal triangle. Moreover, be-
cause of      
78 15 14
= = = 3 003
2 5 6
the number 3 003 appears eight times.
 There are no known examples of higher
number of occurrences up to n, nk ≤ 1060 [81]. This leads to the question
whether
N (a) ≤ 8 (a ≥ 2).
368 Combinatorics and Number Theory of Counting Sequences

13.2 Equal values in the Pascal triangle


n m
 
13.2.1 The history of the equation k = l
We have seen in the previous section that the equation
   
n m
= (13.11)
k l

(and especially its non-trivial solutions) leads to results on the number of


occurrences of numbers in the Pascal triangle. But Equation (13.11) is inter-
esting in itself. Much effort has been put into the solution of (13.11), but only
partial results are known, because as easy the shape of this equation is, as
hard is the machinery needed to solve it.
Complete solutions are known only in the cases when

(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

which then lead to the indeed simpler diophantic equation

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.

13.3 Value distribution in the Stirling triangles


We now turn to the Stirling triangle and will study the similar questions
we raised above with respect to the binomial triangle: we study the occurrence
of numbers, and we study those repeated values in the Stirling triangles from
which only a very few are known.

13.3.1 Stirling triangle of the second kind


We are now going to give a bound for the occurrence numbers M1 (a) and
M2 (a) in the first kind, and second kind Stirling number triangle. We elaborate
on the calculations in the second kind case. The following are based on the
work [51].
The approach is basically the same as Singmaster’s, but the estimation of
the quantity b needs a bit more work.
First note that the sequence i+j

i is monotone increasing both in i and in
2n
j. Also, the sequence n of the central Stirling numbers of the second kind
is strictly increasing.
The proofs are straightforwardly coming from the recurrence
     
n n−1 n−1
= +k .
k k−1 k

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.

The estimation of M2 (a)

We are going to prove that for all a ≥ 2


log a
M2 (a) ≤ 2 + 2 .
W 12 log a

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

This is actually an obvious inequality, taking into account the combinatorial


definition of these numbers.
Diophantic results 371

By Exercise 6 of Chapter 10 we see that


 
2b 1 (2b)!
= b ;
b ≥2 2 b!

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).

13.3.2 Stirling triangle of the first kind


Everything that we have done in the previous section can be applied
2n to
the Stirling numbers of the first kind. The monotonicity of i+j
i and n can
be proven easily. We also need
  X k    
n k+j n
= (n ≥ k + 1),
n−k j=0
j ≥2 k + j

which was presented in (10.2). In particular,


   
2n 2n
≥ .
n n ≥2

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

13.4 Equal values in the Stirling triangles and some


related diophantine equations
Although Mi (a) seems to be sublogarithmic (by (13.15) and (13.13)), it
can well be true that these are bounded functions. Below we present some
calculations supporting these suspects.
By numerical calculations it turns out that
M2 (a) ≤ 2 (2 ≤ a ≤ 100 000).
The only numbers in this interval which occur twice are
15, 4 095, 66 066.
They appear as follows:
   
5 6
= = 15, (13.16)
2 5
   
13 91
= = 4 095, (13.17)
2 90

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.

13.4.1 The Ramanujan-Nagell equation


that the Stirling numbers in (13.16) and (13.17) are of the form n2

Note
n

or n−1 . these have simple closed-form expressions, as we have shown before:
     
n n n n(n − 1)
= 2n−1 − 1, = = .
2 n−1 2 2
The numbers of the form 2n − 1 are often called Mersenne numbers, while the
numbers of the form n(n−1)
2 are named triangular numbers.
Therefore 15 and 4 095 are two remarkable numbers in (13.16) and (13.17):
they are both Mersenne and triangular numbers. In other words, they are
solutions to the diophantine equation
m(m − 1)
2n − 1 = . (13.19)
2
Diophantic results 373

This equation is well known in the literature, called Ramanujan-Nagell equa-


tion. Ramanujan3 conjectured in 19134 [483] that that there are only five
positive integers that are both of the form 2n − 1 and m(m−1)
2 :
0, 1, 3, 15, 4 095.
5
Nagell proved this conjecture in 1948. See [449] for the original (quite el-
ementary) proof in Norwegian, and [450] for an English version from 1961.
Other proofs are found in [280], [445, pp. 205-206], [538, pp. 99-102], and in
[304, 433, 570].
In fact, the Ramanujan-Nagell equation was originally written in the form
2 n − 7 = x2 ,
but it is easy to see that it is equivalent to (13.19). The latter equation has
only the following solutions:
1, 9, 25, 121, 32 761.
The Ramanujan-Nagell equation has been subsequently found useful in
coding theory [515] and in differential algebra [401]. Some generalizations of
the Ramanujan-Nagell equation can be found in [74, 75].

n m
 
13.4.2 The diophantine equation n−3 = m−1

The repeated value 66 066 in (13.18) is not a Ramanujan-Nagell number.


Instead, it is a solution to the equation
   
n m
= (13.20)
n−3 m−1
belonging to
(n, m) = (14, 364).
n

The n−3 special Stirling numbers have a closed form:
       
n n n n
= + 10 + 15 ,
n−3 4 5 6
as it follows from (10.2). Using this expression, we transform (13.20) into the
diophantic equation
       
n n n m
+ 10 + 15 = .
4 5 6 2
This equation was recently studied in [51].
3 Srinivasa Ramanujan (1887-1920), Indian mathematician, whose “insight into formulae

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-

tions in the theory of diophantine equations.


374 Combinatorics and Number Theory of Counting Sequences

13.4.3 A diophantic equation involving factorials and


triangular numbers
In the first kind Stirling triangle, apart one, only two numbers appear more
than once (up to a ≤ 100 000): 6 and 120, in the form
   
4 4
= = 6,
1 3
   
6 16
= = 120.
1 15
From these we can write down an interesting diophantic nequation which,
it seems,
 n  has not been studied in the literature. Note that 1 = (n − 1)!, and
n

n−1 = 2 , thus the above two special values are solutions of

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.

13.4.4 The Klazar – Luca theorem


Still concentrating on equal values, one can ask the question of when it is
possible to find equal values in a given row in our  triangles. For the Pascal
triangle, the answer is trivial: by the symmetry nk = n−k n
we have that any
value that is not a peak appears twice (if n > 2), and other value nl cannot


be equal with these because of the strict log-concavity property.


The Stirling triangles lack this symmetry, but it still can happen that there
are some k1 and k2 indices such that
       
n n n n
= , or = .
k1 k2 k1 k2
6 Note that 1 is also a triangular-factorial number.
Diophantic results 375

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.

The main ingredient of the proof - a result of Corvaja and Zannier

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

ψ(c1 1n ) = c, ψ(cpn ) = cXp ,

and we extend ψ multiplicatively and additively to more general sums in E.


376 Combinatorics and Number Theory of Counting Sequences

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

α = βγ.

The above statement, which is due to Corvaja and Zannier, is Theorem 1


in [177].

The proof of the Klazar – Luca theorem

The Klazar – Luca theorem is an application of the Corvaja – Zannier result


[333]. (For similar applications, see [383].)
We need, however, one more ingredient: the Bertrand postulate. It is a
statement saying that for each n ≥ 2 there is a prime number p such that
n/2 < p ≤ n. For a proof, see [11].
To prove the Klazar – Luca theorem, we suppose that
   
n n
=c (13.22)
k2 k1
holds for infinitely many n (1 < k1 < k2 ). Then by the Corvaja-Zannier result
there is a non-zero γ power sum in E such that
   
n n
= γ.
k2 k1
The leading roots of the left- and right-hand sides are k2n and k1n · an , where
a is the leading root of γ, and is a positive integer. It comes that k2 = ak1 .
Since k1 < k2 , it also follows that k2 ≥ 2k1 . We use Bertrand’s postulate to
fix a prime p such that k1 < p ≤ k2 . Next, we take the above-introduced ψ
map:    
n n
ψ =ψ ψ(γ). (13.23)
k2 k1
This is an equality among polynomials in Q[Xp | p is a prime]. Consider the
n
variable
 x p(which is the image of p by ψ).Since k1 < p, xp does not appear
n
 n 
in ψ k1 , but it appears only once in ψ k2 as the image of
   
1 k2
ψ (−1)k2 −p pn .
k2 ! p
Diophantic results 377

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).

2. Show that N (3) = N (4) = N (5) = 2, N (6) = 3.


3. Based on Tovey’s result, prove the following equalities (which are the
original ones, found by Lind). Let i be a positive integer, and let

n = F2i F2i+1 ,
k = F2i−2 F2i+1 .

Then    
n n−1
= .
k k+1

4. Prove that (13.8) indeed holds.


5. Give a proof, independent from the one in the text, that Fi Li + Fi2 (or,
equivalently, F2i + Fi2 ) is always even.
6. Prove that a given number a can occur in the first or second kind Stirling
triangle only up to the nth line, where

 
1
n= (1 + 1 + 8a) .
2

(See [51] for the details.)


7. (Research problem.) Are there any triangular-factorial numbers apart
from 1, 6 and 120?
Diophantic results 379

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

on the problem nk = ml , and also


 
2. See [81] for the most recent treatise
on the generalization nk − ml = d > 0. In the first case, the quadruple
 

(n, k, m, l) is called collision, in the second case it is a near collision.


3. Bertrand’s postulate has far-reaching generalizations. For example, in
place of the interval n and 2n = n + n we can ask whether there is a
prime between n and n + nα where α < 1. The most recent result [43]
in this direction says that α = 21/40 still guarantees the existence of a
prime between n and n + nα , at least for large n.
Another possibility of generalization was observed by Ramanujan and
Erdős, independently. For any positive integer k there is an integer n(k)
such that there are k primes between n and 2n when n > n(k) [220, 484].
4. There is a statement related to but different from Bertrand’s postulate:
if n > 1, then there is a prime between n2 and (n + 1)2 . This statement,
originally conjectured by Legendre7 , has not been proved yet.
5. The non-integer property of the harmonic numbers can be proven by
using Bertrand’s postulate. See Exercise 21 of Section 6 in [262] and its
solution in the “Answers to Exercises” section.
6. The Klazar-Luca theorem was proved to have much more general power
sums than that of the second kind Stirling numbers. Moreover, it is
proved also that the diophantine equation
 a1  a2  am
n n n
··· = xd
k1 k2 km

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

with k, a fixed and x > k, |y| > 1, and z ≥ 2 unknowns.


8. The Erdős-Moser equation is
m−1
X
in = mn .
i=1

It was verified [105] up to very large m that there are no solutions in n


and m except
11 + 21 = 31 .
There are a plenty of variations on this theme, not only equations but
congruences were also studied. See, for example, [14].
9. Diophantine questions regarding the power sums of Chapter 5 were re-
cently studied in [49, 78, 274, 481, 482].

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

Basic combinatorial notions


Three basic notions in elementary combinatorics are permutation, varia-
tion, and combination.
To be able to follow most parts of this book, it is necessary that the reader
be familiar with these notions.

Definition 14.4.1. A given order of n objects is a permutation of them.

The total number of permutations on n objects is denoted by n!, and it can


be calculated by multiplying the first n positive integers:

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.

Definition 14.4.2. If among the n objects there are l1 , l2 , . . . , lk not distin-


guishable9 , then a given order of these is a permutation with repetition.

Suppose that l1 + l2 + · · · = lk = n. If it is necessary, we can add ones to the


sequence. The total number of these is
 
n n!
= .
l1 , l2 , . . . , lk l1 !l2 ! · · · lk !
This is so, because in any permutation the order of the non-distinguishable el-
ements is not counted. Therefore, the total number of permutations, n!, must
be divided by the permutation of these non-distinguishable objects. These are
l1 !, l2 !, . . . , lk !, respectively. The symbol on the left-hand side is the multino-
mial coefficient.

Definition 14.4.3. If we choose k objects from n different objects such that


the order of the k elements matters, then the chosen objects form a variation.
9 Imagine 3 red balls and 2 blue balls and a green ball. Then i1 = 3, i2 = 2, i3 = 1.

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.

In each step, we choose from n elements and we altogether choose k times, so


the number of variations with repetition is

nk .

If we do not consider the order of the chosen objects we get combination


instead of variation.

Definition 14.4.5. If we choose k objects from n such that we do not regard


the order, then we have a combination.

For given n and k there are


 
n(n − 1)(n − 2) · · · (n − (k − 1)) Vn,k n! n
= = =
k! k! k!(n − k)! k

combinations without repetition. The symbol nk is called binomial coefficient.




The order of the objects can be “forgotten” by dividing by their k! order


in a variation, so the above formula for nk comes.


If k = 2 in the multinomial coefficient such that l1 + l2 = n, we have that


     
n n n
= = .
l1 l2 l1 , l2
Definition 14.4.6. If we choose k objects from n such that the order of the
elements does not count, and an element can be chosen repeatedly, then we
get a combination with repetition.

The number of repetitions is


 
n+k−1
.
k
10 We choose an element, register it on a piece of paper, then throw it back to the urn.
Appendix 383

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.

Next, increase the labels like this: o1 , o2 + 1, . . . , ok + k − 1. We now have


different labels for each object:

0 ≤ o1 < o2 + 1 < · · · < ok + k − 1 ≤ n + k − 1.

Thus, the problem is transformed to choose k labels without repetition while


there are n + k − 1 labels to choose from. This is a combination, hence the
result follows.
384 Appendix

The polynomial theorem


The often used binomial theorem
k  
X k
(x1 + x2 )k = xk1 xn−k
2
j=0
j

easily generalizes to sums of more terms. This is the polynomial theorem:


X k!
(x1 + x2 + · · · + xn )k = xj1 xj2 · · · xjnn .
j1 !j2 ! · · · jn ! 1 2
j1 +j2 +···+jn =k

Writing out the power as

(x1 + x2 + · · · + xn )(x1 + x2 + · · · + xn ) · · · (x1 + x2 + · · · + xn )

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

When n = 2, we get the binomial theorem:


X k! j1 j2
(x1 + x2 )k = x x .
j1 !j2 ! 1 2
j1 +j2 =k
Appendix 385

The sum can be reduced to a simple one index sum:


k k  
X k! X k j k−j
(x1 + x2 )k = xj1 xk−j
2 = x x ,
j=0
j!(k − j)! j=0
j 1 2

which, after setting x1 = x2 = 1 gives the nice identity


k  
X k
2k = (14.1)
j=0
j

An independent combinatorial proof is worth presenting. Take a set of k el-


ements, and choose 0, 1, 2, . . . , k elements from it (this is represented by the
right-hand side). In each occasion, we can make a list in which we mark in
the different positions from 1 to k which elements were chosen and which
were not. There are 2k such possible list (for each element, we register 1 or 0,
depending on whether it was chosen or not).
386 Appendix

The Lambert W function


The Lambert W function [176] can be defined implicitly as the solution of
the transcendental equation

W (z)eW (z) = z. (14.2)

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

A notable special constant appears at z = 1 [230, Section 6.11]:

W (1) = Ω = 0.567143290409784 . . . .

The W function is widely applied in physics and mathematics, see the


classical paper [176], and [169, 422] for newer citations.
In combinatorics, the W function often appears in approximations. There-
fore, it is useful to know that [176]

W (z) ∼ log z − log log z (z → ∞). (14.3)


Formulas

Formulas with respect to the Stirling numbers of the first kind

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

Asymptotics (more on p. 177):


 
n (n − 1)!
∼ (ln n + γ)k−1 .
k (k − 1)!
Formulas 389

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

Schläfli’s formula (1852) [510], see also [474]:


    k   k+jn
n n−1 X k + 1 jn
= (−1)j k+jn
.
n−k k j=0
j + 1 k

The dual of Spivey’s formula:


n X
m   
X
n−k m n
(n + m)! = m k!.
j k
k=0 j=0
392 Formulas

Formulas with respect to the Stirling numbers of the second kind

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

The inverse of Schläfli’s formula [474]:

    k    jn 
n+k n+k X j k+1 jn−k
= (−1) .
n k j=1
j + 1 jn−1k

Spivey’s formula (2008):

n X
m   
X
n−k m n
Bn+m = j Bk .
j k
k=0 j=0
396 Formulas

Formulas with respect to the r-Stirling numbers of the first kind

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

The r-version of the Schlömilch formula [172]:


  n n−k h   
n+r X XX
m+k+h+j n h
= (−1) ·
k+r r j=0
m j
m=k h=0

(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

and vice versa:


  Xk   
n+r r n+r
= .
k l k−l+r r
l=0
Formulas 399

Formulas with respect to the r-Stirling numbers of the second kind

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

Properties of the horizontal generating polynomials

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

For the estimations of the leftmost zeros, see [175, 432].

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

The Euler polynomials have only real and negative zeros.

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 r-Euler polynomials have only real and negative zeros.


Tables

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).

The Stirling numbers of the first kind (A132393)

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.

The Stirling numbers of the second kind (A008277)

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

The 2-Stirling numbers of the first kind (A143491)

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.

The 2-Stirling numbers of the second kind (A143494)

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

The 3-Stirling numbers of the first kind (A143492)

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.

The 3-Stirling numbers of the second kind (A143495)

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

The 3-restricted Stirling numbers of the first kind (|A171996|)

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

The 3-restricted Stirling numbers of the second kind (A144385)

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

The 2-associated Stirling numbers of the first kind (A008306)

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

The 3-associated Stirling numbers of the first kind (A050211)

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

The 2-associated Stirling numbers of the second kind (A008299)

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

The 3-associated Stirling numbers of the second kind (A059022)

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

The Eulerian numbers (A008292)


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.

The 2-Eulerian numbers13


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.

The 3-Eulerian numbers


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

The Bell numbers (A000110)

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

The Fubini numbers (ordered Bell numbers) (A000670)

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

The numerator and denominator of the Cauchy numbers of the second


kind are separately indexed in OEIS under the ID A002657 and A002790,
respectively.
The Cauchy numbers of the second kind

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

The 2-Fubini numbers (A232472)

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

The 3-Fubini numbers (A232473)

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

The factorials (A000142)

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

The harmonic and hyperharmonic numbers

H0 = 0 H02 = 0 H03 = 0 H04 = 0


H1 = 1 H12 = 1 H13 = 1 H14 = 1
3 5 7 9
H2 = H22 = H23 = H24 =
2 2 2 2
11 2 13 3 47 4 37
H3 = H3 = H3 = H3 =
6 3 6 3
25 2 77 3 57 4 319
H4 = H4 = H4 = H4 =
12 12 4 12
137 2 87 3 459 4 743
H5 = 1 H5 = H5 = H5 =
60 10 20 15
49 2 223 3 341 4 2509
H6 = H6 = H6 = H6 =
20 20 10 30
363 2 481 3 3349 4 2761
H7 = H7 = H7 = H7 =
140 35 70 21
761 2 4609 3 3601 4 32891
H8 = H8 = H8 = H8 =
280 280 56 168
7129 2 4861 3 42131 4 35201
H9 = H9 = H9 = H9 =
2520 252 504 126
7381 2 55991 3 44441 4 485333
H10 = H10 = H10 = H10 =
2520 2520 420 1260
83711 2 58301 3 605453 4 511073
H11 = H11 = H11 = H11 =
27720 2310 4620 990
86021 2 785633 3 631193 4 535097
H12 = H12 = H12 = H12 =
27720 27720 3960 792
1145993 2 811373 3 655217 4 1115239
H13 = 1 H13 = H13 = H13 =
360360 25740 3432 1287
1171733 2 835397 3 1355479 4 19679783
H14 = H14 = H14 = H14 =
360360 24024 6006 18018
1195757 2 1715839 3 23763863 4 6786821
H15 = H15 = H15 = H15 =
360360 45045 90090 5005
2436559 2 29889983 3 24444543 4 133033679
H16 = H16 = H16 = H16 =
720720 720720 80080 80080
42142223 2 30570663 3 476698557 4 136913555
H17 = H17 = H17 = H17 =
12252240 680680 1361360 68068
14274301 2 197698279 3 162779395 4 140608675
H18 = H18 = H18 = H18 =
4084080 4084080 408408 58344
275295799 2 201578155 3 166474515 4 144135835
H19 = H19 = H19 = H19 =
77597520 3879876 369512 50388
55835135 2 41054655 3 34000335 4 678544345
H20 = H20 = H20 = H20 =
15519504 739024 67184 201552
422 Tables

The idempotent numbers (A000248)

ı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

Involutions, the 2-restricted Bell numbers and factorials (A000085)

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

The 3-restricted Bell numbers (A006505)

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

The 3-restricted factorials (A057693)

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

The 2-associated Bell numbers (A000296)

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

The 3-associated Bell numbers (A000296)

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

The 2-associated factorials, or derangements (A000166)

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

The 3-associated factorials (A038205)

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

The Lah numbers (A105278)

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.

The Superfactorials14 (A000178)

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

14 The notation n$ is also in use.


Tables 431

The horizontal sum of the Lah numbers (A000262)

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

The Euler numbers (A000111)

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

[1] H. L. Abbott, P. Erdős, D. Hanson, On the number of times an integer


occurs as a binomial coefficient, 81(3) (1974), 256-261.
[2] V. S. Adamchik, On the Hurwitz function for rational arguments,
Appl. Math. Comput. 187(1) (2007), 3-12.
[3] V. S. Adamchik, On Stirling numbers and Euler sums, J. Comput.
Appl. Math. 79 (1997), 119-130.
[4] A. Adelberg, Congruences of p-adic integer order Bernoulli numbers,
J. Number Theory 59 (1996), 374-388.
[5] A. Adelberg, The p-adic analysis of Stirling numbers via higher order
Bernoulli numbers, arXiv:1805.00995.
[6] J. A. Adell, A. Lekuona, Closed form expressions for the Stirling num-
bers of the first kind, Integers 17 (2017), #A26.
[7] T. Agoh, K. Dilcher, Representations of Stirling numbers of the first
kind by multiple integrals, Integers 15 (2015), #A8.
[8] T. Agoh, K. Dilcher, L. Skula, Wilson quotients for composite moduli,
Math. Comput. 67(222) (1998), 843-861.
[9] T. Agoh, L. Skula, The fourth power of the Fermat quotient, J. Number
Theory 128 (2008), 2865-2873.
[10] M. Aigner, Combinatorial Theory, Springer-Verlag, Berlin, Heidelberg,
1997.
[11] M. Aigner, G. Ziegler, Proofs from the Book, Springer, 2001.
[12] M. Aigner, A characterization of the Bell numbers, Discrete Math. 205
(1999), 207-210.
[13] A. Akbary, S. Siavashi, The largest known Wieferich numbers, Integers
18 (2018), #A3.
[14] M. A. Alekseyev, J. M. Grau, A. M. Oller-Marcén, Computing solu-
tions to the congruence 1n +2n +· · ·+nn ≡ p (mod n), Discrete Appl.
Math. 200 (2019), 427-440.

433
434 Bibliography

[15] E. Alkan, Variations on Wolstenholme’s theorem, Amer. Math.


Monthly 101 (1994), 1001-1004.

[16] E. Alkan, H. Gōral, D. C. Sertbaş, Hyperharmonic numbers can rarely


be integers, Integers 18 (2018), #A43.
[17] T. Amdeberhan, V. H. Moll, Involutions and their progenies, J. Comb.
6(4) (2015), 483-508.

[18] T. Amdeberhan, V. De Angelis, V. Moll, Complementary Bell num-


bers: arithmetical properties and Wilf ’s conjecture, Advances in Com-
binatorics Waterloo Workshop in Computer Algebra, W80, Springer,
2013, 23-56.
[19] T. Amdeberhan, D. Manna, V. Moll, The 2-adic valuation of Stirling
numbers, Exp. Math. 17 (2009), 69-82.
[20] R. A. Amrane, H. Belbachir, Non-integerness of class of hyperhar-
monic numbers, Ann. Math. Inform. 37 (2010), 7-11.
[21] R. A. Amrane, H. Belbachir, Are the hyperharmonics integral? A par-
tial answer via the small intervals containing primes, C. R. Math.
Acad. Sci. Paris 349(3-4) (2011), 115-117.
[22] R. A. Amrane, H. Belbachir, Non-integerness of hyperharmonic num-
bers by using intervals containing primes, Int. Conference on Disc.
Math. and Comp. Science (Proceedings), 2011, 9.
[23] T. Andreescu, Z. Feng, A Path to Combinatorics for Undergraduates,
Birkhäuser, 2004.
[24] V. Andrejić, M. Tatarevic, Searching for a counterexample to Kurepa’s
conjecture, Math. Comp. 85 (2016), 3061-3068.
[25] G.E. Andrews, The Theory of Partitions, Addison-Wesley, 1976.
[26] D. André, Développement de sec x and tg x, C. R. Math. Acad. Sci.
Paris 88 (1879), 965-979.
[27] D. André, Sur les permutations alternées, Journal de Mathématiques
Pures et Appliquées, 3e série, 7 (1881) 167-184.
[28] D. André, Mémoire sur les permutations quasi-alternées, Journal de
Mathématiques Pures et Appliquées, 5e série, 1 (1895), 315-350.
[29] V. De Angelis, D. Marcello, Wilf ’s conjecture, Amer. Math. Monthly
123(6) (2016), 557-573.

[30] M. Apagodu, D. Applegate, N. J. A. Sloane, D. Zeilberger, Analysis of


the gift exchange problem, Electronic J. Comb. 24(3) (2017), #P3.9.
Bibliography 435

[31] T. M. Apostol, An Introduction to Analytic Number Theory, Springer,


1976.

[32] P. Appell, Développement en série entière de (1 + ax)1/x , Grunert


Archiv 65 (1880), 171-175.
[33] D. Applegate, N. J. A. Sloane, The gift exchange problem,
arXiv:0907.0513v1

[34] T. Arakawa, T. Ibukiyama, M. Kaneko, Bernoulli Numbers and Zeta


Functions, Springer, 2014.
[35] E. Artin, The Gamma Function, Dover, 2015 (reprint).
[36] N. Asai, I. Kubo, H.-H. Kuo Bell numbers, log-concavity, and log-
convexity, Acta Appl. Math. 63 (2000), 79-87.
[37] W. Asakly, T. Mansour, M. Schork, Representing elements of the Weyl
algebra by labeled trees, J. Math. Phys. 54 (2013), 023514.
[38] R. Askey, Orthogonal Polynomials and Special Functions, Regional
Conference Series in Applied Mathematics, 21 (1975).
[39] R. Askey, M. E. H. Ismail, Permutation problems and special functions,
Canad. J. Math. XXVIII (4) (1976), 853-875.
[40] È. T. Avanesov, Solution of a problem on figurate numbers, (in Rus-
sian) Acta Arith. 12 (1966/67), 409-420.
[41] C. Babbage, Demonstration of a theorem relating to prime numbers,
Edinburgh Philosophical J. 1 (1819), 46-49.
[42] G. Bach, Über eine Verallgemeinerung der Differenzengleichung der
Stirlingschen Zahlen 2. Art und Einige damit zusammenhängende Fra-
gen, J. Reine Angew. Math. 233 (1968), 213-220.

[43] R. C. Baker, G. Harman, J. Pintz, The difference between consecutive


primes, II, Proc. London Math. Soc. 83(3) (2001), 532-562.
[44] D. Barsky, B. Benzaghou, Nombres de Bell et somme de factorielles,
J. Th. Nombres Bordeaux 16(1) (2004), 1-17.

[45] D. Barsky, B. Benzaghou, Erratum à l’article Nombres de Bell et


somme de factorielles, J. Th. Nombres Bordeaux 23(2) (2011), 527.
[46] A. Barghi, Stirling numbers of the first kind for graphs, Australas. J.
Combin. 70(2) (2018), 253-268.
[47] P. Barry, Riordan Arrays: A Primer, Lulu.com, 2017.
436 Bibliography

[48] P. Barry, A note on three families of orthogonal polynomials defined


by circular functions, and their moment sequences, J. Integer Seq. 15
(2012), Article 12.7.2.
[49] A. Bazsó, D. Kreso, F. Luca, Á. Pintér, On equal values of power sums
of arithmetic progressions, Glas. Mat. Ser. III 47 (2012), 253-263.
[50] A. Bazsó, I. Mező, On the coefficients of power sums of arithmetic
progressions, J. Number Theory 153 (2015), 117-123.
[51] A. Bazsó, I. Mező, On the distribution of integers in the Stirling num-
ber triangles (manuscript).
[52] A. Bazsó, Á. Pintér, H. M. Srivastava, A refinement of Faulhaber’s
theorem concerning sums of powers of natural numbers, Appl. Math.
Lett. 25 (2012), 486-489.
[53] H. W. Becker, J. Riordan, The arithmetic of Bell and Stirling numbers,
Amer. J. Math. 70 (1948), 385-394.
[54] H. Belbachir, A. Belkhir, Cross recurrence relations for r-Lah numbers,
Ars Combin. 110 (2013), 199-203.
[55] H. Belbachir, I. E. Bousbaa, Associated Lah numbers and r-Stirling
numbers, arXiv:1404.5573v2.
[56] H. Belbachir, I. E. Bousbaa, Translated Whitney and r-Whitney num-
bers: a combinatorial approach, J. Integer Seq. 16 (2013), Article
13.8.6.
[57] H. Belbachir, A. Khelladi, On a sum involving powers of reciprocals of
an arithmetic progression, Ann. Math. Inform. 34 (2007), 29-31.
[58] H. Belbachir, M. Mihoubi, A generalized recurrence for Bell polynomi-
als: An alternate approach to Spivey and Gould-Quaintance formulas,
Eur. J. Combin. 30(5) (2009), 1254-1256.
[59] E. A. Bender, E. R. Canfield, Log-concavity and related properties of
the cycle index polynomials, J. Combin. Theory Ser. A. 74(1) (1996),
57-70.
[60] A. Benjamin, L. Ericksen, P. Jayawant, M. Shattuck, Combinatorial
trigonometry with Chebyshev polynomials, J. Statist. Plann. Inference
140 (2010), 2157-2160.
[61] A. T. Benjamin, D. Gaebler, R. Gaebler, A combinatorial approach to
hyperharmonic numbers, Integers, 3 (2003), 1-9.
[62] A. T. Benjamin, J. Ornstein A bijective proof of a derangement recur-
rence, Proceedings of the 17th International Conference on Fibonacci
Numbers and Their Applications (2017), 28-29.
Bibliography 437

[63] A. T. Benjamin, G. O. Preston, J. J. Quinn, A Stirling encounter with


harmonic numbers, Math. Mag. 75(2) (2002), 95-103.

[64] M. Benoumhani, On Whitney numbers of Dowling lattices, Discrete


Math. 159 (1996) 13-33.
[65] M. Benoumhani, On some numbers related to Whitney numbers of
Dowling lattices, Adv. Appl. Math. 19 (1997) 106-116.

[66] M. Benoumhani, Log-concavity of Whitney numbers of Dowling lat-


tices, Adv. Appl. Math. 22 (1999), 186-189.
[67] B. Bényi, Restricted lonesum matrices, ArXiv:1711.10178v1.
[68] B. Bényi, M. Méndez, J. L. Ramı́rez, T. Wakhare, Restricted r-Stirling
numbers and their combinatorial applications, Appl. Math. Comput.
348 (2019), 186-205.
[69] B. Bényi,J. L. Ramı́rez, Some applications of S-restricted set parti-
tions, Period. Math. Hungar. 78(1) (2019), 110-127.
[70] D. Berend, T. Tassa, Improved bounds on Bell numbers and on mo-
ments of sums of random variables, Probab. Math. Statist. 30(2)
(2010), 185-205.
[71] E. R. Berlekamp, Algebraic Coding Theory, McGraw Hill, New York,
1968.
[72] M. Bernstein, N. J. A. Sloane, Some canonical sequences of integers,
Linear Alg. Appl. 226-228 (1995), 57-72.
[73] A. Berrizbeitia, L. A. Medina, A. C. Moll, V. H. Moll, L. Noble, The
p-adic valuation of Stirling numbers, J. Alg. Num. Th. Acad. 1 (2010),
1-30.
[74] F. Beukers, On the generalized Ramanujan-Nagell equation, I, Acta
Arith. 38 (1980/81), 389-410.
[75] F. Beukers, On the generalized Ramanujan-Nagell equation, II, Acta
Arith. 39 (1981), 113-123.
[76] G. Bhatnagar, In praise of an elementary identity of Euler, Electron.
J. Combin. 18(2) (2011), #P13.
[77] G. Bianchi, R. Sorrentino, Electronic filter simulation & design,
McGraw-Hill, 2007.
[78] Y. F. Bilu, B. Brindza, P. Kirschenhofer, Á. Pintér, R. F. Tichy, Dio-
phantine equations and Bernoulli polynomials, (with an Appendix by
A. Schinzel) Compos. Math. 131 (2002), 173-188.
438 Bibliography

[79] I. V. Blagouchine, Three notes on Ser’s and Hasse’s representations


for the zeta-functions, Integers 18A (2018), #A3.

[80] P. Blasiak, P. Flajolet, Combinatorial models of creation-annihilation,


Sém. Lothar. Combin. 65 (2011), Article B65c.
[81] A. Blokhuis, A. Brouwer, B. de Weger, Binomial collisions and near
collisions, Integers 17 (2017), #A64.

[82] M. Bóna, A Walk Through Combinatorics (third edition), World Sci-


entific Publishing Co., 2011.
[83] M. Bóna, Combinatorics of Permutations, Chapman & Hall / CRC,
2004.
[84] M. Bóna (editor), Handbook of Enumerative Combinatorics, Chapman
& Hall / CRC, 2015.
[85] M. Bóna, On a balanced property of derangements, Electron. J. Com-
bin. 13 (2006), R102.
[86] M. Bóna, R. Ehrenborg, A combinatorial proof of the log-concavity of
the numbers of permutations with k runs, J. Combin. Theory Ser. A
90 (2000), 293-303.
[87] M. Bóna, I. Mező, Real zeros and partitions without singleton blocks,
Eur. J. Combin. 51 (2016), 500-510.
[88] B. A. Bondarenko, V. V. Karachik, R. B. Tulyaganov, Distribution
of Eulerian and Stirling numbers mod p in arithmetical triangles (in
Russian), Voprosy Vychisl. i Prikl. Mat. 102 (1996), 133-140, and 146.
[89] J. Bonnar, The Gamma Function, CreateSpace Independent Publish-
ing Platform, 2014.

[90] G. Boros, V. Moll, Irresistible Integrals, Cambridge University Press,


2004.
[91] J. Bourgain, K. Ford, S. V. Konyagin, I. E. Shparlinski, On the divis-
ibility of Fermat quotients, Michigan Math. J. 59 (2010), 313-328.

[92] S. Bouroubi, Bell numbers and Engel’s conjecture, Rostock. Math.


Kolloq. 62 (2007), 61-70.
[93] K. Boyadzhiev, Close encounters with the Stirling numbers of the sec-
ond kind, Math. Mag. 85(4) (2012), 252-266.
[94] D. W. Boyd, A p-adic study of the partial sums of the harmonic series,
Experiment. Math. 3 (1994), 287-302.
Bibliography 439

[95] F. Brenti, Permutation enumeration, symmetric functions, and uni-


modality, Pacific J. Math. 157(1) (1993), 1-28.
[96] F. Brenti, Unimodal, Log-Concave and Pólya Frequency Sequences in
Combinatorics, Amer. Math. Soc. 1989.
[97] R. Breusch, Solution to Problem 5040, Amer. Math. Monthly 70
(1963), 769.
[98] B. Brindza, Á. Pintér, On the power values of Stirling numbers, Acta
Arith. 60 (1991), 169-175.
[99] J. R. Britnell, M. Wildon, Bell numbers, partition moves and the eigen-
values of the random-to-top shuffle in Dynkin Types A, B and D, J.
Combin. Th. Ser. A 148 (2017), 116-144.
[100] A. Z. Broder, The r-Stirling numbers, Disc. Math. 49 (1984), 241-259.
[101] B. H. Brown, B. Rosenbaum, E46, Amer. Math. Monthly 41 (1934),
48-49.
[102] D. H. Browne, H. W. Becker, Problem E461, Amer. Math. Monthly
48 (1941), proposal: p. 210, solution: p. 701-703.
[103] R. A. Brualdi, Introductory Combinatorics, 2nd edition, North-
Holland, 1992.
[104] Y. Bugeaud, M. Mignotte, S. Siksek, M. Stoll, Sz. Tengely, Integral
points on hyperelliptic curves, Alg. Number Th. 2(8) (2008), 859-885.
[105] W. Butske, L. M. Jaje, D. R. Mayernik, On the equation p|N p1 + N1 =
P
1, pseudoperfect numbers, and perfectly weighted graphs, Math. Comp.
69 (2000), 407-420.
[106] J. B. Caicedo, V. H. Moll, J. L. Ramı́rez, D. Villamizar, Extensions
of set partitions and permutations, Electron. J. Combin. 26(2) (2019),
P2.20.
[107] A. R. Calderbank, P. Hanlon, R. W. Robinson, Partitions into even
and odd block size and some unusual characters of the symmetric
groups, Proc. London Math. Soc. s3-53(2) (1986), 288-320.
[108] C. K. Caldwell, G. L. Honaker Jr., Prime Curios!: The Dictionary of
Prime Number Trivia, CreateSpace Independent Publishing Platform,
2009.
[109] D. Callan, Sets, lists and non-crossing partitions, J. Integer Seq. 11
(2008), Article 08.1.3.
[110] D. Callan, Notes on Stirling cycle numbers, online note, http://www.
stat.wisc.edu/~callan/papersother/
440 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

[128] L. Carlitz, On a class of finite sums, Amer. Math. Monthly 37 (1930),


472-479.

[129] L. Carlitz, On arrays of numbers, Amer. J. Math. 54 (1932), 739-752.


[130] A. L. Cauchy, Exercises de mathematique, Oeuvres 2(9) (1829), 122.
[131] M. E. Cesàro, Sur une équation aux différences mêlées, Nouvelles An-
nales de Math. 4(3) (1885), 36-40.

[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.

[141] G.-S. Cheon, M. E. A. El-Mikkawy, H.-G. Seol, New identities for


Stirling numbers via Riordan arrays, J. Korea Soc. Math. Educ. Ser.
B: Pure Appl. Math. 13(4) (2006), 311-318.
[142] G.-S. Cheon, J.-H. Jung, r-Whitney numbers of Dowling lattices, Dis-
crete Math. 312(15) (2012), 2337-2348.

[143] G.-S. Cheon, Ji-H. Jung, L. W. Shapiro, Generalized Bessel numbers


and some combinatorial settings, Discrete Math. 313(20) (2013), 2127-
2138.
442 Bibliography

[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

[161] F. Constantinescu, Relations entre les coefficients de deux polynomes


dont les racines se séparent, Časopis Pěst. Mat. 89 (1964), 1-4.

[162] J. H. Conway, R. K. Guy, The Book of Numbers, Springer-Verlag, New


York, 1996.
[163] C. B. Corcino, An asymptotic formula for the r-Bell numbers, Ma-
timyás Mat. 24(1) (2001), 9-18.

[164] C. B. Corcino, R. B. Corcino, An asymptotic formula for r-Bell num-


bers with real arguments, ISRN Discrete Math. 2013 (2013), Article
ID 274697.
[165] C. B. Corcino, R. B. Corcino, Asymptotic estimates for second kind
generalized Stirling numbers, J. Appl. Math. 2013 (2013), Article ID
918513.
[166] C. B. Corcino, R. B. Corcino, N. Acala, Asymptotic estimates for r-
Whitney numbers of the second kind, J. Appl. Math. 2014 (2014), Ar-
ticle ID 354053.
[167] R. B. Corcino, C. B. Corcino, R. Aldema, Asymptotic normality of the
(r, β)-Stirling numbers, Ars Combin. 81 (2006), 81-96.
[168] C. B. Corcino, R. B. Corcino, R. J. Gasparin, Equivalent asymptotic
formulas of second kind r-Whitney numbers, Integral Transforms Spec.
Funct. 26(3) (2015), 192-202.
[169] C. B. Corcino, R. B. Corcino, I. Mező, Integrals and derivatives con-
nected to the r-Lambert function, Integral Transforms Spec. Funct.
28(11) (2017), 838-845.
[170] C. B. Corcino, R. B. Corcino, I. Mező, J. L. Ramı́rez, Some polyno-
mials associated with the r-Whitney numbers, Proc. Math. Sci. 128:27
(2018).
[171] R. B. Corcino, R. O. Celeste, K. J. M. Gonzales, Rook theoretic proofs
of some identities related to Spivey’s Bell number formula, Ars Com-
bin. 132 (2017), 11-26.
[172] R. B. Corcino, M. B. Montero, S. L. Ballenas, Schlömilch-type for-
mula for r-Whitney numbers of the first kind, Matimyás Mat. 37(1-2)
(2014), 1-10.
[173] R. B. Corcino, M. B. Montero, C. B. Corcino, On Generalized Bell
Numbers for Complex Argument, Util. Math. 88 (2012), 267-279.

[174] C. B. Corcino, L. C. Hsu, E. L. Tan, Asymptotic approximations of


r-Stirling numbers, Approx. Theor. Appl. 15(3) (1999), 13-25.
444 Bibliography

[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

[192] P. Diaconis, M. Shahshahani, On the eigenvalues of random matrices,


J. Appl. Prob. 31 (1994), 49-62.
[193] T. Diagana, H. Maı̈ga, Some new identities and congruences for Fubini
numbers, J. Number Theory 173 (2017), 547-569.
[194] R. M. Dickau, Bell number diagrams, see the webpage http://
mathforum.org/advanced/robertd/bell.html
[195] A. Dil, I. Mező, M. Cenkci, Evaluation of Euler-like sums via Hurwitz
zeta values, Turkish J. Math. 41 (2017), 1640-1655.
[196] K. Dilcher, L. Skula, A new criterion for the first case of Fermat’s last
theorem, Math. Comp. 64 (1995), 363-392.
[197] K. Dilcher, L. Skula, Linear relations between certain sums of recipro-
cals modulo p, Ann. Sci. Math. Québec 35 (2011), 17-29.
[198] K. Dilcher, L. Skula, The cube of the Fermat quotient, Integers 6
(2006), #A24.
[199] J. D. Dixon, Polynomials with real roots, Canad. Math. Bull. 5 (1962),
259-263.
[200] A. J. Dobson, A note on Stirling numbers of the second kind, J. Com-
bin. Theory 5(2) (1968), 212-214.
[201] J. B. Dobson, On Lerch’s formula for the Fermat quotient,
Arxiv:1103.3907
[202] L. L. Dornhoff, F. E. Hohn, Applied Modern Algebra, Macmillan, New
York, 1978.
[203] T. A. Dowling, A class of geometric lattices based on finite groups, J.
Combin. Theory Ser. B 14 (1973), 61-86. Erratum: J. Combin. Theory
Ser. B 15 (1973), 211.
[204] B. S. El-Desouky, F. A. Shiha, E. M. Shokr, The generalized r-Whitney
numbers, Appl. Math. 8 (2017), 117-132.
[205] G. Dobiński, Summierung der Reihe nm /m! für m = 1, 2, 3, 4, 5, . . . ,
P
Grunert Archiv (Arch. Math. Phys.) 61 (1877), 333-336.
[206] https://archive.org/stream/archivdermathem88unkngoog#page/
n349. Accessed on 11 June 2019.
[207] R. Donaghey, Alternating permutations and binary increasing trees, J.
Combin. Th. Ser. A 18 (1975), 141-148.
[208] B. Dragovich, A. Yu. Khrennikov, S. V. Kozyrev, I. V. Volovich,
E. I. Zelenov, p-adic mathematical physics: the first 50 years,
arXiv:1705.04758
446 Bibliography

[209] B. Duncan, R. Peele, Bell and Stirling numbers for graphs, J. Integer
Seq. 12 (2009), Article 09.7.1.

[210] A. Edrei, Zeros of successive derivatives of entire functions of the form


h(z) exp(−ez ), Trans. Amer. Math. Soc. 259(1) (1980), 207-226.
[211] R. Ehrenborg, The Hankel determinant of exponential polynomials,
Amer. Math. Monthly 107(6) (2000), 557-560.

[212] C. Elbert, Strong asymptotics for the generating polynomials of the


Stirling numbers of the second kind, J. Approx. Theory 109 (2001),
198-217.
[213] C. Elbert, Weak asymptotics for the generating polynomials of the
Stirling numbers of the second kind, J. Approx. Theory 109 (2001),
218-228.
[214] J. Engbers, D. Galvin, J. Hilyard, Combinatorially interpreting gen-
eralized Stirling numbers, Eur. J. Combin. 43 (2015), 32-54.
[215] J. Engbers, D. Galvin, C. Smyth, Restricted Stirling and Lah number
matrices and their inverses, J. Combin. Th. 161 (2019), 271-298.
[216] K. Engel, On the average rank of an element in a filter of the partition
lattice, J. Combin. Theory Ser. A 65(1) (1994), 67-78.
[217] E. A. Enneking, J. C. Ahuja Generalized Bell numbers, Fibonacci
Quart. 14 (1976), 67-73.
[218] P. Erdős, On a conjecture of Hammersley, J. London Math. Soc. 28
(1953), 232-236.
[219] P. Erdős, Verallgemeinerung eines elementar-zahlenteoretischen Satzes
von Kürschák. Mat. Fiz. Lapok 39 (1932), 17-24.
[220] P. Erdős, A Theorem of Sylvester and Schur, J. London Math. Soc.
9(4) (1934), 282-288.
[221] R. Ernvall, T. Metsänkylä, On the p-divisibility of Fermat quotients,
Math. Comp. 66 (1997), 1353-1365.
[222] A. Eswarathasan, E. Levine, p-integral harmonic sums, Discrete Math.
91 (1991), 249-257.
[223] A. F. von Ettingshausen, Die combinatorische Analysis als Vorbere-
itungslehre zum Studium der theoretischen höhern Mathematik, J. B.
Wallishauffer (1826).
[224] G. Everest, T. Ward, An Introduction to Number Theory, Springer,
2005.
Bibliography 447

[225] N.-E. Fahssi, Polynomial triangles revisited, arXiv:1202.0228v7.

[226] J. Favard, Sur les polynomes de Tchebicheff (in French), C. R. Acad.


Sci. Paris 200 (1935), 2052-2053.
[227] A. E. Fekete, Apropos Two notes on notation, Amer. Math. Monthly
101(8) (1994), 771-778.
[228] L. Fekih-Ahmed, On the power series expansion of the reciprocal
gamma function, HAL Archives, 01029331v1, 2014.
[229] J. Ferenczik, Á. Pintér, B. Porvázsnyik, On equal values of Stirling
numbers of the second kind, Appl. Math. Comput. 218 (2011), 980-
984.
[230] S. R. Finch, Mathematical Constants, Cambridge University Press,
2003.
[231] N. J. Fine, Binomial coefficients modulo a prime, Amer. Math.
Monthly 54 (1947), 589-592.
[232] S. Fisk, The secretary’s packet problem, Math. Mag. 61(2) (1988), 103-
105.
[233] P. Flajolet, On congruences and continued fractions for some classical
combinatorial quantities, Discrete Math. 41 (1982), 145-153.
[234] P. Flajolet, Combinatorial aspects of continued fractions, Discrete
Math. 32 (1980), 125-161.
[235] P. Flajolet, R. Sedgewick, Analytic Combinatorics, Cambridge Uni-
versity Press, 2009.
[236] D. Foata, G.-N. Han, Secant tree calculus, Cent. Eur. J. Math. 12(12)
(2014), 1852-1870.
[237] M. Fujiwara, Über die obere Schranke des absoluten Betrages der
Wurzeln einer algebraischen Gleichung, Tôhoku Math. J. 10 (1916)
167-171.
[238] W. Fulton, Young Tableaux: With Applications to Representation The-
ory and Geometry, Cambridge University Press, 1996.
[239] H. G. Funkhouser, A short account of the history of symmetric func-
tions of roots of equations, Amer. Math. Monthly 37(7) (1930), 357-
365.
[240] L. H. Gallardo, A property of the period of a Bell number modulo a
prime number, Appl. Math. E-Notes 16 (2016), 72-79.
448 Bibliography

[241] D. Galvin, Do T. Thanh, Stirling numbers of forests and cycles, Elec-


tron. J. Combin. 20 (2013), #P73.

[242] A. M. Garsia, J. B. Remmel Q-counting rook configurations and a


formula of Frobenius, J. Combin. Theory Ser. A 41 (1986), 246-275.
[243] M. Gardner, Fractal Music, Hypercards and More: Mathematical
Recreations from Scientific American, W. H. Freeman and Company,
1992.
[244] V. Gasharov, On the Neggers-Stanley conjecture and the Eulerian poly-
nomials, J. Combin. Theory Ser. A 82 (1998), 134-146.
[245] B. J. Gassner, Sorting by replacement selecting, Commun. ACM 10
(1967), 89-93.
[246] J. von zur Gathen, J. Roche, Polynomials with two values, Combina-
torica 17 (1997), 345-362.
[247] A. Gertsch, Nombres harmoniques généralisés, C. R. Acad. Sci. Paris
(Série 1) 324 (1997), 7-10.
[248] A. Gertsch, Congruences pour quelques suites classiques de nom-
bres, sommes de factorielles et calcul ombral, Thesis, Univ. Neuchâtel
(1999).
[249] A. Gertsch, A. M. Robert, Some congruences concerning the Bell num-
bers, Bull. Belg. Math. Soc. Simon Stevin 3(4) (1996), 467-475.
[250] I. M. Gessel, Congruences for Bell and tangent numbers, Fibonacci
Quart. 19 (1981) 137-144.
[251] I. M. Gessel, Fibonacci is a square, Fibonacci Quart. 10 (1972) 417-
419.
[252] I. M. Gessel, Combinatorial proofs of congruences, Joint Mathemat-
ics Meeting, 2010. Available online at http://people.brandeis.edu/
~gessel/homepage/slides/
[253] I. Gessel, T. Lengyel, On the order of Stirling numbers and alternating
binomial coefficient sums, Fibonacci Quart. 39 (2001), 444-454.

[254] J. W. L. Glaisher, On the Residues of rp−1 to modulus p2 , p3 , etc.,


Quart. J. Pure Appl. Math. 32 (1901), 1-27.
[255] J. W. L. Glaisher, On the residues of the sums of products of the first
p − 1 numbers and their powers to modulus p2 or p3 , Quart. J. Math.
Oxford 31 (1900), 321-353.
Bibliography 449

[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.

[272] R. Gy Generalized Lerch primes, Integers 18 (2018), #A10.


450 Bibliography

[273] E. Gyimesi, G. Nyul, New combinatorial interpretations of r-Whitney


and r-Whitney-Lah numbers, Discrete Appl. Math. 255 (2019),
222-233.
[274] K. Győry, Á. Pintér, On the equation 1k + 2k + · · · + xk = y n , Publ.
Math. Debrecen 62 (2003), 403-414.
[275] M. Hall, Arithmetic properties of a partition function, Bull. Amer.
Math. Society 40(5) (1934), 387.
[276] H. Han, S. Seo, Combinatorial proofs of inverse relations and log-
concavity for Bessel numbers, Eur. J. Combin. 29 (2008), 1544-1554.
[277] H. Harborth, Über das Maximum bei Stirlingschen Zahlen 2. Art, J.
Reine Angew. Math. 230 (1968), 213-214.
[278] H. Harborth, Number of odd binomial coefficients, Proc. Amer. Math.
Soc. 62(1) (1977), 19-22.
[279] L. H. Harper, Stirling behavior is asymptotically normal, Ann. Math.
Stat. 38 (1967), 410-414.
[280] H. Hasse, Uber eine diophantische Gleichung von Ramanujan-Nagell
und ihre verallgemeinerung, Nagoya Math. J. 27 (1966), 77-102.
[281] J. Havil, Gamma: Exploring Euler’s Constant, Princeton University
Press, 2003.
[282] F. Heneghan, T. K. Petersen, Power series for up-down min-max
permutations, College Math. J. 45(2) (2014), 83-91.
PN
[283] M. D. Hirschhorn, Evaluating n=1 (a + nd)p , Math. Gaz. 90 (2006)
114-116.
[284] M. E. Hoffman, Quasi-symmetric functions and mod p multiple
harmonic sums, Kyushu J. Math. 69 (2015), 345-366.
[285] J. M. Holte, Carries, combinatorics, and an amazing matrix, Amer.
Math. Monthly 104(2) (1997), 138-149.

[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.

[288] F. T. Howard, Congruences for the Stirling numbers and associated


Stirling numbers, Acta Arith. 55 (1990), 29-41.
Bibliography 451

[289] F. T. Howard, Extensions of congruences of Glaisher and Nielsen


concerning Stirling numbers, Fibonacci Quart. 28(4) (1990), 355-362.
[290] F. T. Howard, Sums of powers of integers via generating functions,
Fibonacci Quart. 34 (1996) 244-256.
[291] L. C. Hsu, Note on an asymptotic expansion of the n-th difference of
zero, Ann. Math. Statist. 19 (1948), 273-277.
[292] L. C. Hsu, P.J.-S. Shiue, A unified approach to generalized Stirling
numbers, Adv. Appl. Math. 20 (1998), 366-384.
[293] G. Hurst, A. Schultz, An elementary (number theory) proof of
Touchard’s congruence, arXiv:0906.0696v2
[294] E. J. Ionaşcu, A variation on bisecting the binomial coefficients,
Discrete Appl. Math. 250 (2018), 276-284.
[295] E. J. Ionaşcu, T. Martinsen, P. Stănică, Bisecting binomial coefficients,
Discrete Appl. Math. 227 (2017) 70-83.
[296] M. E. H. Ismail, Determinants with orthogonal polynomial entries, J.
Comput. Appl. Math. 178(1-2) (2005), 255-266.
[297] A. Ivić, Ž. Mijajlović, On Kurepa’s problems in number theory,
Publ. Inst. Math., Nouv. 57(71) (1995), 19-28. Available also on
arXiv:math/0312202
[298] S. Jakubec, Connection between Fermat quotients and Euler numbers,
Math. Slovaca 58(1) (2008), 19-30.
[299] G. James, A. Kerber, The Representation Theory of the Symmetric
Group, Addison-Wesley, 1981.
[300] S. Janson, Euler-Frobenius numbers and rounding, Online J. Anal.
Comb. 8 (2013), Article 5.
[301] D. J. Jeffrey, N. Murdoch, Stirling numbers, Lambert W and the
gamma function, In: J. Blömer, I. Kotsireas, T. Kutsia, D. Simos
(eds.) Mathematical Aspects of Computer and Information Sciences.
MACIS 2017. Lecture Notes in Computer Science, vol 10693. Springer.
[302] Sh. T. Jensen, The Laguerre-Samuelson Inequality with Extensions
and Applications in Statistics and Matrix Theory (MSc thesis)
Department of Mathematics and Statistics, McGill University, 1999.
[303] W. A. Johnson, Exponential Hilbert series and the Stirling numbers
of the second kind, Discrete Math. 341 (2018), 1237-1243.
[304] W. Johnson, The diophantine equation x2 + 7 = 2n , Amer. Math.
Monthly 94 (1987), 59-62.
452 Bibliography

[305] G. A. Jones, J. M. Jones, Elementary Number Theory, Springer, 1998.

[306] S. József, B. Crstici, Handbook of Number Theory II, Kluwer, 2004.


[307] Ji-H. Jung, I. Mező, J. L. Ramı́rez, The r-Bessel and restricted r-Bell
numbers, Australas. J. Comb. 70(2) (2017), 202-220.
[308] A. Junod, Congruences pour les polynômes et nombres de Bell, Bull.
Belg. Math. Soc. 9 (2002) 503-509.

[309] A. Junod, Congruences par l’analyse p-adique et le calcul symbolique,


Thesis, Univ. de Neuchâtel (2003).
[310] A. Junod, A generalized trace formula for Bell numbers, Expo. Math.
23 (2005), 71-79.
[311] A. Junod, Hankel determinants and orthogonal polynomials, Expo.
Math. 21 (2003), 63-74.
[312] N. Kahale, New modular properties of Bell numbers, J. Combin.
Theory Ser. A 58 (1991) 147-152.
[313] L. T. Kai, Bell numbers and Bell numbers modulo a prime number,
Mathematical Medley 42(2) (1997), 55-58.
[314] G. A. Kalugin, D. J. Jeffrey, Convergence in C of series for the
Lambert W function, arXiv:1208.0754v1.
[315] D. M. Kane, On the number of representations of t as a binomial
coefficient, Integers 4 (2004), #A07.
[316] D. M. Kane, Improved bounds on the number of ways of expressing
t as a binomial coefficient, Integers 7 (2007), #A53.
[317] H.-J. Kanold, Über Stirlingschen Zahlen 2. Art, J. Reine Angew.
Math. 229 (1968), 188-193.
[318] H.-J. Kanold, Über eine asymptotische Abschätzung bei Stirlingschen
Zahlen 2. Art, J. Reine Angew. Math. 230 (1968), 211-212.
[319] H.-J. Kanold, Einige neuere Abschätzungen bei Stirlingschen Zahlen
2. Art, J. Reine Angew. Math. 239 (1969), 148-160.

[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

[323] J. Katriel, On a generalized recurrence for Bell numbers, J. Integer


Seq. 11 (2008), Article 08.3.8.

[324] J. Katriel, A multitude of expressions for the Stirling numbers of the


first kind, Integers 10 (2010), 273-297.
[325] U. N. Katugampola, Mellin transforms of generalized fractional inte-
grals and derivatives, Appl. Math. Comput. 257(15) (2015), 566-580.

[326] M. Kauers, Summation algorithms for Stirling number identities, J.


Symbolic Comput. 42 (2007), 948-970.
[327] M. Kauers, C. Schneider, Automated proofs for some Stirling number
identities, Electron. J. Combin. 15 (2008), #R2.
[328] D. H. Kauffman, Note on preferential arrangements, Amer. Math.
Monthly 70(1) (1963), 62.
[329] B. C. Kellner, J. Sondow, Power-sum denominators, Amer. Math.
Monthly 124(8) (2017), 695-709.
[330] G. Kemkes, D. Merlini, B. Richmond, Maximum Stirling numbers
of the second kind, Integers Electron. J. Combin. Num. Theory, 8
(2008), #A27.
[331] Zs. Kereskényi-Balogh, G. Nyul, Stirling numbers of the second kind
and Bell numbers for graphs, Australas. J. Combin. 58(2) (2014),
264-274.
[332] T. Kim, D. S. Kim, G.-W. Jang, J. Kwon, A note on some identities
of derangement polynomials, J. Inequal. Appl. 40 (2018), 17 pages.
[333] M. Klazar, F. Luca, On some arithmetic properties of polynomial
expressions involving Stirling numbers of the second kind, Acta Arith.
107 (2003), 357-372.
[334] A. Knopfmacher, N. Robbins Some arithmetical properties of Eulerian
numbers, J. Combin. Math. Combin. Comput. 36 (2001), 31-42.
[335] D. E. Knuth, The Art of Computer Programming, vol. 3: Sorting and
Searching, Addison-Wesley, 1973.
[336] D. E. Knuth, Two notes on notation, Amer. Math. Monthly 99(5)
(1992), 403-422.
[337] N. Koblitz, p-adic Numbers, p-adic Analysis, and Zeta Functions,
second edition, Springer, 1984.
454 Bibliography

[338] R. Koekoek, R. F. Swarttouw, The Askey-scheme of hypergeomet-


ric orthogonal polynomials and its q-analogue, Delft University
of Technology, Faculty of Technical Mathematics and Infor-
matics, Report no. 94-05 (1994). Available in PDF format at
http://aw.twi.tudelft.nl/~koekoek/documents/as98.pdf or in
HTML here: http://homepage.tudelft.nl/11r49/askey.html
[339] T. Kojima, On the limits of the zeros of an algebraic equation, Tôhoku
Math. J. 11 (1917) 119-127.
[340] T. Komatsu, K. Liptai, I. Mező, Incomplete poly-Bernoulli numbers
associated with incomplete Stirling numbers, Publ. Math. Debrecen
88(3-4) (2016), 357-368.
[341] T. Komatsu, I. Mező, L. Szalay Incomplete Cauchy numbers, Acta
Math. Hungar. 149(2) (2016), 306-323.
[342] T. Komatsu, J. L. Ramı́rez, Some determinants involving incomplete
Fubini numbers, An. Şt. Univ. Ovidius Constanţa, 26(3) (2018),
143-170.
[343] T. Komatsu, P. T. Young, Exact p-adic valuations of Stirling numbers
of the first kind, J. Number Theory 177 (2017), 20-27.
[344] H. L. Krall, O. Frink, A new class of orthogonal polynomials: the
Bessel Polynomials, Trans. Amer. Math. Soc. 65 (1949), 100-115.
[345] C. Krattenthaler, Advanced determinant calculus, Sém. Lothar.
Combin. 42 (1999), Article B42q.
[346] C. Krattenthaler, Advanced determinant calculus: a complement,
Linear Algebra Appl. 411 (2005), 68-166.
[347] J. Kürschák, A harmonikus sorról (Hungarian), Mat. Fiz. Lapok 27
(1918), 299-300.
[348] Y. H. Kwong, Minimum periods of S(n, k) modulo m, Fibonacci
Quart. 27 (1989), 217-221.
[349] E. Laguerre, Mémoire pour obtenir par approximation les racines
d’une équation algébrique qui a toutes les racines réelles, Nouv. Ann.
Math. 2nd series 19 (1880), 161-172, and 193-202.
[350] I. Lah, A new kind of numbers and its application in the actuarial
mathematics, Bol. Inst. Actuár. Port. 9 (1954), 7-15.
[351] I. Lah, Eine neue Art von Zahlen, ihre Eigenschaften und Anwendung
in der mathematischen Statistik, Mitteilungsbl. Math. Statist. 7
(1955), 203-212.
Bibliography 455

[352] N. J. H. Lai, p-adic properties of recurrences involving Stirling num-


bers, manuscript, available online at https://www.math.ubc.ca/
~njhlai/paper/p-adic-properties-of-recurrences-involving-
Stirling-numbers.pdf
[353] D. Laissaui, M. Rahmani, An explicit formula for sums of powers
of integers in terms of Stirling numbers, J. Integer Seq. 20 (2017),
Article 17.4.8
[354] L. D. Landau, E. M. Lifsic, Quantum Mechanics – Non-relativistic
Theory, Pergamon Press, 1977.
[355] W. Lang, On generalizations of the Stirling number triangles, J.
Integer Seq. 3 (2000), Article 00.2.4
[356] W. Lang, Combinatorial interpretation of generalized Stirling
numbers, J. Integer Seq. 12 (2009), Article 09.3.3
[357] G. Larcher, On the number of odd binomial coefficients, Acta Math.
Hungar. 71(3) (1996), 183-203.
[358] J. W. Layman, The Hankel transform and some of its properties, J.
Integer Seq. Vol. 4 (2001), Article 01.1.5.
[359] J. W. Layman, Maximum zero strings of Bell numbers modulo primes,
J. Comb. Theory Ser. A 40 (1985), 161-168.
[360] J. W. Layman, C. L. Prather, Generalized Bell numbers and zeros of
successive derivatives of an entire function, J. Anal. Math. 96 (1983),
42-51.
[361] E. Lehmer, On congruences involving Bernoulli numbers and the
quotients of Fermat and Wilson, Ann. of Math. 39(2) (1938), 350-360.
[362] T. Lengyel, The order of the Fibonacci and Lucas numbers, Fibonacci
Quart. 33(3) (1995) 234-239.
[363] T. Lengyel, On the divisibility by 2 of the Stirling numbers of the
second kind, Fibonacci Quart. 32 (1994), 194-201.
[364] T. Lengyel, Alternative proofs on the 2-adic order of Stirling numbers
of the second kind, Integers 10 (2010), #A38.
[365] T. Lengyel, On a recurrence involving Stirling numbers, Eur. J.
Combin. 5 (1984), 313-321.
[366] T. Lengyel, On p-adic properties of the Stirling numbers of the first
kind, J. Number Theory 148 (2015), 73-94.
[367] T. Lengyel, On a recurrence involving Stirling numbers, Eur. J.
Combin. 5(4) (1984), 313-321.
456 Bibliography

[368] T. Lengyel, Stirling numbers of the second kind, associated Stirling


numbers of the second kind and Newton-Euler sequences, J. Comb.
Number Theory 6(1) (2014), 51-61.
[369] P. Leonetti, C. Sanna, On the p-dic valuation of Stirling numbers of
the first kind, Acta Math. Hungar. 151(1) (2017), 217-231.
ap−1 −1
[370] M. Lerch, Zur Theorie des Fermatschen Quotienten p = q(a),
Math. Ann. 60 (1905), 471-490.
[371] C. Leudesdorf, Some results in the elementary theory of numbers,
Proc. London Math. Soc. 20 (1888), 199-212.
[372] J. Levine, R. E. Dalton, Minimum periods, modulo p, of first-order
Bell exponential numbers, Math. Comp. 16 (1962), 416-423.
[373] R. Lidl, H. Niederreiter, Finite Fields, Cambridge University Press,
1997.
[374] E. H. Lieb, Concavity properties and a generating function for Stirling
numbers, J. Combin. Theory 5(2) (1968), 203-206.

[375] D. A. Lind, The quadratic field Q( 5) and a certain diophantine
equation, Fibonacci Quart. 6 (1968), 86-93.
[376] W. Ljunggren, Oppgave nr 2, Norsk Mat. Tidsskr. 25 (1943), 29.
[377] G.-D. Liu, An identity involving Lucas numbers and Stirling numbers,
Fibonacci Quart. 46-47(2) (2008/09), 136-139.
[378] L. L. Liu, Ya-N. Li, Recurrence relations for linear transformations
preserving the strong q-log-convexity, Electron. J. Combin. 23(3)
(2016), #P3.44
[379] L. L. Liu, D. Ma, Some polynomials related to Dowling lattices and
x-Stieltjes moment sequences, Linear Alg. Appl. 533 (2017), 195-209.
[380] L. Li Liu, Yi Wang, On the log-convexity of combinatorial sequences,
Adv. Appl. Math. 39(4) (2007), 453-476.

[381] G. Louchard, Number of singletons in involutions of large size: a


central range and a large deviation analysis, manuscript, available
online at: http://www.ulb.ac.be/di/mcs/louchard/louchard.
papers/sing.pdf

[382] L. Lovász, Combinatorial Problems and Exercises North Holland,


1993.
[383] F. Luca, P. G. Walsh, The product of like-indexed terms in binary
recurrences, J. Number Theory 96(1) (2002), 152-173.
Bibliography 457

[384] W. F. Lunnon, P. A. B. Pleasants, N. M. Stephens, Arithmetic


properties of Bell numbers to a composite modulus I, Acta Arith. 35
(1979) 1-16.
[385] M. S. Maamra, M. Mihoubi, The (r1 , . . . , rp )-Bell polynomials,
Integers 14 (2004), #A34.
[386] I. G. Macdonald, Symmetric Functions and Hall Polynomials,
American Mathematical Society, 1988.
[387] B. J. Malešević, Some considerations in connection with alternating
Kurepa’s function, Integral Transforms Spec. Funct. 19(10) (2008),
747-756.
[388] M. M. Mangontarum, Some theorems and applications of the
(q; r)-Whitney numbers, J. Integer Seq. 20 (2017), Article 17.2.5
[389] M. M. Mangontarum, O. I. Cauntongan, A. P. Macodi-Ringia, The
noncentral version of the Whitney numbers: a comprehensive study,
Int. J. Math. Math. Sci. 2016 (2016), Article ID 6206207.
[390] M. M. Mangontarum, A. M. Dibagulun, On the translated Whitney
numbers and their combinatorial properties, Br. J. Appl. Sci. Tech.
11(5) (2015), 1-15.
[391] M. M. Mangontarum, J. Katriel, On q-boson operators and q-
analogues of the r-Whitney and r-Dowling numbers, J. Integer Seq.
18 (2015), Article 15.9.8
[392] T. Mansour, Combinatorics of Set Partitions, CRC Press, 2013.
[393] T. Mansour, J. L. Ramı́rez, M. Shattuck, A generalization of the
r-Whitney numbers of the second kind, J. Comb. 8(1) (2017), 29-55.
[394] T. Mansour, M. Schork Commutation Relations, Normal Ordering,
and Stirling Numbers, CRC Press, 2016.
[395] T. Mansour, M. Schork, M. Shattuck, On a new family of generalized
Stirling and Bell numbers, Electronic J. Combin. 18 (2011), #P77.
[396] I. Martinjak, Two infinite families of terminating binomial sums,
Period. Math. Hung. 75 (2017), 244-254.
[397] I. Martinjak, D. Stanić, A short combinatorial proof of derangement
identity, Elem. Math. 73 (2018), 29-33.
[398] J. L. Massey, Shift-register synthesis and BCH decoding, IEEE Trans.
Information Theory IT-15 (1969), 122-127.
[399] R. J. McIntosh, On the converse of Wolstenholme’s Theorem, Acta
Arith. 71 (1995), 381-389.
458 Bibliography

[400] R. J. McIntosh, E. L. Roettger, A search for Fibonacci-Wieferich and


Wolstenholme primes, Math. Comput. 76 (2007), 2087-2094.

[401] D. G. Mead, The equation of Ramanujan-Nagell and [y 2 ], Proc.


Amer. Math. Soc. 41 (1973), 333-341.
[402] M. Mendez, P. Blasiak, A. Penson, Combinatorial approach to gener-
alized Bell and Stirling numbers and boson normal ordering problem,
J. Math. Phys. 46 (2005), 083511.
[403] V. V. Menon, On the maximum of Stirling numbers of the second
kind, J. Combin. Theory 15(1) (1973), 11-24.
[404] M. Merca, A note on the r-Whitney numbers of Dowling lattices, C.
R. Acad. Sci. Paris Ser I 351 (2013), 649-655.
[405] M. Merca, Some experiments with complete and elementary symmetric
functions, Period. Math. Hung. 69 (2014), 182-189.
[406] D. Merlini, R. Sprugnoli, M. C. Verri The Cauchy numbers, Discrete
Math. 306 (2006), 1906-1920.
[407] R. E. Merrifield, H. E. Simmons, Enumeration of structure-sensitive
graphical subsets: theory, Proc. Natd Acad. Sci. USA 78(2) (1981),
692-695.
[408] R. Merris, The p-Stirling numbers, Turkish J. Math. 24 (2000),
379-399.
[409] R. Meštrović, Lucas’ theorem: its generalizations, extensions and
applications (1878–2014), arXiv:1409.3820.
[410] R. Meštrović, Wolstenholmes’ theorem: its generalizations and exten-
sions in the last hundred and fifty years (1862-2012), arXiv:1111.3057
[411] R. Meštrović, Congruences involving the Fermat quotient, Czechoslo-
vak Math. J. 63(4) (2013), 949-968.
[412] I. Mező, The r-Bell numbers, J. Integer Seq. 14(1) (2011), Article
11.1.1.
[413] I. Mező, The dual of Spivey’s Bell number formula, J. Integer Seq.
15(2) (2012), Article 12.2.4.
[414] I. Mező, On the maximum of r-Stirling numbers, Adv. Appl. Math.
41 (2008), 293-306.
[415] I. Mező, About the non-integer property of hyperharmonic numbers,
Annales Univ. Sci. Budapest 50 (2007), 1-8.
Bibliography 459

[416] I. Mező, Periodicity of the last digits of some combinatorial sequences,


J. Integer Seq. 17 (2014), Article 14.1.1.

[417] I. Mező, A kind of Eulerian numbers connected to Whitney numbers


of Dowling lattices, Discrete Math. 328 (2014), 88-95.
[418] I. Mező, A new formula for the Bernoulli polynomials, Results. Math.
58 (2010), 329-335.

[419] I. Mező, Kombinatorikus számok általánosı́tásairól, PhD thesis,


University of Debrecen, 2009. Available online (in Hungarian) at
https://dea.lib.unideb.hu/dea/bitstream/handle/2437/
94478/Thesis_MezoI_titkositott.pdf_%27?sequence=1!
[420] I. Mező, Recent developments in the theory of Stirling numbers, RIMS
Kôkyûroku No. 2013, 68-80.
[421] I. Mező, Exponential generating function of hyperharmonic numbers
indexed by arithmetic progressions, Cent. Eur. J. Math. 11(5) (2013),
931-939.
[422] I. Mező, On the structure of the solution set of a generalized Euler-
Lambert equation, J. Math. Anal. Appl. 455(1) (2017), 538-553.
[423] I. Mező, On the Mahler measure of the Bell polynomi-
als, manuscript. Available at the author’s webpage: https:
//sites.google.com/site/istvanmezo81/others.
[424] I. Mező, Asymptotics of the modes of the ordered Stirling numbers,
arXiv:1504.06970.
[425] I. Mező, A. Dil, Euler-Seidel method for certain combinatorial num-
bers and a new characterization of Fibonacci sequence, Cent. Eur. J.
Math. 7(2) (2009), 310-321.
[426] I. Mező, A. Dil, Hyperharmonic series involving Hurwitz zeta function,
J. Number Theory 130(2) (2010), 360-369.
[427] I. Mező, J. L. Ramı́rez, Divisibility properties of the r-Bell numbers
and polynomials, J. Number Theory 177 (2017), 136-152.
[428] I. Mező, J. L. Ramı́rez, The linear algebra of the r-Whitney matrices,
Integral Transforms Spec. Funct. 26(3) (2015), 213-225.
[429] I. Mező, J. L. Ramı́rez, Some identities of the r-Whitney numbers,
Aequationes Math. 90(2) (2016), 393-406.

[430] I. Mező, J. L. Ramı́rez, On the enumeration of sets of lists, Appl.


Anal. Discrete Math. (submitted)
460 Bibliography

[431] I. Mező, A. Bazsó, On the coefficients of polynomials related to


alternating power sums of arithmetic progressions, J. Integer Seq. 21
(2018), Article 18.7.8.
[432] I. Mező, Ch.-Y. Wang, H.-Y. Guan, The estimation of the zeros of
some counting polynomials (manuscript).
[433] M. Mignotte, Une nouvelle résolution de l’équation x2 + 7 = 2n ,
Rend. Sem. Fac. Sci. Univ. Cagliari 54(2) (1984), 41-43.
[434] M. Mignotte, D. Stefanescu, Estimates for polynomial zeros, Appl.
Algebra Eng. Commun. Comput. 12(6) (2001) 437-453.
[435] M. Mihoubi, M. Rahmani The partial r-Bell polynomials,
arXiv:1308.0863.
[436] M. Mihoubi, M. Tiachachat, Some applications of the r-Whitney
numbers, C. R. Math. Acad. Sci. Paris 352(12) (2014), 965-969.
[437] H. Miki, A relation between Bernoulli numbers, J. Number Theory 10
(1978), 297-302.
[438] F. L. Miksa, L. Moser, M. Wyman, Restricted partitions of finite sets,
Canad. Math. Bull. 1(2) (1958), 87-96.
[439] P. Miska, A note on p-adic analytic functions with application to be-
havior of the p-adic valuations of Stirling numbers, arXiv:1803.04533.
[440] D. S. Mitrinović, Analytic Inequalities, Springer-Verlag, 1970.
[441] V. H. Moll, Numbers and Functions: From a Classical-Experimental
Mathematician’s Point of View, American Mathematical Society,
2012.
[442] V. H. Moll, J. L. Ramı́rez, D. Villamizar, Combinatorial and arith-
metical properties of the restricted and associated Bell and factorial
numbers, J. Comb. 9(4) (2018), 693-720.
[443] P. L. Montgomery, S. Nahm, S. S. Wagstaff Jr, The period of the Bell
numbers modulo a prime, Math. Comp. 79 (2010), 1793-1800.

[444] L. J. Mordell, On the integer solutions of y(y + 1) = x(x + 1)(x + 2),


Pacific J. Math. 13 (1963), 1347-1351.
[445] L. J. Mordell, Diophantine Equations, Academic Press, 1969.
[446] L. Moser, J. R. Pounder, Problem 53, Canad. Math. Bull. 5 (1962), 70.

[447] L. Moser, M. Wyman, On solutions of xd = 1 in symmetric groups,


Canad. J. Math. 7 (1955), 159-168.
Bibliography 461

[448] T. Nagell, Eine Eigenschaft gewisser Summen, Skr. Norske Vid.


Akad. Kristiania, I(13) (1923), 10-15.
[449] T. Nagell, Løsning till oppgave nr 2, Norsk Mat. Tidsskr. 30 (1948),
62-64.
[450] T. Nagell, The diophantine equation x2 + 7 = 2n , Ark. Mat. 4(2-3)
(1961), 185-187.
[451] A. Navon, Combinatorics and fermion algebra, Nuovo Cimento 16
(1973), 324-330.
[452] D. J. Newman, Problem 5040, Amer. Math. Monthly 69 (1962), 670.
[453] C. P. Niculescu, A new look at Newton’s inequalities, J. Ineq. Pure
Appl. Math. 1(2) (2000), Article 17.
[454] N. Nielsen, Handbuch der Teorie des Gammafunktion, Leipzig, 1906.
(Reprinted by Chelsea in 1966.)
[455] A. Nijenhuis, H. Wilf, Periodicities of partition functions and Stirling
numbers modulo p, J. Number Theory 25 (1987), 308-312.
[456] G. Nyul, G. Rácz, The r-Lah numbers, Discrete Math. 338 (2015),
1660-1666.
[457] R. Peele, A. J. Radcliffe, H. S. Wilf, Congruence problems involving
Stirling numbers of the first kind, Fibonacci Quart. 31 (1993) 73-80.
[458] S. V. Pemmaraju, S. Skiena, Computational Discrete Mathematics:
Combinatorics and Graph Theory with Mathematica, Cambridge
University Press, 2003.
[459] T. K. Petersen, Eulerian Numbers, Birkhäuser, 2015.
[460] A. Petojević, A note about the Pochhammer symbols, Mathematica
Moravica 12(1) (2008), 37-42.
[461] R. Petuchovas, Asymptotic Analysis of the cyclic structure of
permutations, Doctoral dissertation, Vilnius University, 2016.
arXiv:1611.02934.
[462] K. H. Pilehrood, T. H. Pilehrood, R. Tauraso, Multiple harmonic
sums and multiple harmonic star sums are (nearly) never integers,
Integers 17 (2017), #A10.
[463] Á. Pintér, A note on the Diophantine equation x4 = y2 , Publ. Math.
 

Debrecen 47 (1995), 411-415.


[464] Á. Pintér, On a diophantine problem concerning Stirling numbers,
Acts Math. Hungar. 65(4) (1994), 361-364.
462 Bibliography

[465] Á. Pintér, On some arithmetical properties of Stirling numbers, Publ.


Math. Debrecen 40(1-2) (1992), 91-95.
[466] É. Pité, Problem 11957, Amer. Math. Monthly 124(2) (2017), 179.
[467] J. Pitman, Some probabilistic aspects of set partitions, Amer. Math.
Monthly 104(3) (1997), 201-209.
[468] G. Pólya, On the zeros of the derivatives of a function and its analytic
character, Bull. Amer. Math. Soc. 49 (1943), 178-191.
[469] B. Poonen, Periodicity of a combinatorial sequence, Fibonacci Quart.
26(1) (1988), 70-76.
[470] A. J. van der Poorten, Some facts that should be better known,
especially about rational functions, In: R. A. Mollin (ed.), Number
Theory and Applications, Kluwer, 1989.
[471] V. V. Prasolov, Polynomials, Springer, 2004.
[472] F. Qi, An explicit formula for the Bell numbers in terms of the Lah
and Stirling numbers, Mediterr. J. Math. 13 (2016), 2795-2800.
[473] F. Qi, Integral representations and properties of Stirling numbers of
the first kind, J. Number Theory 133(7) (2013), 2307-2319.
[474] J. Quaintance, H. Gould, Combinatorial Identities for Stirling Num-
bers – The Unpublished Notes of H. W. Gould, World Scientific, 2016.
[475] C. Radoux, Nombres de Bell modulo p premier et extensions de degré
p de Fp , C. R. Math. Acad. Sci. Paris Ser A, 281 (1975), 879-882.
[476] C. Radoux, Une congruence pour les polynômes Pn (x) de fonction
z
génératrice ex(e −1) C. R. Math. Acad. Sci. Paris Ser A, 284 (1977),
637-639.
[477] C. Radoux, Calcul effectif de certains déterminants de Hankel, Bull.
Soc. Math. Belg. Sér. B 31 (1979) 49-55.
[478] C. Radoux, Déterminant de Hankel construit sur des polynomes liés
aux nombres de dérangements, Eur. J. Combin. 12 (1991) 327-329.
[479] C. Radoux, Déterminants de Hankel et théorème de Sylvester, in
Sém. Lothar. Combin. (Saint-Nabor, 1992), Publ. Inst. Rech. Math.
Av., 498, Univ. Louis Pasteur, Strasbourg, 1992, 115-122.
[480] M. Rahmani, Some results on Whitney numbers of Dowling lattices,
Arab J. Math. Sci. 20(1) (2014) 11-27.
[481] Cs. Rakaczki, On the Diophantine equation Sm (x) = g(y), Publ.
Math. Debrecen 65 (2004), 439-460.
Bibliography 463

[482] Cs. Rakaczki, On some generalizations of the Diophantine equation


s(1k + 2k + · · · + xk ) + r = dy n , Acta Arith. 151 (2012), 201-216.
[483] S. Ramanujan, Question 464, J. Indian Math. Soc. 5 (1913), 130.
[484] S. Ramanujan, A proof of Bertrand’s postulate, J. Indian Math. Soc.
11 (1919), 181-182.
[485] J. L. Ramı́rez, I. Mező, The r-alternating permutations, Aequationes
Math. (accepted).
[486] J. L. Ramı́rez, M. Shattuck, Generalized r-Whitney numbers of the
first kind, Ann. Math. Inform. 46 (2016), 175-193.
[487] J. L. Ramı́rez, M. Shattuck, A (p; q)-analogue of the r-Whitney-Lah
numbers, J. Integer Seq. 19 (2016), Article 16.5.6.
[488] J. L. Ramı́rez, S. N. Villamarı́n, D. Villamizar, Eulerian numbers
associated with arithmetical progressions, Electron J. Combin. 25(1)
(2018), #P1.48
[489] J. B. Remmel, A note on a recursion for the number of derangements,
Eur. J. Combin. 4 (1983), 371-374.
[490] J. B. Remmel, M. L. Wachs, Rook theory, generalized Stirling numbers
and (p, q)-analogues, Electron. J. Combin. 11 (2004), #R84.
[491] B. C. Rennie, J. Dobson, On Stirling numbers of the second kind, J.
Combin. Theory 7(2) (1969), 116-121.
[492] B. Reznick, Regularity properties of the Stern enumeration of the
rationals, J. Integer Seq. 11 (2008), Article 08.4.1
[493] B. Reznick, Some binary partition functions, Analytic Number
Theory, Proceedings of a conference in honor of Paul T. Bateman
(1990), 451-477.
[494] P. Ribenboim, My Numbers, My Friends: Popular Lectures on Number
Theory, Springer-Verlag, 2000.
[495] J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958.
Pn αi z
[496] J. F. Ritt, A factorization theory for functions i=1 ai e , Trans.
Amer. Math. Soc. 29 (1927), 584-596.
[497] A. M. Robert, A Course in p-adic Analysis, Springer, 2000.
[498] G.-C. Rota The number of partitions of a set, Amer. Math. Monthly
71(5) (1964), 498-504.
[499] G. C. Rota, B. E. Sagan, Congruences derived from group action,
Eur. J. Combin. 1 (1980), 67-76.
464 Bibliography

[500] A. Ruciński, B. Voigt, A local limit theorem for generalized Stirling


numbers, Rev. Roumaine Math. Pures Appl. 35(2) (1990), 161-172.
[501] C. de J. P. Ruiz, Weighted sum of squares via generalized Eulerian
polynomials, Fibonacci Quart. 55(5) (2017), 149-165.
[502] B. E. Sagan, Congruences via Abelian groups, J. Number Theory 20
(1985), 210-237.
[503] B. E. Sagan, Shellability of exponential structures, Order 3(1) (1986),
47-54.
[504] B. E. Sagan, Inductive proofs of q-log-concavity, Discrete Math. 99
(1992), 289-306.
[505] B. E. Sagan, Inductive and injective proofs of log-concavity results,
Discrete Math. 68 (1988), 281-292.
[506] P. Samuelson, How deviant can you be?, J. Am. Stat. Assoc. 63(324)
(1968) 1522-1525.
[507] C. Sanna, On the p-adic valuation of harmonic numbers, J. Number
Theory 166 (2016), 41-46.
[508] R. Sánchez-Peregrino, The Lucas congruence for Stirling numbers of
the second kind, Acta Arith. 94 (2000), 41-52.
[509] H. Scherk, De evolvenda functione (yd · yd · yd · · · ydx)/dxn disquisi-
tiones nonnullae analyticae, Ph.D. Thesis, University of Berlin, 1823.
[510] L. Schläfli, Sur les coefficients du développement du produit
1(1 + x)(1 + 2x) · · · (1 + (n − 1)x) suivant les puissance ascen-
dantes de x, Crelle’s J. Reine Angew. Math. 43 (1852), 1-22.
[511] O. Schlömilch, Recherches sur les coefficients des facultés analytiques,
Crelle 44 (1852), 344-355.
[512] M. Schork, On the combinatorics of normal ordering bosonic operators
and deformations of it, J. Phys. A: Math. Gen. 36 (2003), 4651-4665.
[513] I. J. Schwatt, An Introduction to the Operations with Series (second
edition) Chelsea Pub. Co., 1962.
[514] L. W. Shapiro, S. Getu, W. Woan, L. Woodson, The Riordan group,
Discrete Appl. Math. 34 (1991), 229-239.
[515] H. S. Shapiro, D. L. Slotnik, On the mathematical theory of
error-correcting codes, IBM J. Res. Develop. 3 (1959), 25-34.
[516] M. Shattuck, Generalized r-Lah numbers, Proc. Math. Sci. 126(4)
(2016), 461-478.
Bibliography 465

[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

[531] M. Z. Spivey, A generalized recurrence for Bell numbers, J. Integer


Seq. 11 (2008), Article 08.2.5.

[532] M. Z. Spivey, Log-convexity of the Bell numbers, Blog post,


https://mikespivey.wordpress.com/2014/10/02/log-convexity-of-the-
bell-numbers/
[533] R. Sprugnoli, Riordan arrays and combinatorial sums, Discrete Math.
132 (1994), 267-290.
[534] R. P. Stanley, Enumerative Combinatorics, Vol. 1., Cambridge
University Press, 1997.
[535] R. P. Stanley, Log-concave and unimodal sequences in algebra, combi-
natorics, and geometry, Ann. New York Acad. Sci. 576 (1989), 500-534.
[536] R. P. Stanley, A survey of alternating permutations, Contemp. Math.
531 (2010), 165-196. Available online at arXiv:0912.4240v1.
[537] R. P. Stanley, Exponential structures, Stud. Appl. Math. 59 (1978),
73-82.
[538] I. N. Stewart, D. O. Tall, Algebraic Number Theory, Chapman &
Hall, 1979.
[539] J. Stirling, Methodus Differentialis: sive Tractatus de Summatione et
Interpolatione Serierum Infinitarum, 1730.
[540] K. B. Stolarsky, Power and exponential sums of digital sums related to
binomial coefficient parity, SIAM J. Appl. Math. 32 (1977), 717-730.
[541] R. J. Stroeker, B. M. M. de Weger, Elliptic binomial Diophantine
equations, Math. Comp. 68 (1999), 1257-1281.
[542] X.-T. Su, Yi Wang, On unimodality problems in Pascal?s triangle,
Electron. J. Combin. 15 (2008), R113.
[543] X.-T. Su, Yi Wang, Y.-N. Yeh, Unimodality problems of multinomial
coefficients and symmetric functions, Electron. J. Combin. 18(1)
(2011), P73.

[544] Zhi-H. Sun, Congruences concerning Bernoulli numbers and Bernoulli


polynomials, Discrete Appl. Math. 105 (2000), 193-223.
[545] Zhi-H. Sun, On the properties of Newton-Euler pairs, J. Number
Theory 114 (2005), 88-123.
[546] Y. J. Sun, J.G. Hsieh, A note on circular bound of polynomial zeros,
IEEE Trans. Circuits Syst. I. Regul. Pap. 43 (1996) 476-478.
Bibliography 467

[547] Y.-D. Sun, X. Wu, The largest singletons of set partitions, Eur. J.
Combin. 32 (2011), 369-382.

[548] Y.-D. Sun, X. Wu, J. Zhuang, Congruences on the Bell polynomials


and the derangement polynomials, J. Number Theory 133 (2013)
1564-1571.
[549] Y.-D. Sun, Y. Xu, The largest singletons in weighted set partitions
and its applications, Discrete Math. Theor. Comput. Sci. 13(3) (2011)
75-86.
[550] Zhi-W. Sun, Binomial coefficients and quadratic fields, Proc. Amer.
Math. Soc. 134(8) (2006), 2213-2222.
[551] Zhi-W. Sun, Arithmetic theory of harmonic numbers, Proc. Amer.
Math. Soc. 140(2) (2011), 415-428.
[552] Zhi-W. Sun, D. Zagier, On a curious property of Bell numbers, Bull.
Aust. Math. Soc. 84 (2011), 153-158.
[553] B. Sury, A curious polynomial identity, Nieuw Arch. Wisk. 11 (1993),
93-96.
[554] J. J. Sylvester, Note relative aux communications faites dans les
séances du 28 Janvier et 4 Février 1861. C. R. Acad. Sci. Paris 52
(1861), 307-308. Reprinted in Math. Papers Vol. 2, 234-235. See also
Corrigenda, 241, Cambridge University Press, 1908.
[555] G. S. Sylvester, Continuous-spin Ising ferromagnets, PhD thesis,
MIT (1976).
[556] G. Szegő, Orthogonal Polynomials, fourth edition, American Mathe-
matical Society, 1975.
[557] M. Tan, T. Wang, Lah matrix and its algebraic properties, Ars
Combin. 70 (2004), 97-108.
[558] S. M. Tanny On some numbers related to the Bell numbers, Canad.
Math. Bull. 17(5) (1975), 733-738.
[559] A. F. Tebtoub, Combinatorials aspects linked to the monotony of
classical sequences, PhD thesis, Mathematics Faculty, University of
Sciences and Technology Houari Boumediene, 2016.
[560] N. M. Temme, A class of polynomials related to those of Laguerre, in
Polynômes Orthogonaux et Applications, Proceedings of the Laguerre
Symposium held at Bar-le-Duc, 1984.
[561] L. Theisinger, Bemerkung über die harmonische Reihe, Monatsch.
Math. Phys. 26 (1915), 132-134.
468 Bibliography

[562] I. Tomescu, Méthodes combinatoires dans la théorie des automates


finis, PhD thesis, Bucharest, 1971.
[563] J. Touchard, Propriétés arithmétiques de certains nombres recurrents,
Ann. Soc. Sci. Bruxelles 53A (1933), 21-31.
[564] J. Touchard, Nombres exponentiels et nombres de Bernoulli, Canad.
J. Math. 8 (1956), 305-320.
[565] C. A. Tovey, Multiple occurrences of binomial coefficients, Fibonacci
Quart. 23 (1985), 356-358.
[566] D. Treeby, Further thoughts on a paradoxical tower, Amer. Math.
Monthly 125(1) (2018), 44-60.
[567] F. G. Tricomi, A class of non-orthogonal polynomials related to those
of Laguerre, J. Analyse Math. 1 (1951), 209-231.
[568] H. Tsumura, On some congruences for the Bell numbers and for the
Stirling numbers, J. Number Theory 38(2) (1991), 206-211.
[569] L. R. Turner, Inverse of the Vandermonde matrix with applications,
NASA Technical note, D-3547, 1966.
[570] G. Turnwald, A note on the Ramanujan-Nagell equation, in Number-
theoretic Analysis, lecture notes in mathematics, volume 1452,
Springer, 1988-89.
[571] D. J. Velleman, G. S. Call, Permutations and combination locks,
Math. Mag. 68(4) (1995), 243-253.
[572] M. V. Subbarao, A. Verma, Some remarks on a product expansion.
An unexplored partition function, in Symbolic Computations, Number
Theory, Special Functions, Physics and Combinatorics, F. G. Garvan
and M. E. H. Ismail, eds., Kluwer, Dordrecht, 2001, 267-283.
[573] G. Viennot, Interprétations combinatoires des nombres d’Euler et
de Genocchi, Seminar on Number Theory, 1981/1982, No. 11, Univ.
Bordeaux I, Talence, 1982.
[574] E. B. Vinberg, A Course in Algebra, American Mathematical Society,
2003.
[575] J. F. Voloch, On some subgroups of the multiplicative group of finite
rings, J. Théor. Nombres Bordeaux 16 (2004), 233-239.
[576] M. L. Wachs, Whitney homology of semipure shellable posets, J. Alg.
Comb. 9 (1999), 173-207.
[577] S. S. Wagstaff Jr, Aurifeuillian factorizations and the period of the
Bell numbers modulo a prime, Math. Comp. 65 (1996), 383-391.
Bibliography 469

[578] T. Wakhare, Refinements of the Bell and Stirling numbers, Trans.


Comb. 7(4) (2018), 25-42.

[579] H. S. Wall, Analytic Theory of Continued Fractions, Chelsea


Publishing Company, 1948.
[580] D. Walsh, The number of permutations with only small cycles,
available online on prof. Walsh’s webpage:
http://capone.mtsu.edu/dwalsh/3cycless.pdf
[581] D. Walsh, Counting forests with Stirling and Bell numbers, available
online on prof. Walsh’s webpage:
http://capone.mtsu.edu/dwalsh/stirfort.pdf
[582] W. Wang, Riordan arrays and harmonic number identities, Comp.
Math. Appl. 60 (2010), 1494-1509.
[583] Yi Wang, Linear transforms preserving log-concavity, Linear Algebra
Appl. 359 (2003), 161-167.
[584] Yi Wang, Y.-N. Yeh, Log-concavity and LC-positivity, J. Combin. Th.
Ser A 114 (2007), 195-210.
[585] Ch.-Y. Wang, I. Mező, Some limit theorems with respect to constrained
permutations and partitions, Monatsh. Math. 182 (2017), 155-164.
[586] Ch.-Y. Wang, I. Mező, Some limit theorems with respect to constrained
permutations and partitions – II, manuscript
[587] C.-Y. Wang, P. Miska, I. Mező, The r-derangement numbers, Discrete
Math. 340(7) (2017), 1681-1692.
[588] S. de Wannemacker, On 2-adic orders of Stirling numbers of the
second kind, Integers 5(1) (2005), #A21.
[589] S. de Wannemacker, T. Laffey, R. Osburn, On a conjecture of Wilf,
J. Combin. Th. Ser. A 114 (2007), 1332-1349.
[590] B. M. M. de Weger, Equal binomial coefficients: some elementary
considerations, J. Number Theory 63(2) (1997), 373-386.
[591] B. M. M. de Weger, A binomial Diophantine equation, Quart. J.
Math. Oxford Ser. 186(2) (1996), 221-231.
[592] H. Wegner, Stirling numbers of the second kind and Bonferroni’s
inequalities Elem. Math. 60 (2005), 124-129.

[593] H. Wegner, Über das Maximum bei Stirlingschen Zahlen, zweiter Art,
J. Reine Angew. Math. 262/263 (1973), 134-143.
470 Bibliography

[594] E. W. Weisstein, Integer Sequence Primes, webpage: http:


//mathworld.wolfram.com/IntegerSequencePrimes.html.
[595] T. P. Whaley, Postorder trees and Eulerian numbers, Acta Inform.
28(7) (1991), 703-712.
[596] E. G. Whitehead, Stirling number identities from chromatic polyno-
mials, J. Combin. Theory Ser. A 24 (1978), 314-317.
[597] H. S. Wilf, Generatingfunctionology, Academic Press, 1994.
[598] H. S. Wilf, The asymptotic behavior of the Stirling numbers of the
first kind, J. Combin Th. 64(2) (1993), 344-349.
x
−1
[599] G. T. Williams, Numbers generated by the function ee , Amer.
Math. Monthly 52 (1945), 323-327.
[600] K. S. Williams, The recurrence relation an = (An + B)an−1 + (Cn +
D)an−2 , Crux Mathematicorum 20 (1994), 91-96.
[601] S. Wolfram, A New Kind of Science, Wolfram Media, 2002.
[602] J. Wolstenholme, On certain properties of prime numbers, Quart. J.
Pure Appl. Math. 5 (1862), 35-39.
[603] B.-L. Wu, Y.-G. Chen, On certain properties of harmonic numbers,
J. Number Theory 175 (2017), 66-86.
[604] B.-L. Wu, Y.-G. Chen, On the denominators of harmonic numbers,
C.R. Acad. Sci. Paris, Ser. I 356 (2018), 129-132.
[605] Ai-M. Xu, Extensions of Spivey’s Bell number formula, Electron. J.
Combin. 19(2) (2012), #P6.
[606] Ai-M. Xu, Z. Di Cen, A unified approach to some recurrence sequences
via Faà di Bruno’s formula, Comput. Math. Appl. 62(1) (2011),
253-260.
[607] Ai-M. Xu, T.-H. Zhou, Some identities related to the r-Whitney
numbers, Integral Trans. Spec. Funct. 27(11) (2016), 920-929.
[608] Y. Yang, On a multiplicative partition function, Electron. J. Combin.
8 (2001), #R19.
[609] Sh.-L. Yang, H. You, On a connection between the Pascal, Stirling
and Vandermonde matrices, (note) Discrete Appl. Math. 155 (2007),
2025-2030.
[610] Q. Yin, Sh. Hong, L. Yang, M. Qiu, Multiple reciprocal sums and
multiple reciprocal star sums of polynomials are almost never integers,
J. Number Theory 195 (2019), 269-292.
Bibliography 471

[611] P. T. Young, Congruences for Bernoulli, Euler, and Stirling Numbers,


J. Number Theory 78 (1999), 204-227.

[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

2-associated Bell number 3-restricted factorials


table, 426 table, 425
2-associated Stirling number LDLT decomposition, 74
first kind d-Fibonacci partition, 19
table, 410 d-regular partition, 19
second kind k-partitions, 7
table, 411 m-associated Bell number, 271
2-associated factorial number m-associated Stirling number
table, 428 second kind, 270
2-restricted Bell number, 243 m-restricted Stirling number
exponential generating function, first kind, 256
243 second kind, 249
table, 423 exponential generating
2-restricted Bell polynomial, 243 function, 250
exponential generating function, m-restricted factorial, 260
243 p-adic absolute value, 319
2-restricted Stirling number p-adic norm, 319
first kind p-adic valuation, 318
table, 408 q-log-convexity, 120
second kind r-Bell number, 204
table, 408 Hankel transform, 206
3-associated Bell number r-Bell polynomial, 204
table, 427 exponential generating function,
3-associated Stirling number 205
first kind Hankel transform, 206
table, 410 real zero property, 206
second kind recurrence, 206
table, 411 r-Eulerian number, 216, 220
3-associated factorial log-concavity, 217
table, 429 recursion, 218
3-restricted Bell number table, 412
table, 424 r-Eulerian polynomial, 217, 236
3-restricted Stirling number recursion, 218
first kind r-Fubini number, 210
table, 409 table, 418, 419
second kind r-Fubini polynomial, 210
table, 409 r-Lah number, 233

473
474 Index

associated, 233 Bézout’s lemma, 354


r-Stirling number Barnes G function, 75
first kind, 221 Bell number, 4, 59
table, 406, 407 asymptotics, 178
second kind, 197 divisibility, 311
maximizing index, 206 exp. generating function, 45
recursion, 198 generating function, 50
table, 406, 407 log-convexity, 114
r-Whitney number, 235 ordered, 141
r-Whitney numbers of the second recursion, 6
kind, 129 table, 413
r-Whitney-Eulerian polynomial, 236 Bell polynomial, 60, 85
r-Whitney-Fubini polynomials, 236 addition theorem, 87
r-Whitney-Lah numbers, 236 generalized, 95
r-ascent, 219 real zero property, 88
r-derangement number, 293 Spivey formula, 327
r-descent, 219 Bender-Canfield theorem, 115
r-run, 219 Bernoulli number, 126
table, 415
alternating permutation, 22 Bernoulli polynomial, 236
alternating power sums, 139 Bernoulli polynomials, 128
arc, 20 Bessel differential equation, 247
arc of a partition, 20 Bessel number, 239
arithmetic progression, 126 exponential generating function,
ascent, 148 242
associated r-Lah number, 233 closed form, 240
associated Bell number, 271 horizontal generating function,
asymptotics, 292 241
associated Bell polynomial, 272 log-concavity, 261
real zero property, 291 recursion, 240
associated Bernoulli number, 291 table, 408
associated Cauchy number, 291 Bessel polynomial, 247
associated factorial, 274, 293 differential equation, 247
associated factorial polynomial, 274 bi-restricted Stirling number, 249
real zero property, 291 bijective proof, 19
associated Lah number, 233, 293 binomial coefficient, 382
associated Stirling number for real parameter, 65, 131
first kind, 274 binomial coefficients bisection
asymptotics, 292, 293 problem, 121
second kind, 270 binomial convolution, 119
exponential generating binomial inversion theorem, 42
function, 270 binomial theorem, 384
asymptotics, 292, 293 for falling factorial, 64
recursion, 271 for rising factorial, 81
asymptotic equality, 167 binomial transform, 38, 42, 59, 320
Index 475

generating functions, 44 divisibility, 297


block, 4 Dixon’s theorem, 184
block leader, 199 Dobiński formula, 46, 144, 214
Bonferroni inequality, 168 polynomial version, 101
bumping algorithm, 245 down-up zigzag permutation, 22
draw (competition), 142
Cauchy number duality, 15, 255
first kind, 130
recursion, 134 effectively computable constant, 380
table, 416 Euler Gamma function, 174
second kind, 130 Euler number, 22
recursion, 138 table, 432
table, 417 Euler totient function, 338
Cauchy product, 36 Euler’s theorem on the binomial
cellular automata, 329 transform, 44, 137, 328
Cesàro’s integral formula, 30, 233 Euler-Mascheroni constant, 175
chain (of subsets), 143 Euler-Seidel matrix, 71
characteristic function, 169 Eulerian number, 149
characteristic polynomial, 345 asymptotics, 192
Bell numbers, 346 log-concavity, 157
Chinese remainder theorem, 354 recursion, 150, 159
Chu-Vandermonde identity, 65 second kind, 293
collision, 379 sum, 149
Colucci’s theorem, 185 symmetry, 149
combination, 382 table, 412
with repetition, 382 Eulerian numbers of the second kind,
combinatorial trigonometry, 41 293
congruence, 297 Eulerian polynomial, 155
congruence of Touchard, 312 generating function, 156
connecting coefficient, 62 differential equation, 158
convex analysis, 106 recursion, 156
cotangent function, 159 root structure, 157
Cramer’s rule, 344 expected number of blocks, 101
cycle, 10 expected number of cycles, 29
cycle leader, 221 exponential function, 35, 207
cycle notation, 11
Faà di Bruno formula, 100
derangement factorial, 10
generalized, 274 table, 420
derangement number, 275, 293, 334 falling factorial, 61, 382
Hankel transform, 289 Favard’s theorem, 76
table, 428 Fermat quotient, 336
descent, 148 Fermat’s little theorem, 314, 317
Digamma function, 175 Fibonacci sequence, 79, 363
distinguished element, 199 final set, 92
476 Index

fixed point (of a permutation), 11, 97 harmonic prime, 335


fixed point free involution, 288 hyperbolic cosine, 283
formula of Dobiński, 46 hyperbolic sine, 283
Frobenius theorem, 156, 215 hyperfactorial, 75
Fubini number, 141 hypergeometric function, 207
all of them are odd, 313 hyperharmonic number, 225
asymptotics, 179 non-integer property, 233
exp. generating function, 144 table, 421
Gross congruence, 315
Hankel transform, 237 idempotent number, 96
Poonen’s congruences, 316 exponential generating function,
prime index, 313 102
recursion, 143 table, 422
table, 414 identical permutation, 11
Touchard-like congruence, 314 identity, 11
Fubini polynomial, 145, 156, 159 inclusion-exclusion principle, 168,
Hankel transform, 237 275, 289
real zero property, 147 insertion table, 246
recursion, 146 integer multiple, 297
function, 16 interlacing property (of polynomial
injective, 26 zeros), 88, 182
invertible, 26 inversion formula, 58
surjective, 16, 142 involution, 97, 243
fixed point free, 288
generalized derangement, 274 log-convexity, 116
generalized harmonic number, 63, 80 table, 423
generalized Stirling number, 234, 334 irreducible polynomial, 90
generating function, 33
exponential, 35 Karamata notation, 7
horizontal, 59 Karamata-Knuth notation, 64
operation, 35 Kronecker delta symbol, 145
vertical, 60 Kummer-formula, 210
geometric series, 34, 51 Kurepa’s conjecture, 316, 333
gift exchange problem, 252
graphical Stirling numbers, 29 Laguerre polynomials, 77, 84
Gross congruence, 315 Laguerre–Samuelson theorem, 187
Lah number, 64, 102
Hankel determinant, 70 associated, 233, 293
Hankel matrix, 70 basic recursion, 67
Hankel transform, 71 horizontal sum, 68
harmonic number, 15, 137, 191, 225, asymptotics, 193
292 log-convexity, 116
non-integer property, 233 periodicity, 331
of order one, 225 table, 431
of order zero, 225 log-concavity, 112
table, 421 maximizing index, 113
Index 477

restricted, 293 Online Encyclopedia of Integer


signed, 66 Sequences, xv
table, 430 orbit (in a permutation), 10
Lah polynomial, 83, 113, 118 order (of a polynomial), 350
real zero property, 113 order (of a recurrence), 341
recursion, 113 ordered Bell number, 141
Lambert W function, 102, 111, 176, table, 414
179, 291, 386 ordered Dobiński formula, 144, 314
Laplace numbers, 130 ordered list, 66
lattice, 164, 235 ordered partitions, 141
leading coefficient, 181 orthogonal polynomial, 76
left-to-right minima, 60, 221 Orthogonality, 56
leftmost zero, 185
Lerch prime, 338 parity
generalized, 338 of first kind Stirling, 301
Lerch quotient, 337 of second kind Stirling, 301
log-concavity, 106 partially ordered set, 164
log-convexity, 114 partition, 4
of the Bell numbers, 114 arc, 20
of the horizontal sum of Lah block
numbers, 116 expected number of, 101
of the involutions, 116 ordered, 141
lonesum matrix, 265 pattern, 56
Lucas sequence, 84, 363 partition pattern, 56
Lucas’s theorem, 299 Pascal matrix, 43
for Stirling numbers, 309 pattern, 97
peak, 106, 184
Mathematica (software), 30, 352 permutation, 10, 381
Meixner polynomials, 144 ascent, 148
Mersenne number, 372 cycle, 10
minimal element, 199, 202 expected number of, 29
minimal polynomial, 351 descent, 148
modulus, 297 fixed point, 11
multinomial coefficient, 381, 384 length, 10
pattern, 56, 97
natural logarithm, 35 Riordan representation, 221
near collision, 379 run, 148
Newton’s inequality, 107 with repetition, 381
Newton-Euler pair, 31 word representation, 23
Newton-Euler sequence, 31 permutation matrix, 98
non-central Stirling number, 197 permutation pattern, 56
nonconsecutive partition, 19 plateau, 106, 184
normal ordering problem, 30 Pochhammer symbol, 61
numerical mathematics, 74 polynomial, 34, 60, 123
irreducible, 90
OEIS, xv
478 Index

polynomial theorem, 55, 384 Riordan array, 132


Poonen’s congruences, 316 proper, 132
power sum, 123 Riordan representation, 221
special, 375 rising factorial, 61, 273
power tower, 118 Robinson – Schensted -
pre-period, 350 correspondence, 247
preferential arrangement, 141 Rolle theorem, 214
prime Rolle’s theorem, 88, 147
harmonic, 335 rook, 19
Lerch, 338 run, 148, 161
Wieferich, 337
Wilson, 338 Schlömilch-formula, 390
Wolstenholme, 306 Schröder forest, 256
secant number, 80
Ramanujan-Nagell equation, 373 signed permutation, 290, 294
rational root theorem, 90 sine function, 40, 207
real zero property, 88, 119, 184, 185, singleton, 8
291 Singmaster’s conjecture, 367
reciprocal Gamma function, 178 special element, 199
recursion, 6 special function theory, 174
recursive formula, 6 Spivey formula, 69, 231
relative derangements, 294 r-Stirling version, 231
rencontres numbers, 289 Bell polynomials, 327
restricted Bell number, 251 dual, 327, 391
exponential generating function, Stern sequence, 330
252 Stirling cycle numbers, 12
asymptotics, 292 Stirling number
restricted Bell polynomial, 252 first kind, 12
exponential generating function, asymptotics, 178
252 maximizing index, 108
restricted Bernoulli number, 291 parity, 301
restricted Cauchy number, 291 polynomial identity, 62
restricted factorial, 260 prime upper parameter, 303
restricted Fubini number, 262 recursion, 14
restricted Lah number, 293 signed, 57
restricted Stirling number table, 405
first kind second kind, 7
exponential generating asymptotics, 172
function, 256 exp. generating function, 47
second kind generating function, 50
recursion, 249 maximizing index, 110
reverse alternating permutation, 22 parity, 301
reverse Bessel polynomial, 248 polynomial identity, 62
Riemann zeta function, 140, 291 prime upper parameter, 303
right shift, 11 recursion, 8
Index 479

table, 405 universal factorial polynomial, 285


Stirling numbers exponential generating function,
first kind 285
exp. generating function, 52 universal Stirling number
Stirling transform, 59, 161 r-version, 294
Stolarsky-Harborth constant, 299 first kind, 284
strict log-concavity, 106 second kind, 280
strong triangle inequality, 319 up-down zigzag permutation, 22
superfactorial, 75, 80
table, 430 valuation, 318
Vandermonde convolution, 65, 72
tangent number, 80 Vandermonde matrix, 348
Taylor-expansion, 41 variation, 381
Theorem of Bender and Canfield, 115 with repetition, 382
Theorem of Colucci, 185 Viète’s formulas, 89
Theorem of Dixon, 184
Theorem of Frobenius, 156 weighted Stirling numbers, 197
Theorem of Laguerre and Samuelson, Whitney number, 235
187 Wieferich number, 337
Theorem of Wolstenholme, 305 Wieferich prime, 337
tie (competition), 142 Wilf’s conjecture, 90
Touchard congruence, 312 Wilson prime, 338
transposition, 11, 97 Wilson quotient, 336
tri-restricted Stirling number, 249 Wilson’s theorem, 304, 317
triangular number, 372 Wolstenholme prime, 306
type B derangement, 294 Wolstenholme theorem, 305
type B permutation, 294 word representation (of a
permutation), 23
unimodality, 106 Worpitzky identity, 150, 157
universal Bell number, 280
exponential generating function, Young diagram, 244
282 Young tableau, 244
universal Bell polynomial, 280 standard, 245
exponential generating function,
282 zigzag, 22
universal factorial, 284 zigzag permutation, 22

You might also like