# Number Theory for Mathematical Contests

David A. SANTOS dsantos@ccp.edu

August 13, 2005

REVISION

Contents

Preface 1 Preliminaries 1.1 Introduction . . . . . . 1.2 Well-Ordering . . . . . Practice . . . . . . . . . . . 1.3 Mathematical Induction Practice . . . . . . . . . . . 1.4 Fibonacci Numbers . . Practice . . . . . . . . . . . 1.5 Pigeonhole Principle . Practice . . . . . . . . . . . iii 5 1 1 1 3 3 7 9 11 6 13 14 17 17 18 19 20 21 23 26 26 30 7 31 32 33 33 8 34 34 38 39 41 41 9 45 Linear Diophantine Equations 5.1 Euclidean Algorithm . . . . Practice . . . . . . . . . . . . . . 5.2 Linear Congruences . . . . . Practice . . . . . . . . . . . . . . 5.3 A theorem of Frobenius . . . Practice . . . . . . . . . . . . . . 5.4 Chinese Remainder Theorem Practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 48 50 51 52 52 54 55 56 57 57 60 62 64 64 65 66 68 69 72 73 75 75 76 78 78 80 81 83 84 84 86 87 88 89 91 93

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

2 Divisibility 2.1 Divisibility . . . . . . . . Practice . . . . . . . . . . . . . 2.2 Division Algorithm . . . . Practice . . . . . . . . . . . . . 2.3 Some Algebraic Identities . Practice . . . . . . . . . . . . . 3 Congruences. Zn 3.1 Congruences . . . Practice . . . . . . . . . 3.2 Divisibility Tests . Practice . . . . . . . . . 3.3 Complete Residues Practice . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

Number-Theoretic Functions 6.1 Greatest Integer Function . . . . . . Practice . . . . . . . . . . . . . . . . . . 6.2 De Polignac’s Formula . . . . . . . Practice . . . . . . . . . . . . . . . . . . 6.3 Complementary Sequences . . . . . Practice . . . . . . . . . . . . . . . . . . 6.4 Arithmetic Functions . . . . . . . . Practice . . . . . . . . . . . . . . . . . . 6.5 Euler’s Function. Reduced Residues Practice . . . . . . . . . . . . . . . . . . 6.6 Multiplication in Zn . . . . . . . . . Practice . . . . . . . . . . . . . . . . . . 6.7 Möbius Function . . . . . . . . . . Practice . . . . . . . . . . . . . . . . . . More on Congruences 7.1 Theorems of Fermat and Wilson Practice . . . . . . . . . . . . . . . . 7.2 Euler’s Theorem . . . . . . . . . Practice . . . . . . . . . . . . . . . . Scales of Notation 8.1 The Decimal Scale . . Practice . . . . . . . . . . . 8.2 Non-decimal Scales . . Practice . . . . . . . . . . . 8.3 A theorem of Kummer

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

4 Unique Factorisation 4.1 GCD and LCM . . . . . . . . . . . Practice . . . . . . . . . . . . . . . . . . 4.2 Primes . . . . . . . . . . . . . . . . Practice . . . . . . . . . . . . . . . . . . 4.3 Fundamental Theorem of Arithmetic Practice . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

Miscellaneous Problems Practice . . . . . . . . . . . . . . . . . . . . . . .

Preface

These notes started in the summer of 1993 when I was teaching Number Theory at the Center for Talented Youth Summer Program at the Johns Hopkins University. The pupils were between 13 and 16 years of age. The purpose of the course was to familiarise the pupils with contest-type problem solving. Thus the majority of the problems are taken from well-known competitions: AHSME AIME USAMO IMO ITT MMPC (UM)2 S TANFORD M ANDELBROT American High School Mathematics Examination American Invitational Mathematics Examination United States Mathematical Olympiad International Mathematical Olympiad International Tournament of Towns Michigan Mathematics Prize Competition University of Michigan Mathematics Competition Stanford Mathematics Competition Mandelbrot Competition

Firstly, I would like to thank the pioneers in that course: Samuel Chong, Nikhil Garg, Matthew Harris, Ryan Hoegg, Masha Sapper, Andrew Trister, Nathaniel Wise and Andrew Wong. I would also like to thank the victims of the summer 1994: Karen Acquista, Howard Bernstein, Geoffrey Cook, Hobart Lee, Nathan Lutchansky, David Ripley, Eduardo Rozo, and Victor Yang. I would like to thank Eric Friedman for helping me with the typing, and Carlos Murillo for proofreading the notes. Due to time constraints, these notes are rather sketchy. Most of the motivation was done in the classroom, in the notes I presented a rather terse account of the solutions. I hope some day to be able to give more coherence to these notes. No theme requires the knowledge of Calculus here, but some of the solutions given use it here and there. The reader not knowing Calculus can skip these problems. Since the material is geared to High School students (talented ones, though) I assume very little mathematical knowledge beyond Algebra and Trigonometry. Here and there some of the problems might use certain properties of the complex numbers. A note on the topic selection. I tried to cover most Number Theory that is useful in contests. I also wrote notes (which I have not transcribed) dealing with primitive roots, quadratic reciprocity, diophantine equations, and the geometry of numbers. I shall ﬁnish writing them when laziness leaves my weary soul. I would be very glad to hear any comments, and please forward me any corrections or remarks on the material herein. David A. SANTOS dsantos@ccp.edu

iii

