# Lecture 1: Elementary Number Theory

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Lecture 1: Elementary Number Theory The integers are the simplest and most fundamental objects in discrete mathematics. All calculations by computers are based on the arithmetical operations with integers (or more precisely, with finite decimals). The central ideas of the mathematical logic, theory of algorithms, and set theory also originate in elementary number theory. The set of integers is denoted by Z. That is Z = {0, ±1, ±2,...}. The nonnegative integers (natural numbers) are denoted by N N = {0, 1, 2,...}. The positive integers are denoted by Z +. To represent integers, we use a position-value system with the base 10. For example, 573 = , i.e., it is a sum of digital multiples of powers of 10. Another way to say this is that each integer is represented as a linear combination of powers of ten: 1 = 10 0, 10 = 10 1, 100 = 10 2, 1000 = 10 3,... with coefficients from the set {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. The fact that we are using the base 10 is only an anatomical accident. In computer science, the systems with bases: b = 2, 4, or 16 are more popular. The following example in binary notation will further illustrate the idea of positional notation: (1011) 2 = = = (11) 10 For the binary system (base 2), the digits are only 0 and 1, while in decimal notation: (a k a k 1... a 0 ) 10 = a k 10 k + a k 1 10 k a a 0, where each of the digits a i is one of the decimal digits 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9 anda k 0. The overbar notation is used to emphasize the fact that we are using position notation. We use the overbar notation when the expression would otherwise be ambiguous. For example xyz might be misunderstood. Thus xyz means the product x y z whereas xyz means 100x + 10y + z. For arbitrary base b, (a k a 1 a 0 ) b = a k b k + + a 1 b + a 0, where 0 < a k < b and all the other a j s satisfy 0 a j < b. The invention of position-value system is due to several cultures, Babylonian, Hindu, and Arab. It represents one of the greatest inventions of the human mind. Ancient European systems, for example the Roman system, where 7 = V II, 13 = XIII, 24 = XXIV etc. were inappropriate for most calculations. 1

2 Let s discuss arithmetic operations for the classical system. These operations have an algorithmic nature, that is, they can be represented as a sequence of elementary steps (commands). We must not use our intuition. Arithmetic operations can be simply realized on the computer, especially for the binary system (base b = 2). It will be the subject of Lecture 2. In the next few examples, we illustrate the algorithmic nature of arithmetic operations. Examples of operations 1. Addition. The addition problem is written in vertical format with a 023 zero inserted before the 2 of 23 to produce two three digit numbers Each of the two digit sums 3+9, 2+7, and 0+3 can be read from the table of digit sums All that is needed besides the table is the idea of carry. 2. Multiplication. Multiplication is based on the table of multiplication for digits With this table, multiplication can be reduced to a series of additions. The only problem is to carry over suitable numbers to the higher digits (if necessary) Division. Division is not always possible in the set of integers. The ratio m n is usually not an integer. The collection of fractions obtainable in this way is 2

3 called the rational numbers. A calculator gives in these cases a finite number of digits after the point, i.e., only an approximation. Say, 1 3 = = Both these calculator representations are approximations. When an exact representation is required, we use the overbar notation. Every rational number either terminates with a string of 0 s, like 5/2 = or, as in the two examples above, begin at some position to repeat in blocks of digits. The overbar notation 0. 3 is used to indicate that the single digit block 3 repeats forever. Thus ab.cdefg is interpreted to mean ab.cdefgefgefg..., where the block efg repeats forever. The exact representation of 2/7 using this notation is Next we develop the concept and the notation related to divisibility.if d and n are integers, the notation d n means that the ratio n/d is an integer. When this is the case, we say d divides n and n is a multiple of d. Notice that d n is not a number, but a statement that is either true or false. We also say that d is a divisor of n and that n is divisible by d. More formally, d n if there is an integer q such that n = d q. The number q is called the quotient of n and d. The notation d \ n means that d does not divide n. In this case we can use the division algorithm. The division algorithm states that given any pair of integers n and d with d 0, there exists a unique pair of integers q and r, called the quotient and remainder respectively, such that n = dq + r and 0 r < d. To carry out this algorithm means to find q and r, which we can do by long division q = r = = 37q + r = Thus when n = 1045 and d = 37, it follows that q = 28 and r = 9. Can we use the calculator to find q and r? The answer is yes, but we must first discuss another pair of ideas, the fractional part and the integer part of a number. The integer part of a number x, denoted x, is called the floor of x, and is defined to be the largest integer that is less than or equal to x. The fractional part, denoted {x}, is defined by {x} = x x. Thus, each real number x can be represented in the form x = x + {x}. For example 4.5 = {4.5} =

4 and 2.5 = { 2.5} = If the fraction x = n is not an integer, the d calculator may give x = ab.feg... where x = ab and {x} = 0.fegfeg.... The function is called the floor function. Let us continue solving the problem with a calculator. Note that if n and d are given then n/d can be written in the form above; that is, as the sum of its integer part and its fractional part. n n d = + { n d d }. Multiply through by d to get n = n n d d = d + { n d d } d. Now { n} d = d n n d, d so { n } d is a nonnegative integer. Also, { n } d < d because d d { n} < 1. Therefore, q = n and r = { n } d are the unique integers guaranteed by d d d the division algorithm. For instance, if n = 2173 and d = 43, then 2173 = Hence q = n 43 d = 50 and r = 2173 q d = = 23 or r = 43 { 2173 } = 43 ( ) = Thus 2173 = In this section, we explore divisibility of n by each of the numbers 2, 3, 4, 5, 6, 8, 9, and 11. The goal is to find a test for divisibility that can be carried out using the digits of n but without long division. Throughout the discussion, n = (a k a k 1... a 0 ) 10. a. The number n = (a k a k 1... a 0 ) 10 is divisible by 2 if and only if the last digit a 0 is divisible by 2. The proof is simple. Recall that if d n and d m, then d n ± m because the sum and the difference of two integers is an integer. Because all the positive integer powers of 10 are divisible by 2, it follows that for suitable m, n = 2m + a 0. Thus the divisibility of n by 2 depends simply on a 0 being divisible by 2. b. The same analysis, this time with the two rightmost digits gives divisibility by 4. Thus 4 n if and only if 4 10a 1 + a 0 ; that is, 4 (a 1 a 0 ) 10, again because 10 2, 10 3,..., are divisible by 4. c. The divisibility of n by d = 3. Let s remark that each power of 10 is one larger than a multiple of 3. For example, 10 = 9+1, 100 = 99+1, and 1000 =

5 More generally, n = (a.. a 0 ) 10 = a k 99 }{{... 9} a k 1 k 9 s 9 }. {{.. 9 } a 1 (9 + 1) + a 0 (k-1) 9 s = a k 99 }{{... 9} + a k }{{} a 1 (9) + (a k + a k 1 + a 0 ) k 9 s (k-1) 9 s = 9M + a k + a k a 0 }{{}. sum of digits For example 437 = 4(99 + 1) + 3(9 + 1) + 7(1) = , so 437 is a multiple of 3 if and only if is a multiple of 3. This means that a number n is divisible by 3 if and only if the sum of the digits of n is divisible by 3. Divisibility tests for 6, 8, and 11 are left as exercises. d. A divisibility test for 9. This works similarly to 3. Note that all the positive integer powers of 10 are one bigger than a multiple of 9. This means that a number is divisible by 9 if and only if the sum of its digits is divisible by 9. Now let s discuss the prime numbers. Just as the number 1 is a basic building block for Z + under addition, the prime numbers are the building blocks for Z + under multiplication. A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself. Thus 2, 3, 5, 7, and 11 are prime numbers. The non-prime numbers bigger than 1 are called composite numbers. The first few are 4, 6, 8, 9 and 10. In fact, 4 = 2 2, 6 = 2 3, 8 = = 2 4, 9 = 3 3, and 10 = 2 5. Lemma 1. Every integer n > 1 is divisible by a prime. Proof. Either n is prime and we are done or n has non-trivial divisors d (1 < d < n). The set of all possible divisors is finite and therefore contains a smallest element, say d 0 > 1, which we claim is prime. If d 0 has a divisor d between 1 and d 0, then d n. But this is impossible, so d 0 is prime. Lemma 2. Every integer n, n > 1, can be written as a product of primes. Proof. It follows from Lemma 1 that there is a prime p 1 such that p 1 n; i.e. n = p 1 q 2. If q 2 > 1, we can use Lemma 1 again to find a prime p 2 such that q 2 = p 2 q 3, or n = p 1 p 2 q 3. We can continue this process and after a finite number of steps (the total number of divisors for n is finite!), we obtain n = p 1 p 2... p 5

6 Theorem 1. Factorization theorem (without proof). Any positive number n > 1 can be written as a product of primes in one and only one way (factorizations that differ only in the order of the factors are considered identical, i.e., 24 = = = are identical representations.). This theorem is also called the Fundamental Theorem of Arithmetic. How can we find the primes for the given interval 1 < n < N? The following method was proposed by the Greek mathematician Erathosthenes from Alexandria in 3 rd century BC and is known as Sieve of Erathosthenes (or Erathosthenes Algorithm). (Remark: Erathosthenes was the first scientist to estimate the radius of the Earth. His estimation, based on geometrical and astronomical ideas, is in modern units near to R E 6, 000 km, which is very accurate.) Lemma 3. If n is composite, then it has divisor d such that 1 < d n. Proof. If n = d 1 d 2 and d 1 d 2, then n d 2 1, i.e. d 1 n. The idea of the algorithm is very simple: to eliminate all composite numbers from the set 1,2,..., N. Let s fix the first prime number 2 and eliminate all numbers (greater than 2) that are multiples of 2 (even numbers). The first of the remaining numbers is prime; it is 3. Let s remove all numbers (greater than 3) which are multiples of 3. The first of the remaining numbers is prime; it is 5, etc. According to Lemma 3 we can continue this process until we have crossed out the multiples of all primes less than N. The remaining numbers will be prime. Example. N = 100, N = The table below shows the first stage of the algorithm, after all the multiples of 2 have been eliminated. The final result is shown in the last table after all the multiples of 3, 5, and 7 have been eliminated. 6

7 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\ 37 38\ 39 40\ 41 42\ 43 44\ 45 46\ 47 48\ 49 50\ 51 52\ 53 54\ 55 56\ 57 58\ 59 60\ 61 62\ 63 64\ 65 66\ 67 68\ 69 70\ 71 72\ 73 74\ 75 76\ 77 78\ 79 80\ 81 82\ 83 84\ 85 86\ 87 88\ 89 90\ 91 92\ 93 94\ 95 96\ 97 98\ \ 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\ 37 38\ 39\ 40\ 41 42\ 43 44\ 45\ 46\ 47 48\ 49\ 50\ 51\ 52\ 53 54\ 55\ 56\ 57\ 58\ 59 60\ 61 62\ 63\ 64\ 65\ 66\ 67 68\ 69\ 70\ 71 72\ 73 74\ 75\ 76\ 77\ 78\ 79 80\ 81\ 82\ 83 84\ 85\ 86\ 87\ 88\ 89 90\ 91\ 92\ 93\ 94\ 95\ 96\ 97 98\ 99\ 100\ The primes 100 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97. Lemma 3 shows that each composite number n 10, 000 = 10 4 has a prime factor 100, i.e. the list of primes above is sufficient to solve the problem of factorization for all n Theorem 2 (Euclid). There are infinitely many primes. This is one of the oldest and most beautiful results of number theory. The proof was published in Euclid s Elements in the 3 rd century BC. Proof by contradiction. Suppose the opposite, that there is a finite number of primes p 1 = 2, p 2 = 3,..., p Construct the new integer: N = p 1 p 2 p k + 1. Either N is prime or N has a prime factor 0 < d < N (see Lemma 1). In both cases we find a prime q which is a factor of N. According to our assumption, q must be among p 1... p Thus q N and q p 1... p But p 1... p k and N are two consecutive integers, so q is a divisor of their difference, which is 1. But q 1 is a contradiction. 7

8 Now we ll discuss some applications of the factorization theorem (Theorem 1). According to this theorem each positive integer n can be represented as a product of primes. n = p a 1 1 p a 2 2 p a k k, a 1,... a k 1 and p 1 < p 2 <... < p k are prime. Let s consider two integers m and n, both greater than 1. Definition of LCM Number d is the greatest common divisor of m and n if both 1. d n and d m, and 2. if d n and d m, then d d. Condition 1. says that d is a common divisor of m and n, and condition 2. says that d is the largest (in a sense) of the common divisors. The greatest common divisor of m and n is denoted d = GCD (m, n). Definition of GCD The number k is the least common multiple of m and n if both 1. n k and m k, and 2. if n k and m k then k k. The first condition says that k is a common divisor of m and n, and the second says that k is a divisor of any other common divisor, hence k is the least such divisor. The least common multiple of m and n is denoted k = LCM (m, n). Theorem 3. Let p 1,... p k be all the prime factors for n or m. One can represent n = p a p a k k m = p b p b k Now 0 a i, b i. Then GCD (m, n) = p min(a 1,b 1 ) 1 p min(a 2,b 2 ) 2 p min(a k,b k ) LCM (m, n) = p max(a 1,b 1 ) 1 p max(a 2,b 2 ) 2 p max(a k,b k ) Theorem 3 is a consequence of the Factorization Theorem. Example. n = 75, m = 90. GCD (75, 90) = = 15. LCM (75, 90) = = 450. n = = m = =

10 If our computer can make even such divisions per second, then the total time will be of the order sec. But one year contains only about sec, i.e. the factorization of f i will require billions and billions years! It is also interesting to remark that the complexity of the factorization of very large numbers is the basis for completely different applications: many modern algorithms for the generation of random numbers depend on the arithmetical operations with very large primes. 10

### Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

### MAT Mathematical Concepts and Applications

MAT.1180 - Mathematical Concepts and Applications Chapter (Aug, 7) Number Theory: Prime and Composite Numbers. The set of Natural numbers, aka, Counting numbers, denoted by N, is N = {1,,, 4,, 6,...} If

### This section demonstrates some different techniques of proving some general statements.

Section 4. Number Theory 4.. Introduction This section demonstrates some different techniques of proving some general statements. Examples: Prove that the sum of any two odd numbers is even. Firstly you

### Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called

### CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

### CS103X: Discrete Structures Homework Assignment 2: Solutions

CS103X: Discrete Structures Homework Assignment 2: Solutions Due February 1, 2008 Exercise 1 (10 Points). Prove or give a counterexample for the following: Use the Fundamental Theorem of Arithmetic to

### Chapter 6. Number Theory. 6.1 The Division Algorithm

Chapter 6 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

### Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that. a = bq + r and 0 r < b.

Theorem (The division theorem) Suppose that a and b are integers with b > 0. There exist unique integers q and r so that a = bq + r and 0 r < b. We re dividing a by b: q is the quotient and r is the remainder,

### CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### Integers and division

CS 441 Discrete Mathematics for CS Lecture 12 Integers and division Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Symmetric matrix Definition: A square matrix A is called symmetric if A = A T.

### Continued fractions and good approximations.

Continued fractions and good approximations We will study how to find good approximations for important real life constants A good approximation must be both accurate and easy to use For instance, our

### Prime Numbers. Chapter Primes and Composites

Chapter 2 Prime Numbers The term factoring or factorization refers to the process of expressing an integer as the product of two or more integers in a nontrivial way, e.g., 42 = 6 7. Prime numbers are

### Homework 5 Solutions

Homework 5 Solutions 4.2: 2: a. 321 = 256 + 64 + 1 = (01000001) 2 b. 1023 = 512 + 256 + 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = (1111111111) 2. Note that this is 1 less than the next power of 2, 1024, which

### Topics in Number Theory

Chapter 8 Topics in Number Theory 8.1 The Greatest Common Divisor Preview Activity 1 (The Greatest Common Divisor) 1. Explain what it means to say that a nonzero integer m divides an integer n. Recall

### 8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

### Today s Topics. Primes & Greatest Common Divisors

Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

### Chapter 3: Elementary Number Theory and Methods of Proof. January 31, 2010

Chapter 3: Elementary Number Theory and Methods of Proof January 31, 2010 3.4 - Direct Proof and Counterexample IV: Division into Cases and the Quotient-Remainder Theorem Quotient-Remainder Theorem Given

### 1 Die hard, once and for all

ENGG 2440A: Discrete Mathematics for Engineers Lecture 4 The Chinese University of Hong Kong, Fall 2014 6 and 7 October 2014 Number theory is the branch of mathematics that studies properties of the integers.

### Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

### Section 4.2: The Division Algorithm and Greatest Common Divisors

Section 4.2: The Division Algorithm and Greatest Common Divisors The Division Algorithm The Division Algorithm is merely long division restated as an equation. For example, the division 29 r. 20 32 948

### Reading 7 : Program Correctness

CS/Math 240: Introduction to Discrete Mathematics Fall 2015 Instructors: Beck Hasti, Gautam Prakriya Reading 7 : Program Correctness 7.1 Program Correctness Showing that a program is correct means that

### MATH10040 Chapter 2: Prime and relatively prime numbers

MATH10040 Chapter 2: Prime and relatively prime numbers Recall the basic definition: 1. Prime numbers Definition 1.1. Recall that a positive integer is said to be prime if it has precisely two positive

### The Laws of Cryptography Cryptographers Favorite Algorithms

2 The Laws of Cryptography Cryptographers Favorite Algorithms 2.1 The Extended Euclidean Algorithm. The previous section introduced the field known as the integers mod p, denoted or. Most of the field

### Algebra for Digital Communication

EPFL - Section de Mathématiques Algebra for Digital Communication Fall semester 2008 Solutions for exercise sheet 1 Exercise 1. i) We will do a proof by contradiction. Suppose 2 a 2 but 2 a. We will obtain

