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

Similar documents
God may not play dice with the universe, but something strange is going on with the prime numbers.

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

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

Here is another characterization of prime numbers.

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?

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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

Disproof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Disproof Fall / 16

4 Number Theory and Cryptography

Prime and Perfect Numbers

CSE 20 DISCRETE MATH. Winter

4.3 - Primes and Greatest Common Divisors

Discrete Structures Lecture Primes and Greatest Common Divisor

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?

7. Prime Numbers Part VI of PJE

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

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:

A Local-Global Principle for Diophantine Equations

Divisibility. 1.1 Foundations

2 Elementary number theory

Primes and Factorization

Ma/CS 6a Class 2: Congruences

5: The Integers (An introduction to Number Theory)

Arithmetic, Algebra, Number Theory

Chapter 5: The Integers

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

PRIME NUMBERS YANKI LEKILI

Proofs of the infinitude of primes

8 Primes and Modular Arithmetic

5.1. Primes, Composites, and Tests for Divisibility

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

Discrete Math, Fourteenth Problem Set (July 18)

This is a recursive algorithm. The procedure is guaranteed to terminate, since the second argument decreases each time.

Modular Arithmetic. Examples: 17 mod 5 = 2. 5 mod 17 = 5. 8 mod 3 = 1. Some interesting properties of modular arithmetic:

Introduction to Number Theory

COMS W4995 Introduction to Cryptography September 29, Lecture 8: Number Theory

The Euclidean Algorithm and Multiplicative Inverses

32 Divisibility Theory in Integral Domains

3 The fundamentals: Algorithms, the integers, and matrices

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

Contest Number Theory

Algorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division

Cool Results on Primes

Industrial Strength Factorization. Lawren Smithline Cornell University

Sifting the Primes. Gihan Marasingha University of Oxford

The Impossibility of Certain Types of Carmichael Numbers

ECEN 5022 Cryptography

With Question/Answer Animations. Chapter 4

Beautiful Mathematics

MATH 361: NUMBER THEORY FOURTH LECTURE

Introduction Integers. Discrete Mathematics Andrei Bulatov

Elementary Number Theory

ENTRY NUMBER THEORY. [ENTRY NUMBER THEORY] Authors: Oliver Knill: 2003 Literature: Hua, introduction to number theory.

On the Cardinality of Mersenne Primes

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

1. Algebra 1.7. Prime numbers

A Few Primality Testing Algorithms

1 Overview and revision

