You are on page 1of 50

282 Chapter 7. Complez Combinatorics 7.1.

Tiling and coloring problems 283

1. Let k be an integer greater than 2. For which odd positive integers n Now, let us treat the more difficult case n > 2. Let = be a primitive root
of
can we tile a n x n table by 1 x &k or k& x 1 rectangles such that only the unity of order n and put the number 277 in the square (%, 7). By hypothesis,
central unit square is uncovered? the sum of the numbers associated to the squares of the rectangle is 0, so that
Gabriel Dospinescu Jristy ;’:} 2z = 0. But this factors as

Proof. Assign coordinates to the squares of the table, with (0,0) assigned to

o
8

T
the upper left corner. Put the number 2%%¥ in square (z,y), where z is a
primitive k-th root of unity. Then all 1 x k and k x 1 tiles will cover a total
value of 0. Thus the total value of the whole board must be 0. On the other s0 that necessarily one of a,b is congruent to 1 modulo 7. By symmetry, we
hand, this total value is precisely (E;L;ul z’) — 2t Thus we must have may me that @ = 1 (mod 7). Now, since every residue modulo n appears
2 the same number of times on the sides of the rectangle, we also have
( 'ffol z“) — 2" = 0 50 for some ¢ € {~1,1} we have P
oy =&z 7 . This
-1 b1 o
can be also written as ("% — e)(zll“zu + &) = 0, which immediately implies
that n is congruent to 1 or —1 (mod k). The converse is easily seen to hold, D3+t (}:1 ) =0.
=1 i=1
for if n= 1 (mod k) then we can tile both the center column and the center
row {excluding the center square) using the rectangles, leaving four rectangles
Asa=1 (mod n), the previous equality becomes (z+ 1) (Zfi; zj) =0. But
of dimensions multiples of k. And if n = —1 (mod k), then we can split the
table into four rectangles each with a dimension a multiple of k& and so again 7> 2, so that z+1 # 0 and so we must have Z;;}zj =0andb=1 (mod n).
the tiling is possible. Therefore the answer to the problem is: all n for which Since it is clear that for ¢ = b = 1 (mod n) all conditions are satisfied, it
n=+1 (mod k). O follows that this is the solution if » > 2. =]
The next two problems have very beautiful solutions using the methods
2. Let n > 2 be an integer. At each point (i, ) having integer coordinates
of this chapter and some classical algebraic identities.
we write the number i + j (mod n). Find all pairs (a,b) of positive
integers such that any residue modulo n appears the same pumber of
¥ 3. Each element of M = {1,2, ..., n} is colored in either red, blue or yellow.
times on the sides {except for the vertices) of the rectangle with vertices
Let A be the set of triples (z,y,2) € M x M x M such that n divides
(0,0), (a,0), (a,b), (0,b) and also any residue modulo n appears the
% +y + 2z and z,y,z have the same color. Let B be the set of triples
same number of times in the interior of this rectangle.
(z,9,2) € M x M x M such that n divi=des + y + z and z,y, 2 have
Bulgaria 2601 pairwise different colors. Prove that 2{A] > [B|.

Proof. First, let us get rid of the easy case n = 2. As the interior of the Chinese TST 2010
rectangle must have an even number of lattice points, clearly one of a,b must Proof. For simplicity write 1,2, 3 for the colors and let
be odd. But if one of @,b is odd, then clearly all conditions are satisfied, so
that in this case the solutions are all pairs (g, b} with e, not simultaneously
KX = Y X,
even.
iEM cfi)=j
284 Chapter 7. Complex Combinatorics 7.2. Counting problems 285

where (i) = j if ¢ has color j. The identity Proof. Let us write z = %" and e(j) for the color of number j. Define
fiX) = Ec(a):j X% As in the previous solution, one ends up with the
1 — formula
loza (mod k) = EZZJ(" &
=
yields 1Bl - 14] = % 3 @AE
R + 260 f5(2)® + 2fs(2) (2
=
M=y171 e()melg)me(z)e=i
Y TAPk=0 omen
3 = protd
IS
fur et
ey = Ailz)! ~ fala)* = fa(ze)).
Readers familiar with Heron’s formula have already noticed that
and

1= 286 [ am k=0 g1
2a*B? + B2 + a?) — (ot + b1 4 ot
={a+b+e)b+c—a)cra—bat+b—c).
Of course, this method has some limitations, because it is rather difficult Also, as in the previous solution we have
to compare complex numbers. The miracle is in the formula
4 1
N
2y’ + 2 - By = i(z'ky‘FZ)((z“y)Q+(y‘z)2+(z*m)z) Nlz) + folaw) + falz) = Ze"fi*
=1
and especially in the fact that
and this is nonzero if and only if £ = 0, in which case it equals N. The result
2 2ink T g follows from these remarks and the hypothesis, which ensures that
ij(ew:. Y= Ze“: =0
gl =l
A1)+ B(1) > £(1)
unless k = 0, when it equals n.
and similar inequalities. O
Putting these observations together, we deduce that

2A4] — (B] = (A1) - L) + (1) - L) + (A1) - AL’ 20. O


7.2 Counting problems
The following problem is very similar, but more technically involved.
In this section we combine the technique of generating functions with the
4. Color the numbers 1,2,..., N using 3 colors such that there are at most
fundamental relation )
% numbers of each color. Let A be the set of 4-tuples (a,b,c,d) €
{1,2,...,N}* such that a+b+c+d =0 {mod N) and a,b, ¢,d have the pE
same color. Let B be the set of 4-tuples {(a,b,¢,d) € {1,2,..., N}* such lnza (mod k) = EZzJ("‘"),
that @ +b+c+d =0 {(mod N), a,b and ¢,d have the same color, but =0
these colors are distinet. Prove that |A| < |B}. This mixture is very powerful and applies very well for counting problems with
KoMaL arithmetical flavor, as roots of unity can detect congruences very efficiently.
286 Chapter 7. Complex Combinatorics 7.2. Counting problems
287

5. Three persons A, B, C play the following game: a subset with k elements ‘We present two solutions for the following problem: the first one is the
of the set {1,2,...,1986} is selected randomly, all selections having the
standard proof using complex numbers, while the second one is
same probability. The winner is A4, B, or C, according to whether a very elegant
the probabilistic proof,
sum of the elements of the selected subset is congruent to 0, 1, or
2
modulo 3. Find all values of & for which A, B, C have equal chances
of 6. We roll a regular die n times. What is the probability that the
winning. sum of
the numbers shown is a multiple of 57
IMO 1987 Shortlist
IMC 1999
Proof. Let 2 be a primitive third toot of unity and consider the polynomial Proof. We need to count the number of sequences (x1,@a,...,2,) with
1 <
2; < 6 and such that 5 divides z; + 29 +--- + Zn. Let a; be
the number of
1986 sequences (Z1,y,...,T,) such that 1 < z; < 6 and
P(X) = (14 X2)(1+ X2%) - (1 4 X2190) = S axi. T1HTot-tx, =5
{mod 5). Then for each fifth root of unity z we have
§=0

Note that o+ a1z


- +aget
+ = Z R PR
P(X) = Z 2D xH 122120,<6

1C{1,2,...,1986} This equals 2™ unless z = 1, in which case it equals 6”. Adding these
relations
for all fifth roots of unity z gives 5ap = 6% 4 27 + 22° + 2% 4 2%
where m(I) is the sum of elements of 7. Thus for some
primitive root of unity of order 5. If n is a multiple of 5, 2% + --.
4 2% = 4
and the probability is ®= 5;6"..4 If not, then
aJ=Zz"'(I): Z 1+ Z ljz+ Z 1} 22 e g
=5 Hle=j,3m (1) Hl=k3im(F)—1 Hi=k3lm(H~2 EA TR L T =L
and this is zero if and only if
so that the probability is %
O
ZI:ZI:ZL Proof. We use a simple fact from probability. Suppose X is an integer
-valued
{=,3im(T} {H=4,31m(1)-1 H=3m(I)~2 random variable which is uniformly distributed mod m {that is, takes
on every
value mod m with probability 1/m) and suppose Y is any other integer
Therefore, the problem asks precisely for those k such that -valued
ay = 0. Now, random variable independent of X. Then X + Y is also uniformly
fortunately the polynomial P has a very simple form, since distributed
mod m.
To use this we break a roll of a die into two steps. We first flip a coin
PX) = (1+ X2)(1+ X2)(1+ X22))58 = (1 4 x3)802, with a 5/6 probability of giving a heads. If we get a heads, then we roll
a fair
5-sided die with the numbers 1,2, 3,4,5 on it. Ifwe get a tails, then
so the nonzero coefficients are precisely those whose index is we just get
a multiple of 3. the number 6. If any one of our n coin flips gives a heads (which
Thus the answer to the problem is: those k = 1,2 (mod 3). occurs with
(] probability 1 (1)™), then one of our summands is uniformly distributed mod

|
{
288 Chapter 7. Complex Combinatorics 7.2. Counting problems 289

5 and hence the sum is uniformly distributed mod 5. Otherwise, all the coin So g — 1+ 212+ -+ + 2p—12P~1 = 0, which implies that zg — 1 =, = --- =
flips were tails and hence all the dice were 6's, so that the total i1s n (mod 5).
= k for some k. Since zo + 21 + --- + Zp—y is simply the number of
Thus the probability of gettmg a sum which is a multiple of 5 is { (1~ (})")
— 1}, that is 201, we deduce that kp+ 1 = 2°~! and so
for n not a multiple of 5 and (1~ (£)™) + (1) for n a multiple of 5. 1 . Smce xg = 1+ k, the problem is solved. Note that we included
The following problem is a good opportunity to recall a very useful result: the ompty set when counting z¢ (by convention the sum of the elements of the
if p is a prime and if ag,a1,...,ap.; are rational numbers such that ap + empty set is zero). a
@17+ -+ ap.12P~ ! = 0 for some primitive root z of order p of unity, then
ag = g The following problem is technically more involved, but uses the same
- = ap—1. This is an immediate consequence of the irreducibility
of 14+ X + ideas as before. The special case when 7 is a prime was problem 6 of IMO
-+ X7~ gver the rational numbers.
1996.
7. Let p > 2 be a prime. How many subsets of {1,2,..., p — 1} have the
sum of their elements divisible by p? 8. Prove that the number of subsets with n elements of {1,2,...,2n} whose
sum is a multiple of n is
Ivan Landjev, Bulgaria TST 2006
Proof. Let z be a primitive root of order p of unity and consider the sum

S= Y e,
AC{1.2,.p-1} Proof. Consider the polynomial
where m(A) = 37 4 a. If 7; is the number of subsets A {1,2,...,p~ 1}
such that m{A4) = j {mod p), then clearly FXY)=(1+XY)1+X%Y)---(1+ X2Y).
S=ag+zyz+392° + 0+ mp,lz”’l. If (A} is the sum of the elements of A, we also have
On the other hand, we can explicitly compute S, since 2n

-1 =3[ 3 xm e,
s=Tla+h=T[a+o, a=0 \|A|=a
=1 <
where all sets A in this solution are subsets of {1,2,...,2n}. Taking for X
the product being taken over all roots ¢ of the polynomial
the roots of unity of order n, say 2; = o5 , the fimdament.al relation implies
XP—1 that
e
X1 T+X ERRN
4+ =1 XL 2n

—(faY)+ o+ 2, Y)) = Zxa-Y“,


‘We deduce that
[Ta+o=2
+()= e 1. where z; is the number of subsets A with ¢ elements and such that m(A) = 0
< (mod 7). We deduce that z,,, which is the number of sets A we are trying to
290 Chapter 7. Complex Combinatorics 7.2, Counting problems 291

find, is also the coefficient of Y™ in the polynomial & (f(z1,Y)+- -+ f(2r, Y)). Note that
Now, fix j and let us compute
s:;Z
15 R
Fz YY) = (14 YY1+ 23Y) - (1 + 22Y).
k=0 abcde.fCZ/pE

E(n) (2)
We can write § = du,n = dv, where d = ged(n, j) and then we clearly have
2J"_L"
FanY) = (4 )1+ V) (Lte V)P = (1~ (~Y )y
So the coefficient of Y is (~1)¢" (2;), Since for any d|n there are exactly
In the previous sum, there is one obvious term: the one for k = 0, which
w(n/d) integers 1 < j < 2n such that ged(j,n) = d, we deduce that the
coefficient of Y™ in 2(f(21,Y) + -« + f(2,Y)) is exactly gives
us p%. Also, for each 1 < k < p— 1 we have

GF s () (3) (Z
acF,
Zlcrfi) ( Z
deZ/pZ
Z-MZ) - Z
a,deZ/pZ
=) _ z
TyEZ/pL
2k,

which finishes the solution. O by the change of variable a — d = z,a +d = y (which recovers a,d uniquely
because 2 is invertible modulo p). On the other hand, for a fixed z # 0, we
‘We continue with a very nice problem concerning the number of solutions
have
meod p of a quadratic equation in several variables. Actually, the same methods
also apply in some other situations, but the general problem of estimating the > oma 3 Svag,
number of solutions mod p of systems of polynomial equations mod p is very YEZ/PE YET/pL
deep. See the addendum of this chapter for more details. as the map y = kzy (mod p) is a bijection of Z/pZ. Therefore,
9. Let p be an odd prime. Find the number of 6-tuples (a,b,¢,d, e, f) of eyerspn ?Y = p, which shows that
integers between 0 and p — 1 such that

b+ =d+et+ 2 (mod p).

MOSP 1997
(2)(2)
(Jombmmg the previous paragraphs yields the answer to the problem, namely
P+ (p—1)p m]
Proof. Let z be a primitive root of order p of unity. Since Ez;é 2= 0if z
is not a multiple of p and equals p otherwise, the desired nmunber of 6-tuples Proof. First look at @® ~ d? = (a — d)(a + d) mod p. Since p is an odd prime,
18 -1
we can choose z = a —d and y = a + d arbitrarily and then solve uniquely for
g=1 DS M2me?— 1) aand dviaa = (z+y)/2, d = (y—z)/2. If z is nonzero, then since p is prime,
zy takes on every value exactly once whereas if z = 0 then zy is always zero.
S abede fEL/pL k=0

i
i:
.
‘292 Chapter 7. Complex Combinatorics 7.2, Counting problems 293

Thus a? — d? = zy takes on the value zero 2p — 1 times and takes on every for some integers ;. Since 2* only depends on z (mod p), it is clear that
nonzero value p—1 times. Therefore it is described by the generating function a; is exactly the number of ways residue i is represented by the numbers
+142:4 ?L Thus, the problem asks us to prove that a; = ag = -+ = gpy
-1+ @-DX+@- DX+ -+ (p-1)XP} and to find thls common value.
=p+{p-
DI+ X+ X7+ + X771 The point is that S has a nice closed expression, since it obviously factors
as
in Z[X} modulo X? ~ 1. Note that modulo X? - 1, the polynomial o
S= H(zJ +277).
1+ X+ X244 xP71
=1
has the feature that On the other hand,

FOQ+X+
X2+ XY = O+ X+ X7+ 1 XY e
for any polynomial (X} (as X 1 divides f(X) — f(1)). Thus the generating
H(zJ +2)=S- H (F+29)=5. H(ZH +27P) = 8%
function for the values taken on by (a® ~ d?) + (6% — %) + (¢® ~ f?) is =t=
(PrE-DA+X+X7 4. +x71)° and
- .

=4 (P = P14+ X 4+ X2+ XPTY). HEETHE =) Hu +2%) = H(l +)=1.


=1 =1
From this we read off thc number of 6-tuples for which a® +b?+¢* = d*4-e? + 2
The last relation uses the fact that = — 2z is a bijection of the nonzero
(mod
p) as p* + p* — p. o}
remainders modulo p (as p is odd) and that
‘We continue with a very nice problem, in which one uses a mixture of
-1
the previous techniques, algebraic manipulations and a rather tricky number-
theoretic argument.
TTa+2) =1,
=1
10. Let p be an odd prime. Prove that the 2% numbers 142 .- P;‘» which follows from
represent each nonzero residue class mod p the same number of times. (.
Compute this number. T -)- B 1
R. L. McFarland, AMM 6457
=1
by taking X = —1.
2in
Proof. Let z=e» and write The previous computation shows that §2 = 1, so that § = £1 is definitely
an integer. But then then relation a5 — S+ a2+ + a.‘,_lz’"~l = 0 implies
ept2epbotBrtep_y _ that ap ~ S = @1 = -+~ = ap_;.
z TR =agtagz
oo+ apeef In particular, @; = - = ap—3 and the first
s6{-1.1} part, of problem is solved.
|
|
294 Chapter 7. Complex Combinatorics 7.2. Counting problems 295

