Supplemental Notes for

Andrew V. Sills Georgia Southern University

January 29, 2012

i Contents

Contents ii

1 Generating Functions 1 1.1 Definition and Simple Examples ...... 1 1.2 Polygonal Numbers ...... 2 1.3 The Fibonacci Numbers ...... 4 1.4 Exercises ...... 6

2 Integer Partitions 9 2.1 Introduction ...... 9 2.2 Partitions and Generating Functions ...... 12 2.3 Partitions with restrictions ...... 14 2.4 Elementary partition identities ...... 15 2.5 Graphical and combinatorial methods ...... 17 2.6 Euler’s pentagonal number theorem ...... 20 2.7 Euler’s recurrence ...... 23 2.8 Partition enumeration formulas ...... 24 2.9 Naudé’s question and two variable generating functions . . 27 2.10 Exercises ...... 28 2.11 Notes ...... 30

3 Compositions 31 3.1 Definition and Elementary Results ...... 31 3.2 Exercises ...... 34

ii

Chapter 1

Generating Functions

1.1 Definition and Simple Examples { }∞ Definition 1.1. Let an n=0 be a of numbers. Then the gener- ating function of {an} is given by ∑∞ n G(an; x) = anx . n=0

In other words, the of a sequence {an} encodes the terms of the sequence as coefficients of a power . Building a out of a sequence of numbers is a powerful technique which is often used in combinatorics. (The convergence set of the power series will not concern us here as we will not be substituting particular values in for x.)

Example 1.2. Find the generating function for the sequence of all ones: { }∞ 1 n=0 . Solution: ∞ ∑ 1 G(1; x) = xn = . 1 − x n=0 { }∞ Example 1.3. Find the generating function for the sequence n n=0. Solution: We place the terms of the sequence (0, 1, 2, 3,..., ) as coeffi- cients a power series to get

x + 2x2 + 3x3 + 4x4 + ...

1 2 CHAPTER 1. GENERATING FUNCTIONS

Notice from the previous example that the geometric series is 1 1 + x + x2 + x3 + x4 + ··· = . (1.1) 1 − x Differentiate both sides of (1.1) to obtain 1 0 + 1 + 2x + 3x2 + 4x3 + ··· = . (1.2) (1 − x)2 Now multiply both sides of (1.2) by x to obtain x x + 2x2 + 3x3 + 4x4 + ··· = . (1 − x)2 Thus, x G(n; x) = . (1 − x)2 Many examples of Maclaurin series are studied in elementary calcu- lus. These Maclaurin series may be thought of as generating functions for particular . For example, G 1 x • ( n! ; x) = e .

• G(an; x) = sin x, where { − (n−1)/2 ( 1) if n is odd a = n! . n 0 if n is even (Advice: Write out the details! )

1.2 Polygonal Numbers

Triangular numbers The sequence (1, 1 + 2, 1 + 2 + 3, 1 + 2 + 3 + 4,... ) = (1, 3, 6, 10, 15,... ) is called the sequence of triangular numbers. Let ∆n denote the n-th . It is well known, and easily proved by induction, that ∑n n(n + 1) ∆ = 1 + 2 + 3 + 4 + ··· + n = j = . n 2 j=1

We also define ∆0 = 0. 1.2. POLYGONAL NUMBERS 3

Proposition 1.4. The generating function for the triangular numbers is x G(∆ ; x) = n (1 − x)3 Proof. Twice differentiate the geometric series

d2 ( ) d2 1 1 + x + x2 + x3 + x4 + ··· = dx2 dx2 (1 − x) to obtain ∞ ∑ 2 n(n − 1)xn−2 = . (1 − x)3 n=2 Multiply both sides by x/2, and reindex:

∞ ∑ n(n + 1) x xn = . 2 (1 − x)3 n=0

The extended triangular numbers are given by setting n to any integer value, positive, negative, or zero in ∆n = n(n+1)/2. Notice, however, that ∆−n = (−n)(−n + 1)/2 = n(n − 1)/2 = ∆n−1. So, each triangular number of negative index is the same as a certain triangular number of positive index.

Square numbers The sequence (02, 12, 22, 32, 42,... ) = (0, 1, 4, 9, 16, 25,... ) is called the se- quence of square numbers or perfect squares. Let n denote the n-th . Clearly, 2 n = n . Proposition 1.5. The generating function of the square numbers is given by x(1 + x) G( ; x) = . n (1 − x)3

2 We may define the extended square numbers n = n for all integers 2 2 n, but −n = (−n) = n = n. 4 CHAPTER 1. GENERATING FUNCTIONS

Pentagonal numbers

The sequence (0, 1, 5, 12, 22,... ) is called the sequence {Pn} of pentagonal 3 2 − 1 numbers. The n-th pentagonal number is given by 2 n 2 n. The extended pentagonal numbers of negative index are different from those of positive index. We have (..., 26, 15, 7, 2, 0, 1, 5, 12, 22,... ) as n runs from −∞ to ∞.

Hexagonal numbers The n-th is 2n2 − n. The extended hexagonal numbers coincide with the triangular numbers.

1.3 The Fibonacci Numbers

Generating function Recall that the Fibonacci numbers may be defined recursively by

F0 = 0,F1 = 1,Fn+1 = Fn + Fn−1 for n ≥ 1. (1.3) Let us denote by F(x) the generating function for the Fibonacci se- quence: ∑∞ n F(x) := G(Fn; x) = Fnx . n=0 Multiply (1.3) by xn and sum over n ≥ 1 to obtain ∑∞ ∑∞ ∑∞ n n n Fn+1x = Fnx + Fn−1x . n=1 n=1 n=1 This is equivalent to 1 ( ) F(x) − F − F x = F(x) + xF(x). x 0 1 Thus, F(x) − x = F(x) + xF(x) x 1.3. THE FIBONACCI NUMBERS 5

=⇒ F(x) − x = xF(x) + x2F(x) =⇒ F(x) − xF(x) − x2F(x) = x =⇒ (1 − x − x2)F(x) = x x =⇒ F(x) = . (1.4) 1 − x − x2

A Direct Formula for the nth As an application, we will now derive a direct (i.e., non-recursive) formula for Fn. First recall that the golden ratio ϕ is defined as √ 1 + 5 ϕ := . 2 Let us denote the conjugate of the golden ratio by √ 1 − 5 ϕ¯ := . 2 Note that ϕϕ¯ = −1. (1.5) So, ∑∞ n Fnx = F(x) n=0 x = 1 − x − x2 x = − x2 + x − 1 x = − (x + ϕ)(x + ϕ¯) √2 − ϕ √2 + ϕ¯ 5 − 5 = ¯ (by partial fractions) x(+ ϕ )x + ϕ( ) ϕ¯ √2 − ϕ ϕ √2 + ϕ¯ 5 5 = − ϕ¯(x + ϕ) ϕ(x + ϕ¯) √2 ϕ¯ + 1 √2 ϕ − 1 = 5 − 5 xϕ¯ − 1 xϕ − 1 6 CHAPTER 1. GENERATING FUNCTIONS

√2 ϕ − 1 √2 ϕ¯ + 1 = 5 − 5 1 − xϕ 1 − xϕ¯ √1 √1 = 5 − 5 − − ¯ 1 (xϕ 1 xϕ ) 1 1 1 = √ − 5 1 − ϕx 1 − ϕx¯ ∞ ∞ 1 ∑ ∑ = √ (ϕx)n − (ϕx¯ )n (by (1.1)) 5 n=0 n=0 ∞ ∑ ϕn − ϕ¯n = √ xn. n=0 5 Compare coefficients of xn in the extremes to find that ( ) ( ) √ n √ n 1+ 5 1− 5 n n − ϕ − ϕ¯ 2 2 Fn = √ = √ . 5 5 Thus we see that knowing a recursive formula for a sequence may al- low us to derive its generating function. Then the generating function, together with some techniques from elementary calculus, allowed us to derive a direct formula for the terms of the original sequence.

1.4 Exercises

1. Find a closed form representation for each of the following generat- ing functions. a) G((−1)n; x). cos( πn ) b) G( 2 ; x). n! c) G(an; x), where { 0 if n = 0 an = 1 . n if n > 0 ( ) m(m − 1)(m − 2) ··· (m − k + 1) d) G ; x , where m is a fixed real k! number. 1.4. EXERCISES 7 ( ) 1 − (−1)n e) G ; x . 2(n!) 2. Express the generating function for the pentagonal numbers as a rational function of x.