THIS DOCUMENT MAY NOT BE SOLD FOR PROFIT OR INCORPORATED INTO COMMERCIAL DOCUMENTS WITHOUT EXPRESS PERMISSION FROM THE AUTHOR(S). THIS WORK IS LICENSED AND PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. THIS DOCUMENT MAY BE FREELY DISTRIBUTED PROVIDED THE NAME OF THE ORIGINAL AUTHOR(S) IS(ARE) KEPT AND ANY CHANGES TO IT NOTED. INCLUDING. BUT NOT LIMITED TO. EXPRESS OR IMPLIED. version 1.0 or later (the latest version is presently available at http://www.org/openpub/ .opencontent.
iv
. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR A WARRANTY OF NON-INFRINGEMENT.Legal Notice
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License.

2.2 Well-Ordering
The set N = {0. Number Theory is one of the oldest and most beautiful branches of Mathematics. 4. counting sheep. b.
2 Example Prove that there is no integer in the interval ]0. Associative laws: (a + b) + c = a + (b + c) and a(bc) = (ab)c. 3. 4.
1 Axiom (Well-Ordering Axiom) Every non-empty subset S of the natural numbers has a least element. Additive Identity: 0 + a = a + 0 = a 5. 2. . Distributive law: a(b + c) = ab + ac. 3. Some number-theoretic problems that are yet unsolved are: 1. that satisfy the following properties for natural numbers a. Closure: a + b and ab are also natural numbers.Chapter
1
Preliminaries
1.} of natural numbers is endowed with two operations.) or as a fountain of solace. let us prove that there is no integer between 0 and 1. . etc. who has been drawn to them either for their utility at solving practical problems (like those of measuring. and c: 1. Multiplicative Identity: 1a = a1 = a. (Goldbach’s Conjecture) Is every even integer greater than 2 the sum of distinct primes? 2. One further property of the natural numbers is the following. are very hard to solve.1 Introduction
We can say that no history of mankind would ever be complete without a history of Mathematics. (Twin Prime Problem) Are there inﬁnitely many primes p such that p + 2 is also a prime? 3. 1[. Is there always a prime between two consecutive squares of integers? In this chapter we cover some preliminary tools we need before embarking into the core of Number Theory. Are there inﬁnitely many primes that are 1 more than the square of an integer? 4. It abounds in problems that yet simple to state. For ages numbers have fascinated Man. 1. .
1
. addition and multiplication.
1.
As an example of the use of the Well-Ordering Axiom.

This is a contradiction and so S = ∅. say m.
5 Example (IMO 1988) If a. we see that √ √ √ ( j − k) 2 = k(2 − 2) < k( 2) = j. As a.
Solution: Clearly we can restrict ourselves to nonnegative numbers. b b
. Hence b = 2b1 and so 1 16a6 + 32b6 = c6 . Being a set of positive integers. . But clearly max(a1 . This implies b that the set √ √ A = {n 2 : both n and n 2 positive integers} √ √ is nonempty since it contains a.2
Chapter 1
Solution: Assume to the contrary that the set S of integers in ]0. This contradicts the choice of j as the smallest integer in A and hence. c). 3. that 2 = for some integers a.
√ √ a Solution: The proof is by contradiction. Since 2 < 2 2 implies 2 − 2 < 2 and also j 2 = 2k. a A rational number is a number which can be expressed as the ratio of two integers a. Also b1 = a2 − k b2 − k < < b. i. . then is a perfect square. Let b1 . But this is saying that S has a positive integer m2 which is smaller than its least positive integer m. a perfect square. As k is not a perfect square. it must contain a least element. a = 2a1 . b be its roots.e. and so a6 + 2b6 = 4c6 . − 3. Let us give an example of an irrational number. This gives c = 2c1 .
4 Example Let a. b. .e. By Well-Ordering A has a smallest element. This means that all of 1 1 1 1 1 these must be zero. √ √ √ √ j( 2 − 1) = j 2 − k 2 = ( j − k) 2 √ √ √ √ is a positive integer. ﬁnishes the proof. c) > 0 as small as possible. Z = {. c1 ) < max(a. −1. . so b1 + b = ka and b1 b = a2 − k. If a6 + 2b6 = 4c6 then a must be even. Show that a = b = c = 0. Choose a triplet of nonnegative integers a. Now. An irrational number is a number which cannot be expressed as the ratio of two integers. with max(a. b. b are positive integers such that
a2 + b2 a2 + b2 is an integer. b.}. and so m2 ∈ S . −2. 1. Now. b. This leads to 32a6 + b6 = 2c6 . 1 supposing b1 = 0 is incompatible with a2 + 02 = k(0 · a + 1). √ Thus ( j − k) 2 is a positive integer in A which is smaller than j. b) as small as 1 + ab possible. We denote the set of all integers by Z. a2 + b2 − k(ab + 1) = 0 is a quadratic in b with sum of the roots ka and product of the roots a2 − k. i. c satisfying this equation and with max(a. 1[ is non-empty. supposing b1 < 0 is incompatible with a2 + b2 = k(ab1 + 1)... . We denote the set of b rational numbers by Q. 0 < m2 < m < 1. 1 + ab 1 + ab
a2 + b2 = k is a counterexample of an integer which is not a perfect square. b1 . 2. k are positive integers. As 2 − 1 > 0.
3 Example Prove that
√ 2 is irrational. b. Suppose that 2 were rational. b. where b = 0. say j = k 2. a2 + 1
which forces k = 1. 0. We may assume without loss of generality that a < b for if a = b then Solution: Suppose that 0<k= 2a2 < 2. c be integers such that a6 + 2b6 = 4c6 .

Practice
3
Thus we have found another positive integer b1 for which
a2 + b2 1 = k and which is smaller than the smallest max(a. This 1 + ab1 is a contradiction. Finally. by the Well-Ordering Principle there exists a least positive integer k not in S . and also contains the integer n + 1 whenever it contains the integer n. we try to verify that some assertion P(n) concerning natural numbers is true for some base case k0 (usually k0 = 1. say k0 = 33.
11 Example Prove that the expression
33n+3 − 26n − 27 is a multiple of 169 for all natural numbers n. But by assumption k − 1 + 1 is also in S . n. since 0 ∈ S and there is no positive integer smaller than 0. Assume the assertion is true for n − 1. then A contains all the positive integers greater than or equal to m. then. where n > m.
9 Corollary If a set A of positive integers contains the integer m and also contains n + 1 whenever it contains n. y. Thus S = N..e. etc. Thus in the Principle of Mathematical Induction. We will now derive the Principle of Mathematical Induction from the Well-Ordering Axiom. 10 Corollary (Principle of Strong Mathematical Induction) If a set A of positive integers contains the integer m and also contains n + 1 whenever it contains m + 1. b). Thus if we are ever able to start the job (that is. As k − 1 < k. that k is a perfect square. then A contains all the positive integers greater than or equal to m. Observe that k > 0.
8 Theorem (Principle of Mathematical Induction) If a setS of non-negative integers contains the integer 0.
1. z only when x = y = z = 0. a contradiction.
Proof: Assume this is not the case and so. then S = N. . It must be the case. if we have a base case). and then to the case following that.). m + 2. u The following versions of the Principle of Mathematical Induction should now be obvious. n > 1. suppose that we know how to perform the n-th task provided we have accomplished the n − 1-th task. where n > m.3 Mathematical Induction
The Principle of Mathematical Induction is based on the following fairly intuitive observation. .
We shall now give some examples of the use of induction.
Practice
6 Problem Find all integer solutions of a3 + 2b3 = 4c3 . . then we should be able to ﬁnish it (because starting with the base case we go to the next case. Then 33n+3 − 26n − 27 = 27 · 33n − 26n − 27 = 27(33n − 26n − 1) + 676n
. Suppose that we are to perform a task that involves a certain number of steps. i. Hence k = k − 1 + 1 is also in the set. 7 Problem Prove that the equality x2 +y2 +z2 = 2xyz can hold
for whole numbers x. assume that 33n − 26n − 1 = 169N for some integer N. which is evident. . since the successor of each element in the set is also in the set. but one of the examples below shows that we may take.) Then we try to settle whether information on P(n − 1) leads to favourable information on P(n). Solution: For n = 1 we are asserting that 36 − 53 = 676 = 169 · 4 is divisible by 169. we see that k − 1 ∈ S . Suppose that these steps must be followed in strict numerical order.

Therefore P(1) is true. √ √ √ Solution: We proceed by induction on n. assume that √ √ (1 + 2)2(n−1) + (1 − 2)2(n−1) = 2N for some integer N and that √ √ √ (1 + 2)2(n−1) − (1 − 2)2(n−1) = a 2
for some positive integer a. Assume that 2n+2 |k2 − 1. the above simpliﬁes to
an even integer and similarly √ √ √ √ √ (1 + 2)2n − (1 − 2)2n = 3a 2 + 2 2(2N) = (3a + 4N) 2. Assume that P(n − 1) is true for n > 1. Solution: The statement is evident for n = 1. then we see that √ √ (1 + 2)2 + (1 − 2)2 = 6.
n
. Consider now the quantity √ √ √ √ √ √ (1 + 2)2n + (1 − 2)2n = (1 + 2)2 (1 + 2)2n−2 + (1 − 2)2 (1 − 2)2n−2 . This is obviously true since k odd makes k2n + 1 even. The assertion is thus established by induction. As k2 − 1 = (k2 − 1)(k2 + 1).
Using P(n − 1). Let P(n) be the proposition: “(1 + 2)2n + (1 − 2)2n is even and (1 + 2)2n − (1 − √ √ 2n 2) = b 2 for some b ∈ N.
13 Example Prove that if k is odd. and
√ √ √ (1 + 2)2 − (1 − 2)2 = 4 2.e. as k2 − 1 = (k − 1)(k + 1) is divisible by 8 for any odd natural number k because n both (k − 1) and (k + 1) are divisible by 2 and one of them is divisible by 4. then 2n+2 divides
k2 − 1 for all natural numbers n.” If n = 1. we see that 2n+2 divides (k2n − 1). so the problem reduces to proving that 2n 2n 2|(k + 1). and so P(n) is true. i. for all integers n ≥ 1. which is divisible by 169. √ √ 12N + 2 2a 2 = 2(6N + 2a).. The assertion is thus established by induction.
12 Example Prove that
Chapter 1
√ √ (1 + 2)2n + (1 − 2)2n √ √ √ (1 + 2)2n − (1 − 2)2n = b 2
is an even integer and that
for some positive integer b. and let us prove that n+1 n+1 n n 2n+3 |k2 − 1. This simpliﬁes to √ √ √ √ (3 + 2 2)(1 + 2)2n−2 + (3 − 2 2)(1 − 2)2n−2 .4 which reduces to 27 · 169N + 169 · 4n.
an even integer.

we have √ √ ( x1 − x2 )2 ≥ 0. that is. . w2k−1 satisfy k−1 w1 + w2 + · · · + w2k−1 ≥ (w1 w2 · · · w2k−1 )1/2 . . Solution: We ﬁrst prove that if n is good. 2n + 7” are good. then 2n + 8 and 2n + 9 are good. assume that nonnegative real numbers w1 . .1) implies the truth of P(n + 1) whenever P(n) is true. It consists in proving a statement ﬁrst for powers of 2 and then interpolating between powers of 2. a2 . By the statement of the problem.3) k−1 2 Using (1. . . where a1 . . Let P(n) be the proposition “all the integers n.2) with y1 + y2 + · · · + y2k−1 x1 = 2k−1 and y k−1 + · · · + y2k x2 = 2 +1 k−1 . . x1 + x2 √ ≥ x1 x2 .Mathematical Induction
14 Example (USAMO 1978) An integer n will be called good if we can write
5
n = a1 + a2 + · · · + ak .1) We now establish the truth of the assertion of the problem by induction on n. . Assume that the Arithmetic-Mean-GeometricMean Inequality holds true for n = 2k−1 . Then
1 1 1 + +···+ . we see that P(33) is true. if n is good both 2n + 8 and 2n + 9 are good. an be nonnegative real numbers.
15 Theorem (Arithmetic-Mean-Geometric-Mean Inequality) Let a1 . k > 2. (1. ak are positive integers (not necessarily distinct) satisfying 1 1 1 + + · · · + = 1. . . (1. (1. prove that every integer ≥ 33 is good. a1 a2 · · · an ≤ n Proof: Since the square of any real number is nonnegative. 2a1 2a2 2ak 3 6 2 3 6 Therefore.2) 2 which is the Arithmetic-Mean-Geometric-Mean Inequality for n = 2. . w2 . For assume that n = a1 + a2 + · · · + ak . But (1. a1 a2 ak
√ a1 + a2 + · · · + an n . a2 . n + 2. a1 a2 ak Given the information that the integers 33 through 73 are good. and 1= Then 2n + 8 = 2a1 + 2a2 + · · · + 2ak + 4 + 4 and 1 1 1 1 1 1 1 1 + +···+ + + = + + = 1. n + 1. 2a1 2a2 2ak 4 4 2 4 4 Also. We now present a variant of the Principle of Mathematical Induction used by Cauchy to prove the Arithmetic-MeanGeometric Mean Inequality.
. 2 Upon expanding. . The assertion is thus proved by induction. . . . 2n + 9 = 2a1 + 2a2 + · · · + 2ak + 3 + 6 and 1 1 1 1 1 1 1 1 + +···+ + + = + + = 1. .

n = 1. .4) we obtain a1 + a2 + · · · + an + (2k − n) 2k a1 + · · · + an n a1 + a2 + · · · + an . Thus all the powers of 2 raised to an even power belong to M . n
a1 + · · · + an and G = (a1 · · · an )1/n . 2k
(1. there is an integer r for which 2r < s < 2r+1 . Prove that every interval [s. but √ Since M is a nonempty set of positive integers. . and so we have proved the Arithmetic-Mean-GeometricMean Inequality for powers of 2. n
≥ a1 a2 · · · an (
a1 + · · · + an (2k −n) ) n
1/2k
. etc. Since the square roots belong as well to M we get that all the powers of 2 raised to an odd power also belong to M .e. By assumption a < a unless a = 1. √ a also belongs to M . 2. say a. . Let y1 = a1 . .6 we obtain that y1 + y2 + · · · + y2k−1 y2k−1 +1 + · · · + y2k + 2k−1 2k−1 ≥ 2 ( y1 + y2 + · · · + y2k−1 y2k−1 +1 + · · · + y2k )( ) 2k−1 2k−1
1/2
Chapter 1
. since 4 belongs to M so does 4 · 4 = 42 . 2s] contains a power of 2. assume that 2k−1 < n < 2k . 2k
This translates into A ≥ G or which is what we wanted..
17 Example Let M be a nonempty set of positive integers such that 4x and [ x] both belong to M whenever x does. First we will prove that 1 belongs to the set. and yn+1 = yn+2 = · · · = y2k = Let A= Using (1.
Applying (1. it has a least element. which gives the required result. In conclusion. n
16 Example Let s be a positive integer. we obtain
k y1 + y2 + · · · + y2k ≥ (y1 y2 · · · y2k )1/2 .4)
This means that the 2k−1 -th step implies the 2k -th step. In this way we obtain that all numbers of the form 4n = 22n . Since 1 belongs to M so does 4. then there is nothing to prove.. Now. If s is not a power of 2 then it must lie between two consecutive powers of 2.
which is to say that
k k nA + (2k − n)A ≥ (Gn A2 −n )1/2 .u
(a1 a2 · · · an )1/n ≤
a1 + a2 + · · · + an . Prove
√
that M is the set of all natural numbers. secondly we will prove that every power of 2 is in the set and ﬁnally we will prove that non-powers of 2 are also in the set. This yields 2r+1 < 2s.
Solution: If s is a power of 2. . belong to M . y2 = a2 . yn = an . Hence s < 2r+1 < 2s. i. Solution: We will prove this by induction. .3) to both factors on the right hand side of the above .
. This means that 1 belongs to M . all powers of 2 belong to M . .

27 Problem Prove that the sum of the cubes of three consecutive positive integers is divisible by 9. for a sufﬁciently large positive integer k we have 2−k < log2 (n + 1) − log2 n.
k k k k k k
Practice
18 Problem Prove that 11n+2 + 122n+1 is divisible by 133 for 22 Problem Let a1 = 3. Since the function f: R → x → R∗ + 2−x
is decreasing.Practice
7
Assume now that n ∈ N fails to belong to M . and an = 3an−1 . We have thus obtained the desired contradiction. 3
1 1 1 + +···+ > 1. Observe that n cannot be a power of 2.
.
23 Problem Let n ∈ N. (n + 1)2 ).
20 Problem Let n ∈ N. (n + 1)2 ) belongs to M . a contradiction. But every interval of the form [s. Prove the inequality
12 + 32 + 52 + · · · + (2n − 1)2 =
26 Problem Prove that
n(4n2 − 1) . <√ 2 · 4 · 6 · · · (2n) 3n + 1
24 Problem Prove that if n is a natural number. 2n2 ] is totally contained in [n2 . Prove that
1−
x x(x − 1) x(x − 1)(x − 2) + − 1! 2! 3! x(x − 1)(x − 2) · · · (x − n + 1) n!
1 · 3 · 5 · · · (2n − 1) 1 . then
+ · · · + (−1)n equals (−1)
n (x − 1)(x − 2) · · · (x − n)
1 · 2 + 2 · 5 + · · · + n · (3n − 1) = n2 (n + 1). The function f: R∗ + x → → R log2 x
is increasing and hence log2 (n + 1) − log2 n > 0. thereby obtaining a contradiction to the hypothesis that no element of the Ar belonged to M . (n + 1)2 ) belongs to M . bn = 4bn−1
all natural numbers n. Since n ∈ M we deduce that √ no integer in A1 = [n2 . n+1 n+2 3n + 1
21 Problem Prove that
Õ
4n (2n)! < n+1 (n!)2 for all natural numbers n > 1. Similarly no member z ∈ A2 = [n4 . (n + 1)4 ) belongs to M since this would entail that z would belong to A1 . Prove that a1000 > b999 . This implies that (n + 1)2 > 2n2 .
2+
√ π 2 + · · · + 2 = 2 cos n+1 ßÞ 2
n radical signs
for n ∈ N.
25 Problem Prove that if n is a natural number. 2s] where s is a positive integer contains a power of 2.
19 Problem Prove that
when n > 1. We will now show that eventually these intervals are so large that they contain a power of 2. n > 1. Thus the interval [n2 . then
n!
for all non-negative integers n. By induction we can r r show that no member in the interval Ar = [n2 . b1 = 4. because every member of y ∈ A1 satisﬁes [ y] = n.

33 Problem Prove that if n is a natural number. n ∈ N prove that
Chapter 1 3. yet for which the induction step holds. Let y1 .8
28 Problem If |x| = 1. . Arithmetic-Mean-Geometric-Mean Inequality. Given that u. then 1 · 3 · 5 · · · (2n − 1) < nn .
(1 − x1 )(1 − x2 ) · · · (1 − xn ) ≥ 1/2. is not known to the men. n 1 2
n5 /5 + n4 /2 + n3 /3 − n/30 is always an integer. Prove the Harmonic-Mean. Use the preceding part to give another proof of the for all natural numbers n > 1. . 38 Problem Prove that
with Use induction to prove that a1 + a2 + · · · + an ≥ n. The law of the village demands that when n 1 1 4n a man can PROVE that his wife has been unfaithful. Every man is coms a (s − ar ) n − 1 a 1≤r≤n r 1≤r≤n r pletely law-abiding. Each man is completely intelligent and knows that ev(b) Deduce that ery other man is. . One day the mayor announces that there is at least one unfaithful wife in the village.
7. 2 n
1 2 4 8 2n + + + +···+ n 1 + x 1 + x2 1 + x2 1 + x8 1 + x2 equals
29 Problem Is it true that for every natural number n the
quantity n2 + n + 41 is a prime? Prove or disprove!
30 Problem Give an example of an assertion which is not true
1+
1 1 1 1 +···+ < n 1− . ar
1≤r≤n 1≤r≤n stantly when another’s wife is unfaithful. yn be positive real numbers. . x2 . xn are nonnegative real are exactly forty unfaithful wives in the village (but that fact numbers with x1 + x2 + · · · + xn ≤ 1/2. Let a1 . Prove that if n > 1 then 1 1 +···+ . . w
the ﬁrst two million positive integers but fails for every integer greater than 2000000. Set s = a1 + a2 + · · · + an . . 4. an be positive real numbers a1 · a2 · · · an = 1. . y2 . . . . Prove that if n > 1 then 1 2n+1 + . If in fact there 36 Problem Suppose that x1 . shoot her before sundown the same day. Prove that if n > 1. 0 < a ≤ 1. + 1/n 2 n n+1 (n + 1)
for any positive integer. a2 .
31 Problem Give an example of an assertion which is true for
6.
37 Problem Given a positive integer n prove that there is a polynomial Tn such that cos nx = Tn (cos x) for all real numbers x. The mayor always tells the truth. . . Tn is called the n-th Tchebychev Polynomial. x − 1 1 − x2n+1 n (n + 1)1/n − 1 < 1 + 5. v. he must <s < .
32 Problem Prove by induction on n that a set having n elements has exactly 2n subsets. Let a1 .) what will happen after the mayor’s announcement? Prove that
35 Problem
1. all different. and every man believes him.
34 Problem (Halmos) ) Every man in a village knows in-
8.
1 1 1 13 + +···+ > n+1 n+2 2n 24
. (a) Prove that (n − 1) 1 < s − ar 1 . an be positive real numbers.
2. with equality if and only if a1 = a2 = · · · = an = 1. . but never when his own is. and that u + v + w = 1.Geometric-Mean Inequality: n 1 1 1 + +···+ y1 y2 yn ≤ √ n y y ···y . . prove that 1 −a u 1 −a v 1 − a ≥ 27 − 27a + 9a2 − a3 . w are positive. .

22n − 1
f (n + 1) > f ( f (n)) for each positive integer n. Prove that f (n) = n for each n. . . 1. Solution: Observe that f1 f3 f5 . f1 = 1. n ≥ 1.
44 Example Prove that
2 2 2 f1 + f2 + · · · + fn = fn fn+1 . . .
Thus
2 fn+1 fn − fn fn−1 = fn .
43 Example Prove that
= f3 − f2 = f4 − f3 = f5 − f4 .
(Hint: Let x = sin2 θ . Prove that
1
Fn (x) dx =
0
fying
22n−1 . . fn Summing both columns.
42 Example Prove that
f1 + f2 + · · · + fn = fn+2 − 1. F(x) = 4x(1 − x).Fibonacci Numbers
39 Problem In how many regions will a sphere be divided by n planes passing through its centre if no three planes pass through one and the same diameter? 40 Problem (IMO 1977) Let f .4 Fibonacci Numbers
The Fibonacci numbers fn are given by the recurrence f0 = 0. Fn+1 (x) = F(Fn (x)). f2n − f2n−2
Solution: We have
2 fn−1 fn+1 = ( fn+1 − fn )( fn + fn−1 ) = fn+1 fn − fn + fn+1 fn−1 − fn fn−1 . 5. . 13. 1. . . A number of interesting algebraic identities can be proved using the above recursion. . . . f1 + f2 + · · · + fn = fn+2 − f2 = fn+2 − 1. 1. . 8. . . fn+1 = fn−1 + fn . Solution: We have f1 f2 f3 . .5)
Thus the ﬁrst few Fibonacci numbers are 0. 3. . = fn+2 − fn+1
f1 + f3 + f5 + · · · + f2n−1 = f2n . 21.)
1.
= = = . f : N → N be a function satis-
9
41 Problem Let F0 (x) = x. . (1. =
f2 − f0 f4 − f2 f6 − f4 . as desired. 2.
. n = 0. f2n−1 Adding columnwise we obtain the desired identity. .

The number τ is a root of the quadratic equation Let τ = 2 2 2 x = x + 1. . Assume that n > 2 and that xn−1 = fn−1 x + fn−2 . n4 ) an admissible pair. n ≥ 1. 2. n ∈ {1. . Suppose now that the pair (n1 . . . . We need the following lemma. . 1981} and (n2 − mn − m2 )2 = 1. . n2 ) is admissible. 2. . n3 ) also admissible. 2. 2 Let now n3 = n1 − n2 . . 3.. 987. 1) is admissible. making (n2 .10 which yields
2 2 2 f1 + f2 + · · · + fn = fn fn+1 . 1) and (2. a truncated Fibonacci sequence. Then xn = xn−1 · x = ( fn−1 x + fn−2 )x = fn−1 (x + 1) + fn−2 x = ( fn−1 + fn−2 )x + fn−1 = fn x + fn−1 u
48 Theorem (Binet’s Formula) The n-th Fibonacci number is given by
1 fn = √ 5 n = 0. If m = 1. n ≥ 2 then we have xn = fn x + fn−1 . This yields vn = (−1)n−1 v1 which is to say 2 2 fn−1 fn+1 − fn = (−1)n−1 ( f0 f2 − f1 ) = (−1)n . 1597. As n1 (n1 − n2 ) = n2 ± 1 > 0. The largest admissible pair is thus (1597. . . We have a sequence of positive integers n1 > n2 > . Observe that τ = . . which must necessarily terminate.
u
46 Example (IMO 1981) Determine the maximum value of
m2 + n2 . . 5. . . Solution: Call a pair (n. For n = 2 the assertion is a triviality. This terminates when nk = 1 for some k. .
Proof: Observe that
2 fn−1 fn+1 − fn
2 = ( fn − fn−2 )( fn + fn−1 ) − fn = − fn−2 fn − fn−1 ( fn−2 − fn ) 2 = −( fn−2 fn − fn−1 )
2 Thus if vn = fn−1 fn+1 − fn . in the 1 2 2 3 same way we conclude that n2 > n3 and we can let n4 = n2 − n3 making (n3 . The sequence goes thus 1. Then 1 = (n2 − n1 n2 − n2 )2 = (n2 − n2 n3 − n2 )2 . then (1.
√ 1+ 5 2
n
−
√ 1− 5 2
n
. we have vn = −vn−1 . i. m) admissible if m. n ∈ {1. √ √ 1+ 5 5−1 −1 be the Golden Ratio.e. If n3 > 1. 1981} and (n2 − mn − m2 )2 = 1. n are positive integers satisfying m.
47 Lemma If x2 = x + 1..
Chapter 1
45 Theorem (Cassini’s Identity)
2 fn−1 fn+1 − fn = (−1)n . 1) are the only admissible pairs. 8. . We now obtain a closed formula for fn . 3. we must have nk−1 = 2.
Proof: We prove this by induction on n. we must have n1 > n2 . 2. where m. . 987) and so the maximum sought is 15972 + 9872 . with n2 > 1. Since (nk−1 .

k 5
as wanted.Practice √ √ 1+ 5 1− 5 Proof: The roots of the equation x = x + 1 are τ = and 1 − τ = . Assume that s > 1 and that fs−k+t = fs−k−1 ft + fs−k ft+1 for all k satisfying 1 ≤ k ≤ s − 1.
τ n − (1 − τ )n =
√ 5 fn .
Proof: We keep t ﬁxed and prove this by using strong induction on s. In virtue of the above lemma.t ≥ 0 are integers then
fs+t = fs−1 ft + fs ft+1 . which is trivially true.
n k=0
n k 2 fk k
n
=
k=0
n k τ k − (1 − τ )k √ 2 k 5
n n
= =
n k n k 1 √ τ − 2 (1 − τ )k k 5 k=0 k k=0 1 √ ((1 + 2τ )n − (1 + 2(1 − τ ))n ) . 1 + 2τ = τ 3 .
50 Theorem If s ≥ 1.
n k=0
n k 2 fk = f3n .u
49 Example (Cesàro) Prove that
(1 − τ )n = (1 − τ ) fn + fn−1 . = fs−2 ft + fs−1 ft+1 + fs−3 ft + fs−2 ft+1 by the inductive assumption = ft ( fs−2 + fs−3 ) + ft+1 ( fs−1 + fs−2 ) rearranging. The following theorem will be used later. 2 2
2
11
τ n = τ fn + fn−1
and Subtracting from where Binet’s Formula follows. Similarly 1 + 2(1 − τ ) = (1 − τ )3 . k
Solution: Using Binet’s Formula. For s = 1 we are asking whether ft+1 = f0 ft + f1 ft+1 . = ft fs−1 + ft+1 fs by the Fibonacci recursion. = fs−1+t + fs−2+t trivially. 5
As τ 2 = τ + 1. This ﬁnishes the proof. Thus
n k=0
n k 1 2 fk = √ (τ )3n + (1 − τ )3n = f3n .u
Practice
. We have fs+t = fs+t−1 + fs+t−2 by the Fibonacci recursion.

m = ± fn+1 . then there is an integer n such that k = ± fn . n n→∞ τ 5 lim
63 Problem Prove that
54 Problem Let N be a natural number.
68 Problem Prove the converse of Cassini’s Identity: If k and m are integers such that |m2 − km − k2 | = 1.
57 Problem Prove that
n n
65 Problem (Cesàro) Prove that
f2k =
k=1 k=0
(n − k) f2k+1 . n= 1+ 5 log 2
2 2 fn + fn−1
n→∞
lim
fn+r = τr. k
58 Problem Prove that
∞ n=2
1 = 1.
52 Problem Prove that
2 2 fn+1 = 4 fn fn−1 + fn−2 .
1 fn =√ . f 2k 2
56 Problem Prove that if n > 1.
arctan
n=1
1 = π /4. n > 2.12
51 Problem Prove that 61 Problem Prove that
∞
Chapter 1
fn+1 fn − fn−1 fn−2 = f2n−1 . k
60 Problem Prove that
∞ n=0
1/ f2n = 4 − τ .
n k=0
n fk = f2n . n > 1.
2 fn − fn+l fn−l
∞ k=0
=
(−1)n+l fl2 . f 2k f 2n √ 7− 5 1 = .
67 Problem Find the exact value of
59 Problem Prove that
∞ n=1
fn = 1. Deduce that
f2n −2 1 = 2+ . fn−1 fn+1
66 Problem Prove that
∞ n=1
Hint: What is
1 fn−1 fn
−
1 ? fn fn+1
fn 10n
is a rational number.
. fn+1 fn+2
1994
(−1)k
k=1
1995 fk . Prove that the largest
n such that fn ≤ N is given by
1 √ log N + 5 2 √ . f2n+1
62 Problem Prove that
53 Problem Prove that
2 f1 f2 + f2 f3 + · · · + f2n−1 f2n = f2n . fn
64 Problem Prove that
n k=0
55 Problem Prove that
= f2n+1 .

.
71 Example Given any set of ten natural numbers between 1 and 99 inclusive. 100}. {10. . {4. . a + 2n}. {a + 2. 13. there will always be some two that differ by n. Prove that there must be two distinct integers in A whose sum is 104. there must be at least two different subsets that have the same sum. 4. 2. by the Pigeonhole Principle there must be two integers that belong to one of the pairs. . . 82. there must be a pigeonhole containing at least two pigeons. 97}. The maximum value that any such sum can achieve is 90 + 91 + · · · + 99 = 945 < 1023. .
which satisfy b < a ≤ 2b. {61. From that group. If we select ﬁfty ﬁve integers. {52}. {41. This apparently trivial principle is very powerful. Let us see some examples. 42. . . . . a + 2. a + 3. 32. 22. by the above observation (let n = 10). prove that there are two disjoint nonempty subsets of the set with equal sums of their elements. there must be two that differ by 10. . . . . 29. . a + n + 2}. . 2. . 100. . 16. . . . . 62} and {63. . 5. . . 100} . which add to 104. . . a + 2n} into the n pairs and if n + 1 integers are chosen from this. there must be two that belong to the same group. . . and obviously. 126} into the six sets {1. . Since we are choosing twenty integers and we have nineteen sets. {3. 30}. . . By the Pigeonhole Principle. . 94}. 55}. 4. . Therefore. 64.
Solution: There are 210 − 1 = 1023 non-empty subsets that one can form with a given 10-element set. . . 100}. any such two will satisfy the stated inequality. . a + n + 1}. {21. {49. {a + 1. 61.
Solution: We partition the thirty four elements of this progression into nineteen groups {1}. . . 62. Solution: Split the numbers {1. . . . . . {15. 20}. .5 Pigeonhole Principle
The Pigeonhole Principle states that if n + 1 pigeons ﬂy to n holes. say a and b. So now group the one hundred integers as follows: {1. 8. {31. This is because we can pair the 2n consecutive integers {a + 1.
70 Example Show that amongst any seven distinct positive integers not exceeding 126. .
72 Example No matter which ﬁfty ﬁve integers may be selected from
{1. . two of the seven numbers must lie in one of the six sets. 2}. 80} and {81. {7.
69 Example (Putnam 1978) Let A be any set of twenty integers chosen from the arithmetic progression 1. 60}. {7. 126}. Solution: First observe that if we choose n + 1 integers from any string of 2n consecutive integers. prove that one must select some two that differ by 10. . one can ﬁnd two of them. .
. 3. 6}. 2. . {a + n. 14}. . . To each of these subsets we associate the sum of its elements. we must perforce choose eleven from some group. .Pigeonhole Principle
13
1. . . . 40}. . .

Otherwise. 1 + tan a j tan ai 6 3
as desired. . a6 . . By the Pigeonhole Principle.
74 Example (IMO 1964) Seventeen people correspond by mail with one another—each one with all the rest. Divide the interval (− . . 1/3. If any pair of these six people corresponds on topic I. In their letters
only three different topics are discussed. . . 0. ﬁfty discs ‘‘50”. Solution: Choose a particular person of the group. prove that we can always ﬁnd two. By the Pigeonhole Principle. then Eric and this pair correspond on topic II. M ≥ 1/3. . then Charlie and this pair do the trick. If a1 = a1 + a2 = a1 + a2 + a3 = a2 + a3 + a4 = a3 + a4 + a5 = a4 + a5 + a6 = a5 + a6 + a7 = a7 = 1/3. i. π /2). three discs “3”. Solution: Since a1 ≤ a1 + a2 ≤ a1 + a2 + a3 and a7 ≤ a6 + a7 ≤ a5 + a6 + a7 we see that M also equals
1≤k≤5
max {a1 . one of these is ≥ 1/3.
Practice
.e. a2 . a5 . a6 + a7 . “9” and any nine from each of the discs “10”. Charlie must write to at least six of the people of one topic. a4 . Put these 1 + 2 + 3 + · · · +
Solution: If we draw all the 1 + 2 + · · · + 9 = 45 labelled “1”. we obtain
0 < tan(a j − ai ) = tan a j − tan ai 1 π < tan = √ . we obtain the 7-tuple (a1 . a7 ) = (1/3. + a7 = 1. . 0. 6 Since the tangent increases in (−π /2. 0. and we are done again. . By the Pigeonhole Principle. a7 be nonnegative real numbers with
a1 + a2 + . By the Pigeonhole Principle. a3 . these six correspond amongst themselves only on topics II or III. say topic I.
1≤k≤5
determine the minimum possible value that M can take as the ak vary. Each pair of correspondents deals with only one of these topics.
75 Example Given any seven distinct real numbers x1 . these three people only correspond with one another on topic III. say ai < a j . ) into six non-overlapping subintervals of 2 2 2 2 π equal length. . Then 0 < a j − ai < . say topic II. two of seven points will lie on the same interval. If M = max ak + ak+1 + ak+2 . What is the minimum number of discs that must me drawn in order to guarantee drawing at least ten discs with the same label?
73 Example (AHSME 1994) Label one disc “1”. a2 . . which shows that M = 1/3. . . “50”. Otherwise. . there must be three of the ﬁve remaining that correspond with Eric in one of the topics. . 0. ak + ak+1 + ak+2 }. 1 + ab 3
Solution: Put xk = tan ak for ak satisfying −
π π π π < ak < . Choose a particular person from this group of six. The 415-th disc drawn will assure at least ten discs from a label. x7 . and we are done. say a.
76 Example (Canadian Math Olympiad 1981) Let a1 . a7 . say Charlie. a1 + a2 . say Eric. and we are done. . two discs “2”. 1/3). we have drawn 45 + 9 · 41 = 414 discs. b with
0<
a−b 1 <√ . . . . . These nine quantities then average 3/9 = 1/3. He corresponds with sixteen others. If amongst these three there is a pair that corresponds with each other on topic II. .
We are thus taking the maximum over nine quantities that sum 3(a1 + a2 + · · · + a7 ) = 3.14
Chapter 1
50 = 1275 labeled discs in a box. . Prove that there at least three people who write to each other about the same topic. Discs are then drawn from the box at random without replacement.

There is. there will always exist an equilateral triangle with all its vertices of the same colour. 1 not all zero. There are N people seated at this table in such lected from a way that the next person to be seated must sit next to some{1. If each of the mathematicians can speak at most three languages. 3. a 81 Problem We call a set “sum free” if no two elements of the colouring of the points of the plane with two colours for which set add up to a third element of the set. .
Hint: Observe that the set {n + 1. a room there are at least three who know one another. a square of side 1. 2n − 1}. εk = −1. such that
¬ ¬ n ¬ ¬ ¬ ¬ ¬ ¬ εk r k ¬ ¬
k=1
≤
n . r . show that there will always exist two points of the 80 Problem Show that in any sum of non-negative real num. 1979) Nine mathematicians meet at
1. 86 Problem If the points of the plane are coloured with three colours. is a non-empty proper subset whose sum is not more than 2/n in size. differ by 13.88 Problem Let r . . and some two that Answer: 20. 1 ≤ k ≤ n. 78 Problem Show that if any ﬁve points are all in. 2. but that you need not have any two that differ by 11. .Practice
15
77 Problem (AHSME 1991) A circular table has exactly sixty 84 Problem No matter which ﬁfty ﬁve integers may be sechairs around it. n−1 1. What is the smallest possible value of N? prove that you must select some two that differ by 9. 1947) Prove that amongst six people in members. r . n > 1 be real numbers of abson 1 2 ements is sum free. . What is the maximum no equilateral triangle of side 1 has all its vertices of the same size of a sum free subset of {1. prove that there are at least three of the mathematicians who can speak the same language. some two that differ by 12. Suppose that all the letters are arranged in a circle. with two colours. or at least three who do not know one another. considering p pockets and n dollars. . 1]. bers there is always one number which is at least the average of the numbers and that there is always one member that it is 87 Problem Show that if the points of the plane are coloured at most the average of the numbers. or on. . rn be real numbers in the interval [0. one. What is the minimum number . Show that there is not sum free. 89 Problem Let r1 . . at least two speak a common language. 2n
90 Problem (USAMO. Prove that there must be four consecutive consonants. Prove that there must be ﬁve consecutive consonants. n + 2. . He wants to put his dollars into his pockets so distributed that each pocket contains a different number of dollars. distance 2/2. however. 2. or a decreasing sequence with at least m + 1 79 Problem (Eötvös. .same colour which are one unit apart. Generalise the problem.
83 Problem (Stanford 1953) Bob has ten pockets and forty four silver dollars. . . r2 . . . The problem is most interesting when 91 Problem (USAMO. 1982) In a party with 1982 persons. value at least glish alphabet are listed in an arbitrary order. . n= 2 of people in the party who know everyone else? Why?
. Can he do so?
an international conference and discover that amongst any three of them. Show that any subset with n + 2 elements lute value not exceeding 1 and whose sum is 0. colour. . . 2n − 1} of n + 1 el. Give a list to show that there need not be ﬁve consecutive consonants. Prove that there is either an increasing sequence with at least n + 1 members. . some two that differ by 10. 2. amongst any group of four there is at least one person who (p − 1)(p − 2) knows each of the other three. Give an example in which any subsum has absolute 1 82 Problem (MMPC 1992) Suppose that the letters of the En. . . then some pair of them will be at most at √ 85 Problem Let mn + 1 different real numbers be given. . 0.
2. Show that there are numbers εk . 100}.

there was some moment when both (Hint: e = 1/n!. there are at least n/2 − 1 of them. of the remaining n − 2 people. n=0
.) were sleeping simultaneously.
Chapter 1
some three were sleeping simultaneously. 1986) During a certain lecture. Prove that there are two people such that. Show that at least one monochromatic triangle is formed. each of 94 Problem Let Pn be a set of en! + 1 points on the plane. each of ﬁve mathematicians fell asleep exactly twice. 1985) There are n people at a party. 93 Problem (USAMO. Assume Any two distinct points of Pn are joined by a straight line segthat “knowing” is a symmetrical relationship. For each pair ∞ of these mathematicians. ment which is then coloured in one of n given colours. Prove that.16
92 Problem (USAMO. at some moment. whom knows both or else knows neither of the two.

b are integers. we say that a divides b if there is an integer c such that ac = b. The following properties should be immediate to the reader. Among every two consecutive integers there is an even one. giving c|(am + bn). y|z then x|z. n are integers with c|a.The following theorem goes further. Solution: n2 + 1 = n2 − 1 + 2 = (n − 1)(n + 1) + 2. Thus am + nb = c(sm + tn). This forces n + 1|2 and so n + 1 = 1 or n + 1 = 2.
96 Theorem
1. It should be clear that if a|b and b = 0 then 1 ≤ |a| ≤ |b|. so that the only such n is n = 1.u
97 Example Find all positive integers n for which
n + 1|n2 + 1. Proof: There are integers s. The choice n + 1 = 1 is out since n ≥ 1.
2. among every three consecutive integers there is one divisible by 3.
Solution: Observe that 15x2 − 11x − 14 = (3x + 2)(5x − 7). If x.1 Divisibility
95 Deﬁnition If a = 0. c. Hence xuv = z. b.t with sc = a. m. yv = z. We have 7s = 3x + 2 for some integer s and so 15x2 − 11x − 14 = 7s(5x − 7). giving the result. there are integers u.
If a does not divide b we write a |b.
99 Theorem The product of n consecutive integers is divisible by n!. etc. v with xu = y. c|b. We write this as a|b. y.Chapter
2
Divisibility
2.
98 Example If 7|3x + 2 prove that 7|(15x2 − 11x − 14.
17
. giving x|z. If a.tc = b. then c|(am + nb). z are integers with x|y. Also.).

nk denote the length of the longest chain. that can be selected from ak .)
111 Problem (Olimpíada matemática española.u
Practice
103 Problem Given that 5|(n + 2). for each 1 ≤ k ≤ mn+ 1. m+2. 1985) If n
n9 − 6n7 + 9n5 − 4n3 is divisible by 8640. which of the following are
divisible by 5 n2 − 4. .
102 Theorem If k|n then fk | fn . (Hint: Consider. ak+1 . the integers ak corresponding to these nk ’s cannot divide each other. .
109 Problem Prove that for n ∈ N.
Solution: Let. m+n are positive. separately. p + 4. If all the n consecutive integers are negative.
.
106 Problem Demonstrate that for all integer values n. except for 3.
101 Example (Putnam 1966) Let 0 < a1 < a2 < . and see that the corresponding product is positive. and so there is nothing to prove. .
Solution: n3 − n = (n − 1)n(n + 1) is the product of 3 consecutive integers and hence is divisible by 3! = 6. n n!m! n! If one of the consecutive integers is 0. for all integers n.
Proof: Letting s = kn.
n!(n−1)!
110 Problem (AIME 1986) What is the largest positive inte-
ger n for which (n + 10)|(n3 + 100)? (Hint: x3 + y3 = (x + y)(x2 − xy + y2 ). starting with ak and each dividing the following one. n2 + 8n + 7.
105 Problem Prove that
p. < amn+1 be mn + 1 integers. p + 2. each dividing the following. . . n2 − 2n?
104 Problem Prove that n5 − 5n3 + 4n is always divisible by
107 Problem Prove that if n > 4 is composite. . It is clear that if fn | fkn then fn | f(k+1)n . (n!)! is divisible by
(2m)!(3n)! (m!)2 (n!)3 is always an integer. . If this is so. and so we apply the ﬁrst result.t = n in the identity fs+t = fs−1 ft + fs ft+1 we obtain f(k+1)n = fkn+n = fn−1 fkn + fn fkn+1 . amn+1 . because ak |al implies that nk ≥ nl + 1.u
100 Example Prove that 6|n3 − n. or n + 1 of them. the cases when n is and is not a perfect square. prove that (n + 1)(n + 2) · · · (2n) is divisible by 2n . Since fn | fn·1 . 7. then the are at least m + 1 nk ’s that are the same. Prove that you can ﬁnd either m + 1 of them no one of which divides any other. then n divides (n − 1)!.
is a positive integer. .18
Chapter 2 Proof: Assume ﬁrst that all the consecutive integers m+1.) 108 Problem Prove that there is no prime triplet of the form
120. However. . . the divisibility by n! follows from the fact that binomial coefﬁcients are integers: m+n (m + n)! (m + n)(m + n − 1) · · · (m + 1) = = . we multiply by (−1)n . then the product of them is 0. n4 − 1. 5. the assertion follows. If no nk is greater than n.

. . − 8.} is the family of integers of the form 3k. This completes the proof. which means that r = 164. −2. k ∈ Z. 20 are composite. say r. Now. where a/b denotes the integral part of a/b. If the integer n > 1 is not prime.} is the family of integers of the form 3k − 1. 17. − 7. For assume that r ≥ b. It is important to realise that given an integer n > 0. Thus we must have 0 ≤ r < b. −6. r ≥ 0. then we say that it is composite. . 11. −9.
Solution: n2 + 23 = n2 − 1 + 24 = (n − 1)(n + 1) + 24. If we take n = 24k ± 1. But |r2 − r1 | < b. . 8.} is the family of integers of the form 3k + 1. k ∈ Z.
114 Example Show that n2 + 23 is divisible by 24 for inﬁnitely many n. −3.
For example. Hence d|358 = 2 · 179. . 7. is the same as the family 3k − 1. Thus (for example) 1059 = 5 · 179 + 164. 12. 0 ≤ r1 < b. 10. since r − b ≥ 0. The number 1 is neither a prime nor a composite. 8.
. all these values make the expression divisible by 24.
112 Theorem (Division Algorithm) If a. u It is quite plain that q = a/b . We conclude that d − r = 179 − 164 = 15. . we conclude that d = 179. . 0. 1417 and 2312 are divided by d > 1. . By the Well-Ordering Principle. S has a least element. then 24|(p2 − 1). 0 ≤
Proof: We use the Well-Ordering Principle. q2 . For example. From this. 3k + 1 or 3k + 2 where k ∈ Z. k ∈ Z and C = {. . . Then S is a collection of nonnegative integers and S = ∅ as a − b · 0 ∈ S . 3.
Solution: By the Division Algorithm. 2312 = q3 d + r. 1417 = q2 d + r.
113 Example (AHSME 1976) Let r be the remainder when 1059. . whence r2 = r1 . 6. 16. Find the value of d − r. 0 ≤ r2 < b. 15. then there are unique integers q. −5. 2. To show that r and q are unique. 2. k = 0. . 9.2 Division Algorithm
r < b. 5. . Then r > r − b = a − bq − b = a − (q + 1)b ≥ 0. But then a − (q + 1)b ∈ S and a − (q + 1)b < r which contradicts the fact that r is the smallest member of S . 19 are prime. From this it also follows that q1 = q2 . . Since d > 1. Observe that the family 3k + 2. 7. −4. 18. for some integers q1 . Let us prove that r < b. every integer lies in one of the families 3k. assume that bq1 + r1 = a = bq2 + r2 . b are positive integers. k ∈ Z. Consider the set S = {a − bk : k ∈ Z and a ≥ bk}. −1. . there must be some q ∈ Z such that r = a − bq since r ∈ S . . the Division Algorithm makes a partition of all the integers according to their remainder upon division by n. 2. 3. Then r2 − r1 = b(q1 − q2 ). d|1253 = 7 · 179 and 7|895 = 5 · 179. . . q3 . 14. . 4. . B = {. k ∈ Z. r such that a = bq + r. that is b|(r2 − r1 ). 13.Division Algorithm
19
2. 6.
115 Deﬁnition A prime number p is a positive integer greater than 1 whose only positive divisors are 1 and p. 1. 358 = 1417 − 1059 = d(q2 − q1 ). By construction. Thus Z = A ∪ B ∪C where A = {. 9. 1253 = 2312 − 1059 = d(q3 − q1 ) and 895 = 2312 − 1417 = d(q3 − q2 ). 1. 4.
116 Example Show that if p > 3 is a prime. 5. 1059 = q1 d + r.

128 Problem Prove that any integer n > 11 is the sum of two positive composite numbers. − < r ≤ . any integer comes in one of two ﬂavours: 2a or 2a + 1. . Hint: Think of n − 6 if n is even and n − 9 if n is odd. 11111.e. then we are done. then p is of the form p = 6k ± 1 (the other choices are either divisible by 2 or 3). 12k(3k − 1) is divisible by 24. and so there must be two whose sum or whose difference is divisible by 5. Solution: The square of any integer is of the form 4k or 4k + 1. no matter which integers are substituted. But (6k ± 1)2 − 1 = 36k2 ± 12k = 12k(3k − 1). is the square of an integer. 2n + 1 is prime. . If one of the three integers is of the form 5k. (2a)2 = 4a2 . 0 ≤ r < |b|.
Solution: By the Division Algorithm. .
Solution: It is clear that a3 b − ab3 = ab(a − b)(a + b) is always even. The assertion follows. integers come in one of six ﬂavours: 6k. 1111. Then a2 = 3x + 1.
118 Example Prove that no integer in the sequence
11.
125 Problem Demonstrate that there are no three consecutive
. If p > 3 is a prime. then 3|a and 3|b
Solution: Assume a = 3k ± 1 or b = 3m ± 1.. Prove that if one of the numbers 2n − 1. we are choosing three integers that lie in the residue classes 5k ± 1 or 5k ± 2. then the other is composite.
119 Example Show that from any three integers. b2 = 3y + 1.
124 Problem Prove that the square of any odd integer leaves
remainder 1 upon division by 8. 122 Problem Show that if a and b are positive integers. i.
120 Example Prove that if 3|(a2 + b2 ). then there are unique than zero. (2a + 1)2 = 4(a2 + a) + 1) and so the assertion follows. 111. 2 2
123 Problem Show that the product of two numbers of the
126 Problem Let n > 1 be a positive integer. integers q and r such that a = qb + r. one can always choose two so that a3 b − ab3 is divisible by 10. Two of them must lie in one of these two groups. 127 Problem Prove that there are inﬁnitely many integers n
such that 4n2 + 1 is divisible by both 13 and 5. then
there are unique integers q and r.20
Chapter 2
Solution: By the Division Algorithm. 3 |(a2 + b2 ). Since either k or 3k − 1 is even. But then a2 + b2 = 3t + 1 or a2 + b2 = 3s + 2. 6k ± 2 or 6k + 3. and so they cannot be the square of any integer. If not. and ε = ±1 such that a = b b qb + ε r. All the numbers in this sequence are of the form 4k − 1. Squaring. 6k ± 1.
Practice
121 Problem Prove the following extension of the Division odd integers such that each is the sum of two squares greater Algorithm: if a and b = 0 are integers.
117 Example Prove that the square of any integer is of the form 4k or 4k + 1.
form 4k + 3 is of the form 4k + 1.

since n2 + n + 1 is always greater than 1. Solution: If n = 1 this is quite evident.
.
2. y such that x(x + 1)|y(y + 1) but x |y and (x + 1) |y. For n ≥ 3 odd all the numbers below are integers: n4 + 22n = = = n4 + 2n2 2n + 22n − 2n2 2n (n2 + 2n )2 − n2(n+1)/2 (n2 + 2n + n2(n+1)/2 )(n2 + 2n − n2(n+1)/2 ).
Each factor is greater than 1 for n > 1.
131 Example Find all the primes of the form n3 − 1. y = (12k + 5)(18k + 7).
n
(n + 1)n − 1 =
k=1
n k n.Some Algebraic Identities
129 Problem Prove that 3 never divides n2 + 1. i. each factor is greater than 1.3 Some Algebraic Identities
In this section we present some examples whose solutions depend on the use of some elementary algebraic identities. Thus the only such prime is 7. n2 divides the quantity
(n + 1)n − 1.
133 Example Find all integers n ≥ 1 for which n4 + 4n is a prime.
Solution: n3 − 1 = (n − 1)(n2 + n + 1). b then p divides a. Assume n > 1.
Solution: Observe that
n4 + 4 = n4 + 4n2 + 4 − 4n2 = (n2 + 2)2 − (2n)2 = (n2 + 2 − 2n)(n2 + 2 + 2n) = ((n − 1)2 + 1)((n + 1)2 + 1).
135 Example Prove that if p is an odd prime and if
a = 1 + 1/2 + · · · + 1/(p − 1).
2
It is easy to see that if n ≥ 3. By the Binomial Theorem. for integer n > 1. so this number cannot be a prime. Clearly one must take n odd.
Solution: The expression is only prime for n = 1. n = 2.e. k
and every term is divisible by n2 . 130 Problem Show the existence of inﬁnitely many natural
21 and also x |(y + 1) and (x + 1) |(y + 1). we must have n − 1 = 1.
numbers x. If the expression were prime.
134 Example Prove that for all n ∈ N .
132 Example Prove that n4 + 4 is a prime only when n = 1 for n ∈ N. Hint: Try x = 36k + 14. and so n4 + 4 cannot be a prime.

n
Without calculation we see that 8767
˝ ˝ 137 Example (Eotvos 1899) Show that
2345
− 81012345 is divisible by 666. xy = 0. ak = a−1
k=0
upon letting a = x/y and multiplying through by y .22 Solution: Arrange the sum as 1+ 1 1 1 1 1 + + +···+ + . In that case. Therefore p = 250501. a−b
where k < 250000. a6 − b6 .
139 Example (Grünert. Since 7 and 271 have no prime factors in common.
Solution: If a = 103 . 1856) If x. ﬁnd it. z. the numerator of the resulting fractions is p. Also. Each term in the denominator is < p. Solution: By the preceding problem. b = 2 then 1002004008016032 = a5 + a4 b + a3 b2 + a2 b3 + ab4 + b5 = This last expression factorises as a6 − b6 a−b = (a + b)(a2 + ab + b2 )(a2 − ab + b2 ) = = 1002 · 1002004 · 998004 4 · 4 · 1002 · 250501 · k. n are natural numbers n ≥ z. Since p is a prime. the p on the numerator will not be thus cancelled out. Thus the expression 2903n − 803n − 464n + 261n is divisible by 7. and 261n − 464n is divisible by 261 − 464 = −203 = 7 · (−29).
136 Example Prove that
xn − yn = (x − y)(xn−1 + xn−2 y + xn−3 y2 + · · · + xyn−2 + yn−1 ) Thus x − y always divides xn − yn . then the relation
xn + yn = zn does not hold. p−1 2 p−2 (p − 1)/2 (p + 1)/2
Chapter 2
After summing consecutive pairs. Thus the expression is also divisible by 271. the result follows at once from the identity n−1 an − 1 a = 1. Solution: We may assume that x = y. we can conclude that the expression is divisible by 7 · 271 = 1897.
2903n − 803n − 464n + 261n is divisible by 1897 for all natural numbers n.
. the result being otherwise trivial. 2903n − 464n is divisible by 2903 − 464 = 9 · 271 and 261n − 803n is divisible by −542 = (−2)271.
138 Example ((UM)2C4 1987) Given that 1002004008016032 has a prime factor p > 250000. y. 2903n − 803n is divisible by 2903 − 803 = 2100 = 7 · 300 =.

11 and observing that (−y)n = −yn for n odd.
142 Example (S250) Show that for any natural number n.
is composite. .
143 Example Determine inﬁnitely many pairs of integers (m. k = 2. z then x < z and y < z. ..
148 Problem Let 0 ≤ a < b. This establishes the assertion.. x + y divides xn + yn . Prove that bn ((n + 1)a − nb) < an+1 . Show that
147 Problem Demonstrate that for any natural number n. n) such that M and n share their prime factors and (m − 1. 3. Prove that for n = 1. xx + 1. . 2.
Practice
144 Problem Show that the integer
number ·· 1 · ·ßÞ· · 1 − 2 ·ßÞ 2 ··
2n 1′ s n 2′ s
1.
141 Example Show that 1001 divides
11993 + 21993 + 31993 + · · · + 10001993 . there is another natural number x such that each term of the sequence
x + 1. is divisible by n. .. Solution: It sufﬁces to take x = 2n − 1. contrary to the assertion that xn + yn = zn . we may suppose that x < y..
3. 2. .
xn + yn = (x + y)(xn−1 − xn−2 y + xn−3 y2 − + − · · · + −xyn−2 + yn−1 ). Thus if n is odd. . 21993 + 9991993 . n − 1)
x
share their prime factors. Solution: Follows at once from the previous problem.
145 Problem Prove that 199 + 299 + 399 + 499 is divisible by
1.
ite. Solution: Take m = 2k − 1. .1 ßÞ
91 ones
is the square of an integer. then a4 + 4b4 is compos-
< 1+
1 n+1
n = 1. . xx + 1. . . Then m. n obviously share their prime factors and m − 1 = 2(2k−1 − 1) shares its prime factors with n − 1 = 2k+1 (2k−1 − 1). n = (2k − 1)2 . . By symmetry. Then zn − yn = (z − y)(zn−1 + yzn−2 + · · · + yn−1 ) ≥ 1 · nxn−1 > xn . . b−a
. the
bn+1 − an+1 > (n + 1)a.
146 Problem Show that if |ab| = 1. 2. since each of 11993 + 10001993 . Solution: This is evident by substituting −y for y in example 1. . y. . 1+ 1 n
n n+1
5. . So assume that xn + yn = zn and n ≥ z. .
140 Example Prove that for n odd.Practice
23
Solution: It is clear that if the relation xn + yn = zn holds for natural numbers x. 5001993 + 5011993 is divisible by 1001. .

. 444889. d be real numbers such that
a2 + b2 + c2 + d 2 = ab + bc + cd + da. c. k =
149 Problem If a. 1994) Let a. Show that divisible by 7. . 3(ab + bc + ca) ≤ (a + b + c)2 ≤ 4(ab + bc + ca). 1 < a ∈ N. .
162 Problem Let a > 1 be a real number.
is the square of an integer. b. . A > B. 154 Problem Find. prove that
(a + 1/2)n + (b + 1/2)n is an integer only for ﬁnitely many positive integers n. 44448889. Primes of the form 22 + 1 are positive integer.
n
1−
1 1 1 1 1 + − +···+ − 2 3 4 2n − 1 2n
. 157 Problem Prove that if an − 1. . b are positive integers.
150 Problem Prove that 100|1110 − 1. Show that 1 1+ n
n+1
Chapter 2
158 Problem (Putnam. Prove that a pair of the a. Primes of the form 2 − 1 are called Mersenne primes. Suppose that A and B have more than half of their digits on the sinistral side in common. . satisfying 155 Problem Prove that the number 22225555 + 55552222 is
a + b + c + d = a3 + b3 + c3 + d 3 = 0..
160 Problem Find all the primes of the form n3 + 1. 22 + 1 divides 22
2n +1 n
2
n
same number of digits.
152 Problem Demonstrate that every number in the sequence
− 2. . . Simplify the ex-
pression
√ a+2 a−1+
√ a − 2 a − 1. 3. then n can be represented as the sum of n successive odd numbers. is prime. . Prove that 1 A1/n − B1/n < n for all n = 2.
the positive integers. beginning and ending in 1?
159 Problem Find the least value achieved by 36k − 5k . 2. 2. the unique square which is the 165 Problem (ITT. with proof. b. 151 Problem Let A and B be two natural numbers with the
1. . 1 < a ∈ N. . c. b. (Hint: Consider 2222
5555
+4
5555
+ 5555
2222
−4
2222
+4
2222
−4
5555
.)
ural numbers is never a perfect square. ··
n 4′ s n−1 8′ s
163 Problem Let a. 161 Problem Find a closed formula for the product
P = (1 + 2)(1 + 22 )(1 + 22 ) · · · (1 + 22 ).
153 Problem (Polish Mathematical Olympiad) Prove that 164 Problem Let a. d must add up to 0. . Prove that a = b = c = d. then 168 Problem (Catalan) Prove that
156 Problem Prove that if an + 1. called Fermat primes. . .
166 Problem Prove that the product of four consecutive nat-
divisible by 7. is prime. . b. 4. 4 · ·ßÞ· · 4 8 ·ßÞ 8 9.
·· 49. 4489. then a
a = 2 and n is a prime. d be complex numbers product of four consecutive odd numbers. c.24 4. Use this to prove that for all positive integers n. then the number 13n + 6 is gle. written as usual in base-ten are such that their digits are alternating 1’s and 0’s. Show that if n is a k k is even and n is a power of 2. c be the lengths of the sides of a trianif n is an even natural number. Hint: What is (n2 + n − 1)2 ?
167 Problem Let k ≥ 2 be an integer. 1989) How many primes amongst
1 > 1+ n+1
n+2
n = 1.

each raised to the fourth power. 3. that none of the digits 2. there are always at least one and at most four numbers that are not divisible by any of the numbers 2. 4. 1975) Supposing that an integer n is
divides 1k + 2k + · · · + nk . . a2 + a b2 + b + . n= 2 2
. show that if 4n + 1 = x2 + y2 . + n. 5.
lar number is one of the form 1 + 2 + . b are natural numbers such
25 write 4n + 1 as the sum of two squares.
173 Problem (Polish Mathematical Olympiad) Prove
1 1 1 1 1 a = 1− + − +···− + . b 2 3 4 1318 1319 prove that 1979|a. 4n + 1 = x2 + y2 where x and y are expressed in terms of a and b. Conversely. 1+2+···+n
171 Problem Demonstrate that there are inﬁnitely many
square triangular numbers. 1979) If a. Prove 174 Problem Show that if k is odd. n ∈ N. 7. then n is the sum of two triangular numbers. 9 can be the last digit of a triangular number. equals the ﬁfth raised to the fourth power?
the sum of two triangular numbers.
170 Problem (Polish Mathematical Olympiad) A triangu-
that
that amongst ten successive natural numbers. 7.
172 Problem (Putnam. .Practice equals 1 1 1 + +···+ . n+1 n+2 2n
169 Problem (IMO.
175 Problem Are there ﬁve consecutive positive integers such that the sum of the ﬁrst four.

178 Example Prove that 7 divides 32n+1 + 2n+2 for all natural numbers n. Thus a ± c = b ± d + m(k1 ± k2 ) and ac = bd + m(k2 b + k1 d).
Solution: 62 ≡ −1 mod 37. which is patently false. For example. −8 ≡ −1 ≡ 6 ≡ 13 mod 7. Hence 32n+1 + 2n+2 ≡ 7 · 2n ≡ 0 for all natural numbers n. Property (4) follows by successive application of (3). and (5) follows from (4). Zn
3. For example 875961 · 2753 = 2410520633. For if this were true then (8 + 7 + 5 + 9 + 6 + 1)(2 + 7 + 5 + 3) ≡ 2 + 4 + 1 + 0 + 5 + 2 + 0 + 6 + 3 + 3 But this says that 0 · 8 ≡ 8 mod 9. we can ﬁnd k1 . It also indicates that a and b leave the same remainder upon division by n. a + c ≡ b + d mod m 2.
mod 9. These equalities give (1). and it means that n|(a − b). m ∈ Z. b. we deduce that a ≡ b mod n if and only if there is an integer k such that a = b + nk. (2) and (3). k ∈ with a ≡ b mod m and c ≡ d mod m. We start by mentioning some simple properties of congruences. a − c ≡ b − d mod m 3.
177 Example Find the remainder when 61987 is divided by 37. d.
.
176 Lemma Let a. ak ≡ bk mod m 5. k2 ∈ Z with a = b + k1 m and c = d + k2 m. ac ≡ bd mod m 4. 26 mod 7. Proof: As a ≡ b mod m and c ≡ d mod m.
Solution: Observe that 32n+1 ≡ 3 · 9n ≡ 3 · 2n mod 7 and 2n+2 ≡ 4 · 2n mod 7.1 Congruences
The notation a ≡ b mod n is due to Gauß. u Congruences mod 9 can sometimes be used to check multiplications. Thus 61987 ≡ 6 · 61986 ≡ 6(62 )993 ≡ 6(−1)993 ≡ −6 ≡ 31 mod 37. If f is a polynomial with integral coefﬁcients then f (a) ≡ f (b) mod m. c.Chapter
3
Congruences. Since n|(a − b) implies that ∃k ∈ Z such that nk = a − b. Then
1.

1. Therefore the perfect squares mod 13 are 0.
7
7
mod 10. we obtain 02 ≡ 0. 72 ≡ 1 mod 4 and so 77 ≡ (72 )3 · 7 ≡ 3 mod 4. and 10. Hence 27 · 5 ≡ −1 mod 641 and 54 ≡ −24 mod 641. thus each year.
182 Example Prove that 7|(22225555 + 55552222 ).
184 Example Prove that every year. 5555 ≡ 4 mod 7 and 35 ≡ 5 mod 7. 9. 12 ≡ 1. But 2 is not a perfect square mod 5.
Solution: First observe that we only have to square all the numbers up to 6. because r2 ≡ (13 − r)2 mod 13.
27
Solution: Observe that 641 = 27 · 5 + 1 = 24 + 54 .
7
Solution: We must ﬁnd 77 mod 10. Upon assembling all this.
183 Example Find the units digit of 77 . Also. including any leap year.
Solution: It is enough to prove that each year has a Sunday the 1st. that March 1st is the 50th or 51st day of the year. 62 ≡ 10 mod 13. 12. which means that 641|(232 + 1). Squaring the nonnegative integers up to 6. Now. This last congruence and 54 ≡ −24 mod 641 yield −24 · 228 ≡ 1 mod 641.
181 Example Prove that there are no integers with x2 − 5y2 = 2. 32 ≡ 9. 42 ≡ 3. 72 ≡ −1 mod 10. which means that there is an integer t such that 77 = 3 + 4t. then x2 ≡ 2 mod 5. 52 ≡ 12. 77 ≡ 74t+3 ≡ (74 )t · 73 ≡ 1t · 3 ≡ 3 Thus the last digit is 3. and so 73 ≡ 72 · 7 ≡ −7 ≡ 3 mod 10 and 74 ≡ (72 )2 ≡ 1 mod 10.
. etc.) Now.
180 Example Find the perfect squares mod 13. 3. Now. the ﬁrst day of a month in each year falls in one of the following days: Month Day of the year mod 7 January 1 1 February 32 4 March 60 or 61 4 or 5 April 91 or 92 0 or 1 May 121 or122 2 or 3 June 152 or 153 5 or 6 July 182 or183 0 or 1 August 213 or 214 3 or 4 September 244 or 245 6 or 0 October 274 or 275 1 or 2 November 305 or 306 4 or 5 December 335 or 336 6 or 0 (The above table means that. depending on whether the year is a leap year or not.Congruences
179 Example Prove the following result of Euler: 641|(232 + 1). Now. 22 ≡ 4. whether leap or not. Now 22225555 + 55552222 ≡ 35555 + 42222 ≡ (35 )1111 + (42 )1111 ≡ 51111 − 51111 ≡ 0 mod 7. has at least one Sunday the 1st. 27 · 5 ≡ −1 mod 641 yields 54 · 228 = (5 · 27 )4 ≡ (−1)4 ≡ 1 mod 641. each remainder class modulo 7 is represented in the third column. has at least one Friday 13-th. 4.
Solution: 2222 ≡ 3 mod 7.
Solution: If x2 = 2 − 5y2 .

What is the remainder when the 1994-th term of the sequence is divided by 1000? Solution: We want 3|n2 − 1 = (n − 1)(n + 1). . . 24. this requires n = 3k + 1 or n = 3k − 1. or 6 upon division by 7. . 15. consists of those positive multiples of 3 that are one less than a perfect square. every power of 2 is congruent to 1. produces the terms n2 − 1 = (3k − 1)2 − 1 which are the terms at odd places of the sequence 3. n14 ) if any. . 24. 22 ≡ 4. 4. and this cycle of three repeats. 48. Hence 23k + 27 ≡ 1 + 27 ≡ 0 mod 7 for all positive integers k.. . . 2. . n2 . All perfect fourth powers mod 16 are ≡ 0 or 1 mod 16. or 4 mod 7. 23 ≡ 1. . 24. 2. Then [(10
20000
)/10
100
+3] = [(a−3)
200
1 /a] = [ a
200 k=0
200 200−k a (−3)k ] = k
199 k=0
200 199−k a (−3)k . k
Since
k=0
(−1)k
200 = 0. k = 1. Since 3 is prime. Now. The sequence 3k + 1. . . never leaves remainder 1 when divided by 7. This is an impossibility. . k
199
200 199−k a (−3)k ≡ 3199 k
(−1)k
k=0
200 ≡ −3199 ≡ 3 mod 10. 26 ≡ 1 mod 7 and so 23k ≡ 1 mod 3 for all positive integers k. y such that x3 = 2y + 15?
Solution: No. 1994) The increasing sequence
3. But 1599 ≡ 15 mod 16. 15. k = 1.. Thus 2k − 5 can leave only remainders 3. . This means that n4 + · · · + n4 1 14 can be at most 14 mod 16. the term sought is (3(997) + 1)2 − 1 ≡ (3(−3) + 1)2 − 1 ≡ 82 − 1 ≡ 63 mod 1000. k = 1. .. Finally. 3. 1.
188 Example (AIME. 24 ≡ 2. . 15. 3. of the Diophantine equation n4 + n4 + · · · + n4 = 1599. The sequence 3k − 1. . or 5 mod 7. . produces the terms n2 − 1 = (3k + 1)2 − 1 which are the terms at even places of the sequence of 3. . 2. .
Chapter 3
Solution: Observe that 21 ≡ 2. . The perfect cubes mod 7 are 0. 2. . As a ≡ 3 mod 10. . 1 2 14 Solution: There are no such solutions. . 2. 48. 25 ≡ 4. 2. . and 6.
190 Example (Putnam. . 22 ≡ 4. k = 0. . 1986) What is the units digit of
1020000 ? 10100 + 3 Solution: Set a−3 = 10
200 100
. . 1.
186 Example Are there positive integers x. (3)199 k
199 k=0
199
(−1)k
k=0
200 = −3199 .28
185 Example Find inﬁnitely many integers n such that 2n + 27 is divisible by 7. We must ﬁnd the 997th term of the sequence 3k + 1. k
. This produces the inﬁnitely many values sought.
Solution: 21 ≡ 2. . apart from permutations. . 48. 23 ≡ 1 mod 7.
187 Example Prove that 2k − 5. Thus 2y + 15 ≡ 2. 1979) Determine all nonnegative integral solutions
(n1 .
189 Example (USAMO.. k = 1. . The remainder sought is 63.

−k ≡ b. a2n+1 be a set of integers such that if any one of them is removed. This solves the problem. . Solution: Using the Binomial Theorem. depending on whether they are all even. Thus they are all congruent mod 4. Solution: We have
n!! = n! (1/2! − 1/3! + · · · + (−1)n /n!) . .
where M is an integer. n!! ≡ n! n! − n!! = = = mod (n − 1). The assertion follows.
193 Example Prove that
n−1
(kn)! ≡ 0 if n. a2 . −k ≡ c. or all odd.
mod
r=0
(n + r)
Solution: (kn)! = M(n − 1)!n(n + 1) · · · (2n − 1) for some integer M ≥ 1.
29
Solution: The integers a. the remaining
ones can be divided into two sets of n integers with equal sums.
. −23n+1 2k
mod 23n+2
when n is of the form 2k. 1973) Let a1 .
195 Example Prove that
6n+2 k=0
6n + 2 k 3 ≡ 0. 2k
1 3n+1 (a + b3n+1 ) 2
=
3n + 1 2 3n + 1 3n+1−2r r 2 3. n > 3.
192 Example (Putnam. n |(k + c). k ≤ n − 2. . 23n+1 . The property stated in the problem is now shared by ak /2 or (ak − 1)/2. c belong to at most three different residue classes mod n. Solution: As the sum of the 2n integers remaining is always even. n ≥ k ≥ 2. say k for which −k ≡ a. b = 2 − 3. = a2n+1 .
k=0
√ √ 6n + 2 k 3 = (1 + 3)6n+2 + (1 − 3)6n+2 . . all the ak must have the same parity. and this may only happen if they are all equal. b. Thus there must be a residue class. mod n. 4k + 3 or 4k + 1 respectively. .
3n+1
2S := 2 √ √ Also.Congruences
191 Example Prove that for any a. b. . n ∈ N. since (n − 2)! is divisible by k!. Since n > 3. no matter which of the ak be taken. k ∈ N. Prove that a1 = a2 = .
n(n − 1)(n − 2)!(1 − 1/2! + · · · + (−1)n−1 /(n − 1)! + (−1)n /n!) (n − 1) m + (−1)n−1 n/(n − 1) + (−1)n /(n − 1) (n − 1) (m + (−1)n ) .
194 Example Let
Prove that for all n ∈ N. with a = 2 + 3. we have more than three distinct residue classes. c ∈ Z. 2r
r=0
≡ 3(3n+1)/2 mod 4 ≡ (−1)(n−1)/2 mod 4. n > 3. there is an integer k such that n |(k + a). n |(k + b). Continuing in this manner we arrive at the conclusion that the ak are all congruent mod 2k for every k. if n is odd.

800000007 = x2 + y2 + z2 . 3n + 1 2r+1 3n−2r 2 3 2r + 1
≡ 2(6n + 1)33n mod 8 ≡ 4n + 2 mod 8. a3 − b3 .
n n − [ ] is divisip p
ble by p. S ≡ 23n+2 2n + 1 mod 23n+4 . . then a and b must also be integers. 1986) What is the smallest integer n > 1.
213 Problem Find the last two digits of 3100 . for all n ≥ p.
n
n
remainder when a83 is divided by 49. then 3|abc. 214 Problem (USAMO.
198 Problem (P OLISH M ATHEMATICAL O LYMPIAD ) What
digits should be put instead of x and y in 30x0y03 in order to 209 Problem Prove that 5 never divides give a number divisible by 13?
n
199 Problem Prove that if 9|(a3 + b3 + c3 ). 206 Problem Prove that there are no integers with
Note. . S ≡ (−1)(n−1)/2 23n+1 If n is even. . 1 3n+1 (a + b3n+1 ) 2 =
2r≤3n
Chapter 3
mod 23n+3 . for odd n. for
23k
k=0
integers a. 207 Problem Prove that the sum of the decimal digits of a perfect square cannot be equal to 1991. 50} such that no pair of distinct elements of S has a sum divisible by 7? 204 Problem Prove that there are no integer solutions to the
power of 2 mod 3n . .) 208 Problem Prove that
197 Problem (AIME 1983) Let an = 6n + 8n .
(Hint: n2 + 15n + 122 ≡ n2 + 3n + 2 = (n + 1)(n + 2) mod 6. So for even n. for which the root-mean-square of the ﬁrst n positive integers is an integer?
equation x2 − 7y = 3. a2 − b2 . 2.30 As 2S = 23n+1 (a3n+1 + b3n+1 ). 203 Problem (AHSME 1992) What is the size of the largest subset S of {1. .
The root mean square of n numbers a1 .
Practice
196 Problem Find the number of all n. . c. 201 Problem Prove that if
2n + 1 . we have. . .
200 Problem Describe all integers n such that 10|n10 + 1. Determine the
7|42 + 22 + 1 for all natural numbers n. .
211 Problem How many perfect squares are there mod 2n ? 212 Problem Prove that every non-multiple of 3 is a perfect
a − b. 2k + 1
210 Problem Prove that if p is a prime. .
202 Problem Find the last digit of 3100 . a2 . an is deﬁned to be a 2 + a 2 + · · · + a2 n 1 2 n
1/2
. 1 ≤ n ≤ 25 such that n2 + 15n + 122 is divisible by 6.
. a4 − b4 .
205 Problem Prove that if 7|a2 + b2 then 7|a and 7|b. b. are all integers. .

It follows that n = ak 10k + · · · + a1 10 + a0 ≡ ak + · · · + a1 + a0 . 1975) Let a1 . For let n = ak 10k + ak−1 10k−1 + · · · + a1 10 + a0 . r which satisfy the equation Prove that
pa = qb + rc (a. c. . this number is divisible by 9 if and only if 19 + 20 + 21 + · · · + 92 = 372 · 3 is. 7 ≡ 44444444 ≡ A ≡ B ≡ C mod 9.
216 Problem Show that the number 16 is a perfect 8-th power
k
ai (x2 + 1)3i
i=0 k
mod p for any prime p. 912282219 ≡ 9−1+2−2+8−2+2−1+9 ≡ 7 mod 11 and so 912282219 is not divisible by 11.
221 Theorem (Casting-out 9’s) A natural number n is divisible by 9 if and only if the sum of it digits is divisible by 9.
. 4444 log10 4444 < 4444 log10 104 = 17776. that is. Therefore. . prove that n −n +n−1
n 2
xn + yn = zn for an odd integer n ≥ 3.Divisibility Tests
31
215 Problem Find all integers a. Therefore n ≡ (−1)k ak + (−1)k−1 ak−1 + · · · − a1 + a0 mod 11. The most famous one is perhaps the following. Let C be the sum of the digits of B. Of all the natural numbers ≤ 45. so the sum of the digits of 44444444 is at most 9 · 17776 = 159984. k be arbitrary integers. Amongst all natural numbers ≤ 159984 the one with maximal digit sum is 99999. q. 1992) The two-digit integers from 19 to 92 are written consecutively in order to form the integer
192021222324 · · · 89909192. 39 has the largest digital sum. This means that 44444444 has at most 17776 digits. whence A ≤ 159984. i = 0. For example.2 Divisibility Tests
Working base-ten. But since C ≡ 7 mod 9. a > 1 and all prime 219 Problem Let x and ai . c. a2 .
218 Problem For each integer n > 1. be an increasing
is divisible by x2 ± x + 1 if and only if by x2 ± x + 1. q. . numbers p.
is divisible by (n − 1)2 . . it follows that C = 7.
(−1)i ai is divisible
i=0
sequence of positive integers. we have an ample number of rules of divisibility. By the casting-out 9’s rule. r need not necessarily be different).) Solution: We have 4444 ≡ 7 mod 9. a3 . 1. so it follows that B ≤ 45. we have 10 j ≡ 1 mod 9. b. z are positive integers with am = xas + yat with positive integers x and y and t > s. Find the sum of the digits of B. Thus 44444444 = 44443(1481) · 4444 ≡ 1 · 7 ≡ 7 mod 9. As 10 ≡ 1 mod 9. . (A and B are written in decimal notation. Thus the sum of the digits of B is at most 12.
223 Example (IMO. whereas 8924310064539 ≡ 8 − 9 + 2 − 4 + 3 − 1 + 0 − 0 + 6 − 4 + 4 − 3 + 9 ≡ 0 mod 11. u
222 Example (AHSME. Let B be the sum of the
digits of A. and so 8924310064539 is divisible by 11. the sum of its digits is A. . prove that z cannot be a prime-power. and hence 44443 ≡ 73 ≡ 1 mod 9.
3. y.
217 Problem (IMO. p. A criterion for divisibility by 11 can be established similarly. What is the largest power of 3 that divides this number? Solution: By the casting-out-nines rule. As 10 ≡ −1 mod 11. we have 10 j ≡ (−1) j mod 11. Now. Prove that for every s ≥ 1 there are inﬁnitely many am that can be written in the form 220 Problem ((UM)2C9 1992) If x. the number is divisible by 3 but not by 9.
Proof: Let n = ak 10k + ak−1 10k−1 + · · · + a1 10 + a0 be the base-10 expansion of n. n is divisible by 11 if and only if the alternating sum of its digits is divisible by 11. whence the theorem. namely 12. b. . 1975) When 44444444 is written in decimal notation.

2y. By the relative primality of a and b it follows that a|a0 . and let p(x) = a0 + a1 x + · · · + an xn . Solution: Suppose that f (a/b) = 0. each throwing a coconut to the monkey and taking one ﬁfth of the remain. 321 is a cute three-digit number because 1 divides 3. 1 ≤ k ≤ n. . prove that f (x) = 0 has no rational roots.
228 Problem An old receipt has faded. After throwing a coconut to a monkey to make the division come out even.
231 Problem ((UM)2C8 1991) Suppose that a0 . . Show that if 1 ≤ k ≤ n. b|an . 111 111 111 is divisible by 9. mod 2. . one after the other. Suppose that x0 is a rational number such that p(x0 ) = 0. For example. where x and y are unreadable digits. the new 1953-digit number is also divisible by 27. n} and its ﬁrst k digits form an integer that is divisible by k for all k. How much did each chicken cost?
Answer: 73 cents. an and f (1) are all odd. .
229 Problem Five sailors plan to divide a pile of coconuts
fn+60 ≡ fn mod 10. k ∈ N if
integers with an = 0.
226 Problem How many ways are there to roll two distin-
tical digits is divisible by 3n . . If a0 . he Thus the last digit of a Fibonacci number recurs in cycles of takes one ﬁfth of the pile and goes back to sleep.
227 Problem Prove that a number is divisible by 2k . a1 . The other length 60. For example. How many cute sixdigit integers are there?
piles. What is the smallest amount of coconuts that could have been in the original pile? Answer: 15621
230 Problem Prove that a number which consists of 3n iden-
Answer: 2. . amongst themselves in the morning. and 3 divides 321. whence a and b are both odd. the monkey and divide the remaining coconuts into ﬁve equal
. 2. then if we read these digits in the same direction beginning with any other digit. It reads 88 chickens at the total of $x4. Prove that if the 1953-digit numbers obtained when we read these digits in dextrogyral sense beginning with one of the digits is divisible by 27. . an are
guishable dice to yield a sum that is divisible by three? Answer: 12.
232 Problem 1953 digits are written in a circular order. Then 0 = bn f (a/b) = a0 bn + a1 bn−1 a + · · · + an−1 ban−1 + an an . Hence a0 bn + aa bn−1 a + · · · + an−1 ban−1 + an an ≡ a0 + a1 + · · · + an = f (1) ≡ 1 but this contradicts that a/b is a root of f . Test whether 90908766123456789999872
is an integer. In the morning the ﬁve sailors throw a coconut to 2 2 f2n+1 ≡ fn+1 mod fn . one of them wakes up and decides to take his share. four sailors do likewise.32
224 Example (Putnam. During the night. 1952) Let
Chapter 3
n
f (x) =
k=0
ak xn−k
be a polynomial of degree n with integral coefﬁcients. where a and b are relatively prime integers. 2 divides 32.234 Problem Prove that ing pile. then
2 ak x0 + ak+1 x0 + · · · + an xn−k+1
and only if the number formed by its last k digits is divisible by 2k .
Practice
225 Problem (AHSME 1991) An n-digit integer is cute if its n digits are an arrangement of the set {1. 233 Problem (Lagrange) Prove that
is divisible by 8.

For example. 2}. We now let 0 represent all those integers that are divisible by 3. 3. +n >. and consider the set Z3 = {0. 1. Given a.. 2. c ∈ Z3 we have a +3 (b +3 c) = (a +3 b) +3 c. an element such that a +3 b = b +3 a = 0. 15. 0)
are in Z12 such that a +12 b = 0?
. this set will form a complete set of residues modulo n if and only if the set has n members and every member of the set is incongruent modulo n. 0 satisﬁes 0 +3 a = a +3 0 = a for all a ∈ Z3 2. Every element a ∈ Z3 has an additive inverse b. that is. . We will explore later the multiplicative structure of Zn . 1. 4. 237 Problem How many distinct ordered pairs (a. In Z3 we note that −0 = 0.e. Notice that the set B = {−40. Now. 22. +3 0 1 2 0 0 1 2 1 1 2 0 2 2 0 1 +6 0 1 2 3 4 5 0 0 1 2 3 4 5 1 1 2 3 4 5 0 2 2 3 4 5 0 1 3 3 4 5 0 1 2 4 4 5 0 1 2 3 5 5 0 1 2 3 4
Table 3.
Practice
236 Problem Construct the addition tables for Z8 and Z9 . 1 represent all those integers that leave remainder 1 upon division by 3. −1 = 2. +3 > forms a group and we call it the group of residues under addition mod 3.e. We observe that Z3 together with the operation +3 as given in Table 3. but the set C = {−3. Table 3. We denote the additive inverse of a by −a. 3} does not. 6.3 Complete Residues
The following concept will play a central role in our study of integers. 5} forms a complete set of residues mod 6. b) = (0. the set A = {0. as the group of residues under addition mod n. We deﬁne addition in Z3 as follows.
It is clear that given any ﬁnite set of integers. b. i. there is c ∈ {0. −2. . as −3 ≡ 3 mod 6.Complete Residues
33
3. We then deﬁne a +3 b to be equal to c. 3. let us take n = 3. 7. A set a1 . 2. and 2 all those integers that leave remainder 2 upon division by 3.2: Addition Table for Z6
Tied up with the concept of complete residues is that of Zn . a2 .2). an is called a complete residue system
modulo n if for every integer b there is exactly one index j such that b ≡ a j mod n. Similarly we deﬁne < Zn .1: Addition Table for Z3
Table 3. −1. The operation addition in Z3 is associative. As an example. 35} forms a complete residue set mod 6. +6 > on Table (1. The element 0 ∈ Z3 is an identity element for Z3 . 1. As a further example we present the addition table for < Z6 . for all a. . 1.
235 Deﬁnition If a ≡ b mod n then b is called a residue of a modulo n. 2} such that a + b ≡ c mod 3. i.3 satisﬁes the following properties: 1. −2 = 1. We then say that < Z3 .3 contains all the possible additions. since any integer x is congruent to one and only one member of A . b ∈ Z3 we consider a + b mod 3.

we can ﬁnd integers q. i. b]|c. then a|c. the largest positive integer that divides both a. −6) = 2. Proof: Let A = {ax + by|ax + by > 0. not both zero. because any common divisor of a and b must divide the largest common divisor of a and b. u
It is clear that any linear combination of a. say d. Assume that t|a. then r ∈ A is smaller than the smaller element of A . x. Therefore. For example. ±b is in A . then they have no factor greater than 1 in common. b is divisible by (a. gcd(1998. there are integers x. By the Well Ordering Principle. n. b are integers.
239 Lemma (Euclid’s Lemma) If a|bc and if (a. This entails dq = a. Clearly one of ±a. Since a|bc. The theorem is thus proved.
238 Theorem (Bachet-Bezout Theorem) The greatest common divisor of any two integers a. namely d. b = tn for integers m. d|b and that if t|a.t|b.t|b. r. there are x0 . From this it follows that a|c. as both a. b are relatively prime. as wanted. not both zero. Thus if a. there is an integer s with as = bc. y0 such that d = ax0 + by0 . b]. By the Division Algorithm. We can similarly prove that d|b. b). b) = 1. y with ax + by = 1.e. b) or sometimes by gcd(a. b can be written as a linear combination of a and b. b) = ax + by. Hence d = ax0 + bx0 = t(mx0 + ny0 ). i. This is denoted by [a. A has a smallest element. Thus r = 0. 1999) = 1. b). b are not zero. y with
(a. since c is a common multiple of both a and b. t|d. Then r = a − dq = a(1 − qx0 ) − by0 . If r > 0. then t|d. We see then that if a|c and if b|c. b is called the greatest common divisor of a and b. We prove that d = (a. (68.Chapter
4
Unique Factorisation
4. b). The most important theorem related to gcd’s is probably the following.e. the smallest positive integer that is a multiple of a. Then a = tm. b) = 1. We ﬁrst prove that d|a. d|a.. Then c = c · 1 = cax + cby = cax + asy. If a. there are integers x.1 GCD and LCM
If a. This is denoted by (a. then [a. it must be divisible by the smallest common multiple of a and b.
Proof: As (a.u 34
. we say that a and b are relatively prime or coprime. 0 ≤ r < d such that a = dq + r. To do this we prove that d|a. b is called the least common multiple of a and b. b). y ∈ Z}. If (a. b) = 1. a contradiction. b ∈ Z. by the Bachet-Bezout Theorem. Thus if d|a and d|b then d|(a. that is.

cb) and d2 = (a. b/d) divides this linear combination. n) = 1. d|3a2 . On the other hand. b) = 1. b a . cb) = |c|(a. cb) = c(a. b)c) divides (a. i. we deduce (a2 . (a. b2 ) = (a. (a.. b) = d. n) = 1.
. b) = 1. bc) divides a and bc. (m. But then (a/d)x + (b/d)y = 1. c. bc) = (a. bc) divides (ac. Thus gcd(a. ) = 1. b) for any non-zero integer c. b)c) divides a and bc and hence gcd(a. bc).u
243 Theorem (a2 . n) = 1 implies (m2 . (a. Hence d divides 3b(a + b) − 3ab = 3b2 . bc) = c(a. As (m. Thus cd2 is a common divisor of ca and cb and hence d1 |cd2 . b.
(a.
Solution: Let d = (a + b. b2 ) = 3(a. b/d are integers. and a/d. which is what we wanted. cd2 |d1 .GCD and LCM
240 Theorem If (a. Using the preceding problem again. i. Now d divides (a + b)2 − a2 + ab − b2 = 3ab. hence it divides ac and bc. divides 1. cd2 |cb. By the Bachet-Bezout Theorem we can ﬁnd integers x.
242 Lemma For nonzero integers a. d d Proof: By the Bachet-Bezout Theorem.e.
Proof: Since (a. n)m)n).e. b)c). b)2 . upon multiplying by (a. We prove that d1 |cd2 and cd2 |d1 .
By Theorem 241.u
244 Example Let (a. this last quantity equals (m2 . Proof: Let d1 = (ca. then
35
a b ( . b/d and so (a/d. y such that ax + by = d. b)c). But ax + by is a linear combination of a. b)c)| gcd(a. a2 − ab + b2 ). Then
(ca. There is an integer s then such that sd2 = ax + by. b/d) = 1. It follows that d1 = csd2 . Therefore (a. b). n) = (n. n2 ) = (m2 . y with d1 = acx + bcy = c(ax + by). bc) divides a and c(a. As d2 |a and d2 |b. (m. b). But this is a linear combination of a/d. b)2 (a.. b)2 . n)n) = (m2 . (n. (m2 . b) (a. (a. n)m) = 1. n2 ) = 1. n). 2 (a. Prove that (a + b. (a. Thus (m. (a. b).u
241 Theorem Let c be a positive integer. b) and so it divides (a. b)2 = 3. But then d|(3a2 . Similarly. By Theorem 240.
Proof: Assume that (m. then cd2 |ca. b)c it divides bc. there are integers x. b)2 . In conclusion. 3b2 ) = 3(a2 . b2 ) = (a. a2 − ab + b2 ) = 1 or 3. We conclude that (a/d. This ﬁnishes the proof. (a. b) and hence b2 a2 . u
It follows similarly that (ca. (m2 . (a. (m2 . b and so it is divisible by d2 . Using the preceding lemma twice.
= 1.

fm ). m form an arithmetic progression of length m and common difference m!. a = 1..
Solution: Let d = ( fn . Therefore dn |(2(200−n)+(2n+1)) = 401. n be positive integers. . a = (m. Solution: Set d = ( fn . 1 ≤ l < s ≤ m. Thus d|( fn − fn−1 ) = fn−2 . 2n + 1). 2n + 1 = ld.
Solution: The numbers km! + 1.
n≥1
248 Example Prove that if m and n are natural numbers and m is odd. t|((amx − 1) − ad (a−ny − 1)) = ad − 1. d = 1. Iterating on this process we deduce that d| f1 = 1 and so d = 1. As td + 1 = ud − 1. where t =
j=0
n n− j n− j−1 k d . . It follows that d must be an odd number. In the same manner. c = f(m. 116. Could it be that large? The answer is yes.n) − 1. Thus 1 ≤ d < m and so.
251 Example Prove that
( fm . Thus d|(−1)n . for let n = 200.n) . The assertion is established. 2. by the Bachet-Bezout Theorem there are integers x. 2n + 1). . Solution: Set d = (m. an − 1). n = 1. . n). 2 Aliter: By Cassini’s Identity fn−1 fn+1 − fn = (−1)n . an+1 ).td = n. Thus the numerator and the denominator have no common factor greater than 1. fn+1 ). 2mn = (kd + 1)n = td + 1.36
245 Example Let a. Prove that
Chapter 4
(am − 1. This means that any two terms of this progression are coprime. 14n + 3
Solution: 2(21n + 4) − 3(14n + 3) = −1. They cannot both be positive because then d ≥ m + n. where we have used the fact that m is odd.m) . and 2m − 1 = kd.
247 Example (AIME. assume without loss of generality that x > 0. m. Thus dn |(2(100+n2 )−n(2n+1)) = 200−n. whence d = 1. are of the form an = 100 + n2 .
249 Example Prove that there are arbitrarily long arithmetic progressions in which the terms are pairwise relatively prime. For each n let dn = (an . Hence. 1985) The numbers in the sequence
101. 104. Suppose that d|(lm! + 1). for some natural
n−1
numbers k. we must have d|2. But then d|(sm! + 1 − sm!) = 1. Therefore. l. d|(sm! + 1). 2. . So. d| fn−1 .e. 109. then a200 = 100 + 2002 = 100(401) and a201 = 100 + 2012 = 40501 = 101(401). Now. 1959) Prove that the fraction
21n + 4 is irreducible for every natural number n.
Solution: Let d = (2m − 1. fn ) = f(n. y with mx + ny = d. This means that dn |401 for all n. an − 1) = a(m. As fn+1 − fn = fn−1 and d divides the sinistral side of this equality. . . then (2m − 1. since then d would be negative.
. n). y ≤ 0. Notice that x and y must have opposite signs (they cannot obviously be both negative. . i. when in fact we have d ≤ m. d|m!. Set t = (am − 1. We will prove that c|d and d|c. Thus (ad − 1)|(am − 1.. Thus max dn = 401. Then t|(amx − 1) and t|(a−ny − 1). an − 1 is divisible by ad − 1. d ≤ n). 2n + 1) = 1.
n≥1
Solution: We have the following: dn = (100 + n2 . Then d|(s(lm! + 1) − l(sm! + 1)) = (s − l) < m. k = 1. 2mn = (ld − 1)m = j
ud − 1. 100 + (n + 1)2 ) = (100 + n2 .
246 Example (IMO. . sd = m.
250 Example Prove that any two consecutive Fibonacci numbers are relatively prime. Find max dn . Then am − 1 = (ad )s − 1 is divisible by ad − 1 and similarly. 100 + n2 + 2n + 1) = (100 + n2 . an − 1). .

If it were the case that ( fn . fm )| fa f−xm+1 . Observe that fyn = fa−xm = fa−1 f−xm + fa f−xm+1 upon using the identity fs+t = fs−1 ft + fs ft+1 of Theorem 50. Find the greatest common divisor of
2n 2n 2n . This implies that ( fn . fm ).. a|m we have a ≤ n.. we have that fn | fyn . Solution: By the binomial absorption identity. As n|yn. y > 0. fn ) = 1. This means that d = (17. Observe that x. .e. a contradiction. fm )| f−xm . n+1 n n+1 Since 2n + 1 and n + 1 are relatively prime.
37
Now. Hence ( fn . Thus fa |( fm . fm )| fa . which obviously must be odd. 2 or 34.n) = f1 . 2k − 1
. The case = 1 is a triviality. c|d.GCD and LCM Since a|m and a|n. y cannot be both negative. i. As a|n. They cannot be both positive since then a = xm + yn ≥ m + n. n
254 Example Let n be a natural number. 1 3 2n − 1 Solution: Since
n k=1
2n = 22n−1 . fn ) = (34. otherwise a would be negative. We saw earlier that ( fn . a contradiction to the preceding problem in the case when ( fn ... fm ) > 1. then ( fn .
2n 1 .
Solution: Let d = (17. m|(−xm). . it must be the case that n + 1 divides 2n .. Then (17.
253 Example The Catalan number of order n is deﬁned as
Cn = Prove that Cn is an integer for all natural numbers n. fm )| fyn and ( fn . and since the dextral side is an integer. n+1 n
2n + 1 2n 2n + 1 = . a ≤ m. fm | f−xm . f3 or f9 .
252 Example Prove that no odd Fibonacci number is ever divisible by 17. there are integers x. which is what we wanted to prove. fa | fm and fa | fn by Theorem 102. Thus they are of opposite signs. and we assume without loss of generality that x ≤ 0. fm )| f−xm+1 . fn ) = ( f9 . Therefore ( fn . fm )| f−xm . y such that xm + yn = a. fn ) = f(9. fn ). This forces d = 1. fm ) would be dividing two consecutive Fibonacci numbers. by the Bachet-Bezout Theorem.

b = 2k − 1.
255 Example Let any ﬁfty one integers be taken from amongst the numbers 1. 2k − 1 2k − 1 2k − 2
But 2k − 1 |2l+1 for k > 1. then take a = 2k + 1. . 100. Now. Solution: Arrange the 100 integers into the 50 sets {1. b such that
(a. or 7. where M is odd. 2. . b) = 1764. 4}. 3. then is either of the form 4k or 4k + 2. . 2l+1 m 2l+1 m − 1 2l+1 m = . We claim that 2l+1
Chapter 4 2n = 2n. 2}. 6} .
Practice
258 Problem Show that 260 Problem Find two positive integers a. b. This establishes the claim. Those two are relatively prime. b ∈ N with (a. the problem amounts to ﬁnding those numbers less than 1260 which are not divisible by 2. as consecutive integers are relatively prime. . b)n = (an . Since the gcd must divide power of 2 that divides n. b = n − 2. These two are clearly relatively prime (why?). there must be two that will lie in the same set.
. we see that it has divide 2l+1 . We may write n = 2l m.
257 Example How many positive integers ≤ 1260 are relatively prime to 1260?
Solution: As 1260 = 22 · 32 · 5 · 7. b] = ab for all natural numbers a. 29!37!). If n = 4k + 2. Let A denote the set of integers ≤ 1260 which are multiples of 2. b) = 12. k > 1 take a = 2k + 3. . {99. etc. [a. 262 Problem Prove that (a. b] = 432. b)[a. If n is even.
259 Problem Find lcm (23!41!.38 the gcd must be of the form 2a . B the set of multiples of 3. 5. bn ) for all natural num-
bers n. and lcm (a. each of the
summands being relatively prime. |A ∪ B ∪C ∪ D| = |A| + |B| + |C| + |D| −|A ∩ B| − |A ∩C| − |A ∩ D| −|B ∩C| − |B ∩ D| − |C ∩ D| +|A ∩ B ∩C| + |A ∩ B ∩ D| + |A ∩C ∩ D| +|B ∩C ∩ D| − |A ∩ B ∩C ∩ D| 630 + 420 + 252 + 180 − 210 − 126 − 90 − 84 −60 − 36 + 42 + 30 + 18 + 12 − 6 = 972. we may choose a = 2. . Show that there are two that are
relatively prime.
261 Problem Find a.
=
The number of integers sought is then 1260 − 972 = 288. 100}. where l is the largest 1 divides all of them. {5. By the Inclusion-Exclusion Principle. .
a2 + b2 = 85113. Solution: If n is odd. Since we are choosing ﬁfty one integers. {3. If n = 4k. b = 2k − 1.
256 Example Prove that any natural number n > 6 can be written as the sum of two integers greater than 1.

. By the Well Ordering Principle. . . all b ∈ N such that
39
n 268 Problem Let Fn = 22 + 1 be the n-th Fermat number. 1 < a ≤ b < q. .
269 Problem Find the greatest common divisor of the se-
quence 16n + 10n − 1. n must have a least positive divisor greater than 1. n ∈ N. 271 Problem Prove that any natural number n > 17 can be
written as n = a + b + c where a. which contradicts the minimality of q.)
tions: 1. Fm ).
√ √ an + bn 2 = (1 + 2)n .
2. bn ) = 1 ∀ n.u
276 Theorem (Euclid) There are inﬁnitely many primes. . 1 < a ≤ b < n. p2 . 7n3 + 18n2 − n − 2) = 1. . An integer different from 1 which is not prime is called composite.. .272 Problem Prove that there are no positive integers a.
266 Problem Prove or disprove the following two proposi-
270 Problem Demonstrate that (n! + 1.. It is clear that if n > 1 is composite then we can write n as n = ab. a < b. If a. n > tive integers there are three whose product is divisible 1 with (an − bn )|(an + bn ). 1974) Call a set of integers conspir-
atorial if no three of them are pairwise relatively prime. b. ∈ N. k k k is 1. But then a is a divisor of n greater than 1 and smaller than q. Prove that gcd(an . Prove that the 273 Problem Prove that the binomial coefﬁcients have the
greatest common divisor of the numbers
following hexagonal property: gcd equals gcd n−1 n+1 n . (n + 1)! + 1) = 1. If a. .
. c. n = 1. a. c are pairwise relatively prime natural numbers each exceeding 1. b ∈ N. Find. it has at least one divisor > 1. k.
275 Theorem If n > 1. k−1 k+1 k
n n+1 n+k . n ≥ k > 0 be integers. What is the largest number of elements in any conspiratorial subset of the integers 1 through 16?
4. For if not then we can write q as q = ab. 265 Problem Let the integers an .
(2b − 1)|(2a + 1). We claim that q is prime. . then in any set of b consecutive integers there are two whose product is divisible by ab. k k+1 k−1 .
Proof: Since n > 1. then n is divisible by at least one prime. a < b < c. . b. b ∈ N. b. Clearly 2 is the only even prime and so 2 and 3 are the only consecutive integers which are prime. n−1 n n+1 . 2.Primes
263 Problem Let a ∈ N. by abc.
267 Problem Let n. (Hint: Consider n mod 12. Write two of the summands in the form 6k + s and the third summand as a constant.
264 Problem Show that (n3 + 3n + 1. (Hint: Prove
k
(−1) j
j=0
k j
n+ j = (−1)k .2 Primes
Recall that a prime number is a positive integer greater than 1 whose only positive divisors are itself and 1. bn be deﬁned by the relation
Find (Fn . . say q. then in any set of c consecu. pk be a list of primes. Construct the integer n = p1 p2 · · · pk + 1.) k
274 Problem (Putnam.. with proof.
Proof: Let p1 .

or is of the form 4k ± 1. |A35 | = 2. 3. |A30 | = 3. . Observe that p must be different from any of p1 . The assertion follows. If both a and b are > n. in view of the preceding problem. Now either N is a prime. in which case it is a prime of the form 4k − 1 not on the list.
Proof: (4a + 1)(4b + 1) = 4(4ab + a + b) + 1. |A7 | = 14. |A10 | = 10. 5. By the preceding theorem. Let Am denote the multiples of M which are ≤ 100. We have thus shown that given any ﬁnite list of primes of the form 4k − 1 we can always construct an integer which is divisible by some prime of the form 4k − 1 not on that list. |A3 | = 33.
√ √ √ Proof: Suppose that n = ab.
√ Solution: Observe that 100 = 10. < √ Thus n has a factor = 1 and ≤ n. . .u
277 Lemma The product of two numbers of the form 4k + 1 is again of that form. . N ≥ 11. pk since n leaves remainder 1 upon division by any of the pi . Then each of the numbers k! + 2.. u
281 Example Find the number of prime numbers ≤ 100. or it is a product of primes. and hence a prime factor. |A42 | = 2. or 7 ≤ 100 − 1 4 + 100 − (50 + 33 + 20 + 14) + (16 + 10 + 7 + 6 + 4 + 2) −(3 + 2 + 1 + 0) − 0 − 1 25. . |A70 | = 1. |A6 | = 16. |A15 | = 6. In the latter case.
where we have subtracted the 1. because 1 is neither prime nor composite. |A105 | = 0.e. k
. |A210 | = 0. all of the prime factors of N cannot be of the form 4k + 1.
282 Lemma If p is a prime. for the product of any two primes of this form is again of this form. all the composite numbers in the range 10 ≤ n ≤ 100 have a prime factor amongst 2. |A14 | = 7. pn } be any ﬁnite collection of primes of the form 4k − 1. .
Solution: Let k ∈ N. k ≥ 2.
280 Theorem If the positive integer n is composite. Construct the number N = 4p1 p2 · · · pn − 1. a contradiction. Observe that N is not divisible by any of the primes in our collection. We will show that the collection of primes of the form 4k − 1 is inexhaustible. . . Thus N must be divisible by some prime of the form 4k − 1 not on the list. it must have a prime divisor p. i. |A5 | = 20. Then |A2 | = 50. p2 . Thus the number of primes ≤ 100 is = = = = 100 − ( number of composites ≤ 1) − 1 4 + 100 − multiples of 2.
p is divisible by p for all 0 < k < p. p2 . 3. 5. .
Proof: Any prime either equals 2. Thus we have shown that no ﬁnite list of primes exhausts the set of primes. . or 7. that the set of primes is inﬁnite. . Since each pk is ≥ 3.u
278 Theorem There are inﬁnitely many primes of the form 4n + 3. Let {p1 . 1√ a ≤ b < n. which is ≤ n. then it must have a prime factor p with p ≤
√ n. then n = ab > n n = n. k! + k is composite. u
279 Example Prove that there are arbitrarily long strings that do not contain a prime number. |A21 | = 4.40
Chapter 4 This integer is greater than 1 and so by the preceding problem.

as guaranteed by Theorem 4. By the preceding lemma. 1 < n1 < n. 5. 3. Prove
that the prime factorisation of p + q has at least three (not necessarily distinct) primes.5. n ∈ Z. p divides each of the terms on the dextral side of the above.3 Fundamental Theorem of Arithmetic
Consider the integer 1332. 7 is the only prime triplet of the form p. then p|(n p−1 −
4.Practice Proof:
41
p(p − 1) · · · (p − k + 1) p = k! k p = p(p − 1) · · · (p − k + 1). as k < p. Otherwise. If n1 is a prime.
. This establishes the p
Practice
284 Problem Prove that there are inﬁnitely many primes of the form 6n + 5. as all 2. By Euclid’s Lemma. p p p + +···+ . 666 is clearly divisible by 6. 37 are prime. 1 2 p−1
as
p = 1.
290 Problem Let n > 2.
291 Theorem Every integer greater than 1 is a product of prime numbers. then the other is composite.
Solution: By the Binomial Theorem: 2 p − 2 = (1 + 1) p − 2 = p = 0 assertion. Set n = q1 n1 . By Theorem 4. Now. then we have nothing to prove.u k k
283 Example Prove that if p is a prime. and let q2 be its least prime divisor. Prove that if one of the numbers 2n − 1 and 2n + 1 is prime. induction on n. 286 Problem If p and q are consecutive odd primes. Finally. 5. Assume that n is composite and let q1 be its least proper divisor. If n is a prime. it must be the case that p| .
ap + bp a+b
divides p. prove
1). p |k!. then p divides 2 p − 2. We cannot further decompose 1332 as a product of positive integers greater than 1. 3. 4. We will show now that such decomposition is always possible for a positive integer greater than 1. and so 1332 = 2 · 2 · 3 · 111. q1 is a prime. Let p be a prime and let n ∈ N.
2. assume that n1 is composite. p + 4. then we arrived at the result. Prove that 42|n7 − n. b) = 1. n ∈ Z. Extend this result to all n ∈ Z. 285 Problem Use the preceding problem to show that there are inﬁnitely many primes p such that p − 2 is not a prime. p + 2.
Proof: Let n > 1.
1. 111 is also divisible by 3 and so we obtain 1332 = 2 · 2 · 3 · 3 · 37. that p|(n p − n). by 289 Problem Prove that 3. It is clearly divisible by 2 and so we obtain 1332 = 2 · 666. k
yields k! whence p|k!
p p . Prove. Prove Fermat’s Little Theorem: if p |n.
287 Problem
that a + b.5. Prove that 30|n5 − n. Now.
288 Problem Let p be an odd prime and let (a.

42

Chapter 4 We can write then n = q1 q2 n2 , 1 < n2 < n1 < n. Continuing the argument, we arrive at a chain n > n1 > n2 · · · > 1, and this process must stop before n steps, as n is a positive integer. Eventually we then have n = q1 q2 · · · qs . u

We may arrange the prime factorisation obtained in the preceding Theorem as follows, n = pa1 pa2 · · · pk k , a1 > 0, a2 > 0, . . . , ak > 0, 1 2 p1 < p2 < · · · < pk , where the p j are primes. We call the preceding factorisation of n, the canonical factorisation of n. For example 23 32 52 73 is the canonical factorisation of 617400.

292 Theorem (Fundamental Theorem of Arithmetic) Every integer > 1 can be represented as a product of primes in only

a

one way, apart from the order of the factors. Proof: We prove that a positive integer greater than 1 can only have one canonical factorisation. Assume that n = pa1 pa2 · · · pas = qb1 qb2 · · · qtbt s 1 2 1 2 are two canonical factorisations of n. By Euclid’s Lemma (example 1.2) we conclude that every p must be a q and every q must be a p. This implies that s = t. Also, from p1 < p2 < · · · < ps and q1 < q2 < · · · < qt we conclude that p j = q j , 1 ≤ j ≤ s. If a j > b j for some j then, upon dividing by p j j , we obtain pa1 pa2 · · · p j j 1 2

a −b j

j−1 j+1 · · · pas = pb1 pb2 · · · p j−1 p j+1 · · · pbs , s s 1 2

b

b

b

which is impossible, as the sinistral side is divisible by p j and the dextral side is not. Similarly, the alternative a j < b j for some j is ruled out and so a j = b j for all j. This ﬁnishes the proof. u It is easily seen, by the Fundamental Theorem of Arithmetic, that if a has the prime factorisation a = pa1 pa2 · · · pan and b n 1 2 has the prime factorisation b = pb1 pb2 · · · pbn , (it may be the case that some of the ak and some of the bk are zero) then n 1 2 (a, b) = p1 and also [a, b] = p1

max(a1 ,b1 ) max(a2 ,b2 ) max(an ,bn ) p2 · · · pn . min(a1 ,b1 ) min(a2 ,b2 ) min(an ,bn ) p2 · · · pn .

(4.1)

(4.2)

**Since x + y = max(x, y) + min(x, y), it clearly follows that ab = (a, b)[a, b].
**

293 Example Prove that

√

2 is irrational.

√ Solution: Assume that 2 = a/b with relatively prime natural numbers a, b. Then 2b2 = a2 . The sinistral side of this last equality has an odd number of prime factors (including repetitions), whereas the dextral side has an even number of prime factors. This contradicts the Fundamental Theorem of Arithmetic.

294 Example Prove that if the polynomial

p(x) = a0 xn + a1 xn−1 + · · · + an−1 x + an with integral coefﬁcients assumes the value 7 for four integral values of x, then it cannot take the value 14 for any integral value of x.

Fundamental Theorem of Arithmetic

43

Solution: First observe that the integer 7 can be decomposed into at most three different integer factors 7 = −7(1)(−1). Assume that p(ak ) − 7 = 0 for distinct ak , 1 ≤ k ≤ 4. Then p(x) − 7 = (x − a1 )(x − a2 )(x − a3 )(x − a4 )q(x) for a polynomial q with integer coefﬁcients. Assume that there is an integer M with p(m) = 14. Then 7 = p(m) − 7 = (m − a1 )(m − a2 )(m − a3 )(m − a4 )q(m). Since the factors m − ak are all distinct, we have decomposed the integer 7 into at least four different factors. This is impossible, by the Fundamental Theorem of Arithmetic.

295 Example Prove that the product of three consecutive integers is never a perfect power (i.e., a perfect square or a perfect

cube, etc.). Solution: Let the integer be (n−1)n(n+1) = (n2 −1)n. Since n2 −1 and n are relatively prime, by the Fundamental Theorem of Arithmetic, n2 − 1 is a perfect kth power (k ≥ 2) and n is also a perfect kth power. But then, n2 − 1 and n2 would be consecutive perfect kth powers, sheer nonsense.

296 Example Prove that m5 + 3m4 n − 5m3 n2 − 15m2 n3 + 4mn4 + 12n5 is never equal to 33.

Solution: Observe that m5 + 3m4 n − 5m3 n2 − 15m2 n3 + 4mn4 + 12n5 = (m − 2n)(m − n)(m + n)(m + 2n)(m + 3n). Now, 33 can be decomposed as the product of at most four different integers 33 = (−11)(3)(1)(−1). If n = 0, the factors in the above product are all different. They cannot be multiply to 33, by the Fundamental Theorem of Arithmetic, as 33 is the product of 4 different factors and the expression above is the product of 5 different factors for n = 0.. If n = 0, the product of the factors is m5 , and 33 is clearly not a ﬁfth power.

297 Example Prove that the sum

S = 1/2 + 1/3 + 1/4 + · · · + 1/n is never an integer. Solution: Let k be the largest integer such that 2k ≤ n, and P the product of all the odd natural numbers not exceeding n. The 1 number 2k−1 PS is a sum, all whose terms, except for 2k−1 P k , are integers. 2

298 Example Prove that there is exactly one natural number n for with 28 + 211 + 2n is a perfect square.

Solution: If k2 = 28 + 211 + 2n = 2304 + 2n = 482 + 2n , then k2 − 482 = (k − 48)(k + 48) = 2n . By unique factorisation, k − 48 = 2s , k + 48 = 2t , s +t = n. But then 2t − 2s = 96 = 3 · 25 or 2s (2t−s − 1) = 3 · 25 . By unique factorisation, s = 5,t − s = 2, giving s + t = n = 12.

299 Example Prove that in any set of 33 distinct integers with prime factors amongst {5, 7, 11, 13, 23}, there must be two whose product is a square.

Solution: Any number in our set is going to have the form 5a 7b 11c 13d 23 f . Thus to each number in the set, we associate a vector (a, b, c, d, f ). These vectors come in 32 different ﬂavours, according to the parity of the components. For example (even, odd, odd, even, odd) is one such class. Since we have 33 integers, two (at least) will have the same parity in their exponents, and the product of these two will be a square.

44

Chapter 4

300 Example (IMO, 1985) Given a set M of 1985 distinct positive integers, none with a prime factor greater than 26, prove

that M contains a subset of four distinct elements whose product is the fourth power of an integer. Solution: Any number in our set is going to be of the form 2a 3b 5c 7d 11 f 13g 17h 19 j 23k . Thus if we gather 513 of these numbers, we will have two different ones whose product is a square. Start weeding out squares. Since we have 1985 > 513 numbers, we can ﬁnd a pair of distinct a1 , b1 such that a1 b1 = c2 . 1 Delete this pair. From the 1983 integers remaining, we can ﬁnd a pair of distinct a2 , b2 such that a2 b2 = c2 . Delete this pair. 2 From the 1981 integers remaining, we can ﬁnd a pair a3 , b3 such that a3 b3 = c2 . We can continue this operation as long as 3 we have at least 513 integers. Thus we may perform this operation n + 1 times, were n is the largest positive integer such that 1985 − 2n ≥ 513, i.e., n = 736. Therefore, we are able to gather 737 pairs ak , bk such that ak bk = c2 . Now, the 737 numbers k ck have all their prime factors smaller than 26, and since 737 > 513, we may ﬁnd two distinct cm say ci and c j , i = j, such that ci c j = a2 , a perfect square. But then ci c j = a2 implies that ai bi a j b j = a4 , a fourth power. Thus we have found four distinct numbers in our set whose product is a fourth power.

301 Example Let any ﬁfty one integers be taken from amongst the numbers 1, 2, . . . , 100. Show that there must be one that

divides some other. Solution: Any of the ﬁfty one integers can be written in the form 2a m, where m is odd. Since there are only ﬁfty odd integers between 1 and 100, there are only ﬁfty possibilities for m. Thus two (at least) of the integers chosen must share the same odd part, and thus the smaller will divide the larger.

302 Example (USAMO 1972) Prove that

(a, b, c)2 [a, b, c]2 = . [a, b][b, c][c, a] (a, b)(b, c)(c, a) Solution: Put a=

α β γ

pk k , b =

pk k , c =

pkk ,

with primes pk . The assertion is equivalent to showing 2 max(αk , βk , γk ) − max(αk , βk ) − max(αk , γk ) − max(βk , γk ) = 2 min(αk , βk , γk ) − min(αk , βk ) − min(αk , γk ) − min(βk , γk ). By symmetry, we may assume, without loss of generality, that αk ≥ βk ≥ γk . The equation to be established reduces thus to the identity 2αk − αk − αk − βk = 2γk − βk − γk − γk . √ n.

303 Example Prove that n = 24 is the largest natural number divisible by all integral a, 1 ≤ a ≤

√ √ Solution: Suppose n is divisible by all the integers ≤ n. Let p1 = 2, p2 = 3, . . . , pl be all the primes ≤ n, and let k j be the √ √ √ k k +1 k +1 k k unique integers such that p j j ≤ n < p j j . Clearly nl/2 < p11 +1 p22 +1 · · · pl l . Let lcm(1, 2, 3, . . . , n − 1, n ) = K.

k k Clearly then K = pk1 pk2 · · · pl l . Hence p11 +1 p22 +1 · · · pl l ≤ K 2 and thus nl/2 < K 2 . By hypothesis, n must be divisible by K 1 2 l/2 2 and so K ≤ n. Consequently, n < n . This implies that l < 4 and so n < 49. By inspection, we see that the only valid values for n are n = 2, 4, 6, 8, 12, 24. k k +1

304 Example (Irving Kaplansky) A positive integer n has the property that for 0 < l < m < n,

S = l + (l + 1) + . . . + m is never divisible by n. Prove that this is possible if and only if n is a power of 2.

or [a1 . each not greater than n. a j ] = 2t1 3A1 = 3a1 ≤ 2n. Moreover. n/2 + 2.
Practice
308 Problem Prove that log10 7 is irrational. and n must equal s for at least two of the four numbers. b. together with the k given distinct a’s. 3A1 = A j for some j. 309 Problem Prove that
log 3 log 2
. we see that all the Ak are different. give 2k − 1 > n positive integers. 3
Solution: It is clear that no one of the numbers can divide another (otherwise we would have an lcm ≤ 2n). n. If a1 ≤ 2n/3 . then 3a1 = 2t1 3A1 ≤ 2n. since. The sequence n/2 + 1. . Thus either [a1 . Prove
that a1 >
2n . c. n+1 . and a j = 2t j 3A1 . c] = [b. s < 2k+1 . 2 ≤ i ≤ k. Hence. c. a] = [d. where k >
a1 + a j = ar is soluble. d] = [c. be integers. there are 1 + 4s + 6s2 ways of choosing at least two of the four numbers to have exponent s. Now. so that at least once ar − a1 = a j . Solution: By unique factorisation. each of a.
307 Example (Putnam. they coincide in some order with the set of all positive odd numbers less than 2n. shows that for k = (n + 1)/2 the result is false. s > 2k+1 . at least one of the integers is common to both sets. and 3A1 < 2n. writing ak = 2tk Ak . then S is divisible by n. Prove that 2
305 Example Let 0 < a1 < a2 < · · · < ak ≤ n. But if s > 1. a j ] = 2t j 3A1 = a j ≤ 2n. . 1980) Derive a formula for the number of quadruples (a.
306 Example Let 0 < a1 < a2 < · · · < an ≤ 2n be integers such that the least common multiple of any two exceeds 2n. The required formula is thus (1 + 4r + 6r2 )(1 + 4s + 6s2 ). with 0 < l < m < n. a. d. b. If s = 1. if we take m = (s + 2k+1 − 1)/2 and l= 1 + m − 2k+1 . b. Thus there is a total of 1 + 4r + 6r2 of choosing at least two of the r and 4 four numbers to have exponent r. These contradictions establish the assertion. consider a1 = 2t1 A1 . There are 2 4 of choosing exactly two of the four numbers to have exponent r.Practice
45
Solution: Set n = s2k with s odd. are clearly distinct. Solution: The k − 1 positive integers ai − a1 . 0 ≤ m ≤ r. 1 + m − s. Similarly. Since there are n of them. 2S = (l + m)(m − l + 1). d must be of the form 3m 7n . . . r = 4r ways of choosing exactly three to have exponent 3 4 = 1 of choosing the four to have exponent r. b]. Ak odd. cannot be divisible by 2n = 2k+1 . which has one factor even and one factor odd. d) such that
3r 7s = [a. M must equal 4 2 r = 6r2 ways r for at least two of the four numbers. Hence. c. Since 3A1 would then be an odd number < 2n. its even factor is less than 2n. 0 ≤ n ≤ s. These.

Set
N1 = p1 p2 · · · p j−1 − 1. b.
317 Problem Let n = p11 p22 · · · pt t and m = p11 p22 · · · pt t . 3 = p2 . . . . divides at most one of the Npk . such that √ √ |a + b 2 + c 3| < 10−11 . be the primes in their natural order and suppose that n ≥ 10 and that 1 < j < n. . Each pi . c] = [a. 4. p2 . 2. c) = (0. (Putnam 1980) Let a. the
a a a b b b
p’s being different primes. at be natural numbers.
313 Problem Find min 36k − 5k . Find the number of the common factors of m and n. . .
˝ ˝ 323 Problem (Eotvos 1906) Let a1 . c be integers. n) = 1. except for (a. or perfect ﬁfth powers?
312 Problem Prove that the sum
20
1/3 + 1/5 + 1/7 + · · · + 1/(2n + 1) is never an integer. There is a t. 1 < j < n. (Bonse’s Inequality) For n ≥ 4. . b. . Prove that √ √ |a + b 2 + c 3| > 10−21 . . . 0. 5. There is a j.
. . c). 1000. pn fail to divide t p1 p2 · · · ps−1 − 1. Prove that if n is odd.
is an even number. Let s be the smallest j for which p j > n − j + 1. Is there an inﬁnite set S of distinct positive integers such that the geometric mean of any ﬁnite subset of S is an integer. . a2 . pt be different primes and 1. for which p j > n − j + 1. 311 Problem How many integers from 1 to 10
Chapter 4
319 Problem Let 2 = p1 . . 3. n+1
inclusive. Find the number of ways of 322 Problem a1 a2 triplet of integers (a. Answer:
2.46 is irrational. not all zero and each of absolute value less than a million. (Putnam 1955) Prove that there is no a1 . a2 . the product (a1 − 1)(a2 − 2) · · · (an − n)
t
(1 + min(ak . then t is prime. Factorisations differing in a + b 2 + c 3 = 0. c) of positive integers for which [a. . 321 Problem (USAMO 1984) 315 Problem Find the number of ways of factoring 1332
as the product of two positive relatively prime factors each greater than 1.
316 Problem Let p1 . (Hint: Look at the largest power of 3 ≤ n). . N2 = 2p1 p2 · · · p j−1 − 1.
k=1
318 Problem (USAMO 1973) Show that the cube roots of three distinct prime numbers cannot be three terms (not necessarily consecutive) of an arithmetic progression. an be any permutation of the numbers 1. n. . b. 0) at factoring p1 p2 · · · pt as the product of two positive relatively for which √ √ prime factors each greater than 1. Factorisations differing in order are considered the same. are not perfect squares.
310 Problem Find the smallest positive integer such that n/2 is a square and n/3 is a cube. . j ≤ i ≤ n. [b. p2 < p1 · · · pn . 1 ≤ k≤ j 2. .
k≥1
(Hint: Why is 36k − 1 − 5k = 0?)
314 Problem (AIME 1987) Find the number of ordered
320 Problem Prove that 30 is the only integer n with the foltriples (a. and Np j = p j p1 p2 · · · p j−1 − 1 Prove 1. . For which positive integers n is there a ﬁnite set Sn of n distinct positive integers such that the geometric mean of any subset of Sn is an integer?
2. such that all of p1 . . The s above is > 4 and so ps−1 − 2 ≥ s and p1 p2 · · · ps < ps+1 · · · pn . . and hence pn+1 < p1 p2 · · · ps . 3. . . c. b. bk )). Answer: 3. b. c] = 2000.
1. order are considered the same. b] = lowing property: if 1 ≤ t ≤ n and (t. not all zero and each of absolute value less than a million. .
Answer: 2t−1 − 1. 1 ≤ t ≤ ps . perfect cubes. (Putnam 1980) Prove that there exist integers a.

327 Problem Given n numbers x1 . whose difference. one number) whose sum is divisible by 100.
. xn each of which is equal to ±1. ways to choose two. x2 . . then n is a multiple of 4.Practice
324 Problem Prove that from any sequence formed by arranging in a certain way the numbers from 1 to 101. or else. is divisible by 100. prove that if
325 Problem Prove that from any ﬁfty two integers it is al-
x1 x2 + x2 x3 + · · · + xn x1 = 0. . .
47
326 Problem Prove that from any one hundred integers it is always possible to choose several numbers (or perhaps. . it is always possible to choose 11 numbers (which must not necessarily be consecutive members of the sequence) which form an increasing or a decreasing sequence. whose sum.

c = (a + nb. Thus d is a common divisor of both (a + nb) and b. (88. 16) = 2. 70) = (16. 0 < rn < rn−1 . then
(a. Now. 246) = (158. 158) = (70. This implies that d|c. . 0 < r4 < r3 . 246). . 246) = 2. b) = (a + nb. c|(a + nb). It is called the Euclidean Algorithm and it is described as follows.
330 Theorem If rn is the last non-zero remainder found in the process of the Euclidean Algorithm. r3 ) = · · · = (rn−1 . 0 < r2 < b.
(5. . 246). b). 0 < r3 < r2 . b).
328 Theorem Prove that if a. As d|a. . then
rn = (a. to be proved below. n are positive integers. since b. 246) = (158. and cannot contain more than b positive terms. . d|b. = = bq1 + r2 . that (a. b). rn−1 qn−1 + rn rn qn . 158). c|b imply that c|((a + nb) − nb) = a. . On the other hand. r2 ) = (r2 . . b). by the preceding example. The Euclidean Algorithm rests on the fact.1 Euclidean Algorithm
We now examine a procedure that avoids factorising two integers in order to obtain their greatest common divisor. u
329 Example Use Theorem 328 to ﬁnd (3456. Proof: Set d = (a. 18) = (2. After using the Division Algorithm repeatedly. it follows that d|(a + nb). we ﬁnd the sequence of equalities a b r2 . Let a. 88) = (18. (158. This completes the proof. b) = (b. r2 q2 + r3 r3 q3 + r4 . r3 . Thus c is a common divisor of a and b. 246) = (13 · 246 + 158. Finally. rn ) = rn . . is a monotonically decreasing sequence of integers. b be positive integers.Chapter
5
Linear Diophantine Equations
5. Hence (3456. r2 .1)
The sequence of remainders will eventually reach a rn+1 which will be zero. rn−2 rn−1 = = = .
Solution: (3456. . . b. 48
. . . 158 + 88) = (88. implying that c|d.

1 and working up. 5 = 23 − 3 · 6. rn |rn−2 . u
331 Example Find (23. y that satisfy the linear diophantine equation
23x + 29y = 1. 5 = 5 · 1. rn = = = . The Euclidean Algorithm is an efﬁcient means to ﬁnd a solution to this equation.
This solves the equation. we see that the linear diophantine equation ax + by = c has a solution in integers if and only if (a. . thus (23. . . Hence. rn |r2 . . = a − bq1 b − r2 q2 r2 − r3 q3 . b)|c.
333 Example Find integer solutions to
23x + 29y = 7. 29) = 1. Thus rn is a common divisor of a and b and so rn |(a. rn |a.
. y = 4. with x = −5.
Solution: We have 29 = 1 · 23 + 6. we see that rn |rn−1 . rn−2 − rn−1 qn−1
49
Let r = (a. we see that r|rn . . 29) by means of the Euclidean Algorithm. b). . r|r3 . 23 = 3 · 6 + 5.Euclidean Algorithm Proof: From equations 5. By the Bachet-Bezout Theorem. But starting at the last equation 5. This gives the desired result. which solves the problem. 23(−35) + 29(28) = 7.
332 Example Find integers x. From the ﬁrst equation.1 r2 r3 r4 . starting from the penultimate equality in the preceding problem: 1 = 6 − 1 · 5. Multiplying both sides of this equality by 7. r|r2 . . 6 = 1 · 5 + 1. An equation which requires integer solutions is called a diophantine equation. Solution: From the preceding example. rn |b. 23(−5) + 29(4) = 1. . 1 = = = = = 6−1·5 6 − 1 · (23 − 3 · 6) 4 · 6 − 1 · 23 4(29 · 1 − 23) − 1 · 23 4 · 29 − 5 · 23. 6 = 29 · 1 − 23. . From the second equation. b). Upon iterating the process.
The last non-zero remainder is 1. Solution: We work upwards.

y = 4 − 23t. 987) 2. y0 ) of the linear diophantine
equation ax + by = c any other solution of this equation will have the form b a x = x0 + t . b). From this a ′ b a (x − x0 ) = t . b a ′ (x − x0 ) = (y0 − y′ ). y = 15 − 1728t. (3456. all the solutions are given by x = −1 + 123t.
Practice
338 Problem Find the following:
4. y = y0 − t . (560. d d d Since (a/d. y = y0 − ta/d. Dividing by d = (a. Thus there is an integer t such that t = y0 − y′ . y0 ) is a solution of ax + by = c. 246) = 2 and 2 |73. Let us prove that any solution will have this form. y such that 3456x + 246y = 73?
Solution: No. Solution: By Example 332. t ∈ Z. we have a(x′ − x0 ) = b(y0 − y′ ). Then given any solution (x0 . (8098643070. d d where d = (a. As ax0 + by0 = c also. b) and t ∈ Z. 600) 3. d d that is. in virtue of Euclid’s Lemma. 36)
339 Problem Solve the following linear diophantine equations. y = y0 − ta/d is also a solution. then x = x0 + tb/d. Proof: It is clear that if (x0 . We can ﬁnd a family of solutions by letting x = −5 + 29t. Let (x′ . y′ ) satisfy ax′ + by′ = c. (34567. provided solutions exist:
. 3456(−1) + 246(15) = 234. u
337 Example Find all solutions in integers to
3456x + 246y = 234. c are integers such that (a. which is to say x′ = x0 + tb/d. the pair x0 = −5.50
334 Example Find inﬁnitely many integer solutions to
Chapter 5
23x + 29y = 1. This ﬁnishes the proof. d d a a |(y0 − y′ ). 8173826342)
1. y0 = 4 is a solution. (4554.t ∈ Z. Solution: By inspection. b. By Theorem 336.
336 Theorem Assume that a. b/d) = 1. b)|c.
335 Example Can you ﬁnd integers x.

24x + 25y = 18 2.
3x ≡ 6
mod 12. how many eggs and how many bananas did the woman buy?
5. where x0 . a). the congruencial equation in x. since the absolute difference between any two of them is less than n.
Thus every solution of the congruence ax ≡ b mod n is congruent mod n to one and only one of the d values x0 + nt/d. Whence 3 = 5(9) − 7(6). then it has (a. Thus x ≡ 2 mod 7. Letting t take on the values t = 0. 0 ≤ t ≤ d − 1. n) − 1). 7) = 1. y0 satisfy ax0 + ny = b. ((a. If each banana costs $0. 1.78 for some bananas and eggs.35. b. we write t ′ as t ′ = qd + r. n) mutually incongruent solutions. n)|b. we obtain (a. (b. This gives 5 · 9 ≡ 3 mod 7 which is the same as 5 · 2 ≡ 3 mod 7.2 Linear Congruences
We recall that the expression ax ≡ b mod n means that there is t ∈ Z such that ax = b + nt. y = y0 − at/d. 1998x + 2000y = 33
340 Problem Prove that the area of the triangle whose ver-
51 tices are (0. 1 = 2 = which gives 1 = 5 − 2 · 2 = 5 − 2(7 − 5 · 1) = 5 · 3 − 7 · 2. 2
341 Problem A woman pays $2. We ﬁrst solve the linear diophantine equation 5x + 7y = 1. . .Linear Congruences 1. 0 ≤ r < d. n). 5−2·2 7 − 5 · 1. By the Euclidean Algorithm 7 5 2 Hence. If x = x0 + nt ′ /d is any other solution. then there are d incongruent solutions mod n. n be integers.
342 Theorem Let a. 3456x + 246y = 44 3. .u
343 Example Find all solutions to the congruence 5x ≡ 3 mod 7
Solution: Notice that according to Theorem 342. y) is |by − ax| . n) incongruent solutions
mod n.
344 Example Solve the congruence
= = =
5·1+2 2·2+1 2 · 1. (x.t ∈ Z. 0). If the congruence ax ≡ b mod n has a solution.69 and each egg costs $0. d = (a. Then x = x0 + n(qd + r)/d = x0 + nq + nr/d ≡ x0 + nr/d mod n. Thus if there is a solution to the congruence.
. Hence. ax ≡ b mod n is soluble if and only if the linear diophantine equation ax + ny = b is soluble.
Proof: From Theorem 336 we know that the solutions of the linear diophantine equation ax + ny = b have the form x = x0 + nt/d. there should only be one solution mod 7. as (5. It is clear then that the congruence ax ≡ b mod n has a solution if and only if (a.

all the solutions are thus of the form x = 2 + 4t. This yields (x − y) a n =s . there is always an integer solution to ax + by = n regardless of the integer n. n)
mod
Proof: If ax ≡ ay mod n then a(x − y) = sn for some integer s.t ∈ Z. This implies that x≡y Conversely if x ≡ y mod n implies (a. If (a. b) = 1. If (a. n). the three incongruent solutions modulo 12 are t = 2. n)) = 1 by Theorem 240. n) mod n . 6. 1. 10. 348 Problem How many x. By letting t = 0. n be non-zero integers. the congruence has three mutually incongruent solutions. b be positive integers. b) = d > 1 then the linear form ax + by skips all non-multiples of d. the above congruence implies a fortiori that ax − ay = tn for some integer t. then x ≡ y mod n. We will prove the following theorem of Frobenius that tells un when we will ﬁnd nonnegative solutions to ax + by = n.
349 Theorem (Frobenius) Let a. n) divides a. b) = 1 then the number of positive integers m that cannot be
written in the form ar + bs = m for nonnegative integers r. n)
upon multiplying by a. We now add a few theorems and deﬁnitions that will be of use in the future. n) (a. 2.3 A theorem of Frobenius
If (a. n) = 1. (a. 38 ≤ x ≤ 289 satisfy
3x ≡ 8
mod 11?
5. (a. y be integers and let a. (a. By inspection we see that x = 2 is a solution.
.
346 Corollary If ax ≡ ay mod n and (a. n) by Euclid’s Lemma (Lemma 239).u Theorem 345 gives immediately the following corollary. we must have n |(x − y).
345 Theorem Let x. (a. n)
Since (a/(a. Then
ax ≡ ay if and only if x≡y
mod n n .52
Chapter 5
Solution: As (3. n) ax ≡ ay mod an . s equals (a − 1)(b − 1)/2. As (a. By Theorem 336.
Practice
347 Problem Solve the congruence 50x ≡ 12 mod 14. This gives the required result. n/(a. 12) = 3 and 3|6. (a.

After each play. Thus the number of unattainable numbers is precisely the numbers that occur just above a number of the form vb. y for n = ab−a−b. on the j-th column.. the ﬁrst alternative is dismissed. If this were so then we would have vb ≡ wb mod a.. The unique solution is a = 11. . a−1 a a+1 a + 2 . . hence the greatest value that is not attainable is (a − 1)b − a. a + k . which gives the following theorem. If (a. . Then the equation
ax + by = n is unsoluble in nonnegative integers x. Since (a. This contradicts the fact that 0 ≤ y < v < a. Consider the inﬁnite array 0 1 2 .. 2a + k . vb and wb with 0 ≤ v. b = 8. Since 0 ≤ v. 1971) A game of solitaire is played as follows. Clearly.. y. the player
receives either a or b points. 0 ≤ v ≤ a − 1. Hence the number of unattainable numbers is given by
a−1 a−1 v=0 j=0
53
vb − j (a − 1)(b − 1) = . each measuring 4′′ × 10′′ × 19′′ . b = 8. k .. 2a − 1 2a 2a + 1 2a + 2 . b) = 1. . s with ar + bs = n. It has been noticed that there are thirty ﬁve non-attainable scores and that one of these is 58. This implies that y ≡ v mod b. . . . For a number directly above vb is of the form vb−ka for some natural number k. . b) = 1 we invoke Corollary 5. If vb−ka were attainable. (a−1)(b−1) = 70 = 2(35) = 5(14) = 7(10).
350 Theorem Let a. b be relatively prime positive integers. there are inﬁnitely many such integers. The columns of this array are arithmetic progressions with common difference a. a > b). the number of non-attainable scores is (a−1)(b−1)/2. The numbers directly below a number n have the form n + ka where k is a natural number. This yields by ≤ ax + by = vb − ka < vb.. b = 2 and a = 11.... (a. we must have v = w.
352 Example (AIME. If n > ab−a−b. . Hence. On the other hand. Therefore.
351 Example (Putnam.. By Theorem 349. b ∈ N. (a..A theorem of Frobenius Proof: Let us say that an integer n is attainable if there are nonnegative integers r. How many different tower heights can be achieved using all 94 of the bricks?
... are to be stacked one on top of another to
form a tower 94 bricks tall. By Corollary 346 we obtain v ≡ y mod a.. two numbers on the same column are congruent mod a. b) > 1. a 2
as we wanted to show. there are (vb − j)/a values above vb.u
The greatest unattainable integer occurs just above (a − 1)b. . 1994) Ninety-four bricks..1 to deduce v − w ≡ 0 mod a. −1) and (−2. Hence a(v − w) ≡ 0 mod a. Each brick can be oriented so it contributes 4′′ or 10′′ or 19′′ to the total height of the tower. so is n + ka. implying thus that if an integer n is attainable so is every integer directly below it.. . Find a and b. and his score accumulates from play to play. according to the outcome. . then ax+by = vb−ka for some nonnegative integers x. . w ≤ a − 1 can belong to the same column. As 58 = 0 · 71 + 2 · 29. . Now.. Solution: The attainable scores are the nonnegative integers of the form ax + by.. w ≤ a − 1. The conditions a > b. 0 ≤ y < v < a. Now we show that any number directly above one of the multiples vb. then the equation is soluble in nonnegative integers. 3a − 1 . if n is attainable. Clearly all multiples of b are attainable. 10) and thus it does not pass through a lattice point in the ﬁrst quadrant. Hence (a. The line 11x + 8y = 58 passes through (6. 0 ≤ v ≤ a − 1 is non-attainable. b) = 1 yield the two possibilities a = 71. Therefore we deduce vb ≡ bv − ka ≡ ax + by mod a which yields bv ≡ by mod a. We claim that no two distinct multiples of b.

Conversely. for we would have 170 ≡ 181b mod 11. x ≥ 0. that is 2y + 5z ≤ 470. each ≤ 8. s < 1991. c be positive real numbers. (a. y ≥ 0. ax + by ≤ c. (a. Now. (a. Thus of the 471 nonnegative integers n ≤ 470. b) = 1. We are asking for the number of different sums 4x + 10y + 19z with the constraints x ≥ 0. 466. The answer is thus 170/1991. 1991 181m 11m 1991 r s and r. but 170m < 181. 468. z bricks of height 4′′ . 463. n
358 Problem (IMO. every integer ≥ (2 − 1)(5 − 1) = 4 can be written in the form 2y + 5z. c be pairwise relatively
n n [ ] or [ ] + 1. Evaluate
n→∞
that is not the sum of a positive integral multiple of 42 and a positive composite integer?
356 Problem Let a > 0. 4. By Theorem 350. r) = (b. y ≥ 0. n a b n a b = + does the trick. and 469 can be thus represented. 4 ≤ n ≤ 470 will be “good” only if we have 470 − n = 3x + 5z.
Practice
354 Problem Let a. 10′′ . y ≥ 0. Using x = 96−x−y. For mn > 181 except if m = 1. Let S(n) denote the number of nonnegative solutions to
x ≥ 0. we see that 469 can be written in the form n = 2y+5z. we count the number of different nonnegative integral solutions to the inequality 376 + 3(2y + 5z) ≤ 1786. namely n = 1 and n = 3. x + y + z = 94. b ≥ 1. and the number of different sums is 471 − 6 = 465. Demonstrate that 2abc − ab − bc − ca is the largest integer not of the form bcx + acy + abz. which yields b ≥ m. mn = 11a + 181b. Then every integer n. Let (n. 1991) = 1. but then n would not be of the form n ≡ 181 mod 11.54
Chapter 5
Solution: Let there be x. y + z ≤ 94. z ≥ 0. n ≤ 180. This means that 463. y) satisfying 357 Problem Let a. namely n = 1. we may suppose r = 181r1 . and 19′′ respectively. a. Then the number of nonnegative solutions to the equation ax + by = n is equal to
lim
S(n) . s) = 1. b) = 1.
. By Theorem 349 there are (3 − 1)(5 − 1)/2 = 4 exceptions. ab ab (Hint: [s] − [t] = [s − t] or [s − t] + 1. b with (∗) 1 ≤ m ≤ 10. 1991) = 1 satisﬁes (∗) with b = 1 and M such that mn is of the form mn ≡ 181 mod 11. whence r1 = s1 = m. s1 |r1 . y + z ≤ 94.
2. Prove that there are at least c2 /2ab pairs of integers (x. 0 ≤ n ≤ 470 except for 1. s = 11s1 and then nr1 s1 = 11as1 + 181br1 . 1983) Let a. which leads to r1 |11as1 and so r1 |s1 . z ≥ 0. Prove that 1991 only if there exist integers m.)
prime integers.
355 Problem (AIME. (b) Any n > 170. 7. b > 0. b ∈ N. Letting x = 94 − y − z. b. and the number of exceptions is (2 − 1)(5 − 1)/2 = 2. b. b ≥ 1.
353 Example
n is the sum of two positive integers with denominator < 1991 if an 1. 468. say. a ≥ 1. if = + for a. (n. 2. and 469 are not representable in the form 4x + 10y + 19z. so b ≡ m mod 11. 3. n. 4x + 10y + 19z ≤ 19 · 94 = 1786. and (∗) follows. 1995) What is largest positive integer
ax + by = n. y. Solution: (a) If (∗) holds then But n = 170 does not satisfy (∗). Similarly. 466. Find the largest positive rational with denominator 1991 that cannot be written as the sum of two positive rationals each with denominators less than 1991.

. . i. we have 11x = 33 + 55a. mod 5. each exceeding 1. . and let a1 . and that in fact. .
As n = 21n − 20n. The method is credited to the ancient Chinese.
359 Example Find x such that
x≡3
mod 5 and x ≡ 7
mod 11. m2 .
360 Example Find a number n such that when divided by 4 leaves remainder 2. so does the parametric family x = 147 + 385t. . which we know exists since all the mi are pairwise relatively prime.t ∈ Z. mk be pairwise relatively prime positive integers. This means that x ≡ −37 ≡ 18 mod 55. we have n ≡ 3(35n − 28n) − 20n ≡ 3(70 − 28) − 20 ≡ 106 mod 140. Then the system of congruences
x x . .
≡ ≡ . In the language of congruences we are seeking x such that x ≡ 2 mod 5. The uniqueness of the solution modulo m1 m2 · · · mk can be easily established. Thus x = 11x − 10x = 33 − 70 + 55a − 110b. a2 . x ≡ 4 mod 11. u
. Pj Q j ≡ 1 mod m j .
mod m1 mod m2 mod mk
≡ ak
Proof: Set Pj = m1 m2 · · · mk /m j . One may check that x = 147 satisﬁes the requirements. This number clearly satisﬁes the conditions of the theorem. is divisible by 7. Consider the following problem: ﬁnd an integer x which leaves remainder 2 when divided by 5. .
a1 a2 . We will develop a method to solve congruences like this one. we have 5x = 35 + 55b. and
when divided by 7 leaves remainder 1. x ≡ 0 mod 7. As x = 7 + 11b.Chinese Remainder Theorem
55
5. and leaves remainder 4 when divided by 11.
This implies that
do.4 Chinese Remainder Theorem
In this section we consider the case when we have multiple congruences. Let Q j be the inverse of Pj mod m j . One veriﬁes that all the numbers x = 18 + 55t. . and it is thus called the Chinese Remainder Theorem.t ∈ Z verify the given congruences. 1 ≤ j ≤ k. when divided by 5 leaves remainder 1. x has a unique solution modulo m1 m2 · · · mk . mod 140. mod 7. Form the number x = a1 P1 Q1 + a2 P2 Q2 + · · · + ak Pk Qk . . Thus all n ≡ 106 mod 140 will
361 Theorem (Chinese Remainder Theorem) Let m1 .e. mod 140. . .
Solution: Since x = 3 + 5a. . Solution: We want n such that
n≡ 2 n≡ 1 n≡ 1 35n ≡ 70 28n ≡ 28 20n ≡ 20
mod 4. . ak be arbitrary integers. mod 140.

Practice
363 Problem Solve the following systems: 364 Problem (USAMO 1986)
1. Do there exist twenty-one consecutive integers each of which is divisible by one or more primes p. mod p2 . x x . x ≡ 0 mod 11
1. . 2 ≤ p ≤ 11?
2. By the Chinese Remainder Theorem. p1000000 be a million different primes. Do there exist fourteen consecutive positive integers each of which is divisible by one or more primes p. x ≡ −1 mod 4. 2 mod p2 1000000 . x ≡ ≡ . 3x ≡ 2 mod 9. . . each of which is divisible by the square of a prime. . p2 . x ≡ 10 mod 11 3. Let p1 . x + 1000000 are a million consecutive integers.
≡ −1000000
The numbers x + 1. 5x ≡ 2 mod 8. . there exists a solution to the following system of congruences. 4x ≡ 3 mod 7. 1 mod p2 . . . . x + 2.
. . −1 −2 . . . .56
362 Example Can one ﬁnd one million consecutive integers that are not square-free?
Chapter 5
Solution: Yes. . 2 ≤ p ≤ 13?
. . x ≡ 2 mod 5 2. . .

is often of use. This proves the inequalities. β ∈ R. n ∈ N. Let m = α + a . We also call this function the ﬂoor function. We obtain thus α + β ≤ α + β . Since α + β is an integer less than or equal to α + β . Hence m − a ≤ α < m − a + 1. β − 1 < β ≤ β we get α + β − 2 < α + β ≤ α + β . Thus x satisﬁes the inequalities x − 1 < x ≤ x. 0 ≤ {x} < 1. 0 ≤ Θ < 1. 2. to denote the fractional part of x. which is what we wanted. α + β . which. 3. and ||x|| = min |x − n| to denote the distance of a real number to its nearest integer. Also. so its integer part α + β must be less than α + β + 2. we deduce by (1) that
α = n α /n + nθ = n α /n + nθ . 2. 3. 0 ≤ θ < 1. but α + β < α + β + 2 yields α + β ≤ α + β + 1. we obtain
α α = + Θ. i. 0 ≤ nθ ≤ nθ < n. n n
This yields the required result.1 Greatest Integer Function
The largest integer not exceeding x is denoted by x or x . Write α /n as α /n = α /n + θ . can also be written as x ≤ x < x + 1. Then m ≤ α + a < m + 1. Since n α /n is an integer. The greatest integer function enjoys the following properties:
365 Theorem Let α . of course. and so 0 ≤ nθ /n < 1.
α +a = α +a α = n α n
α + β ≤ α +β ≤ α + β +1
Proof: 1. If we let Θ = nθ /n. it must be less than or equal to the integral part of α + β .
Now. u 57
.Chapter
6
Number-Theoretic Functions
6. From the inequalities α − 1 < α ≤ α . Then
1. A useful fact is that we can write any real
n∈Z
number x in the form x = x + {x}. a ∈ Z.e. α + β is less than the integer α + β + 2. The fact that x is the unique integer satisfying these inequalities. This means that m − a = α . We also utilise the notation {x} = x − x .

(1 (1 √ √ √ whence (1 + √2)n + (1 − 2)n = (1 + 2)n . So all the integers with the required property are the 2
368 Example Prove that the integers
√ 1+ 2
n
with n a nonnegative integer. Solution: Reasoning as in the preceding problem. it must be the case that (1 − 2)n is the fractional part of (1 + 2)n or (1 + 2)n + 1 √ n √ n √ n √ depending on whether n is odd or even. and 3 2t − 2 3t = −1. Solution: By the Binomial Theorem √ √ (1 + 2)n + (1 − 2)n = 2 (2)k
0≤k≤n/2
n := 2N. and so 3 2t − 2 3t = 1. then 2n ≥ ( 2n +1) ≥ 2n+1. 1/3).
369 Example Prove that the ﬁrst thousand digits after the decimal point in
√ (6 + 35)1980 are all 9’s. Since l < 2n < l + 1. and so (1 + 2)n = 2N − 1. [3t] = 1. If m ≥ 2n +1. If m ≤ √2n − 1 then 2n ≤ ( 2n − 1)( 2n + 1) = 2n 2 − 1 ≤ 2n − 1 < 2n. Thus for odd n. It must be the case that m = 2n . another contradiction. 1) as [0. 2k
√ √ √ √ an even integer. we observe that x has unit period. Solution: We claim that 3[2t] − 2[3t] = 0. are alternately even or odd. √ √ l(l + 1) . and so 3 2t − 2 3t = 0. 1/2) then [3t] = 1 and [2t] = 0. let n = triangular numbers. y) = (3x − 2y)(3x − 2y − 1)(3x − 2y + 1)(3x − 2y + 2). √ √ (6 + 35)1980 + (6 − 35)1980 = 2k. so it is enough to prove the claim for t ∈ [0. then 2t = 1. If t ∈ [1/3. 2/3). l = 2n . If t ∈ [1/2. y) such that
Chapter 6
P( 2t . 3t = 2. 1). 1/3) ∪ [1/3.
367 Example Describe all integers n such that 1 +
¬ √ ¬ 2n ¬2n. Conversely. 1). and for n even 2N := (1 + 2)n + (1 − 2)n = (1 + 2)n + 1. 1) = [0. a √ √ 2 2 contradiction. 1). (1 + 2) − 1 <√ + 2) + (1 − 2) < √ + 2)n . always odd for even n. Since −1 < 1 − 2 < 0.
. We divide [0.√ respectively. If t ∈ [0. 2/3) ∪ [2/3. In order to prove the claim. always even.
√ √ √ √ √ Solution: Let 2n = m(1 + 2n ). If t ∈ [2/3. ±1 or −2. We can then take P(x. 1/2) ∪ [1/2. 3t ) = 0 for all real t. then [2t] = 1. then both 2t and 3t are = 0.58
366 Example Find a non-zero polynomial P(x. and so 3 2t − 2 3t = −2.

m2 + m + 1 are all integers. demonstrate that
√ √ √ n+ n+1 = 4n + 2 . so √ √ 4n + 2 = 4n + 3 . Observe that k2 ≤ m < (k + 1)2 = k2 + 2k + 1. the given equation has a solution if and only if |x2 − 2x − 2| < 1. which is clearly nonsense). f ( f (m)). 2
372 Example (Putnam 1983) Let f (n) = n +
√ n . that is to say. and an even integer. . There is a natural number m such that m2 < Tn < (m + 1)2 . Hence. Thus the n-th non-square is Tn = n + n + 1/2 . As there are m squares less than Tn and n non-squares up to Tn . k < j < 2k + 1.
Solution: Let Tn be the n-th non-square.
370 Example (Putnam 1948) If n is a positive integer. At each iteration the excess will reduce and eventually it will hit 0. (1 + 21)). √ It is thus enough to consider the alternative m ∈ A.
373 Example Solve the equation
x2 − x − 2 = x . As f (m) = k2 + j + k = (k + 1)2 + j − k − 1. f (m). Prove that for every positive integer m. We have then m2 < n + m < (m + 1)2 or m2 − m < n < m2 + m + 1. Solving these inequalities it is easy to see that the solution is thus √ √ √ 1 1 1 x ∈ (−1. in which case m + k = k and f ( f (m)) = f (m + k) = m + 2k = (k + 1)2 + j − 1. and the result follows. (for if 10 √ hence 0 < (6 − 35)1980 < 10−1980 which yields √ 1 2k − 1 + 0. b ∈ [k. f ( f ( f (m))). we have nothing to prove.Greatest Integer Function
59
√ √ 1 < 6 − 35. . whence we reach a square. with 0 ≤ j − k − 1 ≤ k − 1 < k + 1. This means that either f (m) is a square or f (m) ∈ A. ßÞ 10
1979 nines
This proves the assertion of the problem.
371 Example Find a formula for the n-th non-square. it is easy to see that
√ √ √ √ 4n + 1 < n + n + 1 < 4n + 3. for x ∈ R. This means that f ( f (m)) is either a square or f ( f (m)) ∈ A with an excess j − 1 smaller than the excess j of m. (m − 1/2)2 < 4 4 √ √ 1 2 n < (m + 1/2) . the set A of all the m with excess j. Assume that m ∈ B. But 0 < 6 − 35 < 1/10. Solution: Let m = k2 + j. these inequalities imply m2 − m + < n < m2 + m + . 9 = 2k − 1980 < (6 + 35)1980 < 2k. .9 . 0 ≤ j ≤ 2k. we see that Tn = n + m.
Neither 4n + 2 nor 4n + 3 are squares since squares are either congruent to 0 or 1 mod 4.
Solution: By squaring. k + 1) which happens if and only if |a − b| < 1. the sequence
m. 0 ≤ j ≤ k and the set B with all those m’s with excess j. But then m = n + . contains at least one square of an integer. (1 − 5)] ∪ [ (1 + 17). Split the m’s into two sets. . Solution: Observe that a = b if and only if ∃k ∈ Z with a. 1 1 Since n. . upon squaring 3500 < 3481. If j = 0. √ m = k. 2 2 2
. m2 − m.

[α ] >
α .60
374 Theorem If a. 0) to (k. ). prove that 377 Problem If x. Thus n/m is a reduction for the irreducible fraction b/a. u
375 Example Find the integral part of
b−1
1 √ . b). 1 ≤ k ≤ a − 1 are each on this line. b 2
Consider the rectangle with vertices at (0. Now. b are relatively prime natural numbers then
a−1 k=1
Chapter 6
kb = a
b−1 k=1
(a − 1)(b − 1) ka = . b). a a a−1 kb kb is the number of lattice points on the lower half of the vertical line that goes from (k. (0. (a. 0).e. k k=1 Solution: The function x → x−1/2 is decreasing. when is it true that
x
y ≤ xy ?
ab b ≥a . k
1 √ < 1999. 0 < m < a. a contradiction. y. For if there were a lattice point n b (m. n are positive integers. points with integer coordinates. n). a We claim that there are no lattice points on this line. except for the endpoints. (a. 0). i. Hence 1998 + 1/10 < The integral part sought is thus 1998. 0 < n < b. n
379 Problem If a. Thus for positive integer k. This rectangle contains (a − 1)(b − 1) xb lattice points. Since there b k=1 are (a − 1)(b − 1) lattice points in total. n n
. k k=1
106
Practice
376 Problem Prove that for all real numbers x. then = . Similarly. prove that
x + x + y + y ≤ 2x + 2y holds. 378 Problem If n > 1 is a natural number and α ≥ 1 is a real
number. m a kb kb equals the number of lattice points on the The points Lk = (k. and their number is shared equally by the halves. 1 √ < k+1 Summing from k = 1 to k = 10 − 1 we deduce 1 √ < k k=2 The integral is easily seen to be 1998. i. This rectangle is split into two halves by the line y = . a a Proof:
k=1
ka rectangle. ). the assertion follows.
3 106 106 1 6 k+1 k
106
dx 1 √ <√ . x k
dx √ < x
106 −1 k=1
1 √ . y real numbers.e. equals the number of lattice points on the upper half of the rectangle.. b.

Practice
380 Problem Let α be a real number.
√ (2 + 3)n is an odd integer. where there are n occurrences of the integer n is √ 2n + 1/2 . Find a formula for the nth non-triangular number.
385 Problem If a. 4. 2. . prove that
395 Problem Let m ∈ N with m > 1 and let y be a positive real number. 5. Prove that there is a positive integer n such that [nα . 1994 1995 gers. 4.
61
−1 or 0 and that α − 2 α /2 = 0 or 1. prove that a + b = c + d. x
where the summation runs through all positive integers x not divisible by the mth power of an integer exceeding 1. y > 0.
396 Problem For which natural numbers n will 112 divide
n + 2 − n/25 3
387 Problem Solve the equation
8n + 24 = . b). Prove that
m
x
y = y . 5. then
1≤n≤(b−1)/2
an + b
1≤n≤(a−1)/2
(a − 1)(b − 1) bn = . Prove that
384 Problem Prove that for all integers m. 3.
391 Problem (Dirichlet’s principle of the hyperbola) Let
N be the number of integer solutions to xy ≤ n. n. n n n
393 Problem Let d = (a. . β ] be an interval which contains no inte-
1 + 2 + · · · + n. 4.
392 Problem (Circle Problem) Let r > 0 and let T denote the
383 Problem Prove Hermite’s Identity: if x is a real number and n is a natural number then
number of lattice points of the domain x2 + y2 ≤ r2 . Prove that [α ]+[−α ] = 390 Problem (Putnam 1973) Prove that if n ∈ N. b 2 2
m+n n−m+1 + =n 2 2 holds. k
1. 3. a 4
na + nb = nc + nd for all natural numbers n. c. 2k+1
8 n 7 < < ? 15 n + k 13
. . b) = 1 and a. nβ ] still contains no integers but has length at least 1/6. T = 1+4 r +8 √ 2
0<x≤r 2
nx = x + x +
1 2 n−1 + x+ +···+ x+ .
386 Problem If n is a natural number. 4. 3.
398 Problem (AIME 1985) How many of the ﬁrst thousand
positive integers can be expressed in the form 2x + 4x + 6x + 8x ?
399 Problem (AIME 1987) What is the largest positive integer n for which there is a unique integer k such that
ate the sum
∞ k=0
n + 2k .
381 Problem Prove that
min(k + n/k ) =
k∈N
√ 4n + 1 .
389 Problem (IMO 1968) For every natural number n. 5. 5. x > 0. b are odd. b. n ∈ N. the equality
1≤n≤b−1
(a − 1)(b − 1) d − 1 an = + . 2. 5. d are positive real numbers such that
394 Problem (Eisenstein) If (a. Prove that Ô r r 2 − x2 + 4 √ 2 . Prove that
n
N=
382 Problem Show that the n-th element of the sequence
k=1
n =2 k
√ 1≤k≤ n
√ 2 n − n . 25
√ 4n − (2 + 2)n ?
397 Problem A triangular number is a number of the form
x x = . evalu388 Problem Let [α .

407 Problem Prove that 402 Problem (Leningrad Olympiad) How many different
1
integers are there in the sequence 12 1980 .
n→∞
lim
1≤k≤n
n 2n −2 k k
= ln 4 − 1. . . 2x.2 De Polignac’s Formula
We will consider now the following result due to De Polignac.
409 Problem (Putnam 1976) Prove that
x
. Find the exact numerical value of 1995 401 Problem Prove that the n-th number not of the form 1 k . 100
π 2 2 4 4 6 6 8 8 · · · · · · · ··· = . 22 1980 . 1 3 3 5 5 7 7 9 2
6.
for which
You may appeal to Wallis Product Formula:
91
r+
k=19
k = 546. etc. when n is a natural number. .62
400 Problem Prove that if p is an odd prime. pk
Proof: The number of integers contributing a factor of p is n/p . . .. k = 1. the number of zeroes is thus determined by the highest power of 5 in 300!. the number of factors contributing a second factor of p is n/p2 . Can you improve the “gap” between 34 and 79?
405 Problem (AIME 1991) Suppose that r is a real number
410 Problem (Putnam 1983) Prove that
1 n→∞ n lim
n ¬¬ n ¬¬
¬¬ ¬¬
1
x
¬¬ ¬¬
dx = log3 (4/π )..
1.
408 Problem Prove that
real number. By De Polignac’s Formula this is
∞
300/5k = 60 + 12 + 2 = 74.
est to n1/4 . .. 2x.. 34x have no 7’s in their decimal expansions.. . 2. then
Chapter 6 Find the value of 100r . 79x has a 7 in its decimal expansion. is f (n)
n=1
Tn = n + ln(n + 1 + ln(n + 1) ) . . Find a real number x = 0 such that x.
2. . Since there are more factors of 2 in 300! than factors of 5. Prove that √ k x =
404 Problem
403 Problem Let k ≥ 2 be a natural number and x a positive
k
√ √ √ √ n+ n+1 = n+ n+2 . Prove that for any real number x = 0 at least one of x. 19802 1980
0
(−1) ?
1994x + 1995x
1993 1994x
1994 1995x
dx = 0.
406 Problem (AIME 1995) Let f (n) denote the integer clos-
√ (2 + 5) p − 2 p+1 is divisible by p. 3. e .
411 Theorem (De Polignac’s Formula) The highest power of a prime p dividing n! is given by
∞ k=1
n .u
412 Example How many zeroes are at the end of 300!?
Solution: The number of zeroes is determined by how many times 10 divides into 300.
k=1
. .

n! n1 !n2 ! · · · nk !
is at least the power of the same prime dividing the denominator. the highest power of 7 that divides the highest power of 7 dividing into 500! is 71 + 10 + 1 = 82. we see that there is at least one product for which equality is achieved. Since = (500!)2 500 1000 1000 is 164 − 2 · 82 = 0. Prove that the quantity
is an integer. Similarly. 500 500
414 Example Let n = n1 + n2 + · · · + nk where the ni are nonnegative integers. For any prime p. 1000 1000! . k = n/p . p Hence it follows that the exponent of an arbitrary prime p is at most n/p . and an arbitrary prime p. prove that the least common multiple of the products x1 x2 · · · xk (k ≥ 1). This proves the claim.
Since we see that the power of any prime dividing the numerator of n1 /p j + n2 /p j + · · · + nk /p j ≤ (n1 + n2 + · · · + nk )/p j .De Polignac’s Formula
413 Example Does
63
7¬
¬ ¬
1000 ? 500
Solution: The highest power of 7 dividing into 1000! is 1000/7 + 1000/72 + 1000/73 = 142 + 20 + 2 = 164. pα j +1 |x j .
The power of p dividing n1 !n2 ! · · · nk ! is
j≥1
n1 /p j + n2 /p j + · · · nk /p j . But on choosing x1 = · · · = xk = p. and so 7 does not divide . The assertion of the problem now follows upon applying De Polignac’s Formula and the claim.
p prime
Consider an arbitrary product x1 x2 · · · xk .
is less than n!.
.
n! n1 !n2 ! · · · nk !
Solution: From (3) in Theorem 365 we deduce by induction that a1 + a2 + · · · + al ≤ a1 + a2 + · · · + al .
Solution: We claim that the least common multiple of the numbers in question is p
p
n/p
. Clearly pα1 + · · · + pαk ≤ n and since pα ≥ α p. Suppose that pα j |x j .
415 Example Given a positive integer n > 3. which establishes the assertion. whose factors xi are the positive integers with x1 + x2 + · · · xk ≤ n. the power of p dividing n! is n/p j =
j≥1 j≥1
(n1 + n2 + · · · + nk )/p j . we have n p(α1 + · · · αk ) ≤ n or α1 + · · · + αk ≤ .

.
423 Problem (AIME 1992) Deﬁne a positive integer n to be a “factorial tail” if there is some positive integer m such that the base-ten representation of m! ends with exactly n zeroes.
prime factor of the integer 200 ? 100
421 Problem (USAMO 1975)
425 Problem If p is a prime divisor of
2n n
with p ≥
√ 2n 2n n
1. 34. . .3 Complementary Sequences
We deﬁne the spectrum of a real number α to be the inﬁnite multiset of integers Spec(α ) = { α . 17.. For example. then
lcm
n n n . 44. . Spec(α ) ∩ Spec(β ) = ∅ and Spec(α ) ∪ Spec(β ) = N. . 9. and √ Spec(2 + 2) = {3. 12. 14. 8.
418 Problem Find the exponent of the highest power of 24
that divides 300!. . 18.
417 Problem Find the highest power of 17 that divides (17n −
2)! for a positive integer n.
426 Problem Prove that
5x + 5y ≥ 3x + y + 3y + x .. 37. 25. 40. n
6. 19. . Two sequences Spec(α ) and Spec(β ) are said to be complementary if they partition the natural numbers. . 11. How many positive integers less than 1992 are not factorial tails? 424 Problem Prove that if m and n are relatively prime posi-
that 10n divides 1005!.. 47.}
are complementary. 2. 13. 16. it appears that the two sequences √ Spec( 2) = {1. 20. 420 Problem (AIME 1983) What is the largest two-digit
tive integers then (m + n − 1)! m!n! is an integer. 2. Using the result of part 1 or otherwise.
422 Problem Prove that if n > 1. 6) = 1. . prove that (5m)!(5n)! m!n!(3m + n)!(3n + m)! is an integer for all positive integers m. 2. 51. n + 1) .. n. i. 5.
. 27. 7. 21. 4. .}.e. 30. . (n. 1 2 n
=
lcm(1. 2α . 22.}.64
Chapter 6
Practice
416 Problem (AHSME 1977) Find the largest possible n such
is an integer. 6. . . 3α . 15. . 23. 24. 10. The following theorem establishes a criterion for spectra to be complementary.
419 Problem Find the largest power of 7 in 300!. Prove that
prove that the exponent of p in the factorisation of equals 1. n+1 m+n n
427 Problem Prove the following result of Catalan:
(2n − 4)! n!(n − 2)!
divides
2m m
2n .

lim n→∞ n 1 but since ( n/α + n/β ) → 1/α + 1/β as n → ∞. β > 1. 9. it follows that 1/α + 1/β = 1. If 0 < α ≤ 1. which we call a2 .Practice
428 Theorem (Beatty’s Theorem. α β Proof: If both α . 11. 6. etc. 8. 14. The n-th term is thus an = nτ . 1926) If α > 1 is irrational and
65
1 1 + = 1. and we delete a3 + 3 = 7. Thus the total number of terms not exceeding N in Spec(α ) and Spec(β ) is N − 1. . { τ τn
Prove that the three sequences (n ≥ 1) }. u n
430 Example Suppose we sieve the positive integers as follows: we choose a1 = 1 and then delete a1 + 1 = 2. then α . α β then the sequences Spec(α ) and Spec(β ) are complementary. then n/α + n/β = 1. { τ 2 n } are complementary. Thus the next available integer is 4 = a3 .
Practice
431 Problem (Skolem) Let τ =
√ 1+ 5 be the Golden 2
Ratio. . The next term is 3. β are positive irrational numbers with 1 1 + = 1. Spec(α ) ∩ Spec(β ) = ∅. and so are not disjoint. 1957) If the sequences
Spec(α ) and Spec(β ) are complementary. 4. 17. 3. { τ τ 2 n }. we gather that N −2 < N/α + N/β < N. As 1/α +1/β = 1. and the total number of terms not exceeding N taken together in both sequences is N/α + N/β . 12. Find a formula for an .
. Spec(β ) eventually contain the same integers. But N/α − 1 + N/β − 1 < N/α + [N/β ] < N/α +N/β . . Spec(α ) and Spec(β ) are each sequences of distinct terms. Since the sandwiched quantity is an integer. it is clear that Spec(α ).
Solution: What we are asking for is a sequence {Sn } which is complementary to the sequence {S√+ n}.
429 Theorem (Bang’s Theorem. which implies that Spec(α ) = N. By Beatty’s Theorem. n + 1) contains exactly one such term. β are irrational. we deduce [N/α ]+[N/β ] = N −1. . n nτ and nτ + n = n(τ + 1) are complementary if 1/τ + 1/(τ + 1) = 1. β are rational numbers. as this is true for any N ≥ 1 each interval (n. u The converse of Beatty’s Theorem is also true. Thus α and β must be irrational. and then we delete a2 + 2 = 5. Thereby we leave the integers 1. 16. whence α > 1 (and so β > 1 also). Proof: Since α > 1. the last inequality being strict because both α . It follows that Spec(α ) ∪ Spec(β ) = N. the Golden ratio. given n there is an M for which mα − 1 < n ≤ mα . But then τ = (1 + 5)/2. If Spec(α ) ∩ Spec(β ) is ﬁnite. hence n = [mα ].

Proof: Suppose that a. we say that f is then a multiplicative function. we see that φ (20) = 8. For this we need ﬁrst the following result. we have d(20) = 6. Then F is also multiplicative. (a. The following functions are of considerable importance in Number Theory: d(n) σ (n) φ (n) the number of positive divisors of the number n. Then r 1 2 f (n) = f (pa1 ) f (pa2 ) · · · f (par ). d2 |b. If f (mn) = f (m) f (n) for every pair of natural numbers m. If f is multiplicative. ω (n) =
p|n
1. If f is an arithmetic function which is not identically 0 such that f (mn) = f (m) f (n) for every pair of relatively prime natural numbers m. n we say then that f is totally multiplicative. 3. counting multiplicity. 13. the number of distinct prime divisors of n. 11. Hence f (a) = f (1 · a) = f (1) f (a) which entails that f (1) = 1. 10 and 20 are the divisors of 20. if n = ab.66
Chapter 6
6. 19 are the positive integers not exceeding 20 and relatively prime to 20. d2 ) = 1. u
. b) = 1. r 1 2 A multiplicative function is thus determined by its values at prime powers. 2. since 1. Since the numbers 1. the sum of the positive divisors of n.
and
φ (n) =
1≤k≤n
1. We will now show that the functions d and σ are multiplicative. the number of positive integers not exceeding n and relative prime to n.
ω (n) Ω(n)
In symbols the above functions are: d(n) =
d|n
1.) For example. σ (20) = 42. (d1 .
This completes the proof. b) = 1 then F(n) =
d|n
f (d) =
d1 |a d2 |b
f (d1 d2 ). d2 of positive divisors of a and b. Ω(20) = 3. 17. By the Fundamental Theorem of Arithmetic.n)=1
(The symbol || in pα ||n is read exactly divides and it signiﬁes that pα |n but pα +1 |n.
Since f is multiplicative the dextral side of the above equals f (d1 ) f (d2 ) =
d1 |a d2 |b d1 |a
f (d1 )
d2 |b
f (d2 ) = F(a)F(b). 5. every divisor d of ab has the form d = d1 d2 where d1 |a. n. b are natural numbers with (a. 7. Thus there is a one-to-one correspondence between positive divisors d of ab and pairs d1 . 9. Let f be multiplicative and let n have the prime factorisation n = pa1 pa2 · · · par . ω (20) = 2. σ (n) =
d|n
d.
(k. Hence.
432 Theorem Let f be a multiplicative function and let F(n) =
d|n
f (d).4 Arithmetic Functions
An arithmetic function f is a function whose domain is the set of positive integers and whose range is a subset of the complex numbers. 4. Ω(n) =
pα ||n
α. then there is a positive integer a such that f (a) = 0. the number of primes dividing n.

p. . p3 . the condition of being locked or unlocked is changed for all those lockers and only those lockers whose numbers are multiples of k. This entails that if n has the prime factorisation n = pa1 pa2 · · · par . . where p. . d(2904) = d(23 · 3 · 112 ) = d(23 )d(3)d(112 ) = (1 + 3)(1 + 1)(1 + 2) = 24. This gives at most 2 n divisors. . Thus n = pα qβ and either 1 + α = 2. If p is a prime. because n ≥ 3 and so we must exclude the divisors 1 and 2. the theorem 1 is a multiplicative function. 1 + β = 3 or 1 + α = 6. T2 . then r 1 2 d(n) = (1 + a1 )(1 + a2 ) · · · (1 + ar ). . one of these divisors must be a a √ √ ≤ n. will be unlocked after n operations if and only if m has an odd number of divisors. 1 ≤ k ≤ n. the answer is 16. It follows that n must divide 180. Tn whereby with the operation Tk .
433 Example (AHSME 1993) For how many values of n will an n-sided polygon have interior angles with integral degree
measures? (n − 2)180 Solution: The measure of an interior angle of a regular n-sided polygon is . 2. The assertion is proved.
435 Example Find all positive integers n such that d(n) = 6.
437 Example (Putnam 1967) A certain locker room contains n lockers numbered 1. Prove this mathematically. pa and so above shows that d(n) =
d|n
d(pa ) = a + 1. n must be of one of the forms pq2 or p5 . d(m) is odd if and only if m is a perfect square. 1 + β = 1. n and are originally locked. Now. Solution: Observe that locker m. Hence.
Interchanging the order of summation 1=
j≤n k≡0
j≤k≤n
j≤n
n . . . p2 . An
attendant performs a sequence of operations T1 . say. 1 ≤ m ≤ n. As n = a · .Arithmetic Functions
67
Since the function f (n) = 1 for all natural numbers n is clearly multiplicative (indeed. j
mod j
which is what we wanted to prove. . .
√
n n Solution: Each positive divisor a of n can paired with its complementary divisor . totally multiplicative). q are distinct primes. the divisors of pa are 1. p and q. After all the n operations have been performed it is observed that all lockers whose numbers are perfect squares (and only those lockers) are now open or unlocked. . Since n there are 18 divisors of 180.
434 Example Prove that d(n) ≤ 2 n. the desired n must have only two distinct prime factors. We give now some examples pertaining to the divisor function.
Solution: Since 6 can be factored as 2 · 3 and 6 · 1.
436 Example Prove that
n n
d(k) =
k=1 j=1
n j
Solution: We have
n
n
d(k) =
k=1 k=1 j|k
1. .
. For example. .

If p is a prime.
Proof: Suppose that p. If b = 1. namely 1. 10) = 1. b = m. This implies that 24|
d|n
We say that a natural number is perfect if it is the sum of its proper divisors.68
Chapter 6
Since the function f (n) = n is multiplicative (indeed. n/d ≡ 2 mod 3 or vice versa. The following theorem is classical. n/d ≡ 7 mod 8 or vice versa. since n perfect is.d=6
d=
1 + 2 + 3. Hence (2s+1 − 1)σ (m) = 2s+1 m. Then σ (2 p − 1) = 1 + 2 p − 1. As d( ) ≡ −1 mod 3 or mod 8. But then (2s+1 − 1)b = m. σ (2 p−1 (2 p − 1)) = σ (2 p−1 )σ (2 p − 1) = (1 + 2 + 22 + · · · + 2 p−1 )(1 + 2 p − 1) = (2 p − 1)2(2 p−1 ). the only possibilities d are d ≡ 1. We propose to show that b = 1. Then σ (n) = σ (2s )σ (m) = (2s+1 − 1)σ (m). and so σ (m) = 2s+1 b for some natural number b. d ≡ 1. whence 24 divides d + n/d.
439 Theorem An even number is perfect if and only if it is of the form 2 p−1 (2 p − 1) where both p and 2 p − 1 are primes. n Solution: Since 24|n + 1. and so m = (2s+1 − 1)b = 2s+1 − 1 is a prime. n ≡ 1 or 2 mod 3 and d ≡ 1. This entails that if n has the prime factorisation n = pa1 pa2 · · · par . b and m. 6 is perfect because 6 =
d|6. We take x = 5s. 2 p − 1 are primes. 2 p − 1) = 1. σ (n) = 2n = 2s+1 m. Observe that b + m = (2s+1 − 1)b + b = 2s+1 b = σ (m). and so b|m. It is easy to see that a natural number is perfect if and only if 2n =
d|n
d. and 2 p−1 (2 p − 1) is perfect. Prove that the sum of all divisors of n is also
divisible by 24. Since (2 p−1 . Thus b = 1. For example. As d ≡ n/d. (s.
Solution: Let s ≥ n. Then σ (x2 ) = σ (y2 ) = 31σ (s2 ). Write n = 2s m. which yields σ (m) ≥ 1 + b + m. then clearly σ (pa ) = 1+ p+ p2 +· · ·+ pa . no divisor is used twice in the pairing.
Practice
. n/d ≡ 5 mod 8 or vice versa. 3.u
440 Example Prove that for every natural number n there exist natural numbers x and y such that x − y ≥ n and σ (x2 ) = σ (y2 ). Conversely.
438 Example (Putnam 1969) Let n be a positive integer such that 24|n + 1. then there are at least three divisors of m. a contradiction. d. 5 or 7 mod 8. In all cases d + n/d ≡ 0 mod 3 and mod 8. y = 4s. 1 2 w r r 1 This last product also equals
a a p11 +1 − 1 p22 +1 − 1 par +1 − 1 · ··· r . r 1 2 then σ (n) = (1 + p1 + p2 + · · · + pa1 )(1 + p2 + p2 + · · · + pa2 ) · · · (1 + pr + p2 + · · · + par ). d ≡ 3. the above theorem entails that σ is multiplicative. totally multiplicative). let n be an even perfect number. This means that 2s+1 − 1 is a Mersenne prime and hence s + 1 must be a prime. m odd. One deduces that 2s+1 |σ (m). Also. p1 − 1 p2 − 1 pr − 1
We present now some examples related to the function σ .

d
three distinct prime factors must have two of its prime factors 3 and 5. .
460 Problem Prove that every odd perfect number having
d|n
1 = 2. j
451 Problem (AIME. 1 − tn
1 1 σ (n!) ≥ 1+ +···+ . k =
2.
461 Problem Prove that there do not exist odd perfect num-
449 Problem Prove that
d=n
d|n
d(n)/2
.
454 Problem Characterise all n for which σ (n) is odd. both p and a are congruent to 1 modulo 4. Prove that the set
of its prime factors occurs to an odd power. then σ (n) > n + √ n. This requires more work than that done for d and σ .
k=1
σ (k) =
j=1 31 19
j
n .Euler’s Function.
443 Problem Prove that
number has only ﬁnitely many solutions. Reduced Residues
69
441 Problem Find the numerical values of d(1024). 442 Problem Describe all natural numbers n such that d(n) = 453 Problem Prove that σ (n) = n + k. all the others occur to an even power.
459 Problem Show that an odd perfect number must contain
A = {n ∈ N : m|d(n)} contains an inﬁnite arithmetic progression.. n! 2 n
457 Problem Prove that an odd perfect number must have at
least two distinct prime factors. b. 452 Problem Prove that if n is composite. if the highest power of p occurring in n is pa .
462 Problem Prove that
450 Problem Prove that the power of a prime cannot be a per-
n
n
fect number. 3. dk (n) = d(dk−1 (n)). . √ 444 Problem Prove that d(n) ≤ 3n with equality if and only if n = 12. Reduced Residues
Recall that Euler’s φ (n) function counts the number of positive integers a ≤ n that are relatively prime to n.
458 Problem Prove that in an odd perfect number. ω (1024). σ (1024).
6.
456 Problem Prove that
holds:
∞
∞
d(n)t n =
n=1 n=1
tn . How many positive integer divisors of n2 are less than n but do not divide n?
463 Problem Find the number of sets of positive integers {a. k > 1 a ﬁxed natural
10. Describe dk (n) for sufﬁciently large k. all other prime factors must occur to an even power. . only one
446 Problem Let d1 (n) = d(n).
448 Problem Let n be a perfect number. First we need the following deﬁnitions.
.5 Euler’s Function.
447 Problem Let m ∈ N be given.
445 Problem Prove that the following Lambert expansion
1 + p. 455 Problem Prove that p is a prime if and only if σ (p) =
d(2n − 1) ≥ d(n). 1995) Let n = 2 3 . We will prove now that φ is multiplicative. Ω(1024) and φ (1024). Show that
one prime factor p such that.
bers having exactly three distinct prime factors. c} such that a × b × c = 462.

465 Deﬁnition A reduced residue system modulo n. n/n are irreducible?
n
Solution: This number is clearly
k=1
φ (k). φ (48) = φ (24 · 3) = φ (24 )φ (3) = (24 − 23 )(3 − 1) = 16. which is what we wanted to show. b) = 1. 0 ≤ m ≤ b − 1. 5. 1 ≤ k ≤ a.
466 Theorem The function φ is multiplicative. This forces i = j. and φ (550) = φ (2 · 52 · 11) = φ (2) · φ (52 ) · φ (11) = (2 − 1)(52 − 5)(11 − 1) = 1 · 20 · 10 = 200. 1 2 3 a+1 a+2 a+3 2a + 1 2a + 2 2a + 3 . 3a .. ab as follows.. the canonical reduced residues mod 12 are 1. . Now i. then 1
φ (n) = (pa1 − pa1 −1 ) · · · (pk k − pk k 1 1
a
a −1
).. 2p.. For if ia + k ≡ ja + k mod b then a(i − j) ≡ 0 mod b. . We claim that no two integers k. . . . Thus φ (pm ) = pm − pm−1 . . (a. This means that the b integers in any of these φ (n) columns are. an integer r is relatively prime to m if and only if it is relatively prime to a and b. .u If p is a prime and m a natural number. (b − 1)a + 1 (b − 1)a + 2 (b − 1)a + 3 . . As k ≡ ma + k mod a. . . . if a n = pa1 · · · pk k is the factorisation of n into distinct primes. . . b − 1] which implies that |i − j| < b. . This means that exactly φ (a)φ (b) integers on the array are relatively prime to ab. The φ (n) integers 1 = a1 < a2 < · · · < aφ (n) = n − 1 less than n and relatively prime to n are called
the canonical reduced residues modulo n. . 11 and the set {−11. . 2/n. (n − 1)/n.. We must determine how many of these integers are relatively prime to b. (b − 1)a + k . k will have a common factor with a if and only if ma + k does. We arrange the ab integers 1. .. Since (a.. ..70
Chapter 6
464 Deﬁnition Let n > 1. For example. We are now ready to prove the main result of this section. b − 1. j ∈ [0.. in some order.. Now consider the k-th column.. . 23} forms a reduced residue system modulo 12. Since φ is multiplicative. (b − 1)a + k on the k-th column are congruent modulo b. . the integers p. n > 1 is a set of φ (n) incongruent integers modulo n that are relatively
prime to n. Each integer on this column is of the form ma + k.. . 2a + k ... pm−1 p are the only positive integers ≤ pm sharing any prime factors with pm .
Proof: Let n be a natural number with n = ab. we deduce that i − j ≡ 0 mod b thanks to Corollary 346.
.. But exactly φ (b) of these are relatively prime to b. a . . . How many of the fractions 1/n. .. 19.. 2a . . . 1.
467 Example Let n be a natural number.. b) = 1. This means that there are exactly φ (a) columns of integers that are relatively prime to a. .. a + k. 3p.. 7. . . congruent to the integers 0.
For example. . There are φ (a) integers relatively prime to a in the ﬁrst row.. a+k . We shall determine ﬁrst the number of integers in the above array that are relatively prime to a and ﬁnd out how may of them are also relatively prime to b.. 5. . . . . ba
Now. 2. k .

1 ≤ n − a ≤ n and (n − a. If k ∈ Td (n). ab ≥ 1. φ (n/d) =
d|n
But as d runs through the divisors of n. so p = 2a 3b m. n) = d. ) = 1.Euler’s Function. 2
(a. n/d runs through the divisors of n in reverse order.
d|n
We claim that Td (n) has φ (n/d) elements. let Td (n) be the set of positive integers ≤ n whose gcd with n is d.u
d|n
470 Example If p − 1 and p + 1 are twin primes.
(a.
71
a=
1≤a≤n
nφ (n) . the Td partition the set {1. (m. Note that the elements of Td (n) are found amongst the integers k n n n d. But d there are exactly φ (n/d) such a. n} and so Td (n) = n. Thus S=
1≤a≤n
a=
1≤a≤n
n − a.
.n)=1
(a. We then have φ (p) ≤ 2a 3b−1 φ (m) ≤ 2a 3b−1 m = p/3.n)=1
Solution: Clearly if 1 ≤ a ≤ n and (a. This implies that (a. d. . . n) = 1. . Then
d|n
φ (d) = n.n)=1
The assertion follows. 2.n)=1
whence 2S =
1≤a≤n
n = nφ (n). ) = 1. prove that 3φ (p) ≤ p. . n) = 1. We gather that n=
d|n
φ (n/d).
469 Theorem Let n be a positive integer.
Solution: Observe that p > 4 must be a multiple of 6. Prove that the equation
φ (x) = n!
is soluble.
(a. .
471 Example Let n ∈ N. Reduced Residues
468 Example Prove that for n > 1. 1 ≤ a ≤ n/d and (k.
Proof: For each divisor d of n. 6) = 1. (a. and p > 4. then k = ad. whence n =
φ (d). 2d. d d d d n Therefore counting the elements of Td (n) is the same as counting the integers a with 1 ≤ a ≤ n/d. As d varies over the divisors of n. . ) = 1. But then ( . .

You tag one person.
480 Problem Prove that if φ (n)|n − 1. Then x =
pα ||n
pα . Show that ∀ k ∈ N. ··· p1 p2 · · · par ≥ r a p1 p2 pr 2 pa1 /2 pa2 /2 · · · pr r /2 1 2
Ö
√ 1 1 This last quantity equals n/2. 2. 4
473 Example Find inﬁnitely many integers n such that 10|φ (n). p √ n. then n has at least three distinct prime factors. 483 Problem Prove that if φ (n)|n−1 and n is composite. then n must be square-
free.
Practice
474 Problem Prove that 479 Problem If φ (n)|n. skip k. This restriction implies that φ (x)/x = φ (n)/n. k = 1. Then φ (11k ) = 11k − 11k−1 = 10 · 11k−1 . this last condition is clearly satisﬁed. 2 p1 − 1 pr − 1
φ (n) =
a a p1 − 1 p2 − 1 pr − 1 a1 a2 1 p11 p22 · · · par r .72
Chapter 6
Solution: We want to solve the equation φ (x) = n with the constraint that x has precisely the same prime factors as n.
1√ 1 n = n1/4 . If n = k!. then tag another. then
√ n for n > 6. An explicit solution to the problem is thus prime factors as n is
p|n
x = (k!)2 /φ (k!).
n has at least four prime factors. and so on. It is
p|n
clear then that a necessary and sufﬁcient condition for φ (x) = n to be soluble under the restriction that x has precisely the same (p − 1)|n. . continuing until you tag 476 Problem (AIME 1992) Find the sum of all positive rasomeone for the second time. . then n must be of the form 2a 3b for
φ (n) = n
p|n
1 1− . .. 478 Problem Prove that φ (n) > 482 Problem Prove that if φ (n)|n−1 and n is composite.
. least once? Answer: 400
477 Problem Prove that φ (n) ≥ n2−ω (n) .
472 Example Let φk (n) = φ (φk−1 (n)). k = 1. 2. where φ0 (n) = φ (n).
Solution: Let pa1 pa2 · · · par be the prime factorisation of n.
481 Problem (Mandelbrot 1994) Four hundred people are
475 Problem Prove that if n is composite then φ (n) ≤ n−
When is equality achieved?
standing in a circle. For how many positive values tional numbers that are less than 10 and have denominator 30 of k less than 400 will every person in the circle get tagged at when written in lowest terms. . then skip k people. . We conclude that n ≥ 22 implies that φk (n) > 1. Let n =
pα ||n
pα . . The integer x will have the same prime factors as n provided that p−1
(p − 1)|n. Therefore φ1 (n) > φ (n) > 2 2 k+2 1 2−k−1 n . Clearly r 1 2 p11 p22 · · · pr r Hence
a /2 a /2 a /2
> 2r−1 ≥
1 p1 pr ··· .
nonnegative integers a. φk (n) > 1 for all sufﬁciently large
n. b. . In general we can show that φk (n) > 4 4
Solution: Take n = 11k . It follows that x = n2 /φ (n).

Deﬁne the Jacobsthal function g(n) :=
1≤k≤φ (n)−1
max
ak+1 − ak
to be the maximum gap between the ak .e.1. y are inverses to a mod n then ax ≡ 1 mod n and ay ≡ 1 mod n. Prove that ω (n) ≤ g(n).
6. we see that 0. and 4 do not have a multiplicative inverse.1: Multiplication Table for Z6
486 Deﬁnition Let n > 1 be a natural number. Another look at the table shows the interesting product 3 ·6 2 = 0. y such that ax + ny = 1.u
488 Example Find the inverse of 5 mod 7. n) = 1.
σ (n) + φ (n) = nd(n). For example. n).
. Conversely if (a.
Proof: Assume that b is the inverse of a mod n.Multiplication in Zn
484 Problem For n > 1 let 1 = a1 < a2 < · · · < aφ (n) = n − 1
73 (Hint: Use the Chinese Remainder Theorem).
485 Problem Prove that a necessary and sufﬁcient condition for n to be a prime is that
be the positive integers less than n that are relatively prime to n. By inspection we see that this is x ≡ 3 mod 7.
Solution: We are looking for a solution to the congruence 5x ≡ 1 mod 7. a be integers. n) = 1.
487 Theorem Let n > 1. We are now going to investigate the multiplicative structure of Zn . let us consider Table 6. ·6 0 1 2 3 4 5 0 0 0 0 0 0 0 1 0 1 2 3 4 5 2 0 2 4 0 2 4 3 0 3 0 3 0 3 4 0 4 2 0 4 2 5 0 5 4 3 2 1
Table 6. For if x. This immediately yields ax ≡ 1 mod n. How to deﬁne multiplication in Zn ? If we want to multiply a ·n b we simply multiply a · b and reduce the result mod n. i. This implies that (a. 3. Why is it interesting? We have multiplied to non-zero entities and obtained a zero entity! Does Z6 form a group under ·6 ? What is the multiplicative identity? In analogy with the rational numbers. Then a possesses an inverse modulo n if and only if a is relatively prime to n. (ya)x ≡ y mod n. We would then deﬁne the multiplicative inverse of a to be that b that has the property that a ·6 b = b ·6 a = 1. Hence x ≡ y mod n.5 we saw that Zn endowed with the operation of addition +n becomes a group. Then ab ≡ 1 mod n. we encounter some problems. The answer is thus 4 ·6 2 = 2. Multiplying by y the ﬁrst of these congruences. As an example. which entails the existence of an integer s such that ab − 1 = sn. For that we need the following. by the Bachet-Bezout Theorem there are integers x. ab − sn = 1. This is a linear combination of a and n and hence divisible by (a. But then.6 Multiplication in Zn
In section 3. i. We need to be able to identify the invertible elements of Zn . 2. we would like 1 to be the multiplicative identity. To obtain 4 ·6 2 we ﬁrst multiplied 4 · 2 = 8 and then reduced mod 6 obtaining 8 ≡ 2 mod 6.e.
It is easy to see that inverses are unique mod n. a has an inverse mod n.. An integer b is said to be the inverse of an integer a modulo n if ab ≡ 1 mod n.

. n) = 1. n since it inherits associativity from the integers. . etc. Then ay ≡ at−xordn a ≡ at · (aordn a )−x ≡ 1 · 1−x ≡ 1 mod n. 35 ≡ 5.
For example. Clearly a = 0. n) = 1 and let t be an integer. 23 ≡ 1 mod 7. . a2 . an+1 mod n. 34 ≡ 4. 24 ≡ 2 mod 7. We let Z× = {a1 . 25 ≡ 4 mod 7. 1 ≤ t − s ≤ n. This is a linear combination of a and n and hence divisible by (a. Hence as ≡ at mod n gives at−s as ≡ at−s at mod n. n) = 1. Then there is an integer s such that sordn a = t. not all integers a are going to have an order mod n. 0 ≤ y < ordn a. n) = 1. .u If (a.u
. the preceding theorem tells us that there is a positive integer k with ak ≡ 1 mod n. . That is. n) = 1 for all j ≥ 1. there is an integer s with am + sn = 1 or a · am−1 + sn = 1.
Conversely. a2 . u The following theorem is of utmost importance.
489 Example (IMO 1964) Prove that there is no positive integer n for which 2n + 1 is divisible by 7. n).
Proof: Assume that ordn a|t. which proves the result. We thus see that only the reduced residues mod n have an inverse. Using Corollary 346 we gather that at−s ≡ 1 mod n. the Pigeonhole Principle two of these powers must have the same remainder mod n. n) = 1. 32 ≡ 2. We conclude that Z× is a group under the operation ·n . 36 ≡ 1 mod 7. ordn a|t. 1. which is to say at ≡ at−s at mod n. . aφ (n) }. Given n. Then a ∈ Z has an order mod n if and only if (a.. n We now give some assorted examples. By the Well-Ordering Principle. This says that there is no power of 2 which is ≡ −1 ≡ 6 mod 7. i. we can ﬁnd s. there exists a positive integer k ≤ n such that ak ≡ 1 mod n. 26 ≡ 1 mod 7. a will have a multiplicative inverse if and only if (a. Now. 33 ≡ 6. This contradicts the deﬁnition of ordn a as the smallest positive integer with that property. because then am ≡ 0 mod n for all positive integers m. . Then at ≡ 1 mod n if and only if ordn a|t. This gives at ≡ asordn a ≡ (aordn a )s ≡ 1s ≡ 1 mod n. Hence assume that a has an order mod n.
492 Theorem Let n > 1 be a positive integer. We write this fact as ord7 3 = 6. The pattern 2. there must be a smallest positive integer with this property.e. a3 . Hence.
Proof: If (a. 4. It is easy to see that the operation ·n is associative. This prompts the following deﬁnition.
491 Deﬁnition If m is the least positive integer with the property that am ≡ 1 mod n. The question as to which integers are going to have an order mod n is answered in the following theorem. n) = 1. we say that a has order m mod n. and so the order of 3 mod 7 is 6. Hence y = 0 and thus t = x · ordn a.
Solution: Observe that 21 ≡ 2. As there are n + 1 numbers and only n residues mod n. .
493 Theorem Let (a.
490 Theorem If a is relatively prime to the positive integer n.74
Chapter 6
According to the preceding theorem. This entails that (a.
If y > 0 we would have a positive integer smaller than ordn a with the property ay ≡ 1 mod n. 22 ≡ 4. assume that at ≡ 1 mod n and t = x · ordn a + y. 31 ≡ 3. The existence of an order entails the existence of a positive integer m such that am ≡ 1 mod n. Consider the sequence a. This is clear if n|a. repeats thus cyclically. then a has an order in view of Theorem 490 and the Well-Ordering Principle. n) = 1 we must have (a j .
Proof: Since (a.t with 1 ≤ s < t ≤ n + 1 such that as ≡ at mod n.

. r2 . 25.
499 Theorem The Möbius Function µ is multiplicative. r2 . if ω (n) = Ω(n). 5) = 1. . . ar2 . Thus n = 3. a ∈ Z. 55 in some order and 1 · 5 · 7 · 11 ≡ 5 · 25 · 35 · 55 mod 12. n) = 1. .Practice
494 Example (IMO 1964) Find all positive integers n for which 2n − 1 is divisible by 7. . b ∈ Z. The following corollary to Theorem 495 should be immediate. −1 for square free integers with an odd number of prime factors. arφ (n) is also a reduced set of residues modulo n. . . then ar1 .7 Möbius Function
498 Deﬁnition The Möbius function is deﬁned for positive integer n as follows:
µ (n) =
1 (−1)ω (n) 0
if n = 1. ar2 +
b. . It must then be the case that 3|n.
6. If both M and n are square-free then
µ (m)µ (n) = (−1)ω (m) (−1)ω (n) = (−1)ω (m)+ω (n) = µ (mn).
495 Theorem Let n > 1. 7. We want 2n ≡ 1 mod 7. µ (30) = −1 and µ (18) = 0. (a.
This proves the theorem. rφ (n) is a reduced set of residues modulo n. 55 is also a reduced residue system modulo 12. The following result will be used repeatedly. This contradicts the fact that the r’s are incongruent. 35. (a. . n) = 1. as 1. we deduce from Corollary 346 that ri ≡ r j mod n. the set 5. . arφ (n) + b is also a reduced set of residues modulo n. . if ω (n) < Ω(n). 5.
Practice
497 Problem Find the order of 5 modulo 12. . If r1 . Since (a. 12. . 11 are the 5.
75
Solution: Observe that the order of 2 mod 7 is 3. . and 0 for non-square free integers. .
Thus µ is 1 for n = 1 and square free integers with an even number of prime factors. Suppose that ari ≡ ar j mod n for some i = j. . Thus for example µ (6) = 1. . so the theorem follows. if n > 1. . 25. n is not square-free then
µ (m)µ (n) = 0 = µ (mn). Again. .u For example. 7. 35. a.. then ar1 + b. . n) = 1. u
500 Theorem
µ (d) =
d|n
1 0
if n = 1. n) = 1.
Proof: Assume (m. 5. . arφ (n) are mutually incongruent mod n. . If r1 . 6. the 1.
.
If one of m. rφ (n) is a reduced set of residues modulo n.
496 Corollary Let n > 1. ar2 . 11 is a reduced residue system modulo 12 and (12. 9. .
Proof: We just need to show that the φ (n) numbers ar1 .

the inner sum is different from 0 only when = 1.u
=
s|n
We now show the converse to Theorem 501. F be arithmetic functions with f (n) =
d|n
µ (d)F(n/d) for all natural numbers n.
Proof: We have
d|n
µ (d)F(n/d) =
d|n d|n
=
ds|n
f (s) n s| d µ (d) f (s) f (s)
µ (d).76
Chapter 6
Proof: There are
ω (n) square-free divisors d of n with exactly k prime factors. For all such d. Hence only the term s = n in the outer s sum survives.u
Practice
503 Problem Prove that 504 Problem If f is an arithmetical function and F(n) =
φ (n) = n
d|n
µ (d) . in which case the entire sum reduces to F(n). d
. the inner sum will be 0 unless s = n. µ (d) = (−1)k . Then F(n) =
d|n
f (d). n d| s n In view of theorem 500.
502 Theorem Let f .
Proof: We have f (d) =
d|n d|n s|d
µ (s)F(d/s) µ (d/s)F(s)
d|n s|d
= =
s|n
µ (r)F(s). k The sum in question is thus
ω (n)
k=0
µ (d) =
d|n
ω (n) (−1)k . Then
f (n) =
d|n
µ (d)F(n/d) =
d|n
µ (n/d)F(d).
n r| s
Using Theorem 500.u
501 Theorem (Möbius Inversion Formula) Let f be an arithmetical function and F(n) =
d|n
f (d). which means that the above sums simplify to f (n). k
By the Binomial Theorem this last sum is (1 − 1)ω (n) = 0.

µ (n + 1) = µ (n + 2) = · · · = µ (n + k).
.
505 Problem If F is an arithmetical function such that f (n) =
n n
µ (k)F([n/k]).Practice
n
77
506 Problem Prove that
d|n n
f ([n/k]).
507 Problem Prove that
d|n
µ (d)d(d) = (−1)ω (n) . prove that F(n) =
k=1 j=1
508 Problem Given any positive integer k.
f (n) =
j=1
µ ( j)F([n/ j]). prove that there exist inﬁnitely many integers n with
f ( j). then
k=1
|µ (d)| = 2ω (n) .

Find the remainder when a100 is divided by 7. 84 ≡ 4 mod 11 and 85 ≡ −1 mod 11.
510 Corollary For every prime p and for every integer a.1 Theorems of Fermat and Wilson
509 Theorem (Fermat’s Little Theorem) Let p be a prime and let p |a. a · 2. p) = 1 we may cancel out the (p − 1)!’s in view of Corollary 346. This proves the theorem. n > 1.Chapter
7
a p−1 ≡ 1 mod p. 5 or 10. Then
Proof: Since (a. p) = 1. If p|a. the set a · 1. an = 4an−1 . Hence p|a(a p−1 − 1) = a p − a.
511 Corollary Let p be a prime and a an integer. we obtain the following. 2.
Proof: Either p|a or p |a.
ap ≡ a
mod p. .
As ((p − 1)!. which again gives the result. mod p in view of
More on Congruences
7. Assume that p |a. .
513 Example Let a1 = 4.u As an obvious corollary. or a p−1 (p − 1)! ≡ (p − 1)! mod p. Now 82 ≡ −2 mod 11. If p |a. . Fermat’s Little Theorem yields p|a p−1 − 1.u The following corollary will also be useful. Hence (a · 1)(a · 2) · · · (a · (p − 1)) ≡ 1 · 2 · · · (p − 1) mod p.u
512 Example Find the order of 8 mod 11. a · (p − 1) is also a reduced set of residues Theorem 495.
78
. The order is thus ord11 8 = 10. .
Solution: By Corollary 511 ord11 8 is either 1. a ≡ 0 ≡ a p mod p and there is nothing to prove.
Proof: This follows immediately from Theorem 493 and Fermat’s Little Theorem. Then ord p a|p − 1.

46 ≡ 1 mod 7. 1 2n−1 n n n +5 + 52 +··· . Now. mn(m p−1 − n p−1 ) ≡ 0 mod p. 4n ≡ 4 mod 6 for all positive integers n. Thus a100 ≡ 4a99 ≡ 44+6t ≡ 44 · (46 )t ≡ 4 mod 7. (x6 − y6 )|Q(x. n).
515 Example (Putnam 1972) Show that given an odd prime p. 2. If p is any one of the primes dividing a. Again. 2 p−2 f p−1 ≡ p − 1 − (5 + 52 + · · · + 5(p−3)/2 ) ≡ − Using (2). 5(p−1)/2 − 1 4 mod p.
mod p. take n = (p − 1)2k+1 . prove that either f p−1 or f p+1 is divisible by p. . 2 p f p+1 ≡ p + 1 + 5(p−1)/2 ≡ 5(p−1)/2 + 1 mod p. 1 ≤ n ≤ p − 1. 7|mn(m6 −n6 )|Q(m. (x2 − y2 )|Q(x. n ∈ Z. ord p 2 must have a common prime factor with n (clearly ord p 2 > 1). n). y).
517 Example Let p be a prime. by Corollary 511. Prove that
1. By Fermat’s Little Theorem.
2. y). (x10 − y10 )|Q(x. p|n|2n − 1 and so 2n ≡ 1 mod p. n).
3. n).
516 Example Prove that there are no integers n > 1 with n|2n − 1. 11|mn(m10 −n10 )|Q(m. 1. Since these are all distinct primes.
Answer: For any odd prime p. Now. a contradiction. y). The assertion follows from this. Hence. which is what we wanted. y). y) = xy(x60 − y60 ). (3) Using the Binomial Theorem and Binet’s Formula fn = From this and (1). k = 0. 2 ≤ n ≤ p − 1. The assertion follows from this. n).e. 1 3 5
. i.e. y). and (x30 − y30 )|Q(x.Theorems of Fermat and Wilson
79
Solution: By Fermat’s Little Theorem. 4n = 4 + 6t for some integer t. y). Then n2n + 1 ≡ (p − 1)2k+1 (2 p−1 )(p−1) + 1 ≡ (−1)2k+1 12k + 1 ≡ 0
2k
mod p. (x3 − y3 )|Q(x. 2 p−1 ≡ 1 mod p. Solution: (1) (p − 1)(p − 2) · · · (p − n) ≡ (−1)(−2) · · · (−n) ≡ (−1)n n! mod p. n). Observe that (x − y)|Q(x. ord p 2 has a prime factor in common with p − 1. 31|m n30 )|Q(m. This means that n has a smaller prime factor than p. n). the Corollary to Fermat’s Little Theorem yields m p − m ≡ 0 mod p and n p − n ≡ 0 mod p. we gather that a|mnQ(m. (x4 − y4 )|Q(x. (x12 − y12 )|Q(x. mn(m60 − n60 ) is always divisible by 56786730.
Solution: Let a = 56786730 = 2 · 3 · 5 · 7 · 11 · 13 · 31 · 61. (2) (p + 1)(p)(p − 1) · · · (p − n + 2) ≡ (1)(0)(−1) · · · (−n + 2) ≡ 0 mod p. we have 2|mn(m − n)|Q(m. By Corollary 511 ..
514 Example Prove that for m.. If p = 5 is an odd prime. then n must be odd and have a smallest odd prime p as a divisor.
p−1 ≡ (−1)n n p+1 ≡0 n
mod p. Thus n(m p − m) − m(n p − n) ≡ 0 mod p. n). Let Q(x. 13|mn(m12 −n12 )|Q(m.. i. . n) and 61|mn(m60 − n60 )|Q(m.
Solution: If n|2n − 1 for some n > 1. there are always inﬁnitely many integers n for which p|n2n + 1. 5|mn(m4 −n4 )|Q(m. y). y). 3|mn(m2 −n2 )|Q(m. .

So assume that p > 3. n + 5} can be partitioned into two sets such that the product of the numbers in one set equals the product of the numbers in the other set. in which case exactly one of A or B is divisible by 7.
But if A = B then we are saying that there is an integer A such that A ≡ −1 mod 7. aa ≡ 1 mod p. 1 ≤ j ≤ (p − 1)/2 with p − j. and so A · B is not a square. Hence −1 ≡ (p − 1)! ≡ As (−1)
(p−1)/2 1≤ j≤(p−1)/2
− j2 ≡ (−1)(p−1)/2
p−1 ! 2
mod p. Observe that j(p − j) ≡ − j2 mod p. n + 3. n + 4. Suppose that we can have such a partition. In this last case we have n(n + 1) · · · (n + 6) ≡ 1 · 2 · · · 6 ≡ A · B ≡ −1
2
mod 7. n + 4. then (p − 1)! ≡ −1 mod p.
521 Example (IMO 1970) Find the set of all positive integers n with the property that the set
{n. it must divide at least one of the factors. a = p − 1. The assertion follows. n + 2. u
520 Example If p ≡ 1 mod 4. and the net contribution of this product is therefore 1. then either a ≡ 1 mod p or a ≡ −1 mod p.80 Thus But by Fermat’s Little Theorem. 2 · 3 · · · (p − 2) ≡ 1 mod p. n + 1. This ﬁnishes the proof. and so A · B is not divisible by 72 . Solution: We will show that no such partition exists. which is an impossibility. Consider a. i.
Practice
. In other words. we obtain the result. The ﬁrst possibility is that exactly one of the numbers in the set {n.
= 1.
518 Lemma If a2 ≡ 1 mod p. n + 1. 5
p−1
Chapter 7
≡ 1 mod p for p = 5. as −1 is not a square mod 7.e.u
519 Theorem (Wilson’s Theorem) If p is a prime. 2 ≤ a ≤ p − 2. we pair them of with their inverses. Thus in multiplying all a in the range 2 ≤ a ≤ p − 2.
p−1 ! ≡ −1 2
mod p. n + 5} is divisible by 7. In symbols. the result follows by direct veriﬁcation. (p − 1)! ≡ 1 · This gives the result. Observe that a = a since then we would have a2 ≡ 1 mod p which violates the preceding lemma as a = 1. n + 3.
Solution: In the product (p − 1)! we pair off j. This proves the lemma.
Proof: If p = 2 or p = 3. To each such a we associate its unique inverse a mod p.
2 p f p−1 f p+1 ≡ 5 p−1 − 1
mod p.
Proof: We have p|a2 − 1 = (a − 1)(a + 1). Since p is a prime. with one of the subsets having product of its members equal to A and the other having product of its members equal to B. We might have two possibilities. n + 2. prove that
j
2≤a≤p−2
· (p − 1) ≡ 1 · 1 · (p − 1) ≡ −1
mod p. The second possibility is that all of the members of the set are relatively prime to 7.

p
529 Problem If p is an odd prime prove that n p ≡ n mod 2p 530 Problem If p is an odd prime and p|m p + n p prove that
Answer: p = 3 only.
526 Problem If p is a prime prove that p|a p + (p − 1)!a for
all integers a.
mod n. by Euler’s Theorem. .
527 Problem If (mn.
6 6
12 ·32 · · · (p−2)2 ≡ 22 ·42 · · · (p−1)2 ≡ (−1)(p−1)/2
533 Problem Prove that 19|(22
6k+2
mod p
+ 3) for all nonnegative
integers k.
525 Problem If p and q are distinct primes prove that
p2 |m p + n p . n) = 1.
Solution: As φ (100) = 40. aaφ (n) also forms a set of incongruent reduced residues.
535 Corollary Let (a. we may cancel the product a1 a2 · · · aφ (n) from both sides of the congruence to obtain Euler’s Theorem. aa1 . .
537 Example Find the last two digits of 77
1000
mod 100. As (a.Euler’s Theorem
522 Problem Find all the natural numbers n for which 528 Problem Let p and q be distinct primes.
531 Problem Prove that n > 1 is a prime if and only if (n − 1)! ≡ −1 mod n.
534 Theorem (Euler’s Theorem) Let (a. The proof is analogous to that of Fermat’s Little Theorem. . n) = 1. a2 . .
As (a1 a2 · · · aφ (n) . 42) = 1 prove that 168|m − n .
523 Problem Prove that there are inﬁnitely many integers n
q p−1 + pq−1 ≡ 1 for all integers n.u Using Theorem 534 we obtain the following corollary. due to Euler. 536 Example Find the last two digits of 31000 . . Thus aa1 · aa2 · · · aaφ (n) ≡ a1 a2 · · · aφ (n) or aφ (n) a1 a2 · · · aφ (n) ≡ a1 a2 · · · aφ (n) mod n.
Proof: Let a1 . aa2 .
. n) = 1.
524 Problem Find all primes p such that p|2 + 1.
mod pq. . . Then aφ (n) ≡ 1 mod n. 340 ≡ 1 mod 100. n) = 1.2 Euler’s Theorem
In this section we obtain a generalisation of Fermat’s Little Theorem. Thus 31000 = (340 )25 ≡ 125 = 1 and so the last two digits are 01.
with n|2n + 2. aφ (n) be the canonical reduced residues mod n. .
7.
. 532 Problem Prove that if p is an odd prime
pq|(a pq − a p − aq − a) for all integers a. Prove that
81
3|(n2n + 1). Then ordn a|φ (n).

82
Chapter 7
Solution: First observe that φ (100) = φ (22 )φ (52 ) = (22 − 2)(52 − 5) = 40. (ii) (a + b)7 − a7 − b7 is divisible by 77 .
539 Example (IMO 1984) Find one pair of positive integers a. Similarly 197820 ≡ 19784 · (19784 )4 ≡ 6 · 64 ≡ 6 · 46 ≡ 26 mod 125. φ (40) = φ (23 )φ (5) = 4 · 4 = 16. m = 3. this last congruence implies that s = 4. n are natural numbers with 1 ≤ m < n. We are given that 1978n − 1978m = 1978m (1978n−m − 1) is divisible by 1000 = 23 53 . respectively. (ii)′ a2 + ab + b2 is divisible by 73 . As (a + b)2 > a2 + ab + b2 ≥ 73 . we take n−m = s = 100 and m = 3. 740 ≡ 1 mod 100. as 12 + 1 · 18 + 182 = 343 = 73 . Since s is the smallest positive integer with 1978s ≡ 1 mod 125. Upon assembling all this 77 This means that the last two digits are 07. Now.3 s|100. i.. or 100. Since s|100. b = 18 give an answer. m + n = 106. We now rule out the ﬁrst two possibilities. Find m.. we ﬁnd that a = 1. This means that 71000 = 1 + 40t for some integer t. and ﬁnally. by Euler’s Theorem. 7(a6 b + ab6 + 3(a5 b2 + a2 b5 ) + 5(a4 b3 + a3 b4 )) 7ab(a5 + b5 + 3ab(a3 + b3 ) + 5(a2 b2 )(a + b)) 7ab(a + b)(a4 + b4 − a3 b − ab3 + a2 b2 +3ab(a2 − ab + b2 ) + 5ab) 7ab(a + b)(a4 + b4 + 2(a3 b + ab3 ) + 3a2 b2 ) 7ab(a + b)(a2 + ab + b2 )2 . 1000 = 16 · 62 + 8. This means that 71000 ≡ (716 )62 78 ≡ 162 78 ≡ (74 )2 ≡ 12 ≡ 1 mod 40. 20. Observe that 19784 ≡ (−22)4 ≡ 24 · 114 ≡ (4 · 121)2 ≡ (−16)2 ≡ 6 This means that s = 4. Hence.
538 Example (IMO 1978) m. Solution: We ﬁrst factorise (a + b)7 − a7 − b7 as ab(a + b)(a2 + ab + b2 )2 . Now. By Euler’s Theorem and so by Corollary 7.
1978m are equal. we obtain a + b ≥ 19. 23 must divide the ﬁrst and so m ≥ 3.
s
1978100 ≡ 1
mod 125
This means that s = 20 and so s = 100. Finally. the last three digits of
1000
≡ 71+40t ≡ 7 · (740 )t ≡ 7
mod 100. Since 125|(1978 − 1) we have 5|(1978s − 1). In their decimal representations. 1978s ≡ 3s ≡ 1 mod 5. Since the second factor is odd.
. Justify your answer. to the last three digits of 1978n .e.
Solution: As m + n = n − m + 2m. Using trial and error. mod 125. hence 716 ≡ 1 mod 40. n = 103. we minimise n − m.e. Using the Binomial Theorem we have (a + b)7 − a7 − b7 = = = = = The given hypotheses can be thus simpliﬁed to (i)′ ab(a + b) is not divisible by 7. ord125 1978 is the smallest positive integer s with 1978s ≡ 1 mod 125. n such that m + n has its least value. b such that:
(i) ab(a + b) is not divisible by 7. i.

an = integer n divisible by s. such that the sum of the digits of n 7an−1 . As a3 − b3 = (a − b)(a2 + ab + b2 ).
83
Now φ (73 ) = (7 − 1)72 = 3 · 98.
544 Problem Find all natural numbers n that divide
ists some power of 2 whose ﬁnal n digits are all ones and twos. (ii)’ is implied by (ii)′′ a3 ≡ b3 mod 73 a ≡ b mod 7. b = 1. . Letting x = 3 we ﬁnd that 398 ≡ 324 mod 73 . which gives the ﬁrst part of (ii)’. Prove that
mφ (n) + nφ (n) ≡ 1
mod mn. We leave to the reader to verify that a = 324. and so if x is not divisible by 7 we have (x98 )3 ≡ 1 mod 73 . n) = 1. 541 Problem Prove that 504|n9 − n3 .Practice Let us look for more solutions by means of Euler’s Theorem.
. 550 Problem (Putnam 1985) Describe the sequence a1 = 3. b = 1 is another solution. 543 Problem Let p |10 be a prime.
Practice
540 Problem Show that for all natural numbers s.
1n + 2n + · · · + (n − 1)n . letting x = 2 we see that 298 ≡ 4 mod 7. For example. 542 Problem Prove that for odd integer n > 0.
545 Problem Let (m. We must verify now the conditions of non-divisibility.
2
10
548 Problem Prove that for every natural number n there ex-
11 . equals s. . an = 3an−1 mod 100 for large n. there is an 546 Problem Find the last two digits of a1001 if a1 = 7.
549 Problem (USAMO 1982) Prove that there exists a positive integer k such that k · 2n + 1 is composite for every positive integer n. n|(2n! − 1). 11. Thus letting a = 298 . Prove that p divides inﬁnitely many numbers of the form 547 Problem Find the remainder of
1010 + 1010 + · · · + 1010 upon division by 7.

551 Example Find all whole numbers which begin with the digit 6 and decrease 25 times when this digit is deleted. P(x) = a0 a1 · · · an−1 ≤ 9n−1 an−1 < 10n−1 an−1 ≤ x (strict inequality occurs when x has more than one digit). For n ≥ 2. For example. Therefore. y has the form 250 · · · 0(n − 2 zeroes).1 The Decimal Scale
As we all know.
Scales of Notation
8. 13. P(x) = 0. P(x) = 1. So x2 − 10x − 22 < x. and we deduce that x < 13. 0 ≤ a j ≤ 9. Now. If x = 12. an−1 = 0. 65789 = 6 · 104 + 5 · 103 + 7 · 102 + 8 · 10 + 9.
553 Example A whole number decreases an integral number of times when its last digit is deleted.Chapter
8
n = a0 10k + a1 10k−1 + · · · + ak−1 10 + ak . ßÞ
n−2 zeroes
552 Example (IMO 1968) Find all natural numbers x such that the product of their digits (in decimal notation) equals x2 −
10x − 22. If x had one digit. x = 12 is the only solution.
84
. but this equation has no integral solutions. but x2 − 10x − 22 = 1. but x2 − 10x − 22 = 0. 6 · 10n would not be divisible by 24). We conclude that all the numbers sought have the form 625 0 .
Solution: Let the number sought have n + 1 digits. whence x has either one digit or x = 10. If x = 10. The condition of the problem stipulates that 6 · 10n + y = 25 · y whence y= 6 · 10n . that is. P(x) = 2 and x2 − 10x − 22 = 2. . where y is a number with n digits (it may begin with one or several zeroes). 0 . 24
From this we gather that n ≥ 2 (otherwise. Then this number can be written as 6 · 10n + y. j ≥ 1. ak ≤ 9. 11. then a0 = x2 − 10x − 22. y = 25 · 10k−2 . Solution: Let x have the form x = a0 + a1 10 + a2 102 + · · · + an−1 10n−1 . . P(x) = x2 − 10x − 22. If x = 11. Let P(x) be the product of the digits of x. any natural number n can be written in the form
where 1 ≤ a0 ≤ 9. Find all such numbers.

. 16. b. a j+2 +a′j+2 = 1 2 a j+3 + a′j+3 = · · · = a10 + a′ = 9. . = . 36. But this implies that a1 + a′ = 0. that have a repeating decimal expansion of the
. In order to obtain p(n) for a particular number. a1 be the consecutive digits of A and A′ = a′ a′ . and j = 9 10 implies that there are no sums of the form al + a′ . 17. the sought numbers are: the multiples of 10. 39. 28. an integer. how many different numerators are required? abc Solution: Observe that 0. 118. Let A = a10 a9 . (Observe that we do not consider fractions of the form l/3t . 3 |l. form 0. = 0. once for 100.abcabcabc . and we obtain the multiples of 10. once for 110.abcabcabc . 10 9 1 A+A′ = 1010 if and only if there is a j. once for 011. let p(n) be the product of the non-zero digits of n. 66. where the digits a. We obtain all the three digit numbers from 001 to 999 by expanding the product (0 + 1 + 2 + · · · + 9)3 − 0. If y = 1. c are not necessarily distinct. x = 1 or x = 2 and we obtain 12 and 22. 18. We must have x|y. By the Inclusion-Exclusion Principle. any natural number x will do. a j+1 +a′j+1 = 10. This requires 10 + y/x = m. . (In the last sum.
556 Example (AIME 1992) Let S be the set of all rational numbers r. 48. there are 999 − (999/3 + 999/37) + 999/3 · 37 = 648 such numbers. and we obtain 11. Now. 33. k ≥ 2. we just have to substitute the (possible) zeroes in the decimal representation. 55. 1 2 10 Since the a′ are a permutation of the as . On adding all these sums. Prove that if A + A′ = 1010 . for example. 37|s. 0 ≤ j ≤ 9 for which a1 +a′ = a2 +a′ = · · · = a j +a′j = 0. If abc is neither divisible by 3 nor 37. . . which gives the result. then A is divisible by 10.22. once for 001. 108. . This implies that j must be odd. 11. 88.
Solution: Clearly A and A′ must have ten digits.The Decimal Scale
85
Solution: Let 0 ≤ y ≤ 9. we gather l a1 + a′ + a2 + a′ + · · · + a10 + a′ = 10 + 9(9 − j). If y = 2. then p(n) is equal to that digit. 800. x = 1. 19. and A′ be a number written with the aid of the same digits with are arranged in some
other order. 0 < r < 1.) As 463 − 1 = 33 · 5 · 7 · 103. and thus not in S. and 10x + y = mx. 12. 37 |s are in S. Notice that j = 0 implies that there are no sums of the form a j+k + a′j+k . Also. because fractions of this form are greater than 1. 26. once for 101. 24. m and x natural numbers.) The total number of distinct numerators in the set of reduced fractions is thus 640 + 12 = 660. 15.) Let S = p(1) + p(2) + · · · + p(999). To write the elements of S as fractions in lowest terms. Continuing in this fashion. 77. Thus (0 + 1 + 2 · · · + 9)3 − 0 = 001 + 002 + · · · + 999. and 811 have the same value p(n). and 999 = 33 · 37. and 99. which equals 463 − 1. where 3|s. 810. (If n has only one
digit. we see that the sinistral side of the above equality is the even number 2(a1 + a2 + · · · + s a10 ).abc. 13. the number required is 103.
554 Example Let A be a positive integer. the numbers 180. a′ . where we subtracted a 0 in order to eliminate 000. So. the fraction is already 999 in lowest terms. 44. fractions of the form s/37. If y = 0. 111 is repeated various times. . There are 12 fractions of this kind. . by 1’s. and so p(1) + p(2) + · · · + p(n) = 111 + 112 + · · · + 999 = (1 + 1 + 2 + · · · + 9)3 − 1. 1 ≤ l ≤ j. etc. What is the largest prime factor of S? Solution: Observe that non-zero digits are the ones that matter. 14. 1
555 Example (AIME 1994) Given a positive integer n.

560 Problem A whole number is equal to the arithmetic mean 565 Problem Let t be a positive real number. 810
562 Problem (AIME 1992) For how many pairs of consecu-
ative integers is called simple if the addition m + n requires no carrying. m + n begin with 1234567890 and one of them is divisible by n. . Then all of the n consecutive integers m + 1. Find all whole num. bac. . m + 2. Find n if n = 0.
563 Problem Let m be a seventeen-digit positive integer and 569 Problem The integer n is the smallest multiple of 15 such let N be number obtained from m by writing the same digits that every digit of n is either 0 or 8.
568 Problem (AIME 1986) In the parlor game. n) of nonneg561 Problem (AIME 1989) Suppose that n is a positive inte-
ger and d is a single digit in base-ten. 570 Problem (AIME 1988) For any positive integer k. Thus g(1983) < 1983 · 101983 < j · 9 · 10r−1 = r10r − 9 9
j=1
104 · 101983 = 101987 and g(1984) > 1983 · 101984 > 103 · 101984 . Compute n/15. . .whose cube ends in 888.d25d25d25d25 . 1001. 2000} is no carrying required when the two integers are added?
cian” asks one of the participants to think of a three-digit number abc. . in reversed order. . c represent the digits of the number in the order indicated.
Practice
559 Problem Prove that there is no whole number which decreases 35 times when its initial digit is deleted.
567 Problem (AIME 1987) An ordered pair (m. we get (r − 1)10r < g(r) < r10r . The magician asks his victim to form the numbers acb. . If told the value of N. The total number of digits in numbers with at most r digits is g(r) = r 10r − 1 10r − 1 . Play the magician and determine abc if N = 319. Find. Prove that at least one digit in the decimal representation of the number M + N is even. If the 10n digit of this sequence occurs in the part in which the m-digit numbers are placed. Therefore f (1987) = 1984. where a.
558 Example (Putnam 1987) The sequence of digits
12345678910111213141516171819202122 . f (1987). is obtained by writing the positive integers in order. Solution: There are 9 · 10 j−1 j-digit positive integers. . let f1 (k) denote the square of the sums of the digits of k. to add the number and to reveal their sum N. cab and cba. . For example f (2) = 2. because the hundredth digit enters the sequence in the placement of the two-digit integer 55. For 564 Problem Given that n ≥ 2. Prove that there
is a positive integer n such that the decimal expansion of nt contains a 7. .86
Chapter 8
557 Example (Putnam 1956) Prove that every positive integer has a multiple whose decimal representation involves all 10
digits. bers with that property. Let m = 123456780 · 10k+1 . Find the number of simple ordered pairs of nonnegative integers that sum 1492. 2! 3! 4! 571 Problem (IMO 1969) Determine all three-digit numbers
prove that e is irrational. Find f1988 (11). deﬁne f (n) to be m. b. Solution: Let n be an arbitrary positive integer with k digits. the magician can identity abc. with proof.
N that are divisible by 11 and such that N/11 equals the sum
. let fn (k) = f1 ( fn−1 (k)). . 1 1 1 e = 2+ + + +··· .
of all the numbers obtained from the given number with the aid 566 Problem (AIME 1988) Find the smallest positive integer of all possible permutations of its digits. the “magi-
tive integers in {1000. . As 0 < < 10r .

. Dividing 411 by 73 we obtain 1 + proper fraction = a3 + proper fraction.
Solution: Write Multiply by 6 to obtain
13 a1 a2 a3 = + + +. such that
572 Problem (IMO 1962) Find the smallest natural number |x − a/b| < b−k . however. having last digit is 6 and if this 6 is erased and put in front of the other digits. as the original number. We thus want to ﬁnd 0 ≤ a0 . . Prove that there exists a positive integer n such that |10n χ − r| < ε .
577 Example Express the decimal number 13/16 in base-six. We gather that a2 = 5.45136 . . Given any positive integer r > 1. Continuing in this way we deduce that 5213 = 211257 . divide by 74 to obtain 2 + proper fraction = a4 + proper fraction. 573 Problem
1.123456789101112131415161718192021 . such that 5213 = a4 74 + a3 73 + a2 72 + a1 7 + a0 . Now.020408163265306122448979591836734693877551.
578 Example Prove that 4.. 2. Continuing in this fashion.2 Non-decimal Scales
The fact that most people have ten ﬁngers has ﬁxed our scale of notation to the decimal. express any number in base r.41 = 4 + 1 4 1 + 2 = 2+ r r r
2
.
Solution: Observe that 5213 < 75 . Hence 13/16 − 4/6 = 7/48 = 2 + 3 + . a2 a3 Thus a1 = 4. Show that Champernowne’s number
575 Problem Given that
χ = 0.Non-decimal Scales of the squares of the digits of N. .
87
574 Problem A Liouville number is a real number x such that for every positive k there exist integers a and b ≥ 2.
is irrational.
8. then 4. we can. Let r ∈ Q and let ε > 0 be given. Multiply by 62 to obtain 6 6 5 + proper fraction = a2 + proper fraction.
Solution: If 4.41 is a perfect square in any scale of notation. . 16 6 62 63
4 + proper fraction = a1 + proper fraction. the resulting number is four times as large Prove or disprove that π is the sum of two Liouville numbers... Thus a3 = 1. we deduce that 13/16 = . a4 = 0. a4 ≤ 6.. . Since a4 is an integer. it must be the case that a4 = 2.
.41 is in scale r.
576 Example Express the decimal number 5213 in base-seven. ﬁnd the last thousand digits of 1 + 50 + 502 + · · · + 50999 . . 1/49 = 0. . Thus 5213 − 2 · 74 = 411 = a3 73 + a2 72 + a1 7 + a0 .

these numbers are. There are 25 = 32 such blocks.a1 a2 a3 a4 a5 a6 a7 . From this we see that 63x − 6 < 12345 ≤ 63x. which is outside [0. This will happen if and only if x0 has a repeating expansion with a1 a2 a3 a4 a5 as the repeating block . Solution: If the terms of the sequence are written in base-3. Find the hundredth term of the sequence. 10. . they comprise the positive integers which do not contain the digit 2. . Thus x − 1 + 2x − 1 + 4x − 1 + · · · + 32x − 1 < x + 2x + 4x + 8x + 16x + 32x
≤ x + 2x + 4x + · · · + 32x. 9. let
xn =
2xn−1 if 2xn−1 < 1 2xn−1 − 1 if 2xn−1 ≥ 1
for all integers n > 0. 4.a6 a7 a8 a9 a10 a11 a12 . 11. . 2n
The algorithm given just moves the binary point one unit to the right. = 0.
581 Example (AIME 1986) The increasing sequence
1. then x0 = 1. . 101.. . the terms of the sequence in ascending order are thus 1. .e. 4x = 4 · 195 + 2a1 + a2 . . In the binary scale. Recall that x satisﬁes the inequalities x − 1 < x ≤ x. For how many x0 is it true that x0 = x5 ? Solution: Write x0 in base-two. 111. . 2 2 2 with ak = 0 or 1. This cannot be because 31a1 + 15a2 + 7a3 + 3a4 + a5 ≤ 31 + 15 + 7 + 3 + 1 = 57 < 60. . Then 2x = 2 · 195 + a1 . The total number of values for which x0 = x5 is thus 32 − 1 = 31. 32x = 32 · 195 + 16a1 + 8a2 + 4a3 + 2a4 + a5 . x0 =
k=1 ∞
an an = 0 or 1. 12. But if a1 = a2 = · · · = a5 = 1. . 2. 10. 13. 3. consists of all those positive integers which are powers of 3 or sums distinct powers of 3. Write then x in base-two: a1 a2 a3 x = 195 + + 2 + 3 + . . 100. Does the equation
Chapter 8
x + 2x + 4x + 8x + 16x + 32x = 12345 have a solution? Solution: We show that there is no such x. of course. 1. .
Adding we ﬁnd that x + 2x + 4x + 8x + 16x + 32x = 63 · 195 + 31a1 + 15a2 + 7a3 + 3a4 + a5 . 31a1 + 15a2 + 7a3 + 3a4 + a5 = 60. 16x = 16 · 195 + 8a1 + 4a2 + 2a3 + a4 .
580 Example (AHSME 1993) Given 0 ≤ x0 < 1. i. For x0 to equal x5 we need 0. . 110.88
579 Example Let x denote the greatest integer less than or equal to x. . . . . 3. . Thus. 1). To obtain the 100-th term of the sequence we just write 100 in binary 100 = 11001002 and translate this into ternary: 11001003 = 36 + 35 + 32 = 981. Hence 195 < x < 196.
Practice
. 8x = 8 · 195 + 4a1 + 2a2 + a3 .

x2 . let
89
′ where xi = 2xi if xi = x j and x′j = 2x j − 1. 1987) For each positive integer n.
1. x3 ). 1982) The base-eight representation
B(n) n2 + n
a rational number? 2. Calculate E(n) . one performs the following “balancing 589 Problem What is the largest integer that I should be peract”: mitted to choose so that you may determine my number in ′ ′ ′ twenty “yes” or “no” questions? B(x1 . say x j > 1/2.
n=0
(−1)B(n) nm
in the form (−1)m a f (m) (g(m))! where a is an integer ordered triple of and f . 1977) An
8. x3 ) = (x1 .
(−1) 2 2n
nx
= 1 − 2(x − x ). For which positive real numbers x does the series
∞ n=1
xα (n) n3
587 Problem Let C denote the class of positive integers
converge?
583 Problem Prove that for x ∈ R. The
exact power m of a prime p dividing n! is given by
m= Proof: By De Polignac’s Formula
n − (a0 + a1 + · · · + ak ) . when written in base-three. B(6) = B(1102 ) = 2. x2 . one has
∞ n=1
which. pk
. x3 ) of positive irrational numbers with x1 + x2 + x3 = 1 is called balanced if xn < 1/2 for all 1 ≤ n ≤ 3. Does continuation of this process always lead to a balanced triple after a ﬁnite number of performances of the balancing act?
α (n) be the number of zeroes in the base-three representation of n. If the new triple is not balanced.
588 Problem Let B(n) be the number of 1’s in the base-two expansion of n.
590 Theorem (Legendre) Let p be a prime and let n = a0 pk + a1 pk−1 + · · · + ak−1 p + ak be the base-p expansion of n. For example. B(15) = B(11112 ) = 4. (P UTNAM 1984) Express
2m −1
of a perfect square is ab3c with a = 0. 1981) Let E(n) denote the largest k
exp
n=1
such that 5k is an integral divisor of 11 22 33 · · · nn . g are polynomials.3 A theorem of Kummer
We ﬁrst establish the following theorem. (x1 . x2 . (P UTNAM 1981) Is
∞
584 Problem (Putnam. If a triple is not balanced. x ≥ 0. Find the value of c.
586 Problem (Putnam. do not require the digit 2. n→∞ n2 lim
585 Problem (AHSME. one performs the balancing act on it.A theorem of Kummer
582 Problem (Putnam. Show that no three integers in C are in arithmetic progression. p−1
∞
m=
k=1
n .

90

**Chapter 8 Now, n/p = a0 pk−1 + a1 pk−2 + · · · ak−2 p + ak−1 , n/p2 = a0 pk−2 + a1 pk−3 + · · · + ak−2 , . . . , n/pk = a0 . Thus
**

∞

n/pk

k=1

=

a0 (1 + p + p2 + · · · + pk−1 ) + a1 (1 + p + p2 + · · · + pk−2 )+ · · · + ak−1 (1 + p) + ak pk − 1 pk−1 − 1 p2 − 1 p−1 a0 + a1 + · · · + ak−1 + ak p−1 p−1 p−1 p−1 a0 pk + a1 pk−1 + · · · + ak − (a0 + a1 + · · · + ak ) p−1 n − (a0 + a1 + · · · + ak ) , p−1

= = = as wanted.u

591 Theorem (Kummer’s Theorem) The exact power of a prime p dividing the binomial coefﬁcient

a+b a

is equal to the

**number of “carry-overs” when performing the addition of a, b written in base p. Proof:
**

k j=0

**Let a = a0 + a1 p + · · · + ak pk , b = b0 + b1 p + · · · + bk pk , 0 ≤ a j , b j ≤ p − 1, and ak + bk > 0. Let Sa =
**

k j=0

a j , Sb =

b j . Let c j , 0 ≤ c j ≤ p − 1, and ε j = 0 or 1, be deﬁned as follows: a0 + b0 = ε0 p + c0 , ε0 + a1 + b1 = ε1 p + c1 , ε1 + a2 + b2 = ε2 p + c2 , . . .

εk−1 + ak + bk = εk p + ck .

Multiplying all these equalities successively by 1, p, p2 , . . . and adding them: a + b + ε0 p + ε1 p2 + . . . + εk−1 pk =

ε0 p + ε1 p2 + . . . + εk−1 pk + εk pk+1 . +c0 + c1 p + · · · + ck pk

We deduce that a + b = c0 + c1 p + · · · + ck pk + εk pk+1 . By adding all the equalities above, we obtain similarly: Sa + Sb + (ε0 + ε1 + · · · + εk−1 ) = (ε0 + ε1 + · · · + εk )p + Sa+b − εk . Upon using Legendre’s result from above, (p − 1)m = (a + b) − Sa+b − a + Sa − b + Sb = (p − 1)(ε0 + ε1 + · · · + εk ), which gives the result.u

Chapter

9

p

Miscellaneous Problems

592 Example Prove that

1 p

p prime

diverges. Solution: Let Fx denote the family consisting of the integer 1 and the positive integers n all whose prime factors are less than or equal to x. By the Unique Factorisation Theorem 1+

p≤x

1 1 + +··· = p p2

p prime

n∈Fx

1 . n

(9.1)

Now,

n∈Fx

1 > n

n≤x

1 . n

**As the harmonic series diverges, the product on the sinistral side of 2.3.3 diverges as x → ∞. But 1+
**

p≤x

1 1 + 2 +··· = p p

p≤x

1 + O(1). p

p prime

p prime

**This ﬁnishes the proof.
**

593 Example Prove that for each positive integer k there exist inﬁnitely many even positive integers which can be written in more than k ways as the sum of two odd primes.

Solution: Let ak denote the number of ways in which 2k can be written as the sum of two odd primes. Assume that ak ≤ C ∀ k for some positive constant C. Then

à2

∞

xp

p>2 p prime

=

k=2

ak x2k ≤ C

x4 . 1 − x2

This yields

p>2 p prime

x p−1 ≤

√ x . C√ 1 − x2

91

**92 Integrating term by term,
**

p>2 p prime

Chapter 9

1 √ ≤ C p

1 0

√ x √ dx = C. 1 − x2

**But the leftmost series is divergent, and we obtain a contradiction.
**

594 Example (IMO 1976) Determine, with proof, the largest number which is the product of positive integers whose sum is

**1976. Solution: Suppose that
**

n

a1 + a2 + · · · + an = 1976; ak . We shall replace some of the ak so that the product is enlarged, but the sum remains the same. By

**we want to maximise
**

k=1

**the arithmetic mean-geometric mean inequality
**

n 1/n

ak

k=1

≤

a1 + a2 + · · · + an , n

with equality if and only if a1 = a2 = · · · = an . Thus we want to make the ak as equal as possible. If we have an ak ≥ 4, we replace it by two numbers 2, ak − 2. Then the sum is not affected, but 2(ak − 2) ≥ ak , since we are assuming ak ≥ 4. Therefore, in order to maximise the product, we must take ak = 2 or ak = 3. We must take as many 2’s and 3’s as possible. Now, 2 + 2 + 2 = 3 + 3, but 23 < 32 , thus we should take no more than two 2’s. Since 1976 = 3 · 658 + 2, the largest possible product is 2 · 3658 .

595 Example (USAMO 1983) Consider an open interval of length 1/n on the real line, where n is a positive integer. Prove that

the number of irreducible fractions a/b, 1 ≤ b ≤ n, contained in the given interval is at most (n + 1)/2. Solution: Divide the rational numbers in (x, x + 1/n) into two sets: { sk }, k = 1, 2, . . . , r, with denominators 1 ≤ tk ≤ n/2 and tk those uk /vk , k = 1, 2, . . . , s with denominators n/2 < vk ≤ n, where all these fractions are in reduced form. Now, for every tk there are integers ck such that n/2 ≤ ck tk ≤ n. Deﬁne us+k = ck sk , vs+k = ck tk , yk+r = uk+r /vk+r . No two of the yl , 1 ≤ l ≤ r + s are equal, for otherwise y j = yk would yield |uk /vk − ui /vi | ≥ 1/vi ≥ 1/n, which contradicts that the open interval is of length 1/n. Hence the number of distinct rationals is r +s ≤ n− n/2 ≤ (n+1)/2. Aliter: Suppose to the contrary that we have at least (n + 1)/2 + 1 = a fractions. Let sk ,tk , 1 ≤ k ≤ a be the set of numerators and denominators. The set of denominators is a subset of {1, 2, . . . , 2(a − 1)}. By the Pigeonhole Principle, ti |tk for some i, k, say tk = mti . But then |sk /tk − si /ti | = |msi − sk |/tk ≥ 1/n, contradicting the hypothesis that the open interval is of length 1/n.

596 Example Let

Qr,s = Show that Qr,ps ≡ Qr,s mod p, where p is a prime

(rs)! . r!s!

.+ + + a1 a2 an−1 an a1 a2 · · · an
such that 3x2 − 7y2 = −1.. 2. 598 Problem Find all integral solutions of the equation
x
604 Problem Determine two-parameter solutions for the “almost” Fermat Diophantine equations
xn−1 + yn−1 = zn . ps − 1 mod p
and Qr. Find integers a.
gers n which cannot be written as n = x2 + y3 + z6 for nonnegative integers x.s =
j=1
93
r
js − 1 s−1 j ps − 1 . b. .ps =
r j=1
it follows from (1 + x) jps−1 ≡ (1 + x p ) js−1 (1 + x) p−1 that j ps − 1 ≡ ps − 1 js − 1 s−1
mod p. y
601 Problem Show that the Diophantine equation
has at least one solution for every n ∈ N.
605 Problem (AIME 1984) What is the largest even integer which cannot be written as the sum of two odd composite numbers? 606 Problem Prove that are inﬁnitely many nonnegative inte-
599 Problem Find all integral solutions of the equation
x
k! = yz .
k=1
xn+1 + yn−1 = zn . Find n.
609 Problem Prove that
602 Problem (AIME 1987) Find the largest possible value of
k for which 311 is expressible as the sum of k consecutive positive integers. . k! = y2 . z.
k=1
600 Problem (USAMO 1985) Determine whether there are
any positive integral solutions to the simultaneous equations
2 2 2 x1 + x2 + · · · + x1985 = y3 . xn+1 + yn+1 = zn .
607 Problem Find the integral solutions of
with distinct integers x1 . . x1985 .
603 Problem (AIME 1987) Let M be the smallest positive
1.
608 Problem Show that there are inﬁnitely many integers x. a3 +b3 +c3 −3abc = (a+b+c)(a2 +b2 +c2 −ab−bc−ca). 0 < r < 1/1000.
integer whose cube is of the form n + r. where n ∈ N.
whence the result. ..Practice Solution: As Qr. x2 .
1 1 1 1 1 + +. y.
Practice
597 Problem Find a four-digit number which is a perfect square such that its ﬁrst two digits are equal to each other and its last two digits are equal to each other.
3 3 3 x1 + x2 + · · · + x1985 = z2
x2 + x = y4 + y3 + y2 + y. c such that 1987 = a3 +b3 +c3 −3abc.

625 Problem Demonstrate that for a prime p and k ∈ N.
bers.
616 Problem (IMO 1977) In a ﬁnite sequence of real num-
pa a ≡ pb b
mod p. Show that
such that x!y! = z!. Determine the maximum number of terms in the sequence. . y > 1.. y. Demonstrate that 618 Problem Prove that any positive rational integer can be pk − 1 expressed as a ﬁnite sum of distinct terms of the harmonic se≡ (−1)a mod p. . R in x. z > 1
fect squares. 1. ries identity (1 + x + x2 + · · · + x p−1 )/(1 − x) p−1 := 1 + c1 x + c2 x2 + · · · . a ries. each term of the series is a perfect square and the sum of the series at any point is also a perfect square. Can you ﬁnd integers a. c with 19872 = a3 + b3 + c3 − 3abc?
610 Problem Find all integers n such that n4 + n + 7 is a per-
Chapter 9
619 Problem (Wostenholme’s Theorem) Let p > 3 be a
prime. 1/3. Prove that
mod p
x4 − 2y2 = 1. Find polynomials P. 0 ≤ a ≤ pk −1. If a 1 1 1 = 1+ + +···+ . 626 Problem Let p be a prime and let k.
622 Problem Let the numbers ci be deﬁned by the power se612 Problem Find inﬁnitely many integers x > 1.
.
620 Problem Prove that the number of odd binomial coefﬁcients in any row of Pascal’s Triangle is a power of 2.
623 Problem Let p be a prime. 1/2. z such that P3 + Q3 + R3 − 3PQR = (x3 + y3 + z3 − 3xyz)2 4.
614 Problem Find all integers with
p−1 ≡ (−1)k k for all 0 ≤ k ≤ p − 1. b. Q. and the sum of any eleven successive terms is positive. sion are odd if and only if n is of the form 2k − 1.
pk a
≡0
mod p.
617 Problem Determine an inﬁnite series of terms such that for 0 < a < pk . the sum of any seven successive terms is negative. b > 0 be integers. .
615 Problem Prove that for every positive integer k there
624 Problem (Putnam 1977) Let p be a prime and let a ≥
exists a sequence of k consecutive positive integers none of which can be represented as the sum of two squares.
613 Problem Find all positive integers with
mn − nm = 1. a ∈ N. b 2 3 p−1 then p2 |a. 621 Problem Prove that the coefﬁcients of a binomial expan611 Problem Prove that 19911991 is not the sum of two per-
fect square.94 3. Show that ci ≡ 0 mod p for all i ≥ 1.