. In particular if a b then N(

Before we talk about prime numbers, we will spend some time with divisibility because there is

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

Heuristics for Prime Statistics Brown Univ. Feb. 11, K. Conrad, UConn

CS March 17, 2009

MAT246H1S - Concepts In Abstract Mathematics. Solutions to Term Test 1 - February 1, 2018

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

Integer and Polynomial Arithmetic First Steps towards Abstract Algebra. Arjeh M. Cohen Hans Cuypers Hans Sterk

#26: Number Theory, Part I: Divisibility

Number theory (Chapter 4)

An Algorithm for Prime Factorization

Lecture 4: Number theory

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

Ch 4.2 Divisibility Properties

Probabilistic Aspects of the Integer-Polynomial Analogy

Elementary Number Theory

Summary Slides for MATH 342 June 25, 2018

History of Mathematics

MATHEMATICS 6180, SPRING 2017 SOME MOTIVATIONAL PROBLEMS IN NUMBER THEORY. p k

MATH 310 Course Objectives

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

Odd Primes. Theory W: Structure and organization of odd primes (8th problem of Hilbert) mathscience.tsoft .com

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

Riemann s Zeta Function and the Prime Number Theorem

Math 3336 Section 4.3 Primes and Greatest Common Divisors. Prime Numbers and their Properties Conjectures and Open Problems About Primes

1. multiplication is commutative and associative;

Fall 2017 Test II review problems

New theory of odd numbers 8th problem of Hilbert

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

p = This is small enough that its primality is easily verified by trial division. A candidate prime above 1000 p of the form p U + 1 is

Ma/CS 6a Class 2: Congruences

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

1. Factorization Divisibility in Z.

C.T.Chong National University of Singapore

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

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

MATH CSE20 Homework 5 Due Monday November 4

Selected Chapters from Number Theory and Algebra

Math in the News: Mersenne Primes

SUMS OF SQUARES WUSHI GOLDRING

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS

Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Transcription:

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

Primes and Theory Number Theory to Abstract Algebra History Euclid to Wiles Computation pencil to supercomputer Practical Uses Cryptography, Error Correcting Codes, etc 11/29/2010 2

Everybody Knows Everybody knows what a prime is: 2, 3, 5, 7, 9, 11, p is prime if its only positive divisors are 1 and p p is prime if, whenever p divides ab, then either p divides a and/or p divides b Any number N factors into a product of primes uniquely (up to order) 11/29/2010 3

Primal Questions Definition Counting Finding and Identifying 11/29/2010 4

Definition(s) Definition: p is prime irreducible if its only if its positive only positive divisors divisors are 1 are and 1 pand p p is prime if, whenever p divides ab, then either p divides a and/or p divides b Thm: If p is prime then p is irreducible Let a be a divisor of p, so p=ab for some b Then p divides a and/or p divides b (as p is prime) Case 1: p divides a. So a=pc, hence a=abc, so 1=bc and b=1. Thus a = p. Case 2: p divides b. Similar argument - thus b = p and a = 1 Thm: If p is irreducible then p is prime Proof requires division algorithm Euclidean Algorithm 11/29/2010 5

Division & Euclidean Algorithms Division Algorithm/Property Given positive integers a and b there are integers r and q with a = bq + r and 0 r < b Euclidean Algorithm Given a and b, compute their greatest common divisor (efficiently) 11/29/2010 6

Euclidean Algorithm (II) Example - Compute gcd of 120 and 222: 120 222 120 222-120=102 120-102=18 102 18 102-5*18=12 18-12=6 12 6 12-2*6=0 11/29/2010 7

Finding Primes Sieve of Eratosthenes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 Primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 11/29/2010 8

Counting Primes There are an infinite number of prime numbers. Proof: Assume not. So p 1,, p n is a list of all primes. Then construct N = p 1 p n +1 and note that none of the known primes divides it. Thus N is prime we have a contradiction. Thus our assumption is incorrect there are infinite primes. Can we do better? 11/29/2010 9

Counting Primes (II) π(x) := The number of primes no greater than x π(10) = #{2, 3, 5, 7} = 4 π(20) = #{2, 3, 5, 7, 11, 13, 17, 19} = 8 π(100) = 25; π(1000) = 168; π(10000) = 1229; π(100000) = 9592; Prime Number Theorem (Conjecture) The number of primes less than x is approximately x/log(x) 11/29/2010 10

Counting Primes (III) Conjectured Gauss (1791? First published 1863) Legendre (1798) Proven Hadamard (1896) de la Vallée Poussin (1896) Further work Riemann Hypothesis 11/29/2010 11

Identifying Primes Proofs Given a number prove that it is prime Tests Industrial Strength Primes 11/29/2010 12

Identifying Primes (II) [Fermat s Little Theorem] If p is prime and p does not divide a, then p divides (a p a) Proof: [Simple, but not today] 35 is not prime as: Let p = 35 and a = 2 Compute (2 35 2) = 34359738366 Note that 35 does not divide 34359738366 17 might be prime as: Let p = 17 and a = 3 Compute (3 17 3) = 129140160 Note that 17 divides 129140160 (in fact 129140160 = (17)(7596480)) 11/29/2010 13

Efficiency Questions Modular Arithmetic & Russian Peasants Even/Odd Arithmetic: + Even Odd * Even Odd Even Even Odd Even Even Even Odd Odd Even Odd Even Odd Modular (Residue) Arithmetic: [Example: Mod 5] + 0 1 2 3 4 * 0 1 2 3 4 0 0 1 2 3 4 0 0 0 0 0 0 1 1 2 3 4 0 1 0 1 2 3 4 2 2 3 4 0 1 2 0 2 4 1 3 3 3 4 0 1 2 3 0 3 1 4 2 4 4 0 1 2 3 4 0 4 3 2 1 11/29/2010 14

Identifying Primes (III) 101 might be prime as: Let p = 101 and a = 2 Compute 2 101 (mod 101) 2 1 = 2 2 2 = (2 1 ) 2 = 4 2 4 = (2 2 ) 2 = 4 2 = 16 2 8 = (2 4 ) 2 = 16 2 = 256 = 54 (mod 101) 2 16 = (2 8 ) 2 = 54 2 = 2916 = 88 (mod 101) 2 32 = (2 16 ) 2 = 88 2 = 7744 = 68 (mod 101) 2 64 = (2 32 ) 2 = 68 2 = 4624 = 79 (mod 101) 2 101 = 2 64+32+4+1 = (2 64 )(2 32 )(2 4 )(2 1 )=(79)(68)(16)(2)=171904 = 2 (mod 101) Try this for 5446367 But try this for 561 11/29/2010 15

Open Questions Find integers a, b, c and n>2 with a n + b n = c n (FLT) Any even integer greater than 2 is the sum of two primes (Goldbach) [e.g. 36 = 29 + 7] Are there an infinite number of successive odd numbers which are prime? (Twin Prime) [e.g. {3,5}, {5,7},, {281, 283}, ] Is there a prime of the form p = 2 2n + 1 for n>4? (Fermat Prime) [e.g. F3 = 2 23 + 1 = 257] 11/29/2010 16

Extension: Gaussian Integers Consider the complex numbers with integer coefficients: {n + mi} = Z[-1] All the nice properties hold: There are an infinite number of irreducibles: 3, 1 i, 7, 2 i, Unique factorization into irreducibles (up to order and multiples of i and 1) We can sieve to find primes We can test for primality 11/29/2010 17

A GI Eratosieve i -1 0 1 -i 1 i 2 I, 1 2i 3, 3i 3 2i, 2 3i, 11/29/2010 18

Identifying GI Primes Given a prime p, can we test to see if it is prime? Fermat s Little Thm (extended to Gaussian Integers) If p is a Gaussian prime, and p does not divide a, then p divides (a N(p) a), where N(p) = pp* is the norm of p. Examples: (1+i) 49 (1+i) = 0 (mod 7), so 7 is probably a Gaussian prime (2+i) 13 (2+i) = 0 (mod 2+3i), so 2+3i is probably a GI prime (2+i) 34 - (2+i) = 1 + 3i (mod 5+3i), so 5+3i is not a GI prime 11/29/2010 19

A Counterexample Consider Z[-6] = {n + m -6} Find primes by sieving But The only units are 1 2, 3, -6, 1+ -6, are irreducible 6 = (-1)(-6) 2 6 = (2)(3) Factorization is not unique -6 divides 6 and 6 = (2)(3), but -6 divides neither 2 nor 3 Z[-6] has irreducibles, but no primes 11/29/2010 20

References & Further Reading The Elements, Euclid (ca 300 BC) (trans Thomas Heath), Dover Publ http://aleph0.clarku.edu/~djoyce/java/elements/elements.html Elementary Number Theory, Jones & Jones, Springer, 1998 The Book of Numbers, Conway & Guy, Copernicus, 1996 Prime Numbers, A Computational Perspective, Crandall & Pomerance, Telos Publ, 2001 Factorization and Primality Testing, Bressoud, Springer, 1989 Algebraic Number Theory and Fermat s Last Thm, 3 rd Ed, Stewart & Tall, Peters Publ, 2002 The Primes Pages http://www.utm.edu/research/primes/ Computational Number Theory http://www.math.umbc.edu/~campbell/numbthy/class/ 11/29/2010 21