3. For n ≥ 3, let Ps(n) denote the nth s-gonal number, so that P3(n) =  ∆n, P4(n) = n, etc. Notice∑ that for the cases already considered, n − − − i.e. for s = 3, 4, 5, 6, Ps(n) = j=1(s 2)j (s 3), so let us define

∑n Ps(n) = (s − 2)j − (s − 3), j=1

for all s = 3. Find a closed form formula for Ps(n). ∑ ∞ n 4. Express n=0 Ps(n)x as a rational function of x. { }∞ 5. The Pell numbers Pn n=0 may be defined recursively by

P0 = 0,P1 = 1,Pn+1 = 2Pn + Pn−1 for n ≥ 1.

a) Express G(Pn; x) as a rational function of x.

b) Find a direct formula for Pn. 6. The Lucas numbers may be defined recursively as

L0 = 2,L1 = 1,Ln+1 = Ln + Ln−1 for n ≥ 1.

a) Express G(Ln; x) as a rational function of x.

b) Find a direct formula for Ln.

Chapter 2

Integer Partitions

2.1 Introduction

In a letter dated September 4, 1740, Phillip Naudé asked Euler if he could figure out how many ways 50 could be be written as a sum of seven differ- ent positive integers.1 Apparently, Euler got very interested in this ques- tion and related questions, and thus was born the theory of integer parti- tions.

Definition 2.1. A partition of an integer n is a representation of n as a sum of positive integers, where the order of the summands is considered irrelevant.

Thus 2 + 3 and 3 + 2 are considered to be the same partition of 5.

Definition 2.2. Each summand in a partition is called a part of the par- tition.

Since the order of the parts is irrelevant, it is often convenient to im- pose a canonical ordering on the parts. The most common ordering is to write the parts from largest to smallest, although sometimes other order- ings are found in the literature. For a small positive integer n, it is easy to write out all of its partitions.

• The integer 1 has exactly one partition, 1 itself.

1The answer is 522.

9 10 CHAPTER 2. INTEGER PARTITIONS

• The integer 2 has exactly two partitions, namely 2 and 1 + 1. • The integer 3 has exactly three partitions, namely 3, 2+1 and 1+1+1. • The integer 4 has exactly five partitions, namely 4, 3+1, 2+2, 2+1+1, and 1 + 1 + 1 + 1.

Here are some statistics and standard notations associated with par- titions. Definition 2.3. The length of a partition π, denoted ℓ(π) is the number of parts in π. Definition 2.4. The weight of a partition π, denoted |π|, is the sum of its parts, i.e. the number being partitioned. Definition 2.5. The multiplicity of the positive integer j in a partition π, denoted mj(π) is the number of times j appears as a part in π.

In a given partition π, π1 denotes the largest part, π2 denotes the sec- ond largest part, etc. Thus π is the partition π1 + π2 + π3 + ··· + πℓ(π), with

π1 = π2 = ··· = πℓ(π). Many different notations for partitions are used in the literature. A particular notation may be more convenient than the others in a given context. Sometimes π is written as an ℓ(π)-tuple:

(π1, π2, . . . , πℓ(π)). Sometimes an “exponential”-style notation is used:

