Contest Number Theory

Similar documents
Winter Camp 2009 Number Theory Tips and Tricks

Summary Slides for MATH 342 June 25, 2018

Table of Contents. 2013, Pearson Education, Inc.

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

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

Number Theory in Problem Solving. Konrad Pilch

Theory of Numbers Problems

1. multiplication is commutative and associative;

8 Primes and Modular Arithmetic

Basic elements of number theory

Basic elements of number theory

I Foundations Of Divisibility And Congruence 1

PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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?

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

Euler s, Fermat s and Wilson s Theorems

f(n) = f(p e 1 1 )...f(p e k k ).

Chapter 7. Number Theory. 7.1 Prime Numbers

Lecture 4: Number theory

M381 Number Theory 2004 Page 1

SOLUTIONS TO PROBLEM SET 1. Section = 2 3, 1. n n + 1. k(k + 1) k=1 k(k + 1) + 1 (n + 1)(n + 2) n + 2,

CPSC 467b: Cryptography and Computer Security

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

Number Theory Marathon. Mario Ynocente Castro, National University of Engineering, Peru

ASSIGNMENT Use mathematical induction to show that the sum of the cubes of three consecutive non-negative integers is divisible by 9.

7. Prime Numbers Part VI of PJE

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

Section 0.6: Factoring from Precalculus Prerequisites a.k.a. Chapter 0 by Carl Stitz, PhD, and Jeff Zeager, PhD, is available under a Creative

ECEN 5022 Cryptography

1 Basic Combinatorics

PRIME NUMBERS YANKI LEKILI

MATH 361: NUMBER THEORY FOURTH LECTURE

Part II. Number Theory. Year

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

2.3 In modular arithmetic, all arithmetic operations are performed modulo some integer.

Fermat s Last Theorem for Regular Primes

Cool Results on Primes

that if a b (mod m) and c d (mod m), then ac bd (mod m) soyou aren't allowed to use this fact!) A5. (a) Show that a perfect square must leave a remain

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

1 Overview and revision

EULER S THEOREM KEITH CONRAD

CPSC 467: Cryptography and Computer Security

2. Two binary operations (addition, denoted + and multiplication, denoted

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

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

A SURVEY OF PRIMALITY TESTS

Math 314 Course Notes: Brief description

Some multiplicative arithmetical functions

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Number Theory. Modular Arithmetic

A Few Primality Testing Algorithms

Introduction to Number Theory

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

OEIS A I. SCOPE

MATH Fundamental Concepts of Algebra

A Generalization of Wilson s Theorem

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Primes. Rational, Gaussian, Industrial Strength, etc. Robert Campbell 11/29/2010 1

Zsigmondy s Theorem. Lola Thompson. August 11, Dartmouth College. Lola Thompson (Dartmouth College) Zsigmondy s Theorem August 11, / 1

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

NUMBER THEORY. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

#26: Number Theory, Part I: Divisibility

, p 1 < p 2 < < p l primes.

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

a the relation arb is defined if and only if = 2 k, k

MAS114: Exercises. October 26, 2018

Elementary Number Theory MARUCO. Summer, 2018

Chapter 5. Number Theory. 5.1 Base b representations

2 Elementary number theory

4 Number Theory and Cryptography

Commutative Rings and Fields

Beautiful Mathematics

D-MATH Algebra II FS18 Prof. Marc Burger. Solution 26. Cyclotomic extensions.

Math 319 Problem Set #2 Solution 14 February 2002

MATH 4400 SOLUTIONS TO SOME EXERCISES. 1. Chapter 1

MAT115A-21 COMPLETE LECTURE NOTES

LECTURE NOTES IN CRYPTOGRAPHY

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

Solutions to Assignment 1

Introduction to Information Security

CPSC 467b: Cryptography and Computer Security

Smol Results on the Möbius Function

Elementary Number Theory Review. Franz Luef

Notes: Pythagorean Triples

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

Basic Algorithms in Number Theory

Section X.55. Cyclotomic Extensions

In Exercises 1 12, list the all of the elements of the given set. 2. The set of all positive integers whose square roots are less than or equal to 3

Number Theory. Jason Filippou UMCP. ason Filippou UMCP)Number Theory History & Definitions / 1