On the other hand, we clearly have since n is odd. But conversely, if we have a sequence by, bg, ..., b, of elements
of Z/nZ satistying b; # 0 (mod n) and by +bz+---+b, = 0 (mod n), then we
‘1<J+a1+~-+fly71::2a§l» can find precisely n admissible sequences giving rise to by, by, ..., b,. Indeed,
which combined with ag ~ § = ag =+« choose any ag € {1,2,...,n} and take for ay the remainder modulo n in
= ap—; and with S = 41 shows that
{1,2,...,n} of the number ap + 1+ 2+ --- + k + by + by + --- + bx. Thus,
if f(n) is the number of sequences (b1, by, ..., by) € (Z/nZ — {0})" such that
(mod p) = (1)Pl (mod p), by 4+ b+ - + by = 0 (mod n), then the desired answer is nf(n).
2 2
so that S = (-1)’;8“" and the value we are looking for is Now, we evaluate f(n) in the standard way: let z = e, so that

_ 2.
277~ (-5
QG may ==
ay g =
i 2
== b1,
Z 'il zk(bfih+~--+bn)

bn €2 nE~ {0} k=0


We used here a standard result in quadratic residues, saying that Legendre’s lfl—l
2_ ";Z DONERIE okbn
symbol (%) = (—1)’*&“", O k=0 1<hi<n—1
It is rather difficult to approach the following problem directly with the
methods of this chapter. However, a small observation reduces the problem
to & more familiar one.

11. a) Let n be an odd integer. Since


Find the number of sequences
{@0,ay,...,an) such that a; € {1,2,...,n} for all 4, a, = a¢ and
a;—ai—1 %4 (mod n) forall i = 1,2,...,n.
b) Let n be an odd prime. Find the number of sequences
(ap,01,...,ay) such that g; € {1,2,...,n} for all ¢, @, = ag and
for k =0 and it equals =25 — 1= ~1 for 1 < k <n— 1, we deduce that
i~ ai—y £ 4,2 (mod n) for all i =1,2,...n.

fy =222
Reid Barton, USA TST 2004 -1 -(n—-1)
Proof. a) Call a sequence as in the problem admissible. Considering

b =a;~ a1~ {modn)


so the answer to part (a) is (n — 1)* — (n — 1).
b) The same argument as in the first paragraph of (a) shows that it is
for 1 <4 < m, the condition becomes &; # 0 (mod n). Note that enough to count the number g(n) of sequences (b1, b2, ... ,5,) with &; € Z/nZ,
b; #0,i (mod n) and b; +by + -+ +b, = 0 (mod n). The desired answer will
bitbyt b= —(1+2+ - +n)=0 (mod n}, be ng(n).
296 Chapter 7. Complex Combinatorics 7.2. Counting problems 297

‘We compute in the same way and of the fact that n is odd. We deduce that

i, s #)-
n-1
1 Z sz(b1+bq+m+lm)
9(n)

il
k3
b 20,7 kw0t =1 \b#04 (mod n)
ln»l
=7_ZZ 37 b gt for all 1 <k <n —1 and so the answer to the problem is
k=0b,#0
(n—1n-2)""1—(n-1)

SEn(s ) g(n) = et el n}
=l \b#0i (modn) The following problem is hard, even though the first steps are rather clear.
The difficulty lies in the algebraic technicalities.
For k = 0 the corresponding product equals trivially (n — 2)™ - (n — 1) (the
factor n - 1 comes from the sum associated to i =n). Now fix 1 <k <n -1 12. Let p > 3 be a prime number.
For all 1 <i < n we have
If'X is a nonempty subset of {0,1,...,p— 1}, let f(X) be the number
of sequences (al,az,,,.,ap_l) such that a; € X for all j and p divides
P B R (14 z’”) = {1 +z'”).
b£0.6 (mod n) 873 das. Prove that £({0,1,3}) > £({0,1,2}), with equality if and
only if p = 5.
For i = n the corresponding sum is —1. Thus
MO 1999 Shortlist
kd n~1
Proof. Let us first find a formula for f(X). Letting z = emf, the usual
) = T+ 25 argument yields
H
i1 (o,m,z z(;nod n) ) H
p-1
Now, since n is a prime and 1 < k < n, we have ged(k, n) = 1, so the numbers f(X) = lz Z SHlar$2art
o p-T)ap1}
2% with 1 <4 < n 1 are precisely the n-th roots of unity different from 1. P et maex

SEE) - (z)
Thus
-1
[Ta+#= 1] a+w=1,
st whmtul
In particular,
the last equality being a consequence of the equality

X" -1 1 =
I «x-w=5%—7 sy =25 | [Ja+#" +z2fi)) .
wr=lukl =0 J=1
298 Chapter 7. Complex Combinatorics 7.3. Miscellaneous problems
299

Since {291 < j < p~1} = {2]1 <j <p—1} for all i # 0 (mod p) and and so the characteristic polynomial of the sequence {a,), is
since p > 3, it follows that
@ rr+1)a-® — Y a+1) =2 - 228 - 22— 22 — 1.
fo2) = (31’"1 - Thus, there exists a constant C such that for all n we have

We also have
@t = 2an43 + Gnyz + Gnyy) + an + C
It is not difficult to compute that the first terms of the sequence (ay),
q Bt fed . . are
f({O'Lgp:;Z H(1+Cu+<3m) . 0,1,1,3,1,1,3,8,... and that the sequence is increasing after the sixth term
(and C = —2). The result follows easily.
a
So, if a, 8,7 are the roots of 2 + 4 1, we have (using again that for all i # 0 Remark 7.1. Except for the technical combinatorial part, which, as
we have
(mod p) the numbers (27); are a permutation of the numbers (27);) seen, is quite standard, the difficult point of the problem is establishing the
inequality a, > 1, with equality precisely for »=15. Proving that
a, > 1 is
however rather easy, without the computation of the characteristic polynomi
Pl : : al.
1{0,1,3)) = ; (3"“ +@-1) [ - e} - By - 7)) Indeed, note that a, is a symmetric polynomial with integer coefficients in the
=1 roots of X® + X 41, so it is an integer. On the other hand, the polynom
ial
_ ¥l (p—1)ay, function 2% + z + 1 is increasing on the whole real line, so
among «, 3,7
T precisely one is real, say . Moreover, it is easy to check that
~1 < a < 0.
Thus l—l?an—p > 0. Also,
where " n "
PRt it A= -7 ='1—fl” o
" e-0E-D0-y
It is thus enough to prove that a, > 1, with equality precisely for p = 5 1=8)1~7) 1-5 ’
However, this sequence satisfies a linear recursive relation with characteristic so that a, > 0. It follows that ¢, > 1. However, we know no easy proof of
the
polynomial fact that a, > 1 for p > 5.

(X~ a)(X =YX =X ~a- BX =B NX-a-NX-a)


7.3 Miscellaneous problems
= (X DE X+ DX = a HX = 59X - a7).
13. Let ap,bg,cx be integers, k = 1,2,...,n and let f(z) be the number
‘We can easily compute that of
ordered triples (A, B, C) of disjoint subsets (not necessarily nonempty)

(X—wfl)(X—flw)(wa»:(M%) (X«L-f;) (X +§) of the set S ={1,2,...,n} whose union is S and for which

= X3 X% 1 Z a; + Z b+ Z =z (mod 3).
ies\A ES\B ieS\C
300 Chapter 7. Complex Combinatorics 7.3, Miscellaneous problems
301

Suppose that f(0) = f(1) = f(2). Prove that there exists ¢ € § such Proof. Consider the matrix A4 = (xi ), whose determinant is given by
that 3 a; + b + ¢
Gabriel Dospinescu det 4 = Z XSto) Z X5,
o even @ odd

Proof. Observe that On the other hand, we also have a simple closed form for det A,
given by
Vandermonde’s formula:
' :
F(X) = H (Xax+b, + Xt +Xcfl+a‘) H - X7).
(X7
det 4 =
il 1<i<j<n
= Z X Siessa it Nies/n it Dies/c o
o Z[’E{}}e first formula and the definition of Aj;,B; imply the
following equality
{4,B,0)

Thus, the equality £(0) = f(1) = f(2) = 3! becomes p—1


S4-B)xT= [] (X —X) (mod X —1).
1+ X+ X% (mod X3 ~1) J=0 I<i<i<n
Therefore, the problem comes down to showing that
Since 1+ X + X21X? — 1 this mmeans in particular that 1 + X + X*F(X).
So there exists ¢ such that 2%+ 4 gbete 4 setas — where 2 is a primitive
n>p = J] (X¥-X)=0 (modx?_1).
third root of unity. This means that {a; + bi,b + ¢,¢ + a5} is equivalent
1<i<i<n
t0 a permutation of {0,1,2} (mod 3} and so 3|a; + b; + ¢;. The conclusion
follows, [m] This is actually very easy. Indeed, if n > p then clearly

Readers who are not familiar with basic linear algebra will have a rather XP—axrt - x I (7~ x7).
hard time trying to solve the following problem. 1<i<j<n
For the other direction, take 2 any primitive root of order p of unity.
14. Let p be an odd prime and n > 2. For a permutation o of the set Then
by hypothesis [] 1<icjznl?’ — 2%) = 0, showing that for some i < 7
{1,2,...,n} define we have
277" = 1. Since this implies that j — i is a multiple of p, thus at least
p, we
are done.
S(o) = o(1) +20(2) + - + no(n). ' a
The following problem is very challenging. Here, it is very
Let A; be the set of even permutations o such that S(o) = j (mod p) and hard to find
the correct approach, especially because the problem suggests
let B; be the set of odd permutations o for which $(¢) = j (mod p). number theory.
Prove that n > p if and only if A; and B; have the same number of 15. Is there a positive integer k such that p = 6k+ 1 is a prime and (3")
=1
elements for all j. (mod p)? B
Gabriel Dospinescu
USA TST 2010
302 Chapter 7. Complex Combinatorics 7.8 Miscellaneous problems 303

Proof. The answer is negative, but the proof is far from being obvious. Sup- Proof. Let () € {0,1,....p — 1} be the remainder of z mod p and observe
pose that p = 6k + 1 satisfies (") = 1 (mod p). Let g be a primitive root mod that r{z) =p- { 31 Thus the hypothesis can also be written

oeom B0 -£0E
p and let z = g%, so that 2 has order k mod p. Consider.the sum
r{an) + r(bn) + r(cn) + r(dn) = 2p
k-1 k~1 3k 3k 3k 3%k k-1
for any ged(n,p) = 1. Let 2 be a primitive root of unity of order p and
let
=0 =0 \j=o \J =0 N /T o' ¥, d be the inverses of a,b, ¢, d modulo p- For any m not a multiple of
p we have 2™ — ;mn g0l we have Y- r(an)2™ = 2p2mn Fix a pumber
Since z has order & mod p, the sum ‘f;ol %7 is 0 unless j is a multiple of &, m relatively prime to p and let n run over a system of representatives
of the
which happens if and only if j = 0, k, 2k, 3k. Hence nonzero classes mod p. Then 7(mn) runs over 1,2,...,p—1 and so does r{an),
as a and m are not multiples of p.

5= ((0)+ () () + o)
Hence if we take the sum over n of the
o {3k 3k 3k 3k previous relation, we obtain

p-1 1
= (2~;- 2(3:)) k (mod p).
Z Z]’z”"“’) = ZpEzj =—2p.
=1 =t
Since (3:) =1 (mod p), we deduce that S = 4k (mod p). On the other hand,
It is easy to check the identity

(1429 = (14 2% 1,0,1 (mod p). 14 2X+___JHIX.,,_I:nX"“—(n+1)X"+1


It is now immediate to check that we cannot have k remainders mod p, each
(X -1y :
of them —1,0 or 1, adding up to 4k modulo p. This contradiction shows that which easily implies that
no such & can be found and solves the problem. [m} -1
il P
We present two difficult solutions for the following beautiful, but very Dae
=
=
challenging problem.
and similarly for b, ¢,d. Thus, we can write
¢ 16. Let p be an odd prime and let a, b, ¢, d be integers not divisible by p such
that 1
ra
P
rb
R
T
Sl
rd
Ak et R Seee ] 2 =2
r P P P and this for all m relatively prime to p. Clearing denominators and canceling
for all integers r not divisible by p (here {-} is the fractional part). Prove equal terms yields (after a tedious computation) an equivalent equality
that at least two of the numbers a + b,a + ¢,a +d, b+ ¢,b+d,c -+ d are
divisible by p. 24 Y sl srm PN RO
Kiran Kedlaya, USAMO 1999 LAl unspecified sums are over a, b,c, d.
304 Chapter 7. Complex Combinatorics 7.8. Miscellaneous problems 305

which continues to hold (trivially) when m is a multiple of p. Proof. This second proof uses Lagrange’s interpolation theorem, for which we
Finally, we add these relations for 0 < m < p — 1. Note that refer the reader to chapter 11. As in the previous solution,

p1
} :Zmu ’ =0
r(z) € {0, p—1}
m=0 is the remainder of z modulo p. Define

and similarly for ', ¢/, d’ and that _ 2r(z) - r(2z)


Q=z) T
p-1
Nms g so that Q(z) = 0if 0 < r(z) < (p—1)/2and Q(z) = 1if (p—1)/2 < r(z) < p.
e —0 Call {a,b,c,d) good if it satisfies the relation in the problem, which can also
be wriiten as r(ka) + r(kb) + r(kc)
+ r(kd) = 2p for all 1 < k < p. Note that if
for any N (simply because the corresponding sum equals p when z¥ =1 and {a,b,c,d) is good, then so is (ka, kb, ke, kd) for any k which is not a multiple
0 otherwise). We deduce that of p. Also, note that if (a,5,¢,d) is good, then

p-1 Qa) + Q) + Q) + Q(d) = 2.


2 e H > 2p,
m=0 Combining these two observations, we deduce that

which implies that o’ + ¥ + ¢’ + d' is a multiple of p (otherwise the left-hand Q(ka) + Qkb) + Qkc) + Qlkd) =2
side would be 0). Therefore, by the previous key equality, we also have
forall 1<k <p.
E:Z_amzz:zam By Lagrange’s interpolation theorem, there exists a polynomial P(X} of
degree at most p — 2 such that P(z} = Q(z) (mod p) for all z # 0 (mod p).
for any m relatively prime to p. By multiplying the previous relation by z~™
Note that if R(X) = P(X + 1) — P(X), then R(z) =0 (inod p) when
we get p—3 p+1
T’;’T"" P
142 =0y =y mid —a')
= gt @A e eb and R((p—1)/2) # 0 (mod p), so degR = p—3 and degP = p— 2. On
the other hand, the polynomial S(X) = P(Xa) + P(Xb) + P(Xc) + P(XdJ
is congruent to 2 mod p for p — 1 values of the variable. Since degS <p -2,
and a similar argument (add the equations and observe that the left-hand side
S ~ 2 must be the zero polynomial mod p. Imposing that the coefficient of
is at Jeast p) shows that at least one of &’ +¥,d' + ¢, @' + &' is a multiple of
XP-2 vanishes in S, we obtain the key relation
p. Say pla’ 4+ ¥, then also ple/ + d' (as pla’ + ¥ + ¢ + d') and so pla + b and
ple + d, finishing the proof of this hard problem. a PPPP e =0 (mod p),
306 Chapter 7. Complex Combinatorics 7.8, Miscellaneous problems 307

which can be also written (by Fermat's little theorem) the sum being taken over all characters y of F' = F. ‘3¢. The whole point is to be
1.1 1 1 able to estimate the previous quantity for each character x. Let g(d) = %2
e
* ¢ * d
=0¢F, and take a subset S as in the theorem, but with |S] = f(d) = 3%9(d). Note
Finally, since 7(a) + r(b) -+ r(c} + r(d) = 2p, we have e+ b+ c+d = Q in that
Fp. Combining the two relations yields D (lzes — gld = D)x(a) = 3 x(s)
Lor 1t zeF s€S

