Week 1: Number Theory - Euler Phi Function, Order and Primitive Roots. 1 Greatest Common Divisor and the Euler Phi Function

Similar documents
Two formulas for the Euler ϕ-function

Chapter 5. Factorization of Integers

Zachary Scherr Math 503 HW 3 Due Friday, Feb 12

Zachary Scherr Math 503 HW 5 Due Friday, Feb 26

Winter Camp 2009 Number Theory Tips and Tricks

SOLUTIONS Math 345 Homework 6 10/11/2017. Exercise 23. (a) Solve the following congruences: (i) x (mod 12) Answer. We have

Derivatives and the Product Rule

Witt#5: Around the integrality criterion 9.93 [version 1.1 (21 April 2013), not completed, not proofread]

Q 2.0.2: If it s 5:30pm now, what time will it be in 4753 hours? Q 2.0.3: Today is Wednesday. What day of the week will it be in one year from today?

Proof by Mathematical Induction.

Number Theory. Everything else. Misha Lavrov. ARML Practice 10/06/2013

Table of Contents. 2013, Pearson Education, Inc.

Calculus in the AP Physics C Course The Derivative

Homework 5 Solutions

Integration Review. May 11, 2013

Q: How can quantum computers break ecryption?

Lecture 11: Extrema. Nathan Pflueger. 2 October 2013

1 Structure of Finite Fields

Vectors in two dimensions

Grade 11/12 Math Circles Rational Points on an Elliptic Curves Dr. Carmen Bruni November 11, Lest We Forget

Linear First-Order Equations

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

Math 324, Fall 2011 Assignment 7 Solutions. 1 (ab) γ = a γ b γ mod n.

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

6 General properties of an autonomous system of two first order ODE

Sequence convergence, the weak T-axioms, and first countability

Some Facts from Number Theory

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

NEERAJ KUMAR AND K. SENTHIL KUMAR. 1. Introduction. Theorem 1 motivate us to ask the following:

Relatively Prime Uniform Partitions

Review/Outline Review: Basic computations in finite fields Reed-Solomon codes Hamming codes Bose-Chaudhuri-Hocquengham (BCH) codes

Basic elements of number theory

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS

Basic elements of number theory

MA 2232 Lecture 08 - Review of Log and Exponential Functions and Exponential Growth

Section X.55. Cyclotomic Extensions

Number Theory in Problem Solving. Konrad Pilch

Differentiation ( , 9.5)

Solutions to Practice Problems Tuesday, October 28, 2008

Math Skills. Fractions

Diophantine Approximations: Examining the Farey Process and its Method on Producing Best Approximations

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

Math 11 Fall 2016 Section 1 Monday, September 19, Definition: A vector parametric equation for the line parallel to vector v = x v, y v, z v

The number of ways to choose r elements (without replacement) from an n-element set is. = r r!(n r)!.

Galois Theory Overview/Example Part 1: Extension Fields. Overview:

Number Theory. Zachary Friggstad. Programming Club Meeting

Exploring Graphs of Polynomial Functions

23 Implicit differentiation

Cosets and Lagrange s theorem

CHMC: Finite Fields 9/23/17

A Few Primality Testing Algorithms

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

base 2 4 The EXPONENT tells you how many times to write the base as a factor. Evaluate the following expressions in standard notation.

Contest Number Theory

MITOCW ocw f99-lec01_300k

To factor an expression means to write it as a product of factors instead of a sum of terms. The expression 3x

Beautiful Mathematics

Free rotation of a rigid body 1 D. E. Soper 2 University of Oregon Physics 611, Theoretical Mechanics 5 November 2012

II. First variation of functionals

The next sequence of lectures in on the topic of Arithmetic Algorithms. We shall build up to an understanding of the RSA public-key cryptosystem.

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

On the enumeration of partitions with summands in arithmetic progression

Notes on Primitive Roots Dan Klain

Basics of Proofs. 1 The Basics. 2 Proof Strategies. 2.1 Understand What s Going On

Multiplicative properties of sets of residues

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

1 Continued Fractions