Grade 11/12 Math Circles Congruent Number Problem Dr. Carmen Bruni October 28, 2015

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

Proof: Let the check matrix be

7.2 Applications of Euler s and Fermat s Theorem.

Cryptography. Number Theory with AN INTRODUCTION TO. James S. Kraft. Lawrence C. Washington. CRC Press

Mathematics for Cryptography

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

Algebraic number theory Revision exercises

Transcription:

Contest Number Theory Andre Kessler December 7, 2008 Introduction Number theory is one of the core subject areas of mathematics. It can be somewhat loosely defined as the study of the integers. Unfortunately, most grade school mathematics curricula don t cover number theory at all, leaving students clueless about a highly fascinating subject. Because of this, most contest problems involving number theory are relatively easy to people that have a decent grasp of the theory. Basic number theory itself is actually very simple, and number theoretic problems are often very easy to understand. Advanced number theory can get tricier, and the best way to get a good intuition about such problems is to practice a lot. And then, of course, you have the insane unsolved problems. Have you ever heard of Fermat s Last Theorem? It states that there are no positive integer solutions to x n + y n = z n for n > 2. This problem remained open for 357 years. 2 Notation If there s something in this section you don t understand, don t worry, it will be explained in its respective section. This is mainly intended as a reference. When we write a b, we mean that a divides b, as in there exists an integer c such that a = bc. For example, 3 2. If a does not divide b, then we write a b. An example would be 3. gcd (a, b) denotes the greatest common denominator of a and b, which is the largest integer that divides both numbers. This is usually abbreviated to (a, b). Example: (2, 20) = 4. The least common multiple of two numbers is the smallest number that they both divide. This is written [a, b], and an example would be [2, 20] = 60. N means the natural numbers, Z the integers, Z + the positive integers, Z/nZ the integers (mod n), Q the rational numbers, Q the irrational numbers, R the real numbers, and C the complex numbers. n, m, and are commonly used as integers. p and q are usually primes. If we want a variable, we usually use x, y, and z, with w and z often used for complex numbers. Constants are often a, b, and c. i, j, and are often indices or dummy variables. f and g are quite often functions. Roots of unity are usually something lie ω or ξ. φ : F F means that φ is a mapping from F to F. means iff means if and only if. A B means if A, then B. s.t is such that. d n means a sum over all the divisors d of n.

3 The Theorems 3. Modular Arithmetic Consider a number system in which we replace each number with its remainder on division by some fixed integer n. Well, this is a perfectly valid sysem to do arithmetic in! We call this arithmetic modulo n, or (mod n). As you may have seen above, we denote the integers (mod n) as Z/nZ. Let s consider some examples of arithmetic in Z/5Z: 24 4 (mod 5) 3 + 4 2 (mod 5) 2 232327893237892285 2 0 0 (mod 5) As you can see, we have a nice system. But watch out! You can t cancel multiplication all of the time. Why? Because x 0 (mod n) does not mean x = 0, and we can have xy 0 (mod n) even if neither x nor y is zero. An example of this is 20 2 (mod 6), but 0 (mod 6). What happened? Consider a number a that divides the product of two others: a bc. Clearly a can be split into parts and a such that a = a, b, and a c. Importantly, if p is a prime, the only way to split it into two parts is p. Thus if p bc, then p b or p c. By the definition of a bc, we have that a = bc for some integer, so = bc a = b that divide b and c. This means that both b both a and b, it divides (a, b). Thus and c a are integers, and thus b b (a,b) b, leading us to the conclusion that c a for and a bc a. But since divides b (a, b) bc a () Let s now loo at the general case. We have ac bc (mod n) (2) This means that ac and bc differ by some number n for some. This means that a and b differ by n c, n which must be an integer, and so c n. By (), we have that (n,c) n n c. Thus a b = c which means a b 0 (mod n/(n, c)), and (2) becomes Going bac to our previous example, we have a b (mod n/(n, c)) (3) 20 2 (mod 6) 2 0 2 (mod 6) 0 (mod 6/(6, 2)) 0 (mod 3) (4) Note that from this we have ac bc (mod n) implies a b (mod n) iff (n, c) =. 3.. Exercises. Evaluate (44098323234) 2332 (mod 5). 2. Prove that if ab is a perfect square and (a, b) =, then both a and b must be perfect squares. 3. Solve the congruence 232x 9045 (mod 24) 2

3.2 Prime Mods Prime mods are nice because we can cancel multiplication in them. This is clear because if we use our canceling equation (3), we note that (p, c) will be since p is prime, so we have ac bc (mod p) a b (mod p), as long as c is not a multiple of p. This is because if p c, then c 0 (mod p) and our equation before would be meaningless. We can do more. Since ac bc unless a b, we now that the sequence consists of all residues {0, a, 2a, 3a,..., (p )a} (5) (mod p). Thus it is a permutation of the set {0,, 2, 3,..., p } Mae sure you understand this. This idea comes up everywhere in number theory. Now we get to an interesting idea. Notice that the set (5) will always contain one element that is (mod p). Thus for every non-zero a, we can find some number b such that ab. What other number system is this lie? More on this later. 3.3 Fermat s Little Theorem If we tae the powers of some number a 0 (mod p), the numbers a 2, a 3, etc. cannot all be different, since they are all between 0 and p. Thus two must be the same, so let s say a j = a. Then if we let j >, we have a j (mod p). Thus the powers of a with be at some point, and we call the least number ord(a) (mod p) (the order of a (mod p)), or ord p (a) for short. Now consider what we said above when we taled about {0, a, 2a, 3a,..., (p )a} being a permutation of {0,, 2, 3,..., p }. This means that we can say canceling 2 3 (p ) from both sides leaves a 2a 3a (p )a 2 3 (p ) (mod p) a p (mod p) This very important theorem is nown as Fermat s Little Theorem. Fermat s Little Theorem 3.3.. For any integer a and any prime p, 3.4 Euler s Totient and Generalization a p a (mod p) (6) Let s try to find an analog of Fermat s Little Theorem for (mod n), where we let n be any integer instead of only primes. Notice we will only be able to cancel numbers from both sides the way we did when n was prime if the number being canceled is relatively prime to n. In addition, a will have to be relatively prime to n (do you see why?). Let S = {, 0, 2,..., n } be the set of all integers less than and relatively prime to n. We can do something similar to what we did before, namely a 0 a a (m )a 0 (n ) (mod n) We need a way to count the numbers less than and relatively prime to n. Therefore, we define a function ϕ(n) that returns the desired number. This is nown as Euler s totient function. Now we can do what we did before and cancel 0 (n ) from both sides, yielding a ϕ(n) (mod n) This is nown as Euler s generalization of Fermat s Little Theorem. 3

Euler s Generalization 3.4.. For any relatively prime integers a and n, 3.4. Exercises a ϕ(n) (mod n) (7). Explain why (7) is considered a generalization of Fermat s Little Theorem. 2. Calculate ϕ(2). 4 3. Find the units digit of 4 444. 4. Find ϕ(p ) for p prime and any positive integer. 5. Prove that ϕ is multiplicative, that is, ϕ(mn) = ϕ(m)ϕ(n) if m and n are relatively prime. 6. From the result of the two earlier problems, find an explicit formula for ϕ(n), n being any positive integer. 3.5 Wilson s Theorem Wilson s Theorem 3.5.. For any odd prime p, (p )! (mod p) (8) Remember that in any prime mod, a number a has a unique inverse that we ll call a such that aa =. We use this fact in the proof of Wilson s Theorem. Proof. Consider (p )! = 2 3 (p 2) (p ). Let s write the final element as, since obviously p (mod p). Notice that is its own inverse. In this it is unique: every other element a (except, of course) will have a distinct inverse such that aa =, so we can replace all of these element-inverse pairs with ones. We now have, and thus we have proven Wilson s Theorem. 3.5. Exercises. Prove that the function F (j) = 3.6 Divisor Sums (j )! + cos π returns when j is prime and 0 when j is composite. j There is a useful formula for the number of the divisors of a number. If the prime factorization is then the number of the divisors of n, τ(n), is n = p e pe2 2 pe τ(n) = (e + )(e 2 + ) (e + ) (9) Since the proof of (9) is pretty easy and rather well nown, let s turn it into an exercise in summation notation. Proof. We are seeing the number of divisors of p e pe2 2 pe. Note that our desired result is equivalent to d n 4

Now, loo at the following nested sum. Can you see how this is equivalent to the previous sum? e e 2 e i =0 i 2=0 i =0 Now, the solution is simple. We brea apart the nested sum, and obtain the formula. τ(n) = = e e 2 i =0 i 2=0 e i =0 ( e ) ( e2 ) ( e ) i =0 i 2=0 i =0 (0) () = (e + )(e 2 + ) (e + ) (2) Once we ve derived the formula for the number of divisors, it is very easy to obtain a formula for the sum of the divisors, σ(n). All it taes is to realize that σ(n) = d n d (3) = = e e 2 i =0 i 2=0 ( e i =0 p i e i =0 ) ( e2 i 2=0 p i pi2 2 pi (4) p i2 2 ) ( e i =0 p i ) = ( + p + p 2 + p e )( + p 2 + p 2 2 + p e2 2 ) ( + p + p 2 + p e ) (6) It is clear that we can extend this to the sum of the th powers of the divisors, σ (n). This result is left as an exercise to the reader. It s best to use these formulas to appreciate them. So, let s find the number and then the sum of the divisors of 666. We now that 666 = 2 3 2 37. Thus τ(666) = ( + )(2 + )( + ) = 2. Now we plug the numbers into the divisor sum formula. 3.6. Exercises σ(666) = ( + 2)( + 3 + 9)( + 37) = 3 2 38 = 368. Find the sum of the divisors of the sum of the divisors of 000. 2. Mae the formula for σ(n) simpler using the formula for the sum of a geometric sequence. 3. A number is perfect if the sum of its divisors (excluding itself) is equal to itself. The first three are 6, 28, and 496. Prove that any number of the form 2 (2 + ) is perfect if 2 + is prime. 4. Extend the above proof to show that all even perfect numbers are of the form 2 (2 + ). 3.7 Prime Number Facts There are an infinite number of primes. Why? Well, if there were a finite number of them, they would mae a finite set {2, 3, 5,..., p n } (5) 5

But if that was so, 2 3 5 p n + would have no prime factors at all, which is a contradiction. Thus there are an infinite number of primes. Dirichlet s Theorem 3.7.. If there is more than one prime in an infinte arithmetic progression, then the arithmetic progression contains an infinite number of primes. Proving Dirichlet s theorem in the general case is very difficult, however, so there isn t a proof here. Green-Tao Theorem 3.7.. There are arbitrarily long arithmetic progressions of primes. This is also very difficult and was only recently proven. Bertrand s Postulate 3.7.. There is always a prime p such that for any n >, n < p < 2n. Bertrand s postulate is more accurately called Chebyshev s Theorem, because it was only postulated by Bertrand, whereas Chebyshev proved it. This is also taes too long to prove, even though the proof is relatively elementary. If you ever are trying to solve a problem, and your solution hinges on the truth of one of the following conjectures, it s best to try something else. These have remained unsolved for decades or centuries. Goldbach Conjecture 3.7.. Every even integer greater than 2 can be written as the sum of two primes. Twin Prime Conjecture 3.7.. There are infinitely many primes p such that p + 2 is also prime. Mersenne Prime Conjecture 3.7.. There are infinitely many primes of the form M n = 2 n. Palindromic Prime Conjecture 3.7.. There are infinitely many primes that are palindromic; that is, they are the same if their digits are reversed. Conjecture 3.7.. an 2 + bn + c is prime for infinitely many values of n, as long as a, b, and c are pairwise relatively prime. 3.8 Diophantine Equations A diophantine equation is an equation in which we are interested in only integer solutions. Bézout s Identity is the solution to a relatively easy Diophantine equation. When solving diophantine equations, you have to eep one thing in mind: you cannot just give a bunch of answers. You have to show they wor, and that no other answers exist. Steps to Solve a Diophantine Equation. Write out the answers to the problem. In the case of, say, x+y = 0, you would write (n, n) for n Z. 2. Show that your answers wor. 3. Prove that you have given all the answers. Usually, this requires a bit of number theory. Methods for Solving Diophantine Equations Tae the equations in certain mods. For example, if you see squares, mod4 is good, since all squares are 0 or. If you see cubes, try mod9, since cubes are -, 0, and. Mod 8 is good for squares a well. Factor everything possible! Substitution Add conditions. If the equation is symmetrical, lie a 2 + b 2 + c 2 = (a + b + c)!, state that without a loss of generality, a b c. Infinite descent. This is where you assume an equation has solutions, and you consider the solution whose value is the smallest. Then, show there is another solution whose value is smaller-which is a contradiction, and thus there can be no solutions. Random important thing to now: the general primitive Pythagorean triple is given by (2rs, r 2 s 2, r 2 +s 2 ). 6

4 Problems The only way you will get better is by doing problems, especially hard problems. SO DO THEM. Harder problems are mared with a. If you would lie to now if your solution is correct, you can email me at apessler (at) gmail (dot) com.. (AHSME 973 ) Show that for all prime numbers p greater than 3, 24 divides p 2 evenly. 2. (Mandelbrot #2 ) Find the last three digits of 9 05. 3. (st IMO Problem, 959 ) Prove that the fraction 2n + 4 is irreducible for every positive integer n. 4n + 3 4. (AHSME 969 ) For any integer greater than, how many prime numbers are there greater than n! + and less than n! + n? 5. Determine, in terms of a and n, how many distinct values the sequence {a, 2a, 3a,... } taes on mod n. 6. (Leningrad 984 ) Find all prime unordered pairs such that a b + b a is prime. 7. (AIME 2006 ) Find the least positive integer such that when the first digit is removed, the resultant integer is 29th as large. 8. (MAΘ) What is the units digit of 7 77? 9. Find the last three digits of 7 9999. 0. (AOPS vol. 2 ) Find all integer solutions to the equation x 3 + 7y 3 = 5. (USAMTS ) Let x and y be integers such that 2x + 3y is a multiple of 7. Show that 9x + 5y must also be a multiple of 7. 2. (M&IQ, 99 ) Prove that for all positive integers, 5 is a multiple of 0. 3. (Traditional) Let p = 4 + be a prime. Prove that p 4. (AoPS vol. 2 ) Prove that the diophantine equation x 3 + y 3 + z 3 + x 2 y + y 2 z + z 2 x + xyz = 0 has no solutions in nonzero integers. 5. (Canada 976 ) Prove that a positive integer is the sum of at least two consecutive positive integers if and only if it is not a power of two. 6. (Traditional) Prove that there are infinitely many composite numbers in the sequence, 3, 33, 333,... 7. Prove that for all odd integers, + 2 + 3 + + n + 2 + 3 + + n 8. (Engel) Prove that there are infinitely many powers of 2 in the sequence a n = n 2 9. The n th cyclotomic polynomial is denoted Φ n (x), and is defined to be Π(x ζ) (ζ ranges over all the primitive n th roots of unity). Prove that all cyclotomic polynomials are irreducible and that all of their coefficients are integers. 20. (995 SL/N ) Let be a positive integer. Prove there are infinitely many perfect squares of the form n2 7 where n is a positive integer. 2. (Andre Kessler) Let a = } a a...a {{}. Prove that the last n digits of a will become constant for sufficiently times large. Find the exact integer in terms of n after which the last n digits become constant. This lecture is a wor in progress; many more problems will be added eventually. 7