⟨1m1 2m2 3m3 ···⟩ means the partition consisting of m1 ones, m2 twos, m3 threes, etc., where mk mj is not printed if mj = 1 and k is not printed if mk = 0. Thus,

⟨1324427⟩ = (7, 4, 4, 2, 2, 2, 2, 1, 1, 1)=7+4+4+2+2+2+2+1+1+1.

It is natural at this point to wonder how many partitions there are of a given integer n. We make the following definition: 2.1. INTRODUCTION 11

n p(n) 0 1 1 1 2 2 3 3 4 5 5 7 6 11 7 15 8 21 9 30 10 42 20 627 30 5 604 40 37 338 50 204 226 100 190 569 292 200 3 972 999 029 388

Table 2.1: Selected values of p(n)

Definition 2.6. The partition function is a function

p : Z → Z≥0 where p(n) equals the number of partitions of n.

Clearly, p(n) = 0 whenever n < 0 because there is no way to write a negative integer as a sum of positive integers. It is customary to define p(0) := 1 for reasons of convenience2.

2The justification for defining p(0) := 1 is analogous to the fact that it is convenient to define 0! := 1 and highly inconvenient to definite 0! to be any other value. 12 CHAPTER 2. INTEGER PARTITIONS

2.2 Partitions and Generating Functions

We seek an expression for the generating function p(n), but first let us consider several simpler situations. The generating function for partitions using only one’s as parts may be written 1 + x1 + x1+1 + x1+1+1 + x1+1+1+1 + ··· . Notice that while we could have “simplified” the exponents and written

1 + x + x2 + x3 + x4 + ··· , this would have made things less transparent. The coefficient of, say, x4 is 1, because there is exactly one partition of 4 using only 1’s for parts, namely, the partition 1 + 1 + 1 + 1. So why not write out the full partition in the exponent of x, i.e. write x1+1+1+1 instead of x4? 1 Furthermore, we may write 1−x for the generating function for parti- tions using only ones, since the series is a geometric series (1.1). Now let us find the generating function for partitions where only 1’s and 2’s may be used as parts. If we multiply the series (1+x2 +x2+2 +x2+2+2 +··· ) by (1+x1 +x1+1 + x1+1+1 + ··· ), without simplifying exponents, but nonetheless grouping “like terms,” we obtain

1 + (x1) + (x2 + x1+1) + (x2+1 + x1+1+1) + (x2+2 + x2+1+1 + x1+1+1+1) + ···

So we see that, for instance, there are three partitions of 4 into 1’s and 2’s: 2 + 2, 2 + 1 + 1, and 1 + 1 + 1 + 1. We may think of the series (1 + x1 + x1+1 + x1+1+1 + ··· ) as generating the 1’s in a partition: there may be no ones (when the term 1 is used), one one (when the term x1 is used), two ones (when the term x1+1 is used), etc. And likewise, the series (1 + x2 + x2+2 + x2+2+2 + ··· ) generates 2’s in a partition. When the two series are multiplied together and expanded out, exactly one term of (1 + x1 + x1+1 + x1+1+1 + ··· ) and one term of (1 + x2 + x2+2 + x2+2+2 + ··· ) is multiplied at a time, and the result of this multiplication is x to a certain power, where the exponent is some partition which whose parts are 1’s and 2’s only. Notice further that both (1+x1 +x1+1 +x1+1+1 +··· ) and (1+x2 +x2+2 +x2+2+2 +··· ) are geometric 2.2. PARTITIONS AND GENERATING FUNCTIONS 13 series, so we may write the generating function for partitions into 1’s and 2’s as 1 . (1 − x)(1 − x2) Extending this reasoning, we find that the generating function for par- titions with parts less than or equal to j is 1 . (1 − x)(1 − x2)(1 − x3) ··· (1 − xj) Upon letting j → ∞, i.e. letting any positive integer serve as a part, we come to Euler’s groundbreaking result: Theorem 2.7 (Euler). The generating function for p(n) is representable by an elegant infinite product: ∞ ∞ ∑ ∏ 1 p(n)xn = . 1 − xm n=0 m=1 Proof. ∞ ( )( )( ) ∏ 1 1 1 1 = ··· 1 − xm 1 − x1 1 − x2 1 − x3 m=1 = (1 + x1 + x1+1 + x1+1+1 + ··· ) × (1 + x2 + x2+2 + x2+2+2 + ··· ) × (1 + x3 + x3+3 + x3+3+3 + ··· ) . . = 1 + (x1) + (x2 + x1+1) + (x3 + x2+1 + x1+1+1) + ··· = 1 + x + 2x2 + 3x3 + 5x4 + 7x5 + ··· ∑∞ = p(n)xn. n=0

Thus, in order to form the unrestricted partition function p(n), we multiply not just two or three infinite series together, but infinitely many series together, the first of which generates 1’s, the second which gener- ates 2’s, the third which generates 3’s, etc. 14 CHAPTER 2. INTEGER PARTITIONS

Thus, if we wish to know how many partitions of n there are for a par- ticular n, all we need to do is find the coefficient of xn in the power series expansion of 1 . (1 − x)(1 − x2)(1 − x3)(1 − x4) ··· ∏ j − j −1 Use your favorite CAS to expand the product m=1(1 x ) , for some j > n, as a power series, and observe the coefficent of xn.

2.3 Partitions with restrictions

In the theory of partitions, we often want to consider partitions which are formed when restrictions are placed on which parts may or may not appear and/or how many times a given part may appear. Let us examine how to form a generating function for a restricted set of partitions. A natural example is the money changing problem. Suppose we have an unlimited number of pennies, 93 nickels, 17 dimes, and 21 quarters. We wish to know how many different ways there are to make change for every amount of money in one cent increments using the coins we have available. This is equivalent to asking for the number of partitions of n (n = 0, 1, 2, 3, 4,... ), using any number of ones, at most 93 fives, at most 17 tens, and at most 21 twenty-fives. The generating function is thus