a b c atbtc if X is not trivial and it equals ,c¢ x(s) ~ 3%g(d — 1) otherwise (again by
which readily becomes (after clearing denominators) (a+ b)(b -+ ¢){e +a) = 0. orthogonality of characters). We deduce that
By symmetry, we may assume that a +b = 0 in F,. But then ¢+ d = 0 also
2
and we are done, o
18] = gld = ISP + 35 3 (Z x(s)) ()Z(lxes - al- 1>)x(z>)
We end this chapter with a very deep result, whose proof is however X \seS 34
elementary (and follows [52]). Tt improves previous results of Brown and ] 2
Buhler {12}, Frankl, Graham and Réd] [33] and finally Ruzsa [52]. For more > g(d—1)[S]* — 31‘, ST - [S (Tees — gld— 1))X(r)!~
details on some arguments concerning orthogonality relations and properties x Ises zeF i
of characters, we refer the reader to addendum 7.A.
Here comes the crucial estimate:
17. Let p be & prime and let § ¢ (Z/3Z)" be a subset containing 1o line
Lemma 7.2. For all characters x we have
of the affine space (Z/3Z)°. Prove that § has at mos elements.
However, prove that we can find such a set with at least 3% elements.
Meshulam-Roth theorem 12" (lees = g(d = D)x(w)| < 3%9(d—1) —|8].
lxel«‘
Proof. Let f(d) be the largest cardinality of a set § ¢ F¢ (we write F3 for
Proof. If x is nontrivial, let Hy be its kernel, while if X is trivial, let Hy be any
Z/3Z) containing no line. Note that three distinct points of F¢ adding up to
the zero vector form a line and conversely, the sum of the points of a line is
hyperplane of F (where F is seen as Fy-vector space of dimension d). Take
the zero vector. So, f(d) is also the largest cardinality of a set S containing Hy, Hy two affine hyperplanes parallel to Hy so that the H;'s form a partition
no three elements that add up to 0. Since F and F = Fye (the field with 3¢ of F. Note that by definition x is constant on each Hi, say x(z) = 2z for
clements) are isomorphic as additive groups, we may work from now on with z € H; (where of course |z;]| = 1). Then
subsets S of F.
2
In particular, if S is such a set, the orthogonality relations for characters
of abelian groups (theorem 7.A.5) yield
> zes —gld -~ 1))x(z)% = > (SNH| - fld- 1))!
zeF i=0
2

;& 3 (Ex(fl) :% S S xlsi+sa+ss) =81, S YISO


H - fd—1)).
X \se§ 51,92,5368 X =0
308 Chapter 7. Complez Combinatorics 7.4. Notes 309

But clearly S M H; does not contain three elements adding up to 0 and since On the other hand, since we work in characteristic 3, we have
H; is (d — 1)-dimensional, we deduce that |S N H;| < f(d ~ 1) (by definition
of f(d~ 1)). Therefore, the previous estimate yields (a1 +a2)® = (a1 + az) (a1 + ag)*
2 ={a1 + az)(a‘;“ + agd

S (lees — gld ~ D)x(z)| <8%(d—1) = D 1SN Hil =af +af + a1057! +agai.
we i=0
‘We deduce that
=3%(d~1) - 18],
which is precisely what we wanted. (i} (a1~ a2)* = (a1 - ag)(a] ' —af ) =0,

Corming back to the proof and using the lemma and Plancherel’s identity a contradiction. O
(theorem 7.A.5)
2
7.4 Notes
Soxts)| =348,
x €S We thank the following people for providing solutions to the problems
we deduce the estimate (do not forget that S was chosen such that IS} = discussed in this chapter: Mitchell Lee (problems 1, 2, 10, 15), Richard Stong
Fg(d) = f(d) (problems 6, 9), Qiaochu Yuan (problems 5, 6, 8), Victor Wang (problem 16),
Alex Zhu (problems 15, 16), Gjergji Zaimi {problems 12, 13, 14). )
1] 2 g(d — VISP ~ |S1(3%(d - 1) — 18D,
which implies that .
gld—1)+3~
A) S A
=TTB
Since g(1) = %, it is immediate to check that the last estimate implies g(d) < 3,
which is precisely what we wanted.
Finally, let us show that f(3d) > 9¢, which will trivially imply the re-
maining part of the theorem. Let x = 3% 4+ 1 and consider

S = {(a,a%)la € Fga} C Fga x Faa.

This has 9¢ elements and we claim that it does not contain three elements
adding up to 0. Note that ¥ € Fy« if a € Fye, because (@1 =1ifa#0.
It (a],af) add up to 0, we obtain a1 +az + a3 = 0 and ‘af +af + af = 0. But
then
af +af + (a1 +ap)* = 0.
;
;
§
7.A. Finite Fourier Analysis 311

Addendum 7.A Finite Fourier Analysis by


The identity P = [ swermay.
(a=0)
= la=b (mod n) The presence of the characters y — %™ of R will be our guide to Fourier
analysis on abelian groups.
(for all integers a,b and all positive integers n) is at the origin of a lot of Remark 7.A.1. When dealing with abelian groups (which will always be the
beautiful mathematical results, as we could see in chapter 7, but it is just case for us), one also denotes by + the internal operation of G. This is quite
a special case of a broader theory. In the first part of this addendum we intuitive when dealing with groups such as Z/nZ, but definitely not suitable for
will see a vast generalization of this relation, through Fourier analysis on groups such as (Z/nZ)". Our convention will be the following: when dealing
finite abelian groups. Though rather elementary, these results are extremely with an abstract abelian group G, we will use muitiplicative notation for the
useful in number theory and combinatorics. On the other hand, they are the internal operation of the group, while in concrete examples we will choose the
very first component of a much broader picture, that of harmonic analysis. most intuitive notation, depending on the situation. Hopefully, this will not
Things are much easier for finite abelian groups, since one avoids quite a lot of create toc much confusion. ..
technicalities that appear when dealing with harmonic analysis on other groups
A character of G is a morphism of groups x : G — C*. So, according to
(such as R, the unit circle in C or, much harder, non-abelian and non-compact
whether we use additive or multiplicative notation for the internal operation
topological groups). For instance, all convergence issues are automatic (as all of G, a character satisfies x(z + y) = x(z) - x(y} for all z,y € G (respectively
sums we deal with are finite), while the integration theory has no subtlety
x{xy) = x{z} - x(y}). The character is called trivial if x(g} = 1 forall g € G.
(on the other hand, if one wants to do harmonic analysis on R, one has to Let G be the set of all characters of G. It becomes a group with respect to the
be very careful with these issues and one has to develop a rather powerful
obvious multiplication {x1-x2}(¢) = x1{¢)x2(g) and it is called the dual group
integration theory first). Also, the fact that the group is abelian simplifies the
of G. Note that for all x € G and g € G we have x{g)" = x{g") = 1, becau
problem considerably, basically because all irreducible complex representations
g" = 1 by Lagrange’s theorem. In particular, |x(g)| = 1 and x~!(g) = x(g|
of such a group are one-dimensional. We will also recall the main features of for all g € G and x € G. The idea of harmonic analysis is that all information
Fourier analysis on finite general groups, without proving anything, since this about the space of C-valued functions on G is encoded in G.
is already the content of a course in representation theory. Next, we deal with
Ezample 7.A.2. Take n > 2 and G = Z/nZ. What is the dual group of G? We
a classical, but amazing application of these ideas, namely Dirichlet’s theorem.
saw that x{1) is an nth root of unity. And clearly x is uniquely determined by
This allows us to say a few words about L-functions of Dirichlet characters.
This is again just the tip of a huge iceberg, which is far from being understood,
X(1), as G is generated by 1. Conversely, if z is an n-th root of unity, # — 2°
even though progress is constantly being made.
defines a character of G (by 2 we mean z° for any lifting a - of z; this does
not depend on the choice of a, as 2" = 1). We deduce that Gis isomorphic
to Z/nZ, even though this isomorphism depends on the choice of a primitive
7.A.1 Dual group
nth root of 1, so it is not really canonical.
From now on, let G be a finite abelian group with n elements. We want It is an easy exercise to check that _passing to duals is compatible with
to define the Fourier transform of a function f: G — C. Recall that if f is an direct products (i.e. the dual of G x H is G x H). Since any finite abelian group
integrable function on R, with complex values, its Fourier transform is defined is a direct product of cyclic groups (this is a nontrivial, but absolutely classical
312 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 313

result), it follows from this remark and the previous example that for any finite because z — g is a permutation of G. Since x is not trivial, there is g such
abelian group G, its dual is isomorphic to G. In particular, G and its dual have that x(g) # 1 and the previous identity yields S = 0 and so (x, x2)=
the same number of elements, which is really not obvious at first sight. We also Step 2. We claim that for all ¢ € G ~ {1} we have 3. ced X{@)= l) The
deduce from this observation and example 7.A.2 that if ¢ € G—{1}, then there same argument as in the first step shows that it is enough to prove that there
exists x € G such that x(z) # 1 (i you think about this for a moment, you will exists x € G such that x(x) # 1. This is nontrivial, but has already been
realize that it is nontriviall). Thus, the map g — (x — x{g)) is an injective explained.
homomorphism G — G, realizing G as subgroup of G. Since i(:‘[ = |G|, the Step 3. Since (x) <& Is an orthonormal set, it is linearly independent.
previous injection has to be an isomorphism. So G is canonically isomorphic But since it has the same cardinality as the dimension of the vector space
to its double dual. Let us now glorify what we have just proved: F(G,C) {namely |G}, by theorem 7.A.3), basic theory of vector spaces shows
that it has to be a basis of F(G,C). The result follows. O
Theorem 7.A.3. If G is a finite abelion group, then G is an abelian group
isamorphic to G and G is canonically isomorphic to G. In practice, one really uses the following consequence of the previcus
theorem:
Let F((,C) be the C-vector space of all maps f : G — C. Tt is a C-vector
space of dimension |, since the map F(G,C) — CI¢l sending £ to (f(9))gec Theorem 7.A.5. For any finite abelian group G, the following relations hold:
is obviously a C-linear isomorphism. If f,g € F(G,C), let
1) (orthogonality relations) For all x,x1,x2 € G and g.heCG

{£,9) me(x 9(z). ,Zn(z)xzm Lu=xes |G|Zx(9)x(h)71w.


266 g xe@
It is easy to check that this is an inner product on the C-vector space F(G,C).
We are now ready to prove the main theorems of Fourier analysis on G. 2) (Fourier inversion) For ol f € F(G,T) we have f = eré(f, XX~
Theorem 7.A.4. The elements of @ Jform an orthenormal basis of F(G,C). 3) (Plancherel’s idenf,z'ty) For all f € F(G,C)
Proof. We split the proof in several steps.
Step 1. We prove that (x1,X2) = Iy =xs, 1-€. that {x) e 50 orthonor- @LS @) = SR
zeG xe@
mal set. If x1 = X2, everything follows from the fact that X(q) has magnitude
1 for any g and any character x. Assume that x = % is not trivial. Then
Proof. 1) has already been proved while proving the previous theorem. For
2}, note that for any z € G we have, by the orthogonality relations
buxe) = 7LS~ o).
€@

Let § = Y x(z). Then for all g € ¢ we have


(Z(f. X ~x) @= Iéij(x)zf(y)@
X X ¥

9S=3 xlgx) =Y x{z)=S,


Ele fle)
= G 10 e = @),
¥ X
314 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 315

from which the result follows. Finally, using 2) and the previous theorem, we If n = 1, we call p a character (this is compatible with the definition of a
can write character given in the previous section). Such a representation V is called

G ze@
DM@ = U = £ - Tl - =S 0F. O
irreducible if no proper subspace of V is stable under all antomorphisms
g,
with ¢ € G. For instance, a character is an irreducible representation, as there
x1 xe xe@ is no proper subspace at all! Moreover, the only irreducible representations of
2 finite abelian group are the characters, so the new theory will be compatible
Remark T.A.6. More generally, we have
with the theory developed in the previous section. To prove the previous
assertion, one has to use a basic result from linear algebra, stating that any
(£.9) = > (£2000%7 commutative family of endomorphisms of a finite dimensional
xed vector space
over an algebraically closed field has a common eigenvector. So, if & is an
for all f,g € F(G,C), as can be deduced by an obvious adaptation of the proof abelian group acting irreducibly on V, there is a common eigenvector v for all
of Plancherel’s identity. 9 € G. But then Cv is a nonzero subspace of V stable under all g € G and so
we must have Cv = V; hence V is a character.
By analogy with the usual formula in classical Fourier analysis
‘We have the following very basic theorem due to Maschke:
® 1 g
Fny=gz | s say, Theorem 7.A.7. Any finite dimensional C-representation V. of a finite group
is a direct sum of irreducible representations. that is there exist sub-vecior
we write f(x) = (f,x) and call it the y-Fourier coefficient of f. spaces Vi,..., Vi of V stable under G, which are irreducible representations
and such that V = @, V,.
7.A.2 A glimpse of the non-abelian case
Now, the role of the dual G of G in the abelian case is played by the set
One may ask whether the above theory can be adapted to the case when G of (isomorphism elasses of) irreducible representations of G. It turns out
the group G is still finite, but no longer abelian. The answer is positive, but that this is a finite set and by the previous discussion its definition agrees with
things are much more complicated than in the abelian case. In order to develop the usual definition if G is abelian. The set of maps F(G,C) is naturally a C-
Fourier analysis on any finite group G, one has to consider all complex finite algebra and as such it is isomorphic to the group algebra C[G]. By definition,
dimensional representations of G. By definition, such a representation consists the elements of the last object can be uniquely written dec ag-g witha, € C
of a finite dimensional C-vector space V on which the group G acts linearly, i.e. (so the elements of G form a C-basis of C[G]) and multiplication is defined by
for each element g € & one has an antomorphism still denoted g of V such that
gh = goh (in the left-hand side gh is the automorphism associated to gh € G,
while in the right-hand side we have a composition of automorphisms). In more Zay»g . Zbg-g :Z Za,.bk “g.
down to earth terms, a representation of (7 is a morphism? p : G — GL,(C) for gEG gEG 926G \hk=g
some n > 1. Two representations py, ps : G — GL,(C) are called isomorphic
if there exists P € GLo(C) such that pa(g) = Ppi(g)P~! for all g € G. Note that C[G] itself is a representation of G (each element of G acting as
multiplication by g). The following theorem summarizes the properties of
“Recall that GLa(C) is the group of matrices A € Ma (C) with nonzero determinant. CciGl.
316 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis
317

Theorem 7.A.8. 1) Gisa finite set and C[G) is isomorphic as a repre- 7.A.3 Some concrete examples
sentation of G to ®y,.a(dim V)V, wherenV = VeV@---@V (n times).
In particular, . Let us specialize the previously quite abstract (at first...)
theory to a
very concrete situation that appears frequently in number
Gl =3 (dim V)% theory. Let N be
an integer greater than 1 and let
ved
G=(Z/NZ)
2) The center of C[G] consists of all maps f : G ~ C such that f(g) =
F(hgh™") for all g,h € G. Its dimension over C is equal to |G} and also be the abelian group of invertible residue classes mod N. A charact
er of G is
to the number of conjugacy classes® of G. called a Dirichlet character of modulus NV or simply a Dirichlet
character mod
N. If x is such a character, we set
Tn the abelian case, we defined an inner product on C{G] and we s}‘Aowed
that the characters of G formed an orthonormal basis of C[G]. All this can
x(n) = Lgcdtn
=1 - X(n)
be done in the non-abelian case, though things are usually more difficult to
prove. Namely, define for fy, fo € C[G} for all integers n, obtaining in this way an N-periodic function. We
will focus
on a more restricted class of characters modulo N, namely the primitiv
e ones.
Let us recall what that means. If
{f1, fa) = ré‘ 3" Al fle)- divides N and if x4 is a character mod
9€G d, then x4 yields a character mod N simply by composing it with
the natural
map (Z/NZ)* — (Z/dZ)*. We say that a character mod N is primitive
if it is
Now, to any representation p : G — GLn{C) one can associate its character, not obtained in this way, for any proper divisor d of N' and any xq. A
more
which is the element of C[G] defined by x,(g) = Tr(p(g)). The main theorem practical and useful criterion is the following: a character x mod N is primitiv
e
of Fourier theory on finite groups is then the following: if and only if for any proper divisor d of N there exists 7 = 1 (mod
d) such
that ged(n, N} = 1 and x(n) # 1. We leave to the reader the easy
task of
Theorem 7.A.9. 1) IfVi, Vs are two representations of G such that xy, = checking this.
Xv, as elements of C[G, then Vi and Va are isomorphic (and conversely). Let us see what happens when we apply the abstract theory to this
situa-
tion. Let @ be an integer prime to N and let £ be the map f(n) = L= (mod n)-
2) (xv)yeq i an orthonormal basis of the center of C[G] for the premj@sly It is naturally a map on ( G and it is clear from the definitions
that for all char-
defined inner product. Moreover, a representation V is irreducible if and acters x of G we have f(x) = x{a}. So, using Fourier’s inversion formula,
we
only if {xv,xv) =1 obtain

lo=e (mod N} = fi’j Effl)x(fl),


