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

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

Warm-up Simple methods Linear recurrences. Solving recurrences. Misha Lavrov. ARML Practice 2/2/2014

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

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

Chuck Garner, Ph.D. May 25, 2009 / Georgia ARML Practice

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?

Contest Number Theory

MATH 361: NUMBER THEORY FOURTH LECTURE

All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points.

Homework #2 solutions Due: June 15, 2012

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.

Theory of Numbers Problems

Number Theory and Group Theoryfor Public-Key Cryptography

Olympiad Number Theory Through Challenging Problems

The Chinese Remainder Theorem

ECEN 5022 Cryptography

Simultaneous Linear, and Non-linear Congruences

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

Ch 4.2 Divisibility Properties

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 5

The security of RSA (part 1) The security of RSA (part 1)

Intermediate Math Circles February 29, 2012 Linear Diophantine Equations I

Lecture 4: Number theory

8 Primes and Modular Arithmetic

Numbers. Çetin Kaya Koç Winter / 18

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

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

Math.3336: Discrete Mathematics. Mathematical Induction


MATH 420 FINAL EXAM J. Beachy, 5/7/97

M381 Number Theory 2004 Page 1

Chapter 5. Number Theory. 5.1 Base b representations

Winter Camp 2009 Number Theory Tips and Tricks

Number Theory in Problem Solving. Konrad Pilch

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

Chapter 5.1: Induction

4 Powers of an Element; Cyclic Groups

Basic elements of number theory

Basic elements of number theory

Math 109 HW 9 Solutions

10 Problem 1. The following assertions may be true or false, depending on the choice of the integers a, b 0. a "

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

CSC 474 Information Systems Security

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Primality Proofs. Geoffrey Exoo Department of Mathematics and Computer Science Indiana State University Terre Haute, IN

PRACTICE PROBLEMS: SET 1

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

Ma/CS 6a Class 3: The RSA Algorithm

2301 Assignment 1 Due Friday 19th March, 2 pm

CPSC 467: Cryptography and Computer Security

not to be republished NCERT REAL NUMBERS CHAPTER 1 (A) Main Concepts and Results

Lecture 11: Number Theoretic Assumptions

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Number Theory A focused introduction

Objective Type Questions

Discrete Mathematics and Probability Theory Fall 2018 Alistair Sinclair and Yun Song Note 6

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

Warm-up Quantifiers and the harmonic series Sets Second warmup Induction Bijections. Writing more proofs. Misha Lavrov

Solutions to Practice Final 3

22. The Quadratic Sieve and Elliptic Curves. 22.a The Quadratic Sieve

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

Introduction to Quantum Information Processing QIC 710 / CS 768 / PH 767 / CO 681 / AM 871

Applied Cryptography and Computer Security CSE 664 Spring 2017

CPSC 467b: Cryptography and Computer Security

MATH 310: Homework 7

Intermediate Math Circles February 26, 2014 Diophantine Equations I

Solutions to Practice Final

A Few Primality Testing Algorithms

Elementary Number Theory Review. Franz Luef

A SURVEY OF PRIMALITY TESTS

Induction. Induction. Induction. Induction. Induction. Induction 2/22/2018

Equations. Rational Equations. Example. 2 x. a b c 2a. Examine each denominator to find values that would cause the denominator to equal zero

NORTHWESTERN UNIVERSITY Thrusday, Oct 6th, 2011 ANSWERS FALL 2011 NU PUTNAM SELECTION TEST

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

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 3

The Euclidean Algorithm and Multiplicative Inverses

Applied Cryptography and Computer Security CSE 664 Spring 2018

Chapter 8. Introduction to Number Theory

REVIEW Chapter 1 The Real Number System

1. (16 points) Circle T if the corresponding statement is True or F if it is False.

Ma/CS 6a Class 4: Primality Testing

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

Chapter 5: The Integers

Some Facts from Number Theory

Fall 2017 Test II review problems

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

Corollary 4.2 (Pepin s Test, 1877). Let F k = 2 2k + 1, the kth Fermat number, where k 1. Then F k is prime iff 3 F k 1

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

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

Chapter 1. Number of special form. 1.1 Introduction(Marin Mersenne) 1.2 The perfect number. See the book.

Mathematical Problem Solving TEAM A-11/12/2010

Math 3 Variable Manipulation Part 3 Polynomials A

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

Solutions to Problem Set 4 - Fall 2008 Due Tuesday, Oct. 7 at 1:00

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

Grade 7/8 Math Circles. Continued Fractions

Introduction to Quantum Information Processing CS 467 / CS 667 Phys 667 / Phys 767 C&O 481 / C&O 681

Notes on Primitive Roots Dan Klain

Transcription:

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

Solving integer equations using divisors PUMaC, 2009. How many positive integer pairs (a, b) satisfy a 2 + b 2 = ab(a + b)?

Solving integer equations using divisors PUMaC, 2009. How many positive integer pairs (a, b) satisfy a 2 + b 2 = ab(a + b)? 1 Let p be a prime. Let p x be the highest power of p dividing a, and p y be the highest power of p dividing b.

Solving integer equations using divisors PUMaC, 2009. How many positive integer pairs (a, b) satisfy a 2 + b 2 = ab(a + b)? 1 Let p be a prime. Let p x be the highest power of p dividing a, and p y be the highest power of p dividing b. 2 Suppose x < y. Then p 2x is the highest power dividing a 2 + b 2, p x+y is the highest power dividing ab, and p x is the highest power dividing a + b.

Solving integer equations using divisors PUMaC, 2009. How many positive integer pairs (a, b) satisfy a 2 + b 2 = ab(a + b)? 1 Let p be a prime. Let p x be the highest power of p dividing a, and p y be the highest power of p dividing b. 2 Suppose x < y. Then p 2x is the highest power dividing a 2 + b 2, p x+y is the highest power dividing ab, and p x is the highest power dividing a + b. 3 So p 2x = p 2x+y, which means y = 0. But x < y, so this is impossible. So we can t have x < y; we can t have x > y for the same reason, so x = y.

Solving integer equations using divisors PUMaC, 2009. How many positive integer pairs (a, b) satisfy a 2 + b 2 = ab(a + b)? 1 Let p be a prime. Let p x be the highest power of p dividing a, and p y be the highest power of p dividing b. 2 Suppose x < y. Then p 2x is the highest power dividing a 2 + b 2, p x+y is the highest power dividing ab, and p x is the highest power dividing a + b. 3 So p 2x = p 2x+y, which means y = 0. But x < y, so this is impossible. So we can t have x < y; we can t have x > y for the same reason, so x = y. 4 This is true for all p, so a = b. Then 2a 2 = a 2 (a + a) = 2a 3, so a = b = 1.

Competition-level problems AIME, 1991. How many fractions a b are there, for which ab = 20! (when written in simplest terms)? How many of these satisfy 0 < a b < 1? Ukrainian MO, 2002. Solve for integers m, n. n 2002 = m(m + n)(m + 2n) (m + 2001n) British MO, 2002. Find all solutions in positive integers a, b, c to the equation a! b! = a! + b! + c!. Putnam, 2000. Prove that the expression gcd(n,k) ( n ) n k is an integer for all pairs of integers n k 1.

Competition-level problems Solutions AIME, 1991. We can factor 20! = 2 18 3 8 5 4 7 2 11 13 17 19. (What s important here is that there are 8 primes that appear in the factorization of 20!, which are the 8 primes 20.) If ab = 20! and a b is in simplest terms (that is, gcd(a, b) = 1) then each prime number must go entirely in a or entirely in b. There are 2 possibilities for each prime, and eight primes, so that s 2 8 = 256 choices. How many are between 0 and 1?

Competition-level problems Solutions AIME, 1991. We can factor 20! = 2 18 3 8 5 4 7 2 11 13 17 19. (What s important here is that there are 8 primes that appear in the factorization of 20!, which are the 8 primes 20.) If ab = 20! and a b is in simplest terms (that is, gcd(a, b) = 1) then each prime number must go entirely in a or entirely in b. There are 2 possibilities for each prime, and eight primes, so that s 2 8 = 256 choices. How many are between 0 and 1? We always have a b > 0, and either a b < 1 or b a < 1. Therefore the answer is 128: half of the total number of fractions.

Competition-level problems Solutions Ukrainian MO, 2002. Let p be a prime. Then: If p divides m, then p divides the RHS, so p divides the LHS, which is n 2002. Therefore p divides n. If p divides n, then p divides the LHS, so p divides the RHS, which means p divides m + kn for some k. Since p also divides kn, p must divide m.

Competition-level problems Solutions Ukrainian MO, 2002. Let p be a prime. Then: If p divides m, then p divides the RHS, so p divides the LHS, which is n 2002. Therefore p divides n. If p divides n, then p divides the LHS, so p divides the RHS, which means p divides m + kn for some k. Since p also divides kn, p must divide m. Normally, we d refine this approach to show that the same power of p divides m and n. Here, there is a shortcut: If m and n are solutions, so are m p and n p. Unless m = n = 0, we can keep dividing by p until one is no longer divisible by p; but then the other can t be divisible by p either. In any case, we prove m = n; but the only solution of this kind is m = n = 0.

Competition-level problems Solutions British MO, 2002. Ruling out 0 a 2 and 0 b 2, a! b! is much larger than a! or b!, so c is the largest of the three integers. Next, we show that a! = b!. Suppose a! < b!: then b! is divisible by (a + 1)!, and if we write a! b! b! c! = a! then everything on the left is divisible by (a + 1)!, while a! is not. This is impossible. Now we have a! 2 = a! + a! + c!, or a!(a! 2) = c!. Since a! 2 is not divisible by 3, a! and c! must have the same number of factors of 3, so c = a + 1 or c = a + 2. Checking both, we get a single solution: 3! 3! = 3! + 3! + 4!

Competition-level problems Solutions Putnam, 2000. Our goal is to show that gcd(n, k) ( n k) is divisible by n. For all primes p, suppose p x divides n and p y divides k. If x y then all is good, because at gcd(n, k) ( n k) is divisible by p x. If x > y, we can use the following trick: ( ) ( n = n n 1 k k 1), and so we can rewrite gcd(n, k) n ( ) n = k gcd(n, k) k k ( ) n 1. k 1 Now we have only a power p y in the denominator, and at least p y in the numerator, so no power of p is left in the denominator, and we are done.

The totient function The totient, or Euler s φ, is defined to be: φ(n) = The number of k, 1 k n, so that gcd(n, k) = 1. Exercise. Find φ(10000). PUMaC, 2010. Find the largest positive integer n such that nφ(n) is a perfect square.

The totient function The totient, or Euler s φ, is defined to be: φ(n) = The number of k, 1 k n, so that gcd(n, k) = 1. Exercise. Find φ(10000). Easy answer: gcd(10000, k) = 1 if k ends in 1, 3, 7, or 9. There are 4000 such numbers between 1 and 10000. General answer: Out of 10000 integers, 1 2 are divisible by 2, and 1 5 are divisible by 5, so there are 10000 ( 1 1 ( ) 2) 1 1 5 = 4000 left. PUMaC, 2010. Find the largest positive integer n such that nφ(n) is a perfect square. Using the general answer above, it s easy to see nφ(n) can t be a perfect square for n > 1.

Rule for raising something to a power mod m Theorem (Euler s theorem) For all positive integers a, n with gcd(a, n) = 1, a φ(n) 1 (mod n) and therefore a m m mod φ(n) a (mod n). Intuition: If gcd(a, 10) = 1, then there are φ(10) = 4 digits a can end in: 1, 3, 7, and 9. The powers of a will cycle through these digits: for example, when a = 3, we have 3 0 = 1, 3 1 = 3, 3 2 = 9, 3 3 = 27 7, 3 4 = 81 1,...

Rule for raising something to a power mod m Theorem (Euler s theorem) For all positive integers a, n with gcd(a, n) = 1, a φ(n) 1 (mod n) and therefore a m m mod φ(n) a (mod n). Intuition: If gcd(a, 10) = 1, then there are φ(10) = 4 digits a can end in: 1, 3, 7, and 9. The powers of a will cycle through these digits: for example, when a = 3, we have 3 0 = 1, 3 1 = 3, 3 2 = 9, 3 3 = 27 7, 3 4 = 81 1,... If gcd(a, n) 1, then powers of a eventually repeat every φ(n) steps, but this is trickier to use.

Competition problems (Note: this theorem is also useful for small things, like knowing that 1 4 2 4 3 4 4 4 1 (mod 5) last week. These are problems where Euler s theorem is the main focus.) Exercise. Compute 100 100 mod 13. Texas A&M, 2008. Find the last three digits of 2007 2008. VTRMC, 2012. Find the last two digits of 3 3... 3 }{{}. 2012 HMMT, 2011. Determine the remainder when is divided by 7. 2 1 2 2 + 2 2 3 2 + + 2 2011 2012 2

Competition problems Solutions Exercise. 100 100 ( 4) 100 ( 4) 4 9 (mod 13). Texas A&M, 2008. 2007 2008 7 2008 7 8 (mod 1000). A shortcut for this: 7 2 = 49 = 50 1, so 7 8 = (50 1) 4 = 50 4 4 50 3 + 6 50 2 4 50 + 1. But here, the first three terms are all divisible by 1000, so all we need to worry about is 4 50 + 1 801 (mod 1000).

Competition problems Solutions VTRMC, 2012. Write 3 n for 3 3... 3 with n 3 s. We use Euler s theorem recursively: for 100 we need φ(100) = 40, for which we need φ(40) = 16, for which we need φ(16) = 8, for which we need φ(8) = 4, for which we need φ(4) = 2. Since 3 is odd, 3 2007 1 (mod 2). So 3 2008 3 1 3 (mod 4). So 3 2009 3 3 27 3 (mod 8). So 3 2010 3 3 27 11 (mod 16). So 3 2011 3 11 27 (mod 40). So 3 2012 3 27 87 (mod 100).

Competition problems Solutions HMMT, 2011. We know 2 n mod 7 is determined by n mod 6. But actually, more is true: 2 3 1 (mod 7), so n mod 3 is enough. When looking at n(n+1) 2 mod 3, we know either n 1, n, or n + 1 is divisible by 3. Unless it s the first, n(n+1) 2 is also divisible by 3, in which case 2 n(n+1) 2 1 (mod 7). However, when n 1 is divisible by 3, n(n+1) 2 1 (mod 3), and 2 n(n+1) 2 2 (mod 7). Therefore 2 1 2 2 + 2 2 3 2 + + 2 2011 2012 2 mod 7 simplifies to 2 } + 1 + 1 + 2 + {{ 1 + 1 + + 2 } mod7 2011 which is 2010 3 (2 + 1 + 1) + 2 1 (mod 7).