(1 + x1 + x1+1 + x1+1+1 + x1+1+1+1 + ··· ) × (1 + x5 + x5+5 + x5+5+5 + ··· + x93·5) × (1 + x10 + x10+10 + x10+10+10 + ··· + x17·10) × (1 + x25 + x25+25 + x25+25+25 + ··· + x21·25) ( )( )( )( ) 1 1 − x5·94 1 − x10·18 1 − x25·22 = (2.1) 1 − x 1 − x5 1 − x10 1 − x25

Thus to find, say, the number of ways to make change for one dollar from the collection of coins listed above, calculate the coefficient of x100 in (2.1). 2.4. ELEMENTARY PARTITION IDENTITIES 15

2.4 Elementary partition identities

We are now ready to introduce the oldest, and arguably greatest, identity in the theory of partitions.

Theorem 2.8 (Euler’s partition theorem). The number of partitions of n into distinct parts equals the number of partitions of n into odd parts.

Before proceeding to a proof of Euler’s partition theorem, let us make sure we understand what is being asserted, with the aid of an example. Let us consider partitions of 7. There are fifteen of them in all. However, there are only five in which all of the parts are distinct, namely,

7, 6 + 1, 5 + 2, 4 + 3, 4 + 2 + 1.

Euler’s partition theorem predicts that if we enumerate partitions where parts may be repeated, but only odd numbers may appear as parts, there will be the same number of partitions of 7:

7, 5 + 1 + 1, 3 + 3 + 1, 3 + 1 + 1 + 1 + 1, 1+1+1+1+1+1+1.

Notice that Euler’s partition theorem does not tell us that there are five partitions of 7 into distinct parts, and five into odd parts, but merely that there are the same number of partitions of n into distinct parts as there are partitions of n into odd parts. Proof of Theorem 2.8. Recall the elementary identity

(1 − y)(1 + y) = (1 − y2), which immediately implies

1 − y2 1 + y = (2.2) 1 − y provided that y ≠ 1. Let q(n) denote the number of partitions of n into distinct parts. Let ω(n) denote the number of partitions of n into odd parts. Then ∑∞ q(n)xn = (1 + x1)(1 + x2)(1 + x3)(1 + x4) ··· n=0 16 CHAPTER 2. INTEGER PARTITIONS ( )( )( )( ) 1 − x2 1 − x4 1 − x6 1 − x8 = ··· 1 − x 1 − x2 1 − x3 1 − x4 (by infinitely many applications of Eq. (2.2)) ( )( )( )( ) 1 1 1 1 = ··· 1 − x 1 − x3 1 − x5 1 − x7 = (1 + x1 + x1+1 + x1+1+1 + ··· ) × (1 + x3 + x3+3 + x3+3+3 + ··· ) × (1 + x5 + x5+5 + x5+5+5 + ··· ) . . ∑∞ = ω(n)xn. n=0

Thus, by comparing coefficients of xn in the extremes, we see that q(n) = ω(n) for all nonnegative integers n.

Euler’s partition theorem is interesting in and of itself, but perhaps more importantly, points out that any time we can find an equality of infi- nite products and interpret each side as a generating function for a certain class of partitions, we have a partition identity. For example, observe that

∞ ∞ ∏ ∏ (1 − x6j+2)(1 − x6j+4) (1 + x3j+1)(1 + x3j+2) = (1 − x3j+1)(1 − x3j+2) j=0 j=0 ∞ ∏ (1 − x6j+2)(1 − x6j+4) = (1 − x6j+1)(1 − x6j+4)(1 − x6j+2)(1 − x6j+5) j=0 ∞ ∏ 1 = . (1 − x6j+1)(1 − x6j+5) j=0

Next, observe that ∏∞ ∏∞ (1 + x2j+1 + x(2j+1)+(2j+1)) = (1 + x2j+1 + x4j+2) j=0 j=1 ∞ ∏ 1 − x6j+3 = 1 − x2j+1 j=1 2.5. GRAPHICAL AND COMBINATORIAL METHODS 17

∞ ∏ 1 − x6j+3 = (1 − x6j+1)(1 − x6j+3)(1 − x6j+5) j=1 ∞ ∏ 1 = . (1 − x6j+1)(1 − x6j+5) j=1 Thus, ∏∞ ∏∞ (1 + x3j+1)(1 + x3j+2) = (1 + x2j+1 + x(2j+1)+(2j+1)) j=0 j=0 ∞ ∏ 1 = (1 − x6j+1)(1 − x6j+5) j=1 Thus we may conclude: Theorem 2.9. The number of partitions of n into distinct nonmultiples of 3 equals the number of partitions of n into odd parts which may ap- pear at most twice equals the number of partitions of n into parts con- gruent to ±1 (mod 6).

2.5 Graphical and combinatorial methods

Not much research was done in the theory of partitions after Euler until J. J. Sylvester became interested in the subject in the 1880’s. Sylvester and his students made many fundamental contributions to the theory of partitions including the simple, yet surprisingly effective device of repre- senting a partition graphically as a so-called “Ferrers diagram.” Let π be a partition of some number n with k parts. The Ferrers dia- gram of π consists of a total of n dots in k left-justified rows, where the number of dots in row k corresponds to the k-th largest part of π. For example the partition 5+5+4+2+1+1+1 has Ferrers diagram ••••• ••••• •••• •• • • • 18 CHAPTER 2. INTEGER PARTITIONS

Definition 2.10. The conjugate of a partition π, denoted π′, is the parti- tion obtained from π by reflecting the Ferrers diagram of π along its main diagonal, i.e., by interchanging the rows and columns of the Ferrers dia- gram of π. The conjugate of the partition 5+5+4+2+1+1+1 is therefore 7 + 4 + 3 + 3 + 2. ••••• ••••• ••••••• •••• •••• •• −→ ••• • ••• • •• • Notice that the Ferrers diagram of a partition with m parts, and largest part ℓ, may be visualized as an m × ℓ 0-1 matrix, with 1’s corresponding to dots and 0’s corresponding to blanks. Then the Ferrers diagram of the conjugate π′ of a partition π is simply the matrix transpose of the Ferrers diagram of π.   1 1 1 1 1      1 1 1 1 1  1 1 1 1 1 1 1      1 1 1 1 0   1 1 1 1 0 0 0       1 1 0 0 0  −→  1 1 1 0 0 0 0       1 0 0 0 0  1 1 1 0 0 0 0  1 0 0 0 0  1 1 0 0 0 0 0 1 0 0 0 0 Notice that the number of rows in the Ferrers diagram of a partition π is the number of parts in π, while the number of columns is the largest part of π. Thus the following result is immediate: Theorem 2.11. The number of partitions of n with m parts equals the number of partitions of n with largest part m. Proof. Conjugation supplies a bijection between the two classes of parti- tions. Definition 2.12. A partition π is called self-conjugate if π′ = π. 2.5. GRAPHICAL AND COMBINATORIAL METHODS 19

For example, 4 + 3 + 2 + 1 is its own conjugate.

For our next result, it will be convenient to have a special notation for partitions in which it is immediately obvious what the conjugate is. Definition 2.13. The Durfee square of a partition π is the largest square of dots contained the upper left corner of the Ferrers diagram of π. For example, the partition 5+5+4+2+1+1+1 has a Durfee square of size 3.

Definition 2.14. Suppose π is a partition of n with m parts: π1 + π2 + ′ ··· + πm, where π1 = π2 = ··· = πm. Then, by Theorem 2.11, π is a ′ ′ ··· ′ partition of n with π1 parts: π1 +π2 + +ππ1 . Furthermore, suppose that π (and therefore also π′) has a Durfee square of size r. Then the Frobenius symbol of π is ( ) a a ··· a 1 2 r , b1 b2 ··· br − ′ − where ai = πi i and bi = πi i. ··· = ··· = Notice∑ that a1 > a2 > > ar 0 and b1 > b2 > br 0 and n = r r + i=1(ai + bi), and that the conjugate is obtained by simply swapping the two rows. For example, the Frobenius symbol of 5+5+4+2+1+1+1 is ( ) 4 3 1 , 6 2 0 while its conjugate partition, 7 + 4 + 3 + 3 + 2 has Frobenius symbol ( ) 6 2 0 , 4 3 1

Theorem 2.15 (Sylvester). The number of self-conjugate partitions of n equals the number of partitions of n into distinct odd parts. Proof. Let π be a self-conjugate partition of n with Durfee square of size r. Then π has Frobenius symbol ( ) a1 a2 . . . ar a1 a2 . . . ar 20 CHAPTER 2. INTEGER PARTITIONS

··· = for some integers a1, a2, . . . , ar with∑ a1 > a2 > > ar 0. Further we r see that we must have n = r + 2 i=1 ai. We then define the map

f : π → λ where λ = f(π) = (2a1 + 1) + (2a2 + 1) + ··· + (2ar + 1). Clearly, λ is a partition of n into r distinct odd parts. The map f is reversible, and therefore a bijection.

2.6 Euler’s pentagonal number theorem

Euler became interested in the reciprocal of the partition generating func- tion, i.e. the infinite product ∏∞ (1 − xm). m=1

He expanded this product out by direct multiplication and was surprised to find ∏∞ (1 − xm) = 1 − x − x2 + x5 + x7 − x12 − x15 + x22 + x26 − · · · . m=1

It appeared that the coefficients of the series were all 0, ±1, with nonzero coefficients at the extended pentagonal numbers. Euler conjectured:

Theorem 2.16 (Euler’s pentagonal number theorem). ∏∞ ∑∞ m j 3 j2− 1 j (1 − x ) = (−1) x 2 2 . m=1 j=−∞

Euler found a proof nearly a decade later. We shall give a different proof here:∏ an indirect one based on observa- ∞ − m tion of Legendre: the infinite product m=1(1 x ) is almost the generat- ing function for partitions with distinct parts, but with a minus sign where the plus should be. Let us multiply out the first few factors to observe the effect of the minus sign: 2.6. EULER’S PENTAGONAL NUMBER THEOREM 21

∏∞ ∏∞ (1 − xm) = (1 − x1) (1 − xm) m=1 m=2 ∏∞ = (1 − x1 − x2 + x2+1) (1 − xm) m=3 ∏∞ = (1 − x1 − x2 + x2+1 − x3 + x3+1 + x3+2 − x3+2+1) (1 − xm). m=4

So we see that partitions into distinct parts are indeed generated in the exponents, with a coefficient of 1 whenever the partition has an even number of parts, and with a coefficient of −1 whenever the number of parts is odd.

Theorem 2.17 (Legendre’s partition theoretic interpretation of Euler’s pentagonal number theorem). Let qe(n) denote the number of partitions of n into an even number of parts, all distinct. Let qo(n) denote the num- ber of partitions of n into an odd number of parts, all distinct. Then { (−1)j if n is of the form 3 j2 ± 1 j q (n) − q (n) = 2 2 . e o 0 otherwise

There is a combinatorial proof of Theorem 2.17, due to Fabian Franklin, a mathematician who earned his Ph.D. under J. J. Sylvester at Johns Hop- kins University in 1880. This proof may be the earliest example of Amer- ican original mathematical research. We will need to define some partition statistics, and a map. It will be convenient to denote a partition π with ℓ parts by (π1, π2, . . . , πℓ), where π1 = π2 = ··· = πℓ.

Definition 2.18. For a partition π with ℓ distinct parts given by (π1, π2, ··· , πℓ), where π1 > π2 > ··· > πℓ, let ρ(π) denote the length of longest initial run of consecutive integers, i.e. the maximum j such that π1 = π2 + 1 = π3 + 2 = ··· = πj + (j − 1). Let σ(π) := πℓ, i.e. the smallest part of π. Let ( ) f(π) = π1 − 1, π2 − 1, ··· , πρ(π) − 1, πρ(π)+1, πρ(π)+2, ··· , πℓ, ρ(π) . 22 CHAPTER 2. INTEGER PARTITIONS ( ) For example, f (6, 5, 3) = (5, 4, 3, 2). Graphically, we can think of f as moving the right-most diagonal of dots in the Ferrers diagram to the bottom, as in ••••• ••••• ⋆ •••• •••• −→f ⋆ ••• ••• ⋆ ⋆

Proof of Theorem 2.17. Let π be a partition of n into ℓ distinct parts. Let us further suppose that ρ(π) ≠ ℓ and that σ(π) ̸∈ {ℓ, ℓ + 1}. Case 1. Suppose ρ(π) < σ(π). Then f maps π to another partition f(π) with ℓ + 1 distinct parts. Case 2. Suppose ρ(π) = σ(π). Then f −1 maps π to another partition f −1(π) with ℓ − 1 distinct parts. Thus for all partitions of n considered thus far, each “case 1 partition” maps to a “case 2 partition” via f and each “case 2 partition” maps to a “case 1 partition” via f −1, and the mapping changes the parity of the length of the partition. Thus, of the partitions considered so far, there are the same number of partitions of n into an even number of distinct parts as there are into an odd number of distinct parts. Now let us consider the partitions we have excluded from the discus- sion to this point. These are the partitions λ of n into ℓ distinct parts where ρ(λ) = ℓ and σ(λ) = ℓ and the partitions µ of n into ℓ distinct parts where ρ(µ) = ℓ and σ(µ) = ℓ + 1. Thus these partitions are of the form

λ = (2ℓ, 2ℓ − 1, 2ℓ − 2, . . . , ℓ + 2, ℓ + 1) (2.3) and µ = (2ℓ − 1, 2ℓ − 2, 2ℓ − 3, . . . , ℓ + 1, ℓ). (2.4) Notice that even though we have ρ(λ) < σ(λ), f(λ) is nonetheless not a partition into distinct parts; the two smallest parts of f(λ) are the same. Thus partitions of the form λ are “left over” and are not counted in case 1. Notice that 3 1 n = |λ| = (2ℓ) + (2ℓ − 1) + (2ℓ − 2) + ··· + (ℓ + 2) + (ℓ + 1) = ℓ2 + ℓ, 2 2 3 2 so this situation only arises when n is of the form 2 ℓ + 12ℓ and results in ℓ qe(n) − qo(n) = (−1) . 2.7. EULER’S RECURRENCE 23

Next, ρ(µ) = σ(µ), but f −1(µ) is a partition into distinct parts, but has the same number of parts as µ. Thus partitions of the form µ are “left over” and are not counted in case 2. 3 1 n = |λ| = (2ℓ − 1) + (2ℓ − 2) + (2ℓ − 3) + ··· + (ℓ + 1) + (ℓ) = ℓ2 − ℓ, 2 2 3 2 − 1 so this situation only arises when n is of the form 2 ℓ 2 ℓ and also results ℓ in qe(n) − qo(n) = (−1) .

2.7 Euler’s recurrence

Theorem 2.19. For n > 0, p(n) = p(n−1)+p(n−2)−p(n−5)−p(n−7)+p(n−12)+p(n−15)+··· ( ) ( ) + (−1)k−1p n − (k(3k − 1)/2) + (−1)k−1p n − (k(3k + 1)/2) + ··· (2.5) Proof. The infinite product in Euler’s pentagonal number theorem and Euler’s generating function for p(n) are reciprocals. Consequently we have ( )( ) ∑∞ ∑∞ p(n)xn (−1)jxj(3j−1)/2 = 1 n=0 j=−∞ Thus, ( ) ∑∞ ( ) p(n)xn 1 − x − x2 + x5 + x7 − x12 − x15 + ··· = 1, n=0 or equivalently, ∑∞ ∑∞ ∑∞ ∑∞ ∑∞ p(n)xn− p(n)xn+1− p(n)xn+2+ p(n)xn+5+ p(n)xn+7−· · · = 1, n=0 n=0 n=0 n=0 n=0 whereupon we shift indices in the sum and recall that p(n) = 0 when n < 0 to find ∑∞ ( ) p(n) − p(n − 1) − p(n − 2) + p(n − 5) + p(n + 7) − · · · xn = 1 n=0 Compare coefficients of xn in the extremes and the result follows. 24 CHAPTER 2. INTEGER PARTITIONS

Theorem 2.19 provides an efficient algorithm for computing values of p(n). In about 1915, P. A. MacMahon used Theorem 2.19 to find p(n) for 0 5 n 5 200. It took him about a month, and amazingly he did not make any mistakes. Today, computer algebra systems (e.g. Maple) use a variant of Theorem 2.19 to compute values of p(n).

2.8 Partition enumeration formulas

A formula for a certain restricted partition function We have already seen in the previous chapter that we can sometimes use generating functions to find direct explicit formulas for the terms of a given sequence.

Definition 2.20. Let p(n, m) denote the number of partitions of n with exactly m parts.3

Let us now find a formula for p(n, 3), the number of partitions of n with exactly three parts. Recall that the generating function for partitions into 1’s, 2’s, and 3’s is 1 , (1 − x)(1 − x2)(1 − x3) and the generating function for partitions into 1’s and 2’s is

1 . (1 − x)(1 − x2)

Thus it follows that the generating function for partitions whose largest part is exactly three is

1 1 − . (2.6) (1 − x)(1 − x2)(1 − x3) (1 − x)(1 − x2)

By Theorem 2.11, (2.6) is also the generating function for partitions with exactly three parts.

3Warning: some authors use the notation p(n, m) to denote the number of partitions of n with at most m parts. 2.8. PARTITION ENUMERATION FORMULAS 25

We will have occasion to use Newton’s binomial series ∞ ∑ (n + m − 1)(n + m − 2) ··· (n + 1) (1 − x)−m = xn, (2.7) (m − 1)! n=0 and the lesser known series expansion

∞ ( ) 1 ∑ n + 1 = 1 − x + 0x2 + x3 − x4 + 0x5 + ··· = xn, (2.8) 1 + x + x2 3 n=0 ( ) a where is the Legendre symbol. p

∞ ∑ 1 1 p(n, 3)xn = − (1 − x)(1 − x2)(1 − x3) (1 − x)(1 − x2) n=0 x3 = (1 − x)3(1 + x)(1 + x + x2) 1/72 1/4 1/6 1/8 (2 + x)/9 = − − + − + 1 − x (1 − x)2 (1 − x)3 1 + x 1 + x + x2 (by partial fractions) ∞ ∞ ∞ 1 ∑ 1 ∑ 1 ∑ (n + 2)(n + 1) = − xn − (n + 1)xn + xn 72 4 6 2 n=0 n=0 n=0 ∞ ∞ ( ) ∞ ( ) 1 ∑ 2 ∑ n + 1 1 ∑ n − (−1)nxn + xn + xn 8 9 3 9 3 n=0 n=0 n=0 ∞ ( ) ( ) ∑ 6n2 − 7 − 9(−1)n + 16 n+1 + 8 n = 3 3 xn 72 n=0 By comparing coefficients of xn in the extremes, we find ( ) ( ) 6n2 − 7 − 9(−1)n + 16 n+1 + 8 n p(n, 3) = 3 3 . (2.9) 72 This is an exact formula for p(n, 3), but it is rather inelegant. Let’s see if we can clean it up a bit. Notice that most of the value of p(n, 3) is contained in the (6n2 −7)/72, and the rest is just a small fraction to adjust for the fact that (6n2 − 7)/72 26 CHAPTER 2. INTEGER PARTITIONS is usually not an integer. In fact, we can write n2 7 p(n, 3) = − + ϵ(n), 12 72 where ϵ(n) is a function which only takes values in the set {−17/72, 7/72, 1/72, 25/72}. This is already quite an improvement. But let us see if we can do even bet- ter. Notice that if we add and subtract a small quantity, say 25/72, to our formula and regroup: ( ) ( ) n2 7 25 25 p(n, 3) = + − + + ϵ(n) − . 12 72 72 72 Now, this is equivalent to n2 1 p(n, 3) = − +ϵ ˜(n), 12 4 where ϵ˜(n) only takes values in the set {−7/12, −1/3, −1/4, 0}. But now our new error correction term, ϵ˜(n) only takes nonpositive values less than 1 in absolute value. Therefore we may write ⌊ ⌋ n2 − 3 p(n, 3) = , (2.10) 12 which is rather nice indeed, and certainly more elegant than (2.9). Where did 25/72 come from? It was simply chosen because it had the effect of shifting the values of ϵ(n) into the range (−1, 0], and had the added bonus of increasing the messy fraction −7/72 to the much nicer −1/4. The same method can be used to find formulas for p(n, m) for any fixed positive integer m, but the formulas get increasingly cumbersome as m increases. We might, for a moment, hope to find a direct formula for p(n) by applying the same techniques to the generating function for ∏p(n). This, however, will not work since the generating function for p(n), ∞ − j −1 j=1(1 x ) , cannot be separated into a sum by a partial fractions de- composition.

Formulas for p(n) A direct, nonrecursive formula for p(n) is known, however. It was dis- covered by Hardy and Ramanujan in 1918 and refined by Rademacher 2.9. NAUDÉ’S QUESTION AND TWO VARIABLE GENERATING FUNCTIONS 27 in 1938. The method of derivation is basically the calculation of an ex- tremely difficult contour integral in the complex plane. Its derivation is well beyond the scope of this course, and we present it here mainly for shock value and amusement:

  ( √ ( )) ∑∞ √ π 2 − 1 1 d sinh k 3 z 24  √  √  p(n) = Ak(n) k , (2.11) π 2 dz − 1 k=1 z 24 z=n where ∑ Ak(n) = exp (πi [s(h, k) − 2nh/k]) , 05h

2.9 Naudé’s question and two variable generating functions

In Euler’s generating function for p(n), the exponent on x keeps track of the number being partitioned. Euler refined his generating function for p(n) to include a second variable, z, to keep track of the number of parts in the partition. 28 CHAPTER 2. INTEGER PARTITIONS

Theorem 2.21 (Euler). ∞ ∞ ∑ ∑n ∏ 1 p(n, m)zmxn = . 1 − zxj n=0 m=0 j=1 Proof. Exercise. Theorem 2.22 (Euler). If q(n, m) denotes the number of partitions of n with m parts, all distinct, then ∑ ∏∞ q(n, m)zmxn = (1 + zxj). n,m=0 j=1

Proof. Exercise. Thus the answer to Naudé’s question, “How many ways can 50 be writ- ten as the sum of seven different∏ positive integers?”, is the coefficent of 7 50 ∞ j z x in the expansion of j=1(1 + zx ).

2.10 Exercises

1. Let pod(n) denote the number of partitions of n where even parts may appear any number of times, but no odd part may appear more than once. Express G(pod(n); x) as an infinite product. 2. Let ped(n) denote the number of partitions of n where odd parts may appear any number of times, but no even part may appear more than once. Express G(ped(n); x) as an infinite product.

3. For m a fixed positive integer, let ρm(n) denote the number of par- titions of n, where no part is a multiple of m. Such partitions are sometimes called m-regular partitions. Express G(ρm(n); x) as an infinite product. 4. Let t(n) denote the number of partitions of n where no part is con- gruent to 2 (mod 4). Express G(t(n); x) as an infinite product.

5. For m a fixed positive integer, let qm(n) denote the number of parti- tions of m where no part may appear more than m−1 times. Express G(qm(n); x) as an infinite product. 2.10. EXERCISES 29

6. Prove that ρ2(n) = q2(n) for n = 0.

7. Prove that pod(n) = t(n) for n = 0.

= 2 1−y3 8. Prove that ρ3(n) = q3(n) for n 0. Hint: 1 + y + y = 1−y when y ≠ 1.

9. Prove that ped(n) = ρ4(n) = q4(n) for n = 0.

10. For m a fixed positive integer, prove that ρm(n) = qm(n) with the aid of the finite geometric series.

11. Prove that the number of partitions of n into distinct parts not con- gruent to 3 (mod 4) equals the number of partitions of n into parts congruent to 1, 5, or 6 (mod 8).

12. Suppose that π is a partition of n into distinct parts. What is the maximum possible number of parts that π can have?

13. Consider the infinite product ∏ ∏∞ (1 − xm) = (1 − x2m−1)(1 − x4m). m≥1 m=1 m̸≡2 (mod 4)

a) Expand the infinite product as a series, and conjecture a result analogous to Euler’s pentagonal number theorem. What would be an appropriate name for this result? b) Prove your conjecture in part (a) by deducing a partition theo- retic interpretation analogous to Lengendre’s interpretation of Euler’s pentagonal number theorem, and proving it.

14. Prove Eq. (2.8).

15. Find a formula for the number of partitions of n with at most three parts.

16. Prove Theorem 2.21.

17. Prove Theorem 2.22. 30 CHAPTER 2. INTEGER PARTITIONS

2.11 Notes

Exercise 6 is a restatement of Euler’s partition theorem. Exercise 10 is a theorem due to J. W. L. Glaisher. Chapter 3

Compositions

3.1 Definition and Elementary Results

Definition 3.1. A composition of an integer n is a representation of n as a sum of positive integers, where the order of summands (parts) is im- portant.

Thus for each partition of n, there corresponds a number of compo- sitions of n. If π is a partition with m parts, all distinct, then π has m! different compositions associated with it.

Definition 3.2. Let c(n) denote the number of compositions of n, and let c(n, m) denote the number of partitions of n with exactly m parts.

We wish to form the generating function for c(n, m) for a fixed positive integer m. As with the generating function for partitions, geometric series will be involved, but in a somewhat different way. Clearly, the generating function for compositions with exactly one part is x1 + x2 + x3 + x4 + ··· , since that one part can be any positive integer. The generating function for compositions with exactly two parts is

(x1 + x2 + x3 + x4 + ··· )(x1 + x2 + x3 + x4 + ··· ) = x1+1 + (x2+1 + x1+2) + (x3+1 + x1+3 + x2+2) + ··· = x2 + 2x3 + 3x4 + 4x5 + ···

31 32 CHAPTER 3. COMPOSITIONS

The generating function for compositions with exactly three parts is

(x1 + x2 + x3 + x4 + ··· )(x1 + x2 + x3 + x4 + ··· )(x1 + x2 + x3 + x4 + ··· ).

So, with the generating function for p(n), the “j-th” geometric series generated the integer j as a part in a given partition. Here, in contrast, the “j-th” geometric series generates the j-th part of the composition, and that j-th part can be any positive integer. Theorem 3.3. Let m and n be positive integers. ( ) n − 1 c(n, m) = . m − 1

Proof. Let m be a fixed positive integer. Then ∑∞ G(c(n, m); x) = c(n, m)xn n=m = (x1 + x2 + x3 + x4 + ··· )m ( ) x m = 1 − x ∞ ∑ (m + r − 1)(m + r − 2) ··· (r + 1) = xm+r (by (2.7)) (m − 1)! r=0 ∞ ∑ (n − 1)(n − 2) ··· (r + 1) = xn (by letting n = m + r) (m − 1)! n=m ∞ ( ) ∑ n − 1 = xn m − 1 n=m Comparing coefficients of xn in the extremes, we find ( ) n − 1 c(n, m) = . m − 1

Corollary 3.4. ( ) ∑n n − 1 c(n) = = 2n−1. (3.1) m − 1 m=1 3.1. DEFINITION AND ELEMENTARY RESULTS 33

Proof. − ( ) ∑n 1 n − 1 = 2n−1. m − 1 m=0

Corollary 3.5 (The generating function for c(n)).

∞ ∑ x c(n)xn = . 1 − 2x n=1

Proof. ∞ ∞ ∑ ∑ x c(n)xn = 2n−1xn = , 1 − 2x n=1 n=1 by summing the geometric series.

Next, we turn to a fun and surprising result:

Theorem 3.6 (Cayley, 1876). The number of compositions of n with no ones equals the n − 1st Fibonacci number.

Proof. Let z(n) denote the number of compositions of n with no ones. Then ∑∞ G(z(n); x) = z(n)xn n=1 ∑∞ = (x2 + x3 + x4 + ··· )m m=1 ∞ ( ) ∑ x2 m = 1 − x m=1 x2 − = 1 x (by (1.1) ) − x2 1 1−x x2 = 1 − x − x2 x = x 1 − x − x2 34 CHAPTER 3. COMPOSITIONS

∑∞ n = x Fnx (by (1.4)) n=0 ∑∞ n+1 = Fnx n=0 ∑∞ n = Fn−1x n=1

3.2 Exercises

1. Let cs(n, m) denote the number of compositions of n with exactly m parts, each part at least s. Prove that ( ) n − (s − 1)m − 1 c (n, m) = . s m − 1

2. Prove that the number of compositions of n with only odd parts equals Fn, the n-th Fibonacci number.