3) If g.h € G, then 2‘,€5 xv{gdxv(h) is equal to the cafdzinality of the
X
centralizer of g in G if g,h are conjugate in G and it is equal fo 0
otherwise. the sum being taken over all Dirichlet characters mod N. This relation
holds
for all n prime to N and plays a crucial role in the proof of the famous
The conjugacy class of an clement g € G is {hgh™ "k € G}. Dirichlet’s theorem, to be discussed in the next section.
318 Chapter 7. Complez Combinatorics 7.A. Finite Fourier Analysis 319

Gauss sums and Fourier coefficients of Dirichlet characters and the result follows from {x(a)] = 1.
To any Dirichlet character x mod N we attached an N-periodic function 2) Write N = dv and @ = du with d > 1 and ged(u,v) = 1. Let
on Z, defined by x(n) = lgqtm et - X(n). Any N-periodic function on Z
induces a map on Z/NZ and we can look at its Fourier coefficients with respect
to this finite abelian group. As we have already seen, the characters of Z/NZ
are identified with Z/NZ (we identify ¢ and the character z — 62‘?%)' Via a primitive root of unity of order v. Note that
this identification, the Fourier coefficients of a map f on Z, /NZ will be denoted

]% E f(a:)ci
R@)=5 3 e
= {mod N)
2EG
1 N-1 R

The following result gives further information about these coefficients when f ¥ 2 X0

I
comes from a Dirichlet charac 3=0
d~1y-1
Proposition 7.A.10. Let x be a Dirichlet character mod N.
= DTG+
k=07=0
ke
1) For any a relatively prime to N we have

¥(a) = x(a)%(1)- > (k mekv)) ¢.

i
J{mod v} \k(mod d)
2) If x is primitive, then R(a) = 0 whenever ged(a, N) > 1 and we have
It is thus enough to prove that

Si= 3 x(i+hv)
& (mod@)
Jor ged(a,N) = 1.

Proof. 1) Sinece x(x) = 0 whenever ged(z, N) > 1, we have vanishes for all j. Now, since x is primitive, there exists n = 1 {mod v)
such that ged(n,V) = 1 and x(n) # 1. It is easy to see that (n(j + kv)
(mod N))g (mod ) is simply a permutation of (j+kv
3 e, (mod NDi (moa a)- Thus
zel

2ir x(m)S;= 3o x(n(i k)= 3 x(G+kv) =5


where { = e7F. As ¢ - az is a permutation of G, we have k(mod d) k{mod d)

X@R@) = 1 30 xar) = - 3wl = 7(1)


ESe zE€G
and since x(n) # 1, we have S; = 0. This proves the first part of 2).
Finally, using Plancherel’s identity (theorem 7.A.5) for Z/NZ and the
320 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 321

information we have already gathered, we deduce that nality relations we can write

L Sk Np= Y Zez""(’(“‘” = flarsr)


== faz)—5)
% (mod N} ar,.amea? 520

3 R 14
:;Ze
2indy
v (Ze—T)
2izbf(a) £ 2ixbf(a]
4(26--——2., )
k

i
a(mod N)
b= acA a€A
3 axol?
e
1
e2imnse|
il
ged(a,N)=1
— (MRME, b acA

O But it is apparent in this last expression that N(j) < N(0), finishing the
from where we obtain XU(1)} == 7m . Using 13 again part 1), the result follows.
proof. i

7.A.4 Some applications The method used to prove the following result is extremely useful in ad-
ditive combinatorics.
We have developed enough theory in the previous sections to be able to
prove quite a few nontrivial results. The first one is very elementary, but tricky Theorem 7.A.12. (D.Hart, A Josevich)
and taken from {71}. The interested reader will find in loc.cit many beautiful Let ¢ be a prmm power, d a positive integer and let A C ]F" be a set with
applications of finite Fourier analysis. more than q 2 elements. Then Jor any x € Fy one can find a,b € A such that
a-b=z (here - is the standard inner pmduct in Fd2
Proposition 7.A.11. Let A be a finite set of integers and let f : A — Z/pZ
be @ map. Then for any positive integer k there exist at least J-— (2k)-tuples Proof. The idea is to express the number of solutions of the equation a-b = 2
(a1, ..., a0) € A% such that using the orthogonality relations, then analyze the error term. Let X be a
nontrivial additive character of F, and let n{z) be the number of solutions of
Flar) + flaz) +--- + flan) = flarsr) + flarsz) + - + flage) (mod p). the equation ¢ - b=z with a,b € A. The orthogonality relations yield

Proof. Let N(j) be the number of 2k-tuples (a1, ..., a) € A% such that Z Zx(c(n b-x) =
ub€4

+ fansa) + o+ flage)
+ flag) + -+ flaw) = flawpr)
flar) +§ (mod p).
where
Clearly 2,_0 N(j)= | A]**. We will prove that N(0) > N(j) for all j, which ZZZx(c(a b—z)).
will be enough to deduce the desired result. Next, note that by the orthogo- a<A bEA ceFy
322 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 323

Now, using the Cauchy-Schwarz inequality and once again the orthogonality Proof. Apply the previous theorem to the subset A x 4 x .- x A of F“. a
relations, we obtain
The following bound on character sums is a basic tool in analytic number
2 theory.
R< 'A'Z 3 wefa- b—x» Theorem 7.A.14. (Polya-Vinogradou) Let x be a primitive character modulo
agA [beA et0
N. Then for all positive integers m,n we have
‘Al5y > > xla- (b —eb))x(@(ez
— a)
a€FE b1 by€ A oy.c2€F
37 x| < VNlogh.
m<j<n
o D DI CCETID SICHCCERE)
1By €A c1,02€8 acFd Before giving the proof, let us mention that Schur proved that if y is a

=4 Y Y e — e labma: primitive character mod N, then

bridn€A o c2€Fy
1
Using the orthogonality relations and the substitution s; = &, 53 = ¢,
max
M 3 xtw) > —\/Iv .
2
Inspt i
we can write
so the Polya-Vinogradov inequality is not far from being optimal.
> Y xale - ) lan—cn Proof. Using Fourier’s inversion formula and proposition 7.A.10, we can write
b1 baeA c1caeFy
B 2ize;
Z Z Ls1bymby Z x(xsa(l - s1}) X@ = 3 RAa)e"F.
by baA a6k s2€FY {a.N)=1
= 3 (@ Dlomiy = O D lab=ty Adding this over j, using the triangle inequality and proposition 7.A.10, we
brbacA by ba€A
s #1 deduce that

<@-1 > ln=n gem | zimem


l
brbagA Y =] Y s@- S8 =
m<j<n (a,Ny=1 !
< giAl.
2
An easy convexity argument shows that sinz>Zizfr0 <z<} Applymg
Combining this with the first formula for n(z), we deduce that n(z) > 0
if |A] > q'difl, from where the result follows. [} this to = = 3¢ (respectively z = M) ifa< N (respectxvely a> ), we
deduce that
L . : 1 ~ .
Corollary 7.A.13. Let A C ¥, be a subset with more than q% 3 elements. [ x@I<VE- 3 asfilogl\
Then for any « € Fy there exist a1,...,aq € A and by,...by € A such that m<j<n a<N/2
2 = arby +agby + -+ + agha. and the result follows. a
324 Chapter 7. Complez Combinatorics 7.A. Finite Fourier Analysis 325

Here is a nice application of the previous theorem, taken from [59]. We Now, everything follows from the simple observation that if S # 0, then there
refer the reader to that paper for many refinements and further discus : exists 1 <n < T such that n% = a (mod p), while if § = 0, then

Theorem 7.A.15. (Murty) Let p be a prime and let q be o prime divisor of


1 3 o
p— 1. Let a be an integer such that =1 (mod p). Then there exists an T<"—%—1. o
integer x such that |z} < PL;W*-E and 29 = o (mod p).
If p is a prime, let ny(p) be the smallest positive integer @ such that
In [59], Murty proves that the hypothesis that ¢ is prime is not neces-
a is a quadratic non-residue mod p. It is an easy exercise to check that
sary and that we can strengthen the conclusion by asking that [z < cp*?/q
na(p) < 1+ /p, but it is much more challenging to find nontrivial bounds for
for a suitable absolute constant ¢. This requires some stronger estimates on
na{p). The next result gives such an upper bound, by combining the Polya-
character sums.
Vinogradov inequality with Mertens’ theorems.
Proof. Consider a parameter p > T > 1 and look at the number of solutions
Theorem 7.A.16. (Vinogradev) If p is a sufficiently large prime number,
of the congruence z7 (mod p) with z € {1,T]. Using the orthogonality 1
relations, we write thi then there exists 1 < a < p? log?p such that

S = Z Ina=a (mod p)
n<T
i o~ e
= 11—~f }_, x(a)x(n?) Proof. Let m = [\/Iflog2 p] and suppose that

5
n<T X {mod p)

Ex(@
— S xn
n<T

In the previous sum we will distinguish those characters x such that x?


from the others. Indeed, if x¥ = 1, then 3_,.7 x¥(n) = T and x(a) = 1 (since foralll <e<X = {pfi' lugzp]. Let N be the number of quadratic non-

1
the hypothesis on « implies that a is a gth power in E;) while if x? # 1, residues among {1,2, .,m}. By Polya-Vinogradov’s inequality
Polya-Vinogradov’s theorem gives

< Vplogp,
3 x| < vhlogp.
n<T
soN > %~ ~f logp. On the other hand, any quadratic non-residue mod p
Thus, since there are precisely ¢ characters x such that x? = 1, the previous must hav:= a prime factor greater than X. Thus
remarks yield
m 1 m
—1-gq Vologp <! N< § — .
< pp—71~\/510gp < /plogp.
X<qzm 4
326 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 327

Mertens’ theorem (theorem 3.A.5 and the remark following it) yields The proof of theorem 7.A.17 combines Fourier analysis on G = (Z/NZ)y*
and very subtle estimates of the L function of a Dirichlet character near 1. To
m logm m start with, define the complex L-function of a Dirichlet character x mod N
E — =mlog —— 4,—0(**) .
x5im 4 log X log X by (recall that x(n) = 0 for ged(n, N} > 1)

Note that ex = O(/B - logp) and Lis,x) = Z M

logm 1
5logp +2loglogp ( 1 ) As {x(n)] <1 for all n, this series converges uniformly on compact subsets of
log = I
log X f logp + 2loglogp Xlogp Re(s) > 1, so L(s, x) defines a holomorphic function in this region. Moreover,
1 1+410 !ogg 1 a simple argument going bark to Euler and using the unique factorization
= =+ log —— T“lo +O(—) theorem and the fact that 1 = Yonzo 2" for jz| < 1 shows that for Re(s) > 1
2 IRENGS Xlogp we have
1
=1 _4e-Dloglogp (1 Y L{s,x) = e
1;1 1-x(p
w—
2 logp logp
We casily deduce from this that L(s, x) does not vanish if Re(s) > 1. Moreover,
Combining these estimates yields if we choose a branch of the complex logarithm, we can write

m
oAt
5
1 5.
~gVPlgp < ATy
5 - d(ve-1m
m logl()gp
Togp T OWPlegn), log L(s,x)= Zlug(l X)) = Z
ZX@
i 7 n>1

which is not possible for p large enough. Dirichlet’s key insight was to use the Fourier transform to express the con-
a
dition that » = ¢ (mod N) in an analytic way. More precisely, muitiplying
the previous relation by x(a), summing over x and using the orthogonality
7.A.5 Dirichlet’s theorem relations, we obtain for s > 1
We will use the previous tools and a bit of complex analysis to give a 1 — 1
proof of the famous am Z x(a)log L(s, x) = z Z F
x {mod N} ? n>1
Theorem 7.A.17. Let o and N be relatively prime positive integers. For
5~ 1" we have

Sl
I


+
2
p=a (mod N) = oy s ( o+ou)
) 1 1 1
o<y > ,,,,MSZZ;.:Z,,@TT)QC-
In particular, there are infinitely many primes p = a (mod N).
p"=a(mod N)
328 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 329

The crucial point is that log L(s, x) remains bounded as s — 1% precisely we get
when x is nontrivial and that log L(s, 1) (where 1 is the trivial character) is
relatively easy to handle and yields the factor log fi If the second part is
rather easy to prove, the first part is a very deep result, equivalent to the
non-vanishing of L(s,x) at s = 1 whenever x is nontrivial. Dirichlet’s proof But for £ € [n,n + 1] we have
was very roundabout, but we have quite a few different ways to prove this
nowadays. First, let us deal with the “easy” part, which will also be important
e -n" =
¢
i
gt
—sz
™" g B
in the proof of the hard part. ’ ' - pRe(s)+1 = pl+Re(s)’

Theorem 7.A.18. L(s,x) extends to a function on Re(s) > 0, which is yielding the uniform convergence of the series
holomorphic except possibly at s = 1. If x is nontriviel, this function is holo-
morphic at s =1, but of x is trivial, we have . +1
gl(s) = Z‘/fl (n*—t~")dt
n>1v"
Tim (s — 1)L(s,1) = ]| (1 - 11;> .
sl .
PN on all compact subsets of Re(s) > 0. Thus g is holomorphic on Re(s) > 0 and
Proof. The key ingredient is Abel summation. Suppose that y is nontrivial
since {(s) = % + g{s), the result follows. a
and note that for all n we have [x(1) + x{2) + - -+ + x(n)| < N, which follows Taking into account the previous theorem and discussion, theorem 7.A.17
casily from the orthogonality relations (theorem 7.A.5). An easy computation
is a consequence of the difficult
shows that
A (A1) = s T O, Theorem 7.A.19. If x is nontrivial, then L(1,X) # 0, 50 log L{s, x) remains
bounded for s — 1%.

.
which is uniform for s in compact sets, Thus the series
Proof. We saw that for all s > 1 we have
S +xX@ 4+ () (27— (1))
n>1
converges uniformly on compact subsets of Re(s) > 0. Moreover, by Abel
x{mod N} ? n>
summation, the sum of the series is L{s, x) if Re(s) > 1, which yields the
holomorphic extension of L(s, x) to Re(s) > 0.
On the other hand, if x is trivial, the inclusion-exclusion principle yields so by taking a = 1 we obtain

Lo =]1PN (1 - pi) o =Y I L=t


nzl x (mod N)

Since But by the previous theorem all L(s,x) with x nontrivial are holomorphic at
a1 1 1)is . pl=s s = 1 and L(s,1) has a simple pole at s = 1. Combining this observation
/n (e —t70)dt = —7 + (7s—1 on - with the previous inequality, we deduce that there is at most one nontrivial
330 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 331

character x such that L(1,x) = 0 (otherwise the product of L(s,x) would (bn(2))n is nondecreasing, as one easily checks using the AM-GM inequality
vanish for s —+ 1), Assume that x is such a character, then clearly that

L(1,%) =0, b (x) = bns1(z)


1 ( 1 z"
90 that we must have x = ¥, that is x takes only values +1 and 0. Thus, it 1-z\n(n+1) (]+a:+~--+z"’1)(1+1+~«-+x"))
remains to prove that L(1,x) s 0 whenever x is a nontrivial real character.
We will present Paul Monsky's elementary proof from [54]. is nonnegative. Next, using Abel’s summation formula, the monotonicity of
Consider the function the bn(z) and the fact that | 31, x(i)| are bounded, it is easy to see that f
is bounded. But this contradicts the resuit of the previous paragraph, ending

@)= xtn the proof of Dirichlet’s theorem. a


n>1 Once we know that L(1,x) # 0 for all nontrivial characters X, it is a
natural question to ask how far it is from being zero. If we look carefully at
defined for z € [0,1) (the series is obviously absolutely convergent for such x).
the proof of the previous theorem, we see that it gives L(1, x) > 0 for any
We claim that f is unbounded as z — 1. Indeed, we can write
nontrivial real Dirichlet character. The following deep theorem gives much
more. The proof is much more involved:

f@ = xm Y=Y (Z x@ | am, Theorem 7.A.20. (Siegel) For any e > O there exists c{e) > 0 such that
a1 i=1 n21 \dn L{l,x) > ‘N—? for any real primitive Dirichlet character modulo N.
all manipulations of the series being justified by the absolute convergence. Let
Oy = Zd,n x{d). If p divides N, then ¢ = 1forall k > 1, as x(p) = 0. Also, it 7.A.6 A useful consequence
is easy to see that Cmp = emen for ged(m, n) = 1. An immediate computation The purpose of this section is to give an analogue of Mertens’ theorems
shows that ¢ > 0 for all primes [ and all k and using the previous observation for primes in arithmetic progressions. This uses the proof of Dirichlet’s the-
we deduce that ¢, > 0 for all n. As infinitely many c,’s are equal to 1 and orem and the standard technique of Abel summation. Recall that A is Von
all ¢, are nonnegative, E" ¢p2™ is not bounded as z — 17 and the claim is Mangoldt’s function, defined by A{n) = log p if there is a prime p and k > 1
proved. such that n = p*, and A(n) = 0 otherwise. Its usefulness in number theory
Now, assuming that L(1,x) = 0, we will prove that f is bounded as comes from the relation Zd]u A(d) = logn, which will be heavily used in the
& — 17, which will finish the proof. If proof of the following result.

1 Theorem 7.A.21. Let a,N be relatively prime positive integers. Then


bn{z) = al-2) 1
3 logp
> =_ o
loga Fow
then the hypothesis L(1,x) = 0 reduces the boundedness of f(z) as z — 1 to p<z
the boundedness of } b,{z)x(n} as = ~+ 1. The miracle is that the sequence p=a(mod N}
332 Chapter 7. Complex Combinatorics 7.A. Finite Fourier Analysis 333

Proof. Since Another Abel summation (using the fact that the partial sums 3okey x(k) are
bounded) shows that
k22 p
we have Z’” = L(1,x Z’“ L(1,X)+o(£),
A
yoler_ oy ) 4 o) i<z >z
psE p n<x We deduce that
p=a(mod N) nza(mod N}
Using the orthogonality relations, we can write

Z A(” ZX ZX(
B(@) = Fx,2)E{1,) + O (; ZA(d)) :
d<s
n<e n<x
nsa (mod N> Since by theorem 7.A.19 we have L{1, x) # 0, in order to prove that
so everything comes down to the study of
Flx,z) =0(1)
Plgzy=3" X(--lA(n).
n,
it is encugh to prove that
n<w
i
If y is trivial, Mertens’ theorern 3.A.4 yields < S Ay =00).
d<z
Flay= S 252 58P 6y gy [
o), But
pr<z v p<e P
ged{pN)=1
ZA (d) = Z logp < Zlogp—— =logr - w{z) = O(z),
Suppose now that x is nontrivial. We will prove that F{x,z) is bounded as d<z i<z p<z
T — 00, which will finish the proof of the theorem. Exploiting the relation
Ld‘n = logn, let us consider the expression using theorem 3.A.2. The result follows. [mj

E(z) = Z x{n) logn. 7.A.7 An “elementary proof” of Dirichlet’s theorem


n<z The proof of Dirichlet’s theorem that we presented used rather heavily
Since z bifi is decreasing for # > 3 and since the partial sums of the basic properties of holomorphic functions, but it turns out that the ideas used
sequence (x(n)), are bounded, Abel summation shows that £(z) = O(1). On in the proof of theorem 7.A.21 may be combined with careful estimates to
the other hand obtain an entirely “elementary” proof of Dirichlet’s theorem, ie. completely
avoiding the use of complex analysis. We will sketch such a proof in this
Bw)= 30 x(dydyd Z)A(dl): }_‘X(
— x(d1)A(d
1)A(d1) v x(da)
(d2) section, but we must emphasize that the complex analytic approach is much
d. d
wies B2 di<e U g<ea more powerful and conceptual.
334
Chapter 7. Complez Combinatories 7.A. Finite Fourier Analysis aar
335

The conclusion is that

ST P(2) = (1 - kylogz + OQ1).


X

But this contradicts the fact that k& > 2 and (again by the orthogonality
relations)

k > 2 (since if L(1,x) = 0 then


L(1,%) = 0). Either a direct com
Yo Pz =oN)-. S Aln)
=0,
a simple application of Mébi putation or X n<z
ug’ inversion formula yields the n=1 (mod N}
identity
The reader has probably
D7 () log % = Lumy - Toga 4 A(n), an “elementary”
noticed that the crucial part of this argument
version of the argument used in the beginning of the proof
was
dn
of theorem 7.A.19.
from which & standard computati
on yields

Flxz)=3Y" %@A(n)
n<e

= —logz -+ Z fl(dl).fi(_idj{).logi
x{dd: :
dida<a d
= ~logz + Z u(dy)logZ . xdy)
d;
Z
2
,X_(‘_ii)
<3 & d @S
‘. d2

The argument used in the proo


f of theorem 7.A.21 shows that
bounded if L(1, X) # 0. Assume F(x,z) is
that L{1,x) = 0. Then Abels
formula shows that pIF. 3‘-,(1@ sum mation
= O(1/z), so the previous form
ula yields

Fx,z) ~logz+ . O (51 Z IOgZi?)


z
It

di<z

~logz + O (@I%ifl‘flz
It

E
~logz + O(1).
It
Chapter 8

Formal Series Revisited

In this chapter, we discuss applications of generating functions in com-


binatorics or combinatorial number theory. This is a rather vast subject and
we will only be able to scratch its surface through some nice examples. The
idea is very simple (even though in practice things are less clear): given a
sequence (an), of complex numbers (but we may allow this sequence to take
values in any ring, in theory), one is sometimes able to extract information
about the sequence from its generating function 3~ @.X™ in an easier way
than by dealing with the sequence itself. For instance, if the sequence satisfies
a rather complicated recursive relation, it is very hard to study the sequence
directly, but quite often it turns out that its generating function satisfies some
differential equations or some regularity properties that allow us to study the
sequence. Also, in counting problems it is very often much easier to find the
generating function of the desired number of objects to count than to find di-
rectly that number. Of course, one sometimes needs quite a lot of imagination
to extract the information from the generating function, but it should be a
principle that if one knows the generating function, then one knows a lot of
things about the sequence. It is important to note that when dealing with gen-
erating functions one neglects all convergence and analytic issues. However,
once one knows the generating function, one usually uses analytic arguments
to study the sequence.
338 Chapter 8. Formal Series Revisited 8.1. Counting problems 339

Before passing to concrete problems, let us recall a few things about op- where (2) = i”;”—ng"—""—”l A very useful special case is @ = —m, where m
erations with formal series. Addition and multiplication are defined just as for is a positive integer. In this case the binomial formula becomes
polynomials. It is an easy exercise to check that a formal series has an inverse
(for multiplication) if and only if the constant term is nonzero. A more subtle
problem is the composition of formal series. Here, one has to be a bit careful,
as simple things such as ) 5—:-31): do not make sense formally. To do things
Finally, we will sometimes use the classical notation [X"]f for the coeffi-
properly, the best way is to introduce the X-adic valuation on formal series:
cient of X™ in f.
if f=ag+ay X+ is a formal series with complex coefficients (more gener-
ally, any field), let vx(f) be the least nonnegative integer n such that a, # 0.
Thus f- XX js an invertible power series and one easily checks using this 8.1 Counting problems
that vx(fg) = vx(f) + vx(g) and vx(f +g) 2 min(vx(f),vx{g)). Thus vx The first exercise is quite technical, but there is no serious difficulty in it
behaves as the p-adic valuation.
and the result is quite beautiful. Recall that if z, is a sequence of complex
Definition 8.1, Say a sequence of formal series f, converges towards a formal numbers, an equivalent for it is a sequence ¥, in closed form such that 2
series f if vx(f — fn) tends to oc. If f =ag+a;X + -+, this means that for converges to 1. -
all 4, the coefficient of X¢ in £, is a; for all sufficiently large n. One says that
F =Y 0s0 Fas respectively f =[], fn if the sequence (fo+ fi + -+ faln 1. Let ay,as,...,a, be relatively prime positive integers. Find an equiv-
(respectively (fofy -+ fn)n) converges to f. alent as k& — oo for the number of positive integral solutions of the
equation a;z; +agTs + - + anzy = k.
Tt is an easy exercise for the reader to check that 3, -, fa converges to a
formal series if and only if vx(fx) tends to infinity (the analogous result holds Proof. The generating function of the sequence y;, the number of positive
for p-adic numbers). Also, if f, are formal series such that f,(0) = 0, then integral solutions of the equation ayz1 + aszs + ... + @z, =k, is
Iaso{1+ fu) converges if and only if ux (f.) tends to co. We can now explain
the composition of two formal series. Assume that f,g are formal series such F(X) =3 wX*
that g(0) = 0 and f = ag+ a; X + apX* + .. The composition f o g is then =S
by definition the formal series = 3 xmetotes
fog=ao+amg+axg+---. T, 22, 21

The series converges, because vx{g") > n. All other operations on formal REDIP ) B By Pt
series (such as differentiation, integration) do not involve any difficulty and
121 Fn21
have the properties that we imagine.
Xo
Before passing to problems, let us recall the following useful extension of
the binomial formula: for any rational number o we have X

a+xe=3 (i)x" This is a rational function and in order to analyze sequence y; we will
n20 decompose it into simpler pieces. Namely, if 1 = 21,2),..., 2, are the distinet
340 Chapter 8. Formal Series Revisited 8.1. Counting problems 341

roots of the polynomial JJiu,(1 — X%), with multiplicities my, ma,...,mr, The following problem is a bit trickier, but it shows how formal series in
then by general theory there exist constants Cj; such that several variables appear quite naturaily.

rom Ly
2. For positive integers m and n, let f (m, n) denote the number of n-tuples
FX)=Con+ D3 s (1,22,..., 2n) of integers such that |z1| + |za] + --- + |2,] < m. Show
=1 g (X - =Y
that f (m,n)= f (n,m).
Using the binomial formula, we obtain
Putnam 2005
1 _ X\~ _ efi+k=1\ &
ey
®=ay (1-3)% T m eyRPN
T . Proof. We will use a two-variable generating function in this problem:
the convention f(m,0) = f(0,n) = 1, we have the chain of equalities
with

Inserting this in the formula for f and re-arranging terms yields


FXY)= 3 fmmX™y"= 3 X" 3
mn20 mn20 k|- +lkn{<rm
T 3 3
i=1 ji
N
_ i+ k-
1) :Zy,, X|h|+“l-zlyn
Hk . lekl)"

n>0 kisekn
€L €Z
_ZL( 1Yz‘(kw) ; oktg 1)
" 1 1+X\"
=1 g=1
—X) - 1—xz(y' l-X)
n20
‘We claim that the dominant term in the previous sum corresponds to
i=1and j = my = n. First, note that m; < n for all ¢ # 1. Indeed, each of SI-X
v —xv
X% —1 has simple roots, so the only possibility for m; > n would be that z is
a oot of all X% — 1, thus also of X —1 and so i = 1. Thus the contribution to Since F(X,Y) = F(Y, X), it is clear that f(m,n) = f(n,m) for all m,n.
i of all terms with ¢ # 1 is dominated by k"2 for some constant c. A similar a
argument shows that the contribution of the terms with i = 1 and j < n is
also dominated by a constant times k"2, Thus the main contribution is that 3. Forq =3and AC{1,2,...,n}, say Ais even if the sum of the elements
of the term with ¢ = 1 and j = n, which is (("—jl%(lc+ 1) (k+n—1)Cn. To of A is an even number. Otherwise, we say that A is odd. By convention,
find Cy, note that the empty set is even.

a) Find the number of even, respectively odd subsets of {1,2,...,n}.


Cun wm== lim0 F@)(e
(@)@
— 1) == (-(1) ]tim [T11—‘1“»‘_a1a
A2 = L
= b) Find the sum of the elements of the even, respectively odd subsets
of {1,2,...,n}.
Combining the previous observations yields the equivalent Zfi“—% for yg.-
a Romanian TST 1994
342 Chapter 8. Formal Series Revisited 8.1. Counting problems 343

Proof. The generating funcf:ion for the sums of the elements of the subsets of for even n. By induction, we deduce that @, = b, for all n and then solving
{1,2,...,n} is [Ti (1 + X¢), because of the obvious identity the previous recursive relation (which becomes a, = 2a,-; +7n- 2"‘2} yields
n a, = 2"3n(n +1).
TTa+x9 z XA, ‘We continue with a very nice problem, though quite simple.
m]
4. How many polynomials P with coefficients 0, 1, 2, or 3 satisfy P(2) = n,
where m(A) = 37 . a. Let E(n), respectively O(n) be the sets of even, where 7 is a given positive integer?
respectively odd subsets of {1,2,...,n}. Taking X = —1 in the previous
Romanian TST 1994
identity yields 0 = |E(n)] —[O(n)|. Since we clearly have |E(n)|+[0(n)} = 27,
we deduce that the number of odd, respectively even subsets is 2°~1. To answer Proof. Let a, be the number of such polynomials. Then a, is also the number
the second question, we differentiate the identity, to get of solutions of the equation zg+2z)+ - -+zx2* = n in integers z; € {0,1,2.3},
n for varying k. Thus, the generating function is
YT I+ X9 = 3 mayxma, Sanxm = T (14 X% 4 X224 X3
=] G A
n0 k20
Taking X = —1 yields
This is also equal to
3 omiay= 3 m(a). 1-X"
ont2
1-xt 1-x8% 1-X'%
AEO(n) A€E{n)
=X ~1-X 1-X2 1-%x¢
n>0
On the other hand, taking X = 1 gives
which simplifies drastically to
S om@A+ Y om n(n+1)2"2
A€O(m) A€E(n) pOTI
720
SNSX)a-x7
We deduce that the answer to the second question is n{n + 1)2"2 for both
Now, we can decompose the last rational fraction in simple elements, following
quantities involved. o
the standard procedure. A simple computation yields
Remark 8.2. Here is an alternative proof for the second part. 1 1/ 1 1
Ifa, = ZAEO(") m(A) and by = 3 4c gy m(A4), then (1—X)(1—X2)w;(l—X+1+X)+2(1—X)2‘
G = Gt +bpo1 + 122 By =g+ Gpey + 0272 Expanding this once more, we deduce that the answer is 'L%J +1.
Note that we could have avoided the simple elements decomposition, be-
for 1 odd, as the odd subsets of {1,2,...,n} are either odd subsets of
cause )f] X7 is simply the generating function for the number of ways
{1,2,...,n 1} or the union of {n} and of an even subset of {1,2,...,n—1}.
A similar analysis shows that to express 7 as a + 2b, where a, b are nonnegative integers. There are | 2] +1
possible choices for b, each of which leaves one choice for a. So there are
G == 2y 41 272 by = 2b, gy 4 202 [3] + 1 ways to express n as a + 2b and the conclusion follows. =]
344 Chapter 8. Formal Series Revisited 8.1. Counting problems 345

Remark 8.3. Here is another nice solution: if P(X) =ag+aX +---+ apX® Now,
satisfies P(2) = n, define