### Section 5.1 Number Theory: Prime & Composite Numbers

Section 5.1 Number Theory: Prime & Composite Numbers Objectives 1. Determine divisibility. 2. Write the prime factorization of a composite number. 3. Find the greatest common divisor of two numbers. 4.

### CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

### Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Discrete Mathematics, Chapter 4: Number Theory and Cryptography Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 4 1 / 35 Outline 1 Divisibility

### 15 Prime and Composite Numbers

15 Prime and Composite Numbers Divides, Divisors, Factors, Multiples In section 13, we considered the division algorithm: If a and b are whole numbers with b 0 then there exist unique numbers q and r such

### Chapter 11 Number Theory

Chapter 11 Number Theory Number theory is one of the oldest branches of mathematics. For many years people who studied number theory delighted in its pure nature because there were few practical applications

### Playing with Numbers. factors and multiples

3 Playing with Numbers IN T H I S CH A P T E R, Y O U W I L L LEARN: Factors and multiples of a natural number Common factors and common multiples Types of natural numbers even and odd numbers, prime and

### a = bq + r where 0 r < b.

Lecture 5: Euclid s algorithm Introduction The fundamental arithmetic operations are addition, subtraction, multiplication and division. But there is a fifth operation which I would argue is just as fundamental

### 5544 = 2 2772 = 2 2 1386 = 2 2 2 693. Now we have to find a divisor of 693. We can try 3, and 693 = 3 231,and we keep dividing by 3 to get: 1