NOTES ON FINITE FIELDS

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Exploring Combinatorics: Inclusion{exclusion

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

Cool Results on Primes

Factoring. there exists some 1 i < j l such that x i x j (mod p). (1) p gcd(x i x j, n).

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

Benford s Law: Theory and Extensions Austin Shapiro Berkeley Math Circle September 6, 2016

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Fibonacci mod k. In this section, we examine the question of which terms of the Fibonacci sequence have a given divisor k.

Multiplicative properties of sets of residues

Math 115 Section 018 Course Note

Unit #6 - Families of Functions, Taylor Polynomials, l Hopital s Rule

Theorem 5.3. Let E/F, E = F (u), be a simple field extension. Then u is algebraic if and only if E/F is finite. In this case, [E : F ] = deg f u.

Lecture 6: Finite Fields

Number Theory Math 420 Silverman Exam #1 February 27, 2018

Section 20: Arrow Diagrams on the Integers

MATH10040 Chapter 1: Integers and divisibility

Exam 2 Review Solutions

4.2 First Differentiation Rules; Leibniz Notation

SOME DIVISIBILITY PROPERTIES OF BINOMIAL AND q-binomial COEFFICIENTS

Bohr Model of the Hydrogen Atom

5.4 Continuity: Preliminary Notions

MA554 Assessment 1 Cosets and Lagrange s theorem

Math 31 Lesson Plan. Day 2: Sets; Binary Operations. Elizabeth Gillaspy. September 23, 2011

Mathematics 116 HWK 25a Solutions 8.6 p610

Year 11 Matrices Semester 2. Yuk

( )( b + c) = ab + ac, but it can also be ( )( a) = ba + ca. Let s use the distributive property on a couple of

PDE Notes, Lecture #11

Modern Algebra Prof. Manindra Agrawal Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Introduction: Pythagorean Triplets

Modular Arithmetic Instructor: Marizza Bailey Name:

Transcription:

2010 IMO Summer Training: Number Theory 1 Week 1: Number Theory - Euler Phi Function, Orer an Primitive Roots 1 Greatest Common Divisor an the Euler Phi Function Consier the following problem. Exercise 1.1 Let n be a positive integer an a positive integer such that ivies n. Amongst the fractions 1 n, 2 n,, 1 n written in lowest terms, how many of these fractions have enominator? Your first thought shoul efinitely be that this problem is relate to the notion of greatest common ivisor. A fraction a has enominator for some a {1,, n} if an only if the n numerator an enominator are ivie by n to reuce the fraction to lowest terms. Hence, gc(a/(n/), ) = 1, or equivalently, gc(a, n) = n. Therefore, the number of such fractions with enominator is equal to the number of positive integers a {1,, n} such that gc(a, n) = n, or equivalently, gc(a/(n/), ) = 1. For each positive integer n, let ϕ(n) enote the number of positive integers that is at most n an relatively prime to n. Example 1.2 ϕ(12) = 4, since {1, 5, 7, 11} are the only positive integers from 1 to 12 that are relatively prime to 12 an there are four such numbers. Let s return to Exercise??. Let S be the set of the fractions in Exercise?? with enominator. Try the following exercise. Exercise 1.3 Prove that S = ϕ ( n ). Base on this exercise, try to prove the following useful result: Theorem 1.4 For any positive integer n, prove that ϕ() = n. n 1

2010 IMO Summer Training: Number Theory 2 This is an awesome result that can come in extremely hany. It is well known enough that you can state it without proof on a competition. But just in case, o know the proof of this result. Now, try the following exercises. 1. Let n 3 be a positive integer. n lilypas are place in a circle, with one lilypa marke start. There are n frogs, labele 1,, n, such that frog k in one leap jumps k lilypas in the clockwise irection. For each k {1,, n}, if frog k is at start, how many (positive number of ) leaps oes the frog make to return to start for the first time? 2. (University of Waterloo Big E Competition 1998) Let x be a positive real number such that x < 1. Prove that a,b 0,a+b 1,gc(a,b)=1 x a+b 1 x = x a+b (1 x). 2 2 What Is Your Orer Your Majesty? We recall two important theorems in number theory. Theorem 2.1 Euler s Theorem: Let n be a positive integer an a be a positive integer such that gc(a, n) = 1. Then a ϕ(n) 1 (mo n). Of course, Euler s Theorem has a famous chil. Theorem 2.2 Fermat s Little Theorem: Let p be a prime number an a a positive integer not ivisible by p. Then a p 1 1 (mo p). Euler s theorem tells you that the sequence a 0, a, a 2, a 3, (mo n) oes eventually reach 1, is perioic, an reaches 1 at a ϕ(n). Of course, this may not be the first time that the sequence a, a 2, a 3 (mo n) reaches 1. It is possible that the sequence reaches 1 well before a ϕ(n). But when? Goo question. One thing for certain is that there is some smallest positive integer m such that a m 1 (mo n). hmmm.. Maybe we shoul give m a name. Definition 2.3 Let n, a be positive integers such that gc(a, n) = 1. The smallest positive integer m such that a m 1 (mo n) is calle the orer of a moulo n. This is enote by or n (a). 2

2010 IMO Summer Training: Number Theory 3 1 = a^0 = a^m a^{m 1} a^1 a^{m 2} a^2 Figure 1: Demonstrating Orer Example 2.4 1. or 15 (2) = 4, since 2 4 1 (mo 15) an 2, 2 2, 2 3 1 (mo 15), i.e. we nee to reach the fourth term in the sequence 2, 2 2, 2 3, before we reach one that is congruent to 1 moulo 15. 2. or 7 (3) = 6, since 3 6 1 (mo 7) an 3, 3 2, 3 3, 3 4, 3 5 1 (mo 15). Let m = or n (a). It is important to note that a 0, a 1, a 2,, a m 1 are all istinct moulo n. Suppose a i a j (mo n) for i, j {0,, m 1}. Suppose i j. Then a i j 1 (mo n). Note that the only term in a 0, a 1,, a m 1 that is congruent to 1 moulo n is 2 0. Since 0 i j m 1, i j = 0. Therefore, i = j. Therefore, a 0, a 1,, a m 1 are all istinct moulo n. Since a m 1 (mo n), the sequence a 0, a 1, (mo n) is perioic with perio m. Think of this sequence as a cycle; See Figure??. No element except for a 0 = a m is equal to 1. Therefore, no other element in the cycle is equal to 1. How oes this help us? If a k 1 (mo n) for some positive integer k, then k is ivisible by m = or n (a). Wow, this fact is awesome. Better show how awesome it is by putting it as a theorem. Theorem 2.5 Let a, n be positive integers such that gc(a, n) = 1. Suppose a k 1 (mo n) for some non-negative integer k. Then or n (a) ivies k 3

2010 IMO Summer Training: Number Theory 4 But wait, we alreay know that a ϕ(n) 1 (mo n). Nice! What oes this mean? Corollary 2.6 Using the notation of Theorem??, or n (a) ivies ϕ(n). Corollary 2.7 Let p be a prime an a a positive integer not ivisible by p. Then or p (a) ivies p 1. New to the notion of orer? Do the following exercises. Exercises 1. Let a, n, be positive integers such that gc(a, n) = 1. Let m = or n (a). Express or n (a ) in terms of m an. (Hint: Think about the frogs problem from the previous section an the cyclic nature of a 0, a 1, a 2, (mo n). 2. Let a, n be positive integers. Prove that ϕ(a n 1) is ivisible by n. (Hint: There is a short solution to this problem.) 3. Let p be a prime which is not 2 or 5 an 0 < n < p be a positive integer. Let = or n (p). Prove that the ecimal representation of n is perioic with perio. p 4. Fin all positive integers n such that n 2 n 1. (Hint: If n > 1, consier the smallest prime factor p of n.) 5. Let p be a prime number. Prove that p p 1 contains a prime factor congruent to 1 moulo q. 6. If 3 2 n+1, then (a 2n + 1 for all positive integers a. 4

2010 IMO Summer Training: Number Theory 5 3 Primitive Roots Let s look back at the beautiful figure in Figure??. Wow, what a wonerful piece of art. Well, most of the time it is. But what oes the figure look like if a = 1. Wow, what a boring figure. A single ot. Let s consier another example. Suppose a = 2 an n = 7. So we have 1, 2, 2 2, 2 3 1 (mo 7). So the cycle contains the numbers 1, 2, 4 (mo 7). The picture is kin of pretty. It contains three numbers. A cycle of three numbers is nice. But you know what woul make a super beautiful picture? If the cycle contains everything moulo 7. Well, except 0. Since gc(a, n) = 1, 0 can never appear. But what if we want {1, 2, 3, 4, 5, 6} to all appear? Can we? Pick another a. Say, a = 3. Let s calculate 1, 3, 3 2 = 2, 3 3 = 6, 3 4 = 4, 3 5 = 5. An of course 3 6 is back at the beginning of the cycle. Yes, we can make the cycle contain everything moulo 7. Sweet! So you may be thinking that seven is just a lucky number. Surely you cannot o this with all prime numbers. Well, I m telling you that you can. If you believe me, rea on. If you on t believe me, well, keep reaing on. I will prove it to you. Let s formalize what we are trying to prove. For a prime number p, we want to fin g {1,, p 1} such that Equivalently, {1, 2,, p 1} = {1, g, g 2,, g p 2 } (mo p). or p (g) = p 1. Can you see why these two properties of g are equivalent? (Think about the cycle picture again.) Such an element g is calle a primitive root moulo p. Does g always exist? The answer is yes! Theorem 3.1 Let p be a prime number. Then there exists g {1, p 1} such that g is a primitive root moulo p. Proof: Since a p 1 1 (mo p), or p (a) is a ivisor of p 1 for each a {1,, p 1}. For each p 1, let S be the subset of {1,, p 1} with orer. We claim that S ϕ(). If S = 0, then clearly our claim hols. Otherwise, let a S. Consier {1, a,, a 1 }. Every element in this set are roots of the polynomial x 1 (mo p). Such a polynomial 5

2010 IMO Summer Training: Number Theory 6 contains at most roots. Therefore, {1, a,, a 1 } is the complete set of roots of this polynomial. Furthermore, all elements of orer are in this list, namely a k, where k {1,, 1} an gc(k, ) = 1. Hence, S = ϕ(). Therefore, p 1 = ϕ() S = p 1. p 1 p 1 Hence, equality must hol throughout. Specifically, S p 1 = ϕ(p 1) > 0. Wow, this is great. Not only i we prove that primitive roots moulo p exist, but also that there are ϕ(p 1) of them. So how o we fin a primitive root moulo p? There is no clean way to o it. In practice, 2 or 3 usually is a primitive root. For now, we will just call it g. We on t know what g is. But g exists. An that s more than enough to make us happy. After all, we have ϕ(p 1) beautiful cycles. Example 3.2 Prove that 2 is a primitive root moulo 101. Solution: So we calculate 2, 2 2, 2 3,, 2 99 to see that none of them are 1 (mo 101). Or, we can be clever. It suffices to show that 2 20 an 2 50 are not 1 (mo 101). (Why? I ll let you figure this one out.) Now, you o know the trick to calculate 2 m (mo n) reasonably quickly? Just calculate 2, 2 2, 2 4, 2 8, (mo 101). (Each term is just the square of the previous term, so this isn t too cumbersome.) I will leave this as an exercise for you. Okay. Let s use primitive roots to actually solve an olympia style problem. Exercise 3.3 Let p 5 be a prime an 1 n < p 1 a positive integer. Prove that 1 n + 2 n + + (p 1) n is ivisible by p. Solution: So we take the general formula for 1 n + 2 n + + (p 1) n an... wait, what is that formula again? Oh right. It s ugly an complicate. We nee something else. We re trying to prove that 1 n + 2 n + + (p 1) n 0 (mo p). If only we have an alternate way of representing {1, 2,, p 1} (mo p). If only. 6

2010 IMO Summer Training: Number Theory 7 Oh wait we o! Let g be a primitive root moulo p. Then {1, 2,, p 1} = {1, g,, g p 2 }. Then (1 n + 2 n + + (p 1) n ) (1 + g n + g 2n + + g (p 2)n (mo p). Oh nice. A geometric sequence. We know how to sum this. Life is goo again. (1 + g n + g 2n + + g (p 2)n = 1 g(p 1)n 1 g n. By Fermat s Little Theorem, the numerator of this expression is ivisible by p. Since n < p 1 an g is a primitive root, the numerator is not ivisible by p. Hence, we are not iviing by zero. This solves the exercise. Exercises: 1. Let p be an o prime an g a primitive root moulo p. Prove that g p 1 2 1 (mo p). 2. Let p be a prime such that p 3 (mo 4). Prove that p 1 (j 2 + 1) 4 (mo p). j=1 3. (Putnam 1994) For each non-negative integer m, let n m = 101m 100 2 m. Let a, b, c, be integers such that 0 a, b, c, 99 such that n a + n b n c + n (mo 10100). Prove that {a, b} = {c, }. 4. (IMO 1984 Variant) Fin all pairs of positive integers (a, b) such that ab(a + b) is not ivisible by 7, but (a + b) 7 a 7 b 7 is ivisible by 7 7. 7