IR
ao ay
E I R
L | %k
A
k (B1/2) S
rra4R = =y() , TR
1.3....(2n-3)
=3 T )
gyyrgn AT2/2n
2 (B0-2
We obtain a map f from the set of polynomials P as in the statement of the and so, using the previous relation yields a, = rl. 2':‘:1 . 0
problem, to values in {0,1,...,[%]}. Tt is easy to check that this map is a
bijection. {76. Let F(n) be the number of functions f : {1,2,...,n} — {1,2,...,n}
In the next two problems, one combines an easy combinatorial argument with the property that if ¢ is in the range of f, then so is j, for all j < i.
with a generating functions argument. Such mixtures appear very often in Prove that
kn
combinatorial problems and in this case generating functions do the dirty
work of solving quite complicated recursive relations. Let us start with an
Fin) = Z T
k>0
absolute classic,
L. Lovasz, Miklos Schweitzer Competition
5. In how many different ways can we parenthesize a non-associative prod-
uet zyze o 2R? Proof. The key point to obtain a recursive relation for the sequence F(n) is to
Catalan Fook at [F7H (1)) If [£71(1)] = j, then the j elements of f~1(1) can be chosen
in (’]’) ways and f can be defined in F(n— ) ways on the remaining elements.
Proof. Let a,, be the desired answer. Note that in a product of &, respectively
7 — k factors, we can put parentheses in ag, respectively an_x ways. Looking
Thus, there are (;’) F(n — j) maps f satisfying the property in the statement
at the position at which the first parenthesis ends, we deduce the recursive of the problem and for which |f~(1)} = j. Summing over all possible values
relation a; = 1 and an = Ezj axln_k- of 4, we cover all functions f satisfying the property in the statement, so
Next, define f(X) = 3,5, anX™ and observe that the recursive relation L. el
implies the chain of equalities
n-1
Fw =3=N(5)rw-0-3= (1)ro.
Fx)? = X2 .+.Z (Zakfln‘—k) X" = f(X)~
X,
n23 \k=1 Here we took by convention F(0) = 1. Considering the exponential generating
which implies (taking into account that f(0) = 0) that function f{X) =372, ESQX ™, the previous relation yields

f(X)x%_lU‘{, Fit X)=


) 1+(e*X _- 1)f(X)
= f(X) -1
T
101 1
=§7§(1~4X)2 Next, we can write ;

11 1/2
=
2 2"220
S (=1
(u>
4", L
100=3w
_1 11
=33 il

)
/‘Z'!
346 Chapter 8. Formal Series Revisited 8.1. Counting problems 347

Expanding now On the other hand, the unique factorization of monic polynomials into
(nXx)* products of irreducible monic polynomials yields
Tt
P = [0+ xoesh
4 x2doet 1
and identifying coefficients in the previous equality yields the )((iesired for- “):Hl_xdcgh’
mula for F(n). Note! that we cheated a bit, since EnzoE;T does not A
converge X adically, but this can be easily fixed: consider the function the product being taken over the irreducible monic polynomials h. Taking the
f(z) = ~~rlz", defined in a neighborhood of 0 in C. This sLnes con- formal logarithm yiclds
verges absolutely and the previous computations show that f(2)= ;1e,, if 2
is close enough to 0. But then we can expand 1
log Zlo@,
Xdegh ZNlonl<
1 ene
PIES
n20
The desired formula is easily obtained from this equality and the classical
expansion
where this time the series converges in C. Expanding €™, collecting terms log——=)
log 1 —.
3 a
and identifying coefficients yields the result. [}

Hemark 8.4. Using Mébius® inversion formula and the result of the previous
We end this section with two more challenging problems. The first one is
problem, we obtain
a very classical result in the theory of finite fields.
1
Ne= =3 uldpi.E
7. Let N, be the number of irreducible monic polynomials of degree n with din
coefficients in Z/pZ. Then for all n we have Pdn ANg = p" It is fairly easy to see from here that N, > 0, so there exists at least one
irreducible polynomial of degree n over F,. This result is absolutely not trivial.
Proof. Write IF, = Z/pZ and consider the generating function There is also an arithmetic solution of the previous problem, the idea being
to prove the stronger result
Fa= 3 xiel H F=Xx7"
seR[x]
FeRp(X],
deg fin
the swn being taken over monic polynomials f € Fy[X]. As there are p™ monic
polynomials of degree n with coefficients in F,, we have where the product is taken only over those irreducible monic polynomials
f € Fp{X] whose degree divides n.
oS P> o 8. Let z and y be noncommutative variables. Express in terms of n the
constant term of the expression (z +y + 21 + 3y~ 1)
We thank Richard Stong for pomtmg this out. M. Haiman, D. Richman, AMM 6458
348 Chapter 8. Formal Series Revisited 8.2. Proving identities using generating functions 349

Proof. Note that variables cancel in variable/inverse pairs so the constant term (2s+1) 1(2s+2) 2m 2m+1 2m
== and = -
is zero for n odd. Let Gy be the number of products ujuy - - - un, where each 5 2\s+1 m—1 m (m)7
u; is one of {z,y,z~},y7!} and after cancellation we are left with a word of we can write this as
length m. Note that ag, is the desired constant term. By convention we set
a_y,n = 0. Starting from a word of length m > 0 there are three ways we
1 1 ( 1 1-6T 1Y o
can add one more term on the right and produce a word of length m + 1 and 6rvi-tr o \vi—vr istvi—tr T 1er) T
one way we can add a cancelling term and produce a word of length m — 1.
Solving for a(T’) and simplifying gives
Therefore we have
“ _ [30main t Gmin mFL a(T)
_ 3 _AI-1T-1
Tkl dagn + a2 m=1 1+2/1-12F 1-16T
Letting Ay = Y n_oGmxX™ we can rewrite this as Extracting the coefficient of 7" using the binomial formula gives

Any1 = (3X + XV An + agn(X ~ X1, . _ 1/2


o,2r =2 ; 212 (G >0 *( ) 2%
This is a first order linear difference equation in A, and it can be solved by
.
standard techniques to give
— odr 28r—ki+23k rof 2
n—1 =2 _ZT(k—l)'
k=1
An=@X+ X743 agpomer (X = X7HEX + X",
=g

By definition it is clear that A, is a polynomial in X, therefore the coefficient


of any negative power of X in this series must be zero. In particular, setting 8.2 Proving identities using generating functions
n =25+ 1 and looking at the coefficient of X~ gives
Generating functions are a very powerful method for proving combinato-

() = oo [ (7)
g9 25+ 1 . %
m=0
m 2m _ am~1
()]
2m rial identities. Namely, we compute the generating functions of both sides of
the identity we are given and we prove that they are the same. Here are a few
examples.
Forming generating functions of this identity gives
o o0 oo 9. Prove that for all positive integers n,
Egs( 2541
st5 )]v 3 [ m( 2mm) -3*“"( m-1
2
m )]W«Zuozfl”.
§ n
5=0 =0 r=0 n+k— 1)
>
= ( 2k—1
= Fon,

G
Let a(T) = 3.2 ag 2 T". Recognizing the other sums via
where F}, is the Fibonacci sequence (with R =F =1).

ma0 Iranian Olympiad 2008


350 Chapter 8. Formal Series Revisited 8.2. Proving identities using generating functions
351

Proof. The generating function of the left-hand side is Proof. Let f(n, k) be the desired sum of products and conside
r the generating
n function
an.z("{ +k-1
)zzzxn( n+k-—1
)
not PANEL k>1nzk 2%k -1 9<X):Zf(n,k)x":z Z ajaz---ap X"
n>0 n20ar+tag=n
On the other hand, we bave
k
nfr+k—-1\ _ ok n+2k -1\ 0 ok . X)2% = 3 aXme... akxflnz(zixf)
ZX<2k—1 "X;:) 2% —1 A= XA =27
by the binomial formula.
So the generating function of the left-hand side is ~ () =x0-0
k(Y oy, X Expanding (1 - X) ™ thanks to the binomial formula and using the previous
ZX - X?-3X+1 relation, we deduce that
k21
It remains to compute the generating function of the sequence Fa,. This is
very easy, since we know that F, = ’”I{um, where z,y are the roots of the s = () = ("R,
equation ¢ — ¢ — 1 = 0. Thus
On the other hand, it is easy to check that
22X _ X
1—22X 1-92X n(n? - 12)(n? —--22)--~(n’—(k—1)7)_ n+k—1
Zk—1)! ‘( 2k —1 )
from where the result follows.
(-1 —22X)(1 - X)’ )
Since ¢+ y = 1,y = —1, we easily deduce that
Remark 8.5. Here are a few other such identities that can be easily
proved
(1-2®X)(1 - y*X) = X2 ~3X +1 using generating functions:

and the result follows. =] a) Zalflwmw‘c:n @arag---ax = Fy,, where the sum is taken over all
or-
dered partitions of n and F, is the nth Fibonacci number.
10. Let n and k be positive integers. For any sequence of nonnegative in-
tegers (a1,aq,...,ax) adding up to n, compute the product ajag - - a. b) Zm-bafi»‘"éuk:n(gm TenEeetog.... (2%
Prove that the sum of all these products is —1) = Fpp.
We continue with a very nice combinatorial identity,
n(n? ~ 12)(n? - 22) ... (0? ~ (k - 1)?) for which we give
two proofs: a natural one using generating functions
k-1 combinatorial one.
and a more subtle, purely
352 Chapter 8. Formal Series Revisited 8.2, Proving identities using generating functions 353

11. Let m,n be positive integers with m > n, and let S be the set of all Multiplying this by 1 — ¢X and taking X — % yields the expression of A; and
sequences of positive integers (1, az, ..., an) such that @y +ag+- - +a, = a trivial computation shows that A, = (~1)"7(7)i" [n]
m. Show that
n
Y mmean
a1942 | pn =3y1yt () ka im Proof. Define k = m ~ n and let T be the set of sequences of nonnegative
integers (by,b2,...,b,) such that by + by 4+ --- + b, = k. The substitution
{a1,.4an)ES i=1
bi = a; — 1 transforms the desired identity into
Palmer Mebane, USA TST 2010

Proof. The solution using generating functions is rather straightforward. In- nY 1o = i(—l)"’jj*‘*"(;).
deed, note that = =1
ZX"L( S e an) 3 xmER)®. (nx) To prove this, we will count in two ways the colorings of & + n objects with n

It
m>n @b ek aanzt colors such that each color is used at least once.
The first method of counting is to line up the objects in some order and
to consider the first appearance of each color. Suppose object ¢; is the first
appearance of the ith color (in order of occurrence). Let by = 31 — ¢ — 1
(with ¢z41 = n + & + 1) be the number of objects between ¢; and ¢;31. Any
choice of (b1,ba,...,b,) with by + by + -+ + b, = k also gives a valid choice
of the ¢;’s via ¢; = i + E =1 b;. Now for the b; objects in between the first
On the other hand, we have
appearance of color i and color i+ 1, there are i ways to color each one since

X (Z 1)""( ) m) = i( 1)"71@) S x)
only i colors have appeared so far. Therefore, for each choice of (by, by, ... by)
>
mzn =] mzn
the number of ways is 122%2...00 Summing over all possible cases and
taking into account that the order the colors appear in can be rearranged in

-y ()i n! ways, we get n! 35 191252... nP ways to color our objects.


On the other hand, there are 7#*+® ways to color k + n objects with n
Thus, it is enough to prove that colors and there are (,”,)(n — 1) ways to do the coloring with 7 — 1 of
n N the n colors, (,",)(n — 2)**" ways with at most n — 2 colors and so on. A
1
ST E oz SO (1 D
ka3
standard inclusion exclusion argument shows that the number of admissible
-(1-nX) Zl:( ) (z) 1—iX colorings is
But the theory of simple fractions decomposition shows that there exist
A1, Ag, ...,Ay such that <Z>nk+n, (nfi])(n~1)k+n (1) 2( )2,‘M+( - ( )

n} A
-X)0-2X)
- (1-nX) & 1-iX and we are done. [m]
354 Chapter 8. Formal Series Revisited 8.8. Recurrence relations 355

8.3 Recurrence relations Explicitly finding P, might be tedious, however we do not need to do so since
we only care about when B, = {0} or equivalently P,(X) =1 or Q(T)=1.
Generating functions are an extremely powerful tool to deal with the It is easy to see from the formula above that this occurs if and only if n is
complicated recurrence relations that appear quite often in enumerative com- a power of 2. More explicitly, from Legendre’s formula it follows that the
binatorics. The reader is warned that the problems in this section are rather smallest & > 0 for which (}) is odd is k = 22(%), Therefore Q,(T) has degree
technical and difficult.
n — 2% as a polynomial in T and Po(X} has degree %(n - 2"2("’) as a

|
polynomial in X. Therefore Q,(T) =1 if and only if n is a power of 2. m]
12. Let A; =@, By = {0} and
Proof. As above, we consider the sequence of polynomials defined by Pp =
Apsr = {1+2] 2 € B}, Bapr = (Ag \ Ba) U (Ba \ An).
i
Py =1and
Find all positive integers n such that B, = {0}. PalX) = Paca(X) + XPosg(X)
Chinese Olympiad and we observe that, modulo 2, the coefficient of X* in P,(X) is simply 1p,.(k}.
We consider the generating function P(X,Y) =3 o 0 Pa(X)Y™ and observe
Proof. Using the relations given in the statement of the problem, it is imme- that
diate to check that
(1-Y = XYHP(XY) = Ao(X) + (A(X) - R(X))Y
LB (k) = 15, (k) + 18, 4 (k— 1) (mod 2),
where 14(z) = 1if 2 € A and O otherwise. This relation suggests considering + Y (PalX) ~ Paci(X) = X Paa XY™ =Y,
=2
the sequence of polynomials defined by
so we get
P=0, P=1, Pu(X)=PFa(X)+XPuoa(X)
. Y S—
Looking at the two recursive relations, it is clear that, modulo 2, the coefficient PAY) 1-Y-Xy?
of X* in P,(X) is simply 1g, (k). To solve this recursion, it is convenient to o
introduce a new variable T and set X = 7 + 7% To avoid confusion let =3 Y™+ xy)m
Qn(T) = Po(T + T?). Then this relation becomes m=0
o m
- Z Z ("") Xiymei+l
Qn(T) = Qn—s(T) + T (1 + T)Qna(T).
m=0j=0 N
This relation is easy to solve mod 2 giving o n-j—-1
=ZZ( ’ )X’Y".
Qu(T) = (T+ 1) +T" € F[T). a=0 j J

It is obvious either from the original recursion or because Qn(T) = Qn(T +1) Thus the problem is reduced to finding all n such that ("‘j ‘l) is even for
(mod 2), that Qn(T) can actually be written mod 2 as a polynomial P, (T+T?). alln > j > 0. We will prove that this happens if and only if 7 is a power of 2.
356 Chapter 8. Formal Series Revisited 8.3, Recurrence relations 357

Consider the representation of n in the form 02" where o is an odd number. Replacing these expressions in the previous equality and collecting similar
If n is not a power of 2, then o > 3 and we have ("’2?1’1) is odd. If nis terms, we end up with the differential equation
a power of 2, then we need to prove that (™ “j 1) is even mo matter which j
FOX —2X% ~3X%) + f(X)(2-3X - 3X%) —-2=0.
we choose. Using the Legendre formula we are done if we can find an m for
which Ll'%lm-ij > LL?'J“;IJ + ‘i?mJ ‘We can choose one more than the binary Now comes the technical part, which we will skip: solving this differential
logarithm of the highest power of 2 that divides j. Thus the conditions are equation. There are standard methods to solve this, but unfortunately when
that = is a power of 2. a one uses them in this case, one obtains rather horrendous expressions. Thus,
we leave to the reader to convince himself that the resolution of this equation
The following problem is very technical and its solution is too. But these yields
kind of problems appear quite often in real life and we think it is rather -X-v1-2X-3Xx2
important to be able to deal with them. 2X? )
And now? It is absolutely not clear that the coefficients in the Taylor expan-
9 13. Suppose that ap = a; = 1 and (n + 3)ansy = (2n + 3)an + 3nap_ for
sion of f are integers! The tricky point is to write
n 2 1. Prove that all terms of this sequence are integers.
KéMaL (1-X—2X%f(X))*=1-2X —3X?
Proof. The first step is to consider the generating function =1+ (X — DAX) + X2AXP =0
fX) =3 aX™ And now we are saved, because if we identify the coefficients in the previous
nz0 relation, we obtain the following recursive relation
n
Multiplying by X™ the recursive relation and adding these relations yields
Gpt2 = Qi + Zukan—k-
Z(n + B)an
1 X" = Z(Qn + 3)an X" + Efma,,,lX". k=0
n2l n>1 n>1 And since the first terms are integers, the previous relation shows inductively
Now, since f'(X) = Y, nan X1, it is very easy to express each of the that all terms of the sequence are integers. Another elegant way, found by
previous sums in terms of f and f’. More precisely, a straightforward compu- Richard Stong, is to note that
tation yields
1-X 4X2

Yo+ B X7 = F(X) + o (f(X) 1) -3, f<X)‘W(1’ 1'@)


n2l _i 1 (Zk) X%
S @n+3)anX" = 2X f/(X) + 3£(X) - 3 and S k+1\k ) A= X5
nzi

Lz e ()
o [ln/2]
3 S 1 X" = 3XF(X) +3X2/(X).
n2l n=0 { k=0
358 Chapter 8. Formal Series Revisited 8.3. Recurrence relations 359

and that iy (%) = () — () is an integer (this is the famous Catalan Proof. Cousidering the generating functions
number). We leave as a challenge to the reader to prove directly from the
recursive relation that AX) = Za..X", B(X) = Ebn)(",
n n22 n22
Qn42 = Oni1 + }:Gk%-k the recursive relation can also be written in the form
ko)
A(X) = XB'(X) + A(X)B(X),
or that
av%:m 1 (2% (n from where we obtain the fundamental identity
M RETINR N2k XB'(X) d
AX) = B~ X los(1 - BLX)).
He will probably appreciate the power of generating functions (as far as we
know, the proofs by induction are hideous, to say the least...). [m} Now, we have the following very useful result:

Lemma 8.7. Any f € Z[[X]] with constant term 1 can be written in the form
Remark 8.6. The numbers appearing in the previous problem are called
Motzkin numbers and they have nice combinatorial interpretations. Here is
one of them: a Motzkin path is a lattice path from (0,0) to (n,0) with steps
(1,0), (1,1) and (1, ~1), never going below the z-axis. Then a, is the number
r=T10-ax)™
=1
of Motzkin paths of length n. This is a beautiful and not obvious exercise that
with a; € Z.
we leave to the reader. Another good exercise is to prove that g, is also the
number of paths on N with n steps, each step being —1,0 or 1, starting and Proof. Write
ending at 0. To make everything precise, let us recall that if A is a subset of
FXO=1+AX+£X7
5.
Z™, then a lattice path of length ! from z € Z" to y € Z", with steps in A is
a sequence vg = & +.-.,u =y of elements of Z" such that v; —v;_, € A for for some integers f;. Looking at the coefficient of X we obtain
that a; = f;.
all 4. In general, we find a, in terms of ay, ..., an-1 by imposing the
condition that

‘We give three different sclutions for the following beautiful problem. The (I-a1X)---(1-a, X")f(X)=1 (mod X™).
||
first two proofs are a bit technical, but quite natural. The third one is very
short and elegant, but not very natural. This expresses a,, as a polynomial with integer céeflicients ina;,..
.,a, ;1 and
iy, fn, from where the conclusion follows immediately by induction.
: (’14. Consider (bn)n>1 a sequence of integers such that b = 0 and define
Using this result, let us write
3

a3 = 0 and @y, = 1by + @by + -+ - + Gp1by for all n > 2. Prove that
plap for any prime number p.

KoMal 1-500 = [T -axy i=1


. q
bi=taor
- "M
360 Chapter 8. Formal Series Revisited 8.4. Additive properties =2 bm RN 453; L‘M-i o 381

with ¢; € Z. Then we deduce that

A(X) = Zx log{1 — ¢; X) ia’)‘”*i (baX?


+ by X3 4 ... )t
izl & i _: i :
Z ic; X*
1—X* Looking at the coefficients of X? in both sides shows that E‘L is the coefficient
of XP in LL il (I”XM. Since the denominator of this coefficient. is
Z(ic,X’ X ).
clearly relatxvely prime to p, it follows that pla,. ]
21

Since ap is the coefficient of XP in A(X), the only contribution comes from Proof. Let 21, ¥2, ..., Tp be the roots of the polynomial
the terms with ¢ == 1 and ¢ = p and since the contribution for ¢ = p is clearly
a multiple of p, it is enough to check that ¢; = (. But this is clear, since XP 4 B XP 4 b XP2 4 by XP P by,
1~ B(X)=1 (mod X?). o
Comparing the identities a; = b; and a,, = nb, +arb,_1 +--- +ay_1by for all
Proof. Let us modify the definitions of the generating functions a bit, by n > 2 with Newton’s identities, we easily deduce that
imposing different initial terms. Namely, define ag = ay = 0,bp = —1,b; =0
and 7a,':z’i+x§+---+z;
oo o )
=Y aX BX)=Y -hX" for every¢ € {1,2,...,p}. On the other hand,b; = 0 implies that
im0 =
Then the recursive relation satisfied by the sequences implies that T+7, =0

AX)B(X) = -XB'(X), The desired result follows then from corollary 9.15. [m]

50 that
—AX) _ B(X) 8.4 Additive properties
X BX)
‘When studying additive properties of sets A C Z, it is very useful to
Integrating both sides we get
consider the generating function f = Ene 4 X°. For instance, the square of f
* 2
encodes the number of solutions to the equation a+b = n, with a.be A This
X =log (1— (X + 55X +--1)). rather innocent-looking observation yields quite a lot of nontrivial results and
the purpose of this section is to present a few of them.
- Quite often, it is more convenient to reduce the generating function mod-
Since
ulo suitable primes, as this simplifies a lot the computations: it is a very
log(l — X) = -X—-Q— R
fortunate feature of Fy, that (1+ X)P = 1 + X? in F,[X].
362 Chapter 8. Formal Series Revisited 8.4. Additive properties 363

T15. Let A be a finite set of nonnegative integers. Define a sequence of sets Suppose that this is not the case and note that the partition hypothesis yields
by: Ag = A and for all n > 0, an integer « is in A,y if and only if an identity of formal series
exactly one of the integers a — 1 and a is in Ay. Prove that for infinitely R n 5
many positive integers k, Ag is the union of 4 with the set of numbers
of the form k + a with a € A, TTx L i=1 X
420 ixe
i=1
Putnam Competition 2000 However, the right-hand side has a pole at a primitive a® root of unity, while
the left-hand side definitely does not have such a pole. [}
Proof. The key point is to note that the definition of An.1 in terms of A, can
be expressed algebraically by The following problem is much trickier.
V17
3oxt=04+%)
3 xe Letpbea prime and let n > p and ay.as,...,a, be integers. Define
a€Angy e€An
fo = 1and fi the number of subsets B C {1,2,...,n} having k elements
and such that p divides ¥, g a;. Show that fo— fi + fo—---+ (-1 fn
for all n, the equality being in Fo[X]. We deduce that is a multiple of p.
Saint Petersburg 2003
S xr=qaxnyoxe
a€ln acd Proof. Adding to all of the a;’s & suitable large multiple of p (which does
not affect the hypothesis or the conclusion), we may assume that the a;’s are
for all n. On the other hand, the condition that A, is the union of A and positive. The point is to consider the remainder of
A +n ean be also written {(when n > max 4) in the form
JX) =0 =X~ X))
(1= X*)
Sxe=0+xm3xe
a€dn atA =3 )F Y x® eF,x]
k=0 BCA
Thus, it suffices to find infinitely many n such that (1+ X)" = 1+ X" in Bi=k
FyX]. Simply take for n a power of 2 greater than max 4 and we will have modulo X? — 1, where m(B) is the sum of the elements of B. On the one
Ap = AU (A +n). 0 hand, the hypothesis n > p and the fact that 1 — X divides 1 — X% imply that
1 - X7 = (1 X)? (remember that we are working in F,[X]) divides f(X).
The following problem is an absolute classic. On the other hand, we have XV = XM (mod X7 — 1) #f N = M {mod p),
thus
16. Prove that if we partition the set of nonhegative integers into a finite
p-1 n
number of infinite arithmetic progressions, then there will be two of them
having the same common difference. fx)y= (ZH)* > 1) X7 (mod
X7 ~1).
=0 0 \k=0 |Bl=km(B)=j (mod p)
Proof. Suppose that N is partitioned into the arithmetic progressions a;N +b;, Since this polynomial is 0, it follows that its constant term is 0 in F,. But this
with a;,b; > Oand a3 < ag < -+ < a,. We will actually prove that a,_; = an. is precisely saying that p divides fo ~ fi + fo ~ -+ + (=1)" f.
=}
|,
364 Chapter 8. Formal Series Revisited 8.4. Additive properties 365

The following is also a rather tricky problem. We found it in the wonderful Proof. 1t is easy to build examples with n = 1,2, 3, and 4. Suppose n > 5 and
little book [62]. It was also proposed in a Chinese Team Selection Test in 2002. without loss of generality that a; < az < -+ < a,. Then the largest difference
must be a, — a; = (3} and since
W18. For which positive integers n can we find real numbers a1,az,..., an
such that n-1 i
an —ay = Z(‘%H —ag) > Zk = (;)
{lai~ajl | 1Si<j<n}= {12@)}7 k=1 k=1
we see that the differences agy; —ay for 1 <k < n—1 must be a permutation
Proof. Tt is clear that if a; are such numbers, then all their differences are of1,2,...,n~1. In particular, all differences of a;’s with indices two apart are
integers, thus we may actually assyme that they are integers. Let at least ». Suppose ag1; — ap = 1, then if they are present, both az,p —ag
=
L+ (aks2 — ag1) and agey — apoy = 1+ (ap — ag—1) would be at most n,
FOX) = X% 4 X% o X0, a contradiction since they are at least n and distinct. Thus the difference
so that the hypothesis can be written of 1 can only occur at one of the ends G2 — @) OF G — Gy and it must be
adjacent to the difference of 7 — 1. Since this accounts for the difference of 7
&) () X+ x—(3) all remaining differences of a;'s two apart must be at least n + 1. Therefore
FXf (%) —nt X’+ZX‘1:n—l+—)t—l
repeating the above argument shows that the difference of 2 must also oceur
i 1 =1
at one of the ends and can only be adjacent to the difference of n — 1. But
The point is to look at values of f at points on the unit circle, since for this is impossible since the ends are at least n— 1 > 4 apart. o
2] = 1 we have £ {1) = f(2) =F(z), thus f(2)f (1) = 1f(2)[* z 0. We deduce
that for any z = ¢** we have The following gem is one of our favorite problems..

-
JECLETeC 19. Find all positive integers n with the following property: for any real
z-1 - numbers ay, Gz, ...,
4y, knowing the numbers a; +aj, i < j (but not
knowing which number corresponds to which sum} determines the values
However, an easy computation shows that this is equivalent to
@1,a2, - - ., Gy, uniquely.
dn(n? — 1+-+ 1) b
I G s
n

3
;SN Selfridge and Straus
Proof. We will eventually prove that the answer is: ail positive integers but
We will take x such that (n? —n + 3= 37" to deduce that the powers of 2.
1 2(n? ~ n+41) First, let us give a nice counter-example when n = 2. Let 4; = {0,3}
7 1 > N and By = {1,2} and define inductively
S 3R Ty 3

However, it is immediate to check that the last inequality cannot hold unless A=A U@N 4By, By =B;U (@ + 4p).
n < 4. And indeed, for n < 4 such sequences exist. For n = 1,2 things are It is an amusing exercise left to the reader to check that Ay, B; have 27 elements
clear, while for n = 3 and n = 4 one can take the sequences 1,2, 4, respectively, and that
5
1,2,5,7. O {a1+aslar # az € Aj} = {by + bofby # b2 € B}
366 Chapter 8. Formal Series Revisited 8.4. Additive properties
367

for all j. Actually, 4; and B; are precisely the sets of number


s having at most inequality, any equality a; + aj = b; +b; forces
J+1 digits when written in base 2 and whose sum of digits ¢ +q; = 75 + 1 ; (indeed, we
is even (respectively have
odd). All this can be easily proved by induction and
shows that Ay, By area
counter-example for n = 2%, i+ 45 = (ri+75) = 4 — pa; + ¢; — pa; ~ (r; — pb;) — (r; - pb;)
Let us prove now that if n is not a power of 2 and
if the collections and each term has magnitude smaller than 1/4).
(@i + az)ic; and (b; + B;)ic; are identical, then the collections Hence the two collections
(a:)i and (b;); (i + g5)icj and (r; + 75)i<j are the same and so
are identical. This is the hard part. We may always (by what has already been
assume that a;,b; are done) we have an equality of polynomials
Dpositive real numbers, by adding to each of them (X — g = [T,(X —ry). This
the same large integer. can also be written as
Assume first that the a;’s and b;'s are integers and
consider the polyno- n
mials
n n H(X—rww) :Hn (X,,HM).
X =3"X% o)=Y x*. i=1 P i=1 P
i=1 =1 By taking ¢ smaller and smaller, we obtain
SeqUeNces un, v, which converge
Then the hypothesis implies the equality to 0 and such that [T/ (X —a;4u,) = 1 (X = b; +vy) for all . It is clear
that this forces [T,(X ~a;) = T (X — b;). which is the desired result. [
FIXP = F(XP) = g(X)? - g(X2).
The following alternative proof is a very elegan
If f = g, then we are done, so assume that /i = f—g t argument due to Selfridge
is not the zero polynomial. and Straus ([70]):
Write H(X) = (X ~ 1)*p(z) for some polynomial p with
p(1) # 0 and some
k21 (note that f(1) = g(1) = n). Then Proof. Assume that n is not a power of 2. Let us prove
that the knowledge of
the multiset (a; +a i )i<; uniquely determines the
symetric elementary sums
(X = D)) + 9(X)) = (X° — Dp(X?), {this in turns uniquely determines the multiset (a;);,
yielding the
desired result). Using Newton’s formulae,
which, after division by (X — 1)%, can be written as it is enough to prove that we can
recover the sums Sy = af +af + ... + af from the multis
et (a; + @5)icy, and
X)X this for every k (it would be enough to take k < n). Note
+9(X)) = (X + 1)Fp(X?). that
Teking X = 1 in this identity and dividing by p(1) ’ Z(at +a;)f = Z (@ + a;)F — 2k5,
# 0, we obtain that
n = 251 Since this is a contradiction, it follows that f
= g and the result is i 1<ij%n
- 53 (e -5,
proved for integers. It follows trivially that the result
also holds for rational
numbers (by multiplying them by a suitable positiv
e integer we can make all
of them integers). ij=11=0
In order to prove the general case, we will use Dirichl k
et’s approximation
theorem. Suppose that 7 is not a power of 2 and that the two collect
ions of
= (k)sk<,s, ~ 2k,
numbers (a; + a;)ic; and (b; + by )ic; are the same. Pick any =0 {
s < 3.
By Dirichlet’s approximation theorem, we can find integers p, ¢;,r; such
k-1
that p 5 0, |pa; — ;] < ¢ and [pb; — rif <eforall 1 <¢ =(2n-2%)8; + > (’;)sk_,s,.
< n. By the triangle
=1
S—
368 Chapter 8. Formal Series Revisited 8.4. Additive properties 369

As 2n~2F + 0 for all k, the previous relations show (by induction on k) that S Now, consider the permutation 2 — 22 of the roots of X2~ _ 1.
can be uniquely determined as a linear combination of the sums 3., ;(a; 4a]) If ..., C; are the cycles of this permutation, the irreducible factors of
and Sp, 81, ..., 8—1. This is precisely what we needed. X211 are the polynomials [Ticc,(X — 2). We deduce that the existence
of S is equivalent to: for any root z # 1 of X2*~1 — 1, there is no k such that
The last two problems of this chapter are very hard. The first one requires
= 1/z. This is equivalent to (X1 — 1, X¥**+ _ 1) = X — 1 for all £ >0
a few facts about polynomials over finite fields, for which we refer the reader
and so therefore ged(2n — 1,2 + 1) = 1 for all k > 1. Hence the least s such
to the addendum 9.A. that 2r — 1/2° — 1 is odd and writing s = 2k + 1 we are done. ]
F20. Prove that there exists a subset S of {1,2, Rather strong analytic skills are required to prove the following result,
all have an odd number of representations as z — y with z,y € S which we found in chapter III of the excellent book [62]. It is there considered
only if 2n — 1 has a multiple of the form 2 - 4* — 1. an “appetizer.”
Miklos Schweitzer Competition 21. Let A be an infinite set of positive integers. Let z, be the number of
pairs {a,b) € A x A such that @ < b and @ + b = n. Prove that the
Proof. Define f(X) = 3,4 X*7'. The fact that S satisfies the property in
sequence (2,), is not eventually constant.
the statement is equlvalent to the followmg equality in F2[X]
Donald J. Newman
XX (%) w4 X A XPR Proof. Consider the generating function f(X)= Y aca X°. Note that f(z)
converges for all [z} < 1 and z — f(z) is a continuous function on the open it
disk. Moreover, the hypothesis that z, is eventually constant is equivalent to
Indeed, the coefficient of X in f(X)f () is the number of representations of
the existence of a constant ¢ and of a polynomial P such that
a as a difference of two elements of S. Conversely, if we can find a polynomial
f € F3[X] satisfying the previous equality, we can define a set S with the
desired property simply by saying that s € § if and only if X9~ has coefficient
FEP 2 - (X% == 55
‘We will prove that this cannot happen. The idea is to look at the behavior
lin f.
of f on the real axis, close to 1 and then at its average behavior on circles of
Thus, we must find 7 for which one can find f € F2[X] satisfying the
radius tending to 1. To avoid introducing too many functions, we will write
previous relation. A first crucial remark is that 1+ X +--- + X2 has no
multiple root in the algebraic closure of Fp. Indeed, this already the case
f >> g (when f,g are positive functions on (0,1)) if there exists a constant
with X2*1 — 1, since this polynomial is relatively prime to its derivative. ¢ > 0 such that f(r) > cg(r) for all 7 in a neighborhood of 1. In particular,
Next, the roots of f are precisely the inverses of the roots of X"~ (§). We we have )Pi << 1 and since f(z?) > 0 for 0 < z < 1, we deduce that
deduce that no irreducible factor of 1+ X + -+ + X?*~2 can vanish at 7 and flay > 15 + P(z) and so f(z) >> ‘/7 So f grows quite fast on the re».l
1/z for any root z of 14+ X +--- 4+ X?=2 But conversely, if this property axis, near 1
holds, we can find such f. Indeed, we can then pair the irreducible factors of Now we integrate the relation satisfied by f on circles of radius close to
14+ X 4 -4+ X272 guch that in each pair the roots of the first polynomial
1. Using the triangle inequality, we deduce that for all 7 € (0,1)
are the inverses of the roots of the second polynomial. One can then take for 1 27 2 B

f the product of the first components of these pairs.


o /0 1£(re’®)de < % /D ] f(rze“)|dx+§g |P(2)] + cF(r),
2w
370 Chapter 8. Formal Series Revisited 8.5. Miscellaneous problems 371

where F(r) = 2%{ 02" -4z Using Parseval's identity we obtain Theorem 8.9. Let A be a set of positive integers and let r(n) be the number
of pairs (a.b) with a,b € A such that a + b =n. Suppose that for some £ > 0

o | e
Lo
T Jo
2
P =3 wEA
2
= 1), 2 we have
)
)
+r{l)+
+r(1) )
- +7r(n
1

n+1 ’C+O(n%+s)
On the other hand, Caucky-Schwarz inequality and Parseval’s identity yield for some constant C. Then C = 0.
2 {1 gom For the origin of this result and a complete proof, see [62].
52n |Jo e <o [
v 2w Jo
e pae = VI < VT,
8.5 Miscellaneous problems
Putting these remarks together, we obtain the estimate:
The solution of the following problem is quite short, but the problem is
F0?) < VFET + O+ CoF (r) actually quite tricky.
for some constants Ci,Cy > 0 independent of r. This immediately yields
22. Is it possible to partition the set of all 12-digit numbers (leading zeroes
J(r?) << L+ F{r). If we combine this with the result established in the first
are allowed) into groups of four numbers such that the mumbers in each
paragraph, we deduce that \/‘—fi << 14 F(r). It remains to prove that this
group have the same digits in 11 places and four consecutive digits in
is not the case. Note that for 0 < z <« we have the remaining place?
|1 re|? = (1~ r)? + drsin®(z/2) 2 (1~ r)? + drz?/n?, St. Petersburg Olympiad

hence Proof. The answer is negative. Assume that we found such a partition and
let A be the set of all 12-digit numbers. Consider f{X) = Yaea X5@), where
1 (" dz
s{a) is the sum of digits of a, and Iet G....,Gy be the groups appearing in
Fin = ;/O |t —re2| the partition. By the condition imposed on the structure of each group we
1 [ deduce that 37, X' (9 i5 a multiple of 1+ X + X2 + X3 for any i. Thus
®Jo Va - k
1 (2
= ilfiarcsmh (1—_ T) . I+X+ X+ X)) =3 3 xo,
=1 aeG;
1t follows that Im,_,y- 7—;-({13):5 < % and hence But we can actually compute f in a elosed form, since

1)
Xo_ 3 2
Terl
lim V1—rF(r)=0. a f(X)=(l+X+»--+x9)”:(
Remark 8.8. With basically the same techniques, but with more work, one Since this is clearly not a multiple of 1 + X + X2 + X2 (for instance, because
can prove the following beautiful theorem of Erdés and Fuchs: it does not vanish at i), the problem is solved. [m)
372 Chapter 8. Formal Series Revigited 8.5. Miscellaneous problems 373

The following problems are quite challenging. They establish congruences The following problem is similar in nature to problem 23, but more com-
using generating functions. The first one is taken from [64]. See also [77], [78], plicated.
[79] for other references and delicate congruences.
24. Let p > 3 be a prime. Prove that
23. Let p be a prime and let d € {0,1,...,p}. Prove that
p-1
p=1 2k
2k > Z (k) =0 (modp?).
§ =7 (modp), k=1
prd (lc +d
where r = p—d (mod 3), r € {—1,0,1}. David Callan, AMM 11292
H. Pan, ZW. Sun Proof. Let § = E”Z o (%), so we need to prove that § = 1 (mod p?). The
first key point is to observe that
Proof. The key point is io observe that
p7 1
% _ x5t
(k2-fd> (X2 (X+X)7k,
k o
50
thus

s=E () -G (xe5) -
-1 2k X+ 4 2;7_I
2p?
k=0 k=0 =X (=i ) xe - x)
1-Xx3
Now, since we are only interested in S (mod p), it is enough to understand 72-1
the previous rational function taken mod p. Since in Fp({X)) we have X 27

1
(X + M)_() o= (X L 4
()
The second key ingredient is the following nice

()(0) e
we deduce that S (mod p) is the coefficient of X =¥ in X=X
it il € Fy((((X)). Lemma 8.10. Forell1 <k < p2 we have
So § (mod p) is also the coefficient of X~ in
po KT EXT4L
T X+Xx 141 Proof. The left- hand side is the coefficient of X*in (1 + X)zl’z But since
WM(XP+X“P+1> ‘ {1+ X)p =14+X7 (mod p) (this follows by raising to the p-th power the
1-x
equality (1+X)? =1+ X? (mod p)), we can write
= (XP+ X4 ) sznusz&wz . (L+ X = 1+ X7 + pA(X)
nz0 nzo for some A € Z[{X|. The lemma follows then by taking the square of the
By inspection of the last product, the result follows. O previous relation and comparing the coefficients of X%, )
S——
374 Chapter 8. Formal Series Reuvisited 8.6. Notes 375

Coming back to the prouf we deduce that § — 1 is the same (mod p?} as Proof. Observe first of all that
twice the coefficient of X?*~1 in
2l N
L (2 - 17
1 X (fiz(
T"“} RS k)x 7 “,e ié?(k) T4 @2k)
=(1-x) 3 (k>X
kel PE>k21520
=(-1)*-.
o * -2 - 1)
4 (2k)T
which is precisely

2 2
= (—1)‘“(";") (mod 47,
v 4 7
s- r
1<k<p? 3k ()-.x DSk<p?-1,3|k+1 ) where n .
‘We will prove that for all nonnegative integers n we have
We need to prove | that S is a multiple of p%. Well, the good news is that
Sy =0, since if 7 = 5 , then
§
s
k=0
(3 () =
L4 2)P - 2(1+ 271 by computing the generating function of the left-hand side. We have
gtz B

On the other hand, since p* = 1 (mod 6), we have 5 (S ()0


720 \k=0 e -gor () 5 (s
k20
A4+ =142 214+ e w1z, PN n+ 2k F(2KY yr 1
‘Z( 1y ( )X ZX"( ) Z( D ( X (1T - X)%+1
k20 £20
which combined with the previous relation shows that S = 0. The result 1
follows. (]
2% X Vo -X \®
% Z(k) (’(1—)02) - l—X'(l“"a—xP)
§20
The following result is very difficult. It was conjectured by Rodrignez-
Villegas and proved in a rather difficult way by E. Mortenson. The following 14X
beautiful proof is due to R. Tauraso, taken from [83).
Combining the previous two paragraphs yields the desired result. O

25. Prove that for any p > 2 we have


8.6 Notes
-1

S e(2) =01 (2% -~


ma P
The following people provided solutions for the problems in this chapter:
==
Robin Chapman (problem 24), Prasad Chebolu (problem 14), Darij Grinberg
376 Chapter 8. Formal Series Revisited

(problem 14), Xiangyi Huang (problems 18, 22), Mitchell Lee (problems 4, 10, Addendum 8.A Lagrange’s Inversion
12), Palmer Mebane (problem 11), Greg Martin (problem 2), Fedja Nazarov
Theorem
(problem 21}, Fedor Petrov (problem 23}, Richard Stong (problems 8, 12, 18),
Qiaochu Yuan (problems 1, 6, 16), Victor Wang (problem 12), In many counting problems, we start by finding a recursive relation for
the number of objects we are trying to count, then we consider the generating
function of that sequence (or the exponential generating function, according to
the context) and establish a functional equation for it, based on the recursive
relation. For instance, when counting the number of ways to put parantheses
in a product of n terms, the associated generating function turns out to satisfy
the easy functional equation f(2) = 1+ zf(2)2. Of course, in this case one
can solve this quadratic equation and find a formula for f(z), which in turn
allows us to find the desired number of ways (which is the classical nth Catalan
number). But what if the equation was f(z) = 1+ 2f(2)°? Then surely such a
method would not work, simply because it is impossible to solve this equation
using radicals. Of course, one might argue that such an equation is unlikely
to come up in enumerative combinatorics, but this is also wrong!
The purpose of this addendum is to present a basic and very powerful
tool for dealing with such problems {and many more), the Lagrange inversion
formula. After discussing the very beautiful proof of this result, we will turn
to applications, which will hopefully show its power.

8.A.1 Statement and proof of Lagrange’s inversion formula


Before stating Lagrange’s inversion formula, let us recall a very basic
result on compositional inverses.

Proposition 8.A.1. Let K be a field and let F(T) = ;T +ayT?+- - € K{T)


be a formal series with ay # 0. Then there exists a wnique f € K{[T}] such
that F(f(T)) =T and it also satisfies f(F(T)) =T.

Prooj Let us look for solutions of the equation F(f(7))= 7 having the form
FT) =0T + 577 + -+ (it is clear that if f is a solution, then f has zero
constant term). By oompa.ring the coefficient of T on both sides, we obtain
by = “L Doing the same for the coefficient of 72 yields aby + agh?= 0
and, in general, looking at the coefficient of 7™ we obtain an equation of the
378 Chapter 8. Formal Series Revisited 8.A. Lagrange’s Inversion Theorem
379

form agby, +Grla1,a2,. .., an,b1, ..., by.1) = 0 for some polynomial G,. This 50 both terms of the equality we want to establish are zero.
already shows that if the solution exists, then it is unique. But it also shows So, assume that
k= —1. Then?
that a solution exists, since the previous equations can be-solved recursively.
In order to prove that f(F(T)) = T, observe that f has the satme property F(T) _1 &M 1 e(T)\’
as F' (namely its constant term vanishes and its linear term is nonzero). So, FT) "7 an) T (l"ge(o))‘
by the previous paragraph there is a unique g such that f (¢(T)) = T. But
then F(T) = F(f(g(T))) = g(T) and so F = g and f(F(T)) =T. (] 50 res ( %(IT) =res (%) and we are done again. O
We are now ready to state and prove the main theoretical result of this Coming back to the proof of the theorem and using the lemma,
we can
addendum. The proof given here (due to Hofbauer) is an adaptation of an write
analytic proof that would work over complex numbers. However, using the
purely algebraic notion of residue of a Laurent series, one can obtain a proof ) = (L)
over any field of characteristic zero. Recall that if f ¢ K[[T]], then [T AT
denotes the coefficient of 7" in f. = res (9“;{(%&2»?(1')&)
Theorem 8.A.2. (Lagrange’s inversion formula) Let K be a field of charac-
teristic O and let e be o series in K|[T|] whose constant term is nonzero. If =~ xes(g(T)(F(T)
") dT).
1 € K[[T] satisfies f(T) = Te(f(T)), then for any g € K{|T)] and any n > 0
we hove As w'v+uv’ = (uv)', we have res(u'v)= —res{uv’) for all u, v, which combine
d
T (T) = L™l (D)) with the previous equality yields

Proof. Let F(T") = fi 80 F{T) = o T+ for some o € K*, as the constant (T = res (£ ar )
term of e is nonzero. The hypothesis f(T') = Te(f(T')) becomes F(f(T)) = T.
Thus f is the (compositional} inverse of F and so f(F(T)) = T, too. I
= Lo (PDryar)
Tl
RT) = 3 ez and™ € K{[T)|{1/T] i a Laurent series with coefficients in K 1 n
(50 an= 0 for all n small enough), let res(hdT) = a_y. Obviously, for all » = (g (Dye(Ty).
we have res(R'dT’) = 0. The key point is the following “change of variable
formula” The result follows.
O

||
Here is an easy application of the inversion formula, which is
Lemma 8.A.3. If G € K[[T}|[1/7], we have not so easy
to prove by other means:
res(G(T)dT) = res(G(E(T)) F'(T)dT). “Note that

E
D D) "
Proof. By linearity, we may assume that G(I')= T%, with k € Z. I &k # —1, Z Py e(ofl)
both G(T') and G(F(T))F'(T) are of the form ¢ with g € K[[T H1/T} and exists in K([T],
380 Chapter 8. Formal Series Revisited 8.A. Lagrange’s Inversion Theorem 381

Ezample 8.A.4. Suppose that two sequences (@, )n, (bn)n of complex numbers 8.A.2 Two variations and some applications
satisfy . In applications, one also encounters the following versions of the
inversion
formula. For instance, we will use the following result to prove
b = z (n k)ak a very nice
& combinatorial identity due to Abel.
for all n > 0. Prove that Theorem 8.A.5. Let K be a field of characteristic 0 and let e be a series in
K{[T]] whose constant term is nonzero. Then for dll f ¢ K| [T} we have

10 =10+ (75) - 2r-irae .


foralln > 1. n=1

Proof. Let X = X(T) be a formal series such that X = Te(X) (it exists
Proof. Let A(X) = 37,50anX™ and B(X) = 37,48, X™ be the generating by
proposition 8.A.1 applied to F(T) = %) Then Lagrange’s inversion formula
functions of the two sequences. An easy computation shows that yields

B(X) "“";X"- (Z (nfik)ak>


fiE:;akaz <”fk>Xn FXD) = FO)+ 3T AXTHT = f(0)+3 %IT"’I}(I'(T)e(T)")-T"~
& £ ' n21 n>1
&
( k )X": & X)F& = A(X 2 X?).
2 ) =2
=y apX® apXF(1+ + Now, substitute T' = Y/e(Y') to obtain the desired result.
[wi
Here is the promised application, which is really not easy to prove by
direct computational means.
Let Y = X+ X2, so that X = f(¥) with f(¥) = Y--fi;(?—‘). Using Lagrange's
inversion formula, we obtain Theorem 8.A.6. (Abel’s identity) For all compler numbers a,z,y and all
Dpositive integers n,
an = [YTIA(Y) = [Y")(B(X)) = [Y"UB(F(Y))
%
=Ly v = >" By g vy (+y)" = Z (:) z(z + ak)* "y — ak)n*.
i k3 = \k

ST
k [ =)
‘ Proof. 'The desired equality is equivalent o

(z+y)" n
z(z + ak)*! (y - ak)"*
and the result follows from the easily checked equality T >
k=0
] m— k)

(o) = (5 : Let us consider the generating functions of the two sides of the previous
ity. The generating function of the left-hand side is e™+¥T,
equal-
The generating

You might also like