MATH 13150: Freshman Seminar Unit 8 1. Prime numbers 1.1. Primes. A number bigger than 1 is called prime if its only divisors are 1 and itself. For example, 3 is prime because the only numbers dividing

### Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

### 2. Integers and Algorithms Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers

2. INTEGERS AND ALGORITHMS 155 2. Integers and Algorithms 2.1. Euclidean Algorithm. Euclidean Algorithm. Suppose a and b are integers with a b > 0. (1) Apply the division algorithm: a = bq + r, 0 r < b.

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

### There are 8000 registered voters in Brownsville, and 3 8. of these voters live in

Politics and the political process affect everyone in some way. In local, state or national elections, registered voters make decisions about who will represent them and make choices about various ballot

### Chapter 1 Basic Number Concepts

Draft of September 2014 Chapter 1 Basic Number Concepts 1.1. Introduction No problems in this section. 1.2. Factors and Multiples 1. Determine whether the following numbers are divisible by 3, 9, and 11:

### Math Workshop October 2010 Fractions and Repeating Decimals

Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,

### It is time to prove some theorems. There are various strategies for doing

CHAPTER 4 Direct Proof It is time to prove some theorems. There are various strategies for doing this; we now examine the most straightforward approach, a technique called direct proof. As we begin, it

### a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

### Proof that an Infinite Number of Mersenne Prime Numbers Exit

Proof that an Infinite Number of Mersenne Prime Numbers Exit Stephen Marshall 29 Aug 2014 Abstract This paper presents a complete and exhaustive proof of the infinitude of Mersenne prime numbers. The approach

### 2 The Euclidean algorithm

2 The Euclidean algorithm Do you understand the number 5? 6? 7? At some point our level of comfort with individual numbers goes down as the numbers get large For some it may be at 43, for others, 4 In

### Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

MTHSC 412 Section 2.4 Prime Factors and Greatest Common Divisor Greatest Common Divisor Definition Suppose that a, b Z. Then we say that d Z is a greatest common divisor (gcd) of a and b if the following

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2 Proofs Intuitively, the concept of proof should already be familiar We all like to assert things, and few of us

### Handout NUMBER THEORY

Handout of NUMBER THEORY by Kus Prihantoso Krisnawan MATHEMATICS DEPARTMENT FACULTY OF MATHEMATICS AND NATURAL SCIENCES YOGYAKARTA STATE UNIVERSITY 2012 Contents Contents i 1 Some Preliminary Considerations

### 2.3 Bounds of sets of real numbers

2.3 Bounds of sets of real numbers 2.3.1 Upper bounds of a set; the least upper bound (supremum) Consider S a set of real numbers. S is called bounded above if there is a number M so that any x S is less

### The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

The Prime Numbers Before starting our study of primes, we record the following important lemma. Recall that integers a, b are said to be relatively prime if gcd(a, b) = 1. Lemma (Euclid s Lemma). If gcd(a,

### Homework until Test #2

MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

### CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

CONTINUED FRACTIONS AND FACTORING Niels Lauritzen ii NIELS LAURITZEN DEPARTMENT OF MATHEMATICAL SCIENCES UNIVERSITY OF AARHUS, DENMARK EMAIL: niels@imf.au.dk URL: http://home.imf.au.dk/niels/ Contents

### Lecture 13 - Basic Number Theory.

Lecture 13 - Basic Number Theory. Boaz Barak March 22, 2010 Divisibility and primes Unless mentioned otherwise throughout this lecture all numbers are non-negative integers. We say that A divides B, denoted

### Math 139 Problem Set #6 Solution 15 April 2003

Math 139 Problem Set #6 Solution 15 April 2003 A1 (Based on Barr, 41, exercise 3) (a) Let n be an integer greater than 2 Consider the list of numbers n! + 2, n! + 3, n! + 4,, n! + n Explain why all the

### Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

### 9 abcd = dcba. 9 ( b + 10c) = c + 10b b + 90c = c + 10b b = 10c.

In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should

### Further linear algebra. Chapter I. Integers.

Further linear algebra. Chapter I. Integers. Andrei Yafaev Number theory is the theory of Z = {0, ±1, ±2,...}. 1 Euclid s algorithm, Bézout s identity and the greatest common divisor. We say that a Z divides

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### MODULAR ARITHMETIC. a smallest member. It is equivalent to the Principle of Mathematical Induction.

MODULAR ARITHMETIC 1 Working With Integers The usual arithmetic operations of addition, subtraction and multiplication can be performed on integers, and the result is always another integer Division, on

### Playing with Numbers

Playing with Numbers Chapter 3 3.1 Introduction Ramesh has 6 marbles with him. He wants to arrange them in rows in such a way that each row has the same number of marbles. He arranges them in the following

### Fractions and Decimals

Fractions and Decimals Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles December 1, 2005 1 Introduction If you divide 1 by 81, you will find that 1/81 =.012345679012345679... The first

### STRAND B: Number Theory. UNIT B2 Number Classification and Bases: Text * * * * * Contents. Section. B2.1 Number Classification. B2.

STRAND B: Number Theory B2 Number Classification and Bases Text Contents * * * * * Section B2. Number Classification B2.2 Binary Numbers B2.3 Adding and Subtracting Binary Numbers B2.4 Multiplying Binary

### Handout #1: Mathematical Reasoning

Math 101 Rumbos Spring 2010 1 Handout #1: Mathematical Reasoning 1 Propositional Logic A proposition is a mathematical statement that it is either true or false; that is, a statement whose certainty or

### 12 Greatest Common Divisors. The Euclidean Algorithm

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan 12 Greatest Common Divisors. The Euclidean Algorithm As mentioned at the end of the previous section, we would like to

### GREATEST COMMON DIVISOR

DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their

### THE FUNDAMENTAL THEOREM OF ARITHMETIC

Introduction In mathematics, there are three theorems that are significant enough to be called fundamental. The first theorem, of which this essay expounds, concerns arithmetic, or more properly number

### 1. LINEAR EQUATIONS. A linear equation in n unknowns x 1, x 2,, x n is an equation of the form

1. LINEAR EQUATIONS A linear equation in n unknowns x 1, x 2,, x n is an equation of the form a 1 x 1 + a 2 x 2 + + a n x n = b, where a 1, a 2,..., a n, b are given real numbers. For example, with x and

### Section Summary. Integer Representations. Base Conversion Algorithm Algorithms for Integer Operations

Section 4.2 Section Summary Integer Representations Base b Expansions Binary Expansions Octal Expansions Hexadecimal Expansions Base Conversion Algorithm Algorithms for Integer Operations Representations

### Elementary Number Theory

Elementary Number Theory Ahto Buldas December 3, 2016 Ahto Buldas Elementary Number Theory December 3, 2016 1 / 1 Division For any m > 0, we define Z m = {0, 1,... m 1} For any n, m Z (m > 0), there are

### Chapter Two. Number Theory

Chapter Two Number Theory 2.1 INTRODUCTION Number theory is that area of mathematics dealing with the properties of the integers under the ordinary operations of addition, subtraction, multiplication and

### Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions

Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Lights, Camera, Primes! Grade 6 Math Circles March 10/11, 2015 Prime Time Solutions Today, we re going

### Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

### Math Circle Beginners Group October 18, 2015

Math Circle Beginners Group October 18, 2015 Warm-up problem 1. Let n be a (positive) integer. Prove that if n 2 is odd, then n is also odd. (Hint: Use a proof by contradiction.) Suppose that n 2 is odd

### A farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after.

Fibonacci Problem: A farmer raises rabbits. Each rabbit gives birth when 2 months old and then each month there after. Question: How many rabbits will the farmer have after n months? Try it on small numbers.

### Students in their first advanced mathematics classes are often surprised

CHAPTER 8 Proofs Involving Sets Students in their first advanced mathematics classes are often surprised by the extensive role that sets play and by the fact that most of the proofs they encounter are

### The Fundamental Theorem of Arithmetic

MODULE 3 The Fundamental Theorem of Arithmetic 1. Sieve of Eratosthenes Two is the only odd prime. Every even number > 2 is composite because it is divisible by 2. Similarly, all multiples of 3 6 are composite;

### 4. Number Theory (Part 2)

4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

### Integers and Rational Numbers

Chapter 6 Integers and Rational Numbers In this chapter, we will see constructions of the integers and the rational numbers; and we will see that our number system still has gaps (equations we can t solve)

### SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics Numbers. Factors 2. Multiples 3. Prime and Composite Numbers 4. Modular Arithmetic 5. Boolean Algebra 6. Modulo 2 Matrix Arithmetic 7. Number Systems

### Course notes on Number Theory

Course notes on Number Theory In Number Theory, we make the decision to work entirely with whole numbers. There are many reasons for this besides just mathematical interest, not the least of which is that

### CHAPTER 6: RATIONAL NUMBERS AND ORDERED FIELDS

CHAPTER 6: RATIONAL NUMBERS AND ORDERED FIELDS LECTURE NOTES FOR MATH 378 (CSUSM, SPRING 2009). WAYNE AITKEN 1. Introduction In this chapter we construct the set of rational numbers Q using equivalence

### Finding Prime Factors

Section 3.2 PRE-ACTIVITY PREPARATION Finding Prime Factors Note: While this section on fi nding prime factors does not include fraction notation, it does address an intermediate and necessary concept to

### Practice Problems for First Test

Mathematicians have tried in vain to this day to discover some order in the sequence of prime numbers, and we have reason to believe that it is a mystery into which the human mind will never penetrate.-

### Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

### COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

### Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

Chapter 3 Number Theory 159 3.1 Prime Numbers Prime numbers serve as the basic building blocs in the multiplicative structure of the integers. As you may recall, an integer n greater than one is prime

### Chapter Three. Functions. In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics.

Chapter Three Functions 3.1 INTRODUCTION In this section, we study what is undoubtedly the most fundamental type of relation used in mathematics. Definition 3.1: Given sets X and Y, a function from X to

### 1 Number System. Introduction. Face Value and Place Value of a Digit. Categories of Numbers

RMAT Success Master 3 1 Number System Introduction In the decimal number system, numbers are expressed by means of symbols 0, 1,, 3, 4, 5, 6, 7, 8, 9, called digits. Here, 0 is called an insignificant

### Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5

CS 70 Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 5 Modular Arithmetic One way to think of modular arithmetic is that it limits numbers to a predefined range {0,1,...,N

### We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: 9081 + 900b + 90c = 9001 + 100c + 10b

In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should

### INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS

INTRODUCTION TO PROOFS: HOMEWORK SOLUTIONS STEVEN HEILMAN Contents 1. Homework 1 1 2. Homework 2 6 3. Homework 3 10 4. Homework 4 16 5. Homework 5 19 6. Homework 6 21 7. Homework 7 25 8. Homework 8 28

### Chapter 1. Real Numbers Operations

www.ck1.org Chapter 1. Real Numbers Operations Review Answers 1 1. (a) 101 (b) 8 (c) 1 1 (d) 1 7 (e) xy z. (a) 10 (b) 14 (c) 5 66 (d) 1 (e) 7x 10 (f) y x (g) 5 (h) (i) 44 x. At 48 square feet per pint

### 6.2 Permutations continued

6.2 Permutations continued Theorem A permutation on a finite set A is either a cycle or can be expressed as a product (composition of disjoint cycles. Proof is by (strong induction on the number, r, of

### Integers: applications, base conversions.

CS 441 Discrete Mathematics for CS Lecture 14 Integers: applications, base conversions. Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Modular arithmetic in CS Modular arithmetic and congruencies

### 1. R In this and the next section we are going to study the properties of sequences of real numbers.

+a 1. R In this and the next section we are going to study the properties of sequences of real numbers. Definition 1.1. (Sequence) A sequence is a function with domain N. Example 1.2. A sequence of real

### Primes in Sequences. Lee 1. By: Jae Young Lee. Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov

Lee 1 Primes in Sequences By: Jae Young Lee Project for MA 341 (Number Theory) Boston University Summer Term I 2009 Instructor: Kalin Kostadinov Lee 2 Jae Young Lee MA341 Number Theory PRIMES IN SEQUENCES

### EULER S THEOREM. 1. Introduction Fermat s little theorem is an important property of integers to a prime modulus. a p 1 1 mod p.

EULER S THEOREM KEITH CONRAD. Introduction Fermat s little theorem is an important property of integers to a prime modulus. Theorem. (Fermat). For prime p and any a Z such that a 0 mod p, a p mod p. If

### An Introductory Course in Elementary Number Theory. Wissam Raji

An Introductory Course in Elementary Number Theory Wissam Raji 2 Preface These notes serve as course notes for an undergraduate course in number theory. Most if not all universities worldwide offer introductory

### Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

Breaking The Code Ryan Lowe Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and a minor in Applied Physics. As a sophomore, he took an independent study

### SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted