Contents 1 Recurrent Problems 1 1.1 The Tower of Hanoi I 1.2 Lines in the Plane 4 1.3 The Josephus Problem 8 Exercises 17 2 Sums 21 2.1 Notation 21 2.2 Sums and Recurrences 25 2.3 Manipulation of Sums 30 2.4 Multiple Sums 34 2.5 General Methods 41 2.6 Finite and Infinite Calculus 47 2.7 Infinite Sums 56 Exercises 62 3 Integer Functions 67 3.1 Floors and Ceilings 67 3.2 Floor/Ceiling Applications 70 3.3 Floor/Ceiling Recurrences 78 3.4 'mod':The Binary Operation 81 3.5 Floor/Ceiling Sums 86 Exercises 95 4 Number Theory 102 4.1 Divisibility 102 4.2 Primes 105 4.3 Prime Examples 107 4.4 Factorial Factors 111 4.5 Relative Primality 115 4.6‘mod':The Congruence Relation 123 4.7 Independent Residues 126 4.8 Additional Applications 129 4.9 Phi and Mu 133 Exercises 144 5 Binomial Coefficients 153 5.1 Basic Identities 153 5.2 Basic Practice 172 xiiContents 1 Recurrent Problems 1 1.1 The Tower of Hanoi 1 1.2 Lines in the Plane 4 1.3 The Josephus Problem 8 Exercises 17 2 Sums 2.1 Notation 21 2.2 Sums and Recurrences 25 2.3 Manipulation of Sums 30 2.4 Multiple Sums 34 2.5 General Methods 41 2.6 Finite and Infinite Calculus 47 2.7 Infinite Sums 56 Exercises 62 21 3 Integer Functions 67 3.1 Floors and Ceilings 67 3.2 Floor/Ceiling Applications 70 3.3 Floor/Ceiling Recurrences 78 3.4 ‘mod’: The Binary Operation 81 3.5 Floor/Ceiling Sums 86 Exercises 95 4 Number Theory 102 4.1 Divisibility 102 4.2 Primes 105 4.3 Prime Examples 107 4.4 Factorial Factors 111 4.5 Relative Primality 115 4.6 ‘mod’: The Congruence Relation 123 4.7 Independent Residues 126 4.8 Additional Applications 129 4.9 Phi and Mu 133 Exercises 144 5 Binomial Coefficients 153 5.1 Basic Identities 153 5.2 Basic Practice 172 xii