The Integers

Total Page:16

File Type:pdf, Size:1020Kb

The Integers Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Integers Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing March 20-21, 2018 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization 1 Euclid's Algorithm for GCD Mathematical Foundations The Algorithm 2 The Least Common Multiple 3 Prime numbers 4 Prime Factorization Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor The greatest common divisor (gcd) of two integers, a; b, is the largest integer that divides both. Formally, the gcd(a; b) is the greatest integer d such that d j a and d j b. Examples: gcd(1; x) = 1 gcd(10; 2) = 2 gcd(2; 10) = 2 gcd(2; 15) = 1 gcd(14; 10) = 2 gcd(13; 13) = 13 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Lemma 1: For x 2 Z +, gcd(x; 0) = x Proof: 0 divided by anything is 0 with no remainder. (Arithmetic.) Therefore, any integer, x, divides 0. (Definition of \divides".) Any integer, x, divides itself. (x=x = 1; with remainder 0, and definition of divides.) x is the largest integer that divides x. (Definition of divides.) gcd(x; 0) = x. (Definition of gcd.) Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Lemma 2: For a; b; q; r 2 Z and either a 6= 0 or b 6= 0. if a = bq + r then gcd(a; b) = gcd(b; r) Proof by division into parts: Part 1a. Any common divisor of b and r also divides a. Part 1b. Any common divisor of a and b also divides r. Part 2. Show that gcd(a; b) = gcd(b; r). Part 2a. Show that gcd(a; b) ≤ gcd(b; r). Part 2b. Show that gcd(b; r) ≤ gcd(a; b). Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Part 1a. Show ANY common divisor of b and r also divides a. 1 Let c be any common divisor of a and b. 2 Then 9m; n 2 Z, a = cm and b = cn. (Def. of divides.) 3 a = bq + r, so cm = cnq + r. (Substitute equals.) 4 r = cm − cnq = c(m − nq) (Arithmetic.) 5 So c divides r, and c is a common divisor of a; b and r. Part 1b. Show ANY common divisor of a and b also divides r. 1 Let c be any common divisor of b and r. 2 Then 9m; n 2 Z, b = cm and r = cn. (Def. of divides.) 3 a = bq + r, so a = cmq + cn. (Substitute equals.) 4 a = c(mq + n) (Arithmetic.) 5 So c divides a, and c is a common divisor of a; b and r. Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor, Part 2. Show that the greatest common divisor of a and b is also the greatest common divisor of b and r. a. Show that gcd(a; b) ≤ gcd(b; r) gcd(a; b) is a common divisor of b and r. (Lemma 2.1a) Every element of a set is always ≤ the greatest element of that set. So gcd(a; b) ≤ gcd(b; r). b. Show that gcd(b; r) ≤ gcd(a; b) gcd(b; r) is also a common divisor of a and b. (Lemma 2.1b) Every element of a set is always ≤ the greatest element of that set. So gcd(b; r) ≤ gcd(a; b). ) gcd(a; b) = gcd(b; r) Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Euclid's Algorithm Find the gcd(a; b): First, find the remainder, r, of a divided by b. Then iterate, with b becoming the numerator, r the denominator, and finding a new remainder. a b r a b r 72 46 26 318 39 6 46 26 20 39 6 3 26 20 6 6 3 0 20 6 2 3 0 3 6 2 0 2 0 2 Why does this algorithm work? By Lemma 2, the gcd(a; b) on every line is equal to the gcd(a; b) on the following line. By Lemma 1, the gcd of any number and 0 is that number. Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Algorithm To calculate gcd(p; q) 1 If p < q, swap p and q. 2 Begin a loop: If r = 0, leave the loop and return q as the gcd. Else, let r = p mod q, then assign p = q and q = r. Repeat the loop from step 2. Example: gcd(10; 745) = gcd(745; 10) = gcd(10; 5) = gcd(5; 0) = 5 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor in C int gcd (int p, int q) { int r; if (p*q == 0) return 0; if (q > p) { r=p, p=q, q=r; } for(;;){ r = p % q; if (r==0) break; p=q; q=r; } return q; } p q r return value 650 30 20 Compute gcd( 650, 30) 30 20 10 20 10 0 10 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Least Common Multiple The Least Common Multiple of two non-zero integers a and b, denoted lcm(a; b) or LCM(a; b), is the positive integer c such that: a j c and b j c, that is a and b are factors of c, and 8m 2 Z + , if a j m and b j m, then c ≤ m. To compute the LCM, compute the GCD and divide: lcm(a; b) = (a × b)=gcd(a; b) Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The GCD and LCM For all positive integers, a and b, ab = lcm(a; b) × gcd(a; b). Part 1 of proof: ab b a We can write gcd(a;b) = a × gcd(a;b) = b × gcd(a;b) ab So gcd(a;b) is a multiple of both a and b. This works because the gcd(a; b) is a factor of both a and b, so the divisions do not have any remainders. Because the LCM is the minimal multiple, it is true that ab gcd(a;b) ≥ lcm(a; b). Therefore, ab ≥ lcm(a; b) × gcd(a; b) But we need to prove that is it equal, not just ≥. Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The GCD and LCM continued Part 2 of proof: lcm(a; b) is divisible by both a and b, so we know lcm(a; b)=a and lcm(a; b)=b are both integers. ab a b We can write lcm(a;b) = lcm(a;b)=b = lcm(a;b)=a . (Arithmetic.) So lcm(a; b)=b is a common divisor of both a and b. Since the GCD is the greatest common divisor of a and b, lcm(a; b) ≤ gcd(a; b). Therefore, ab ≤ lcm(a; b) ∗ gcd(a; b). (Arithmetic) Combining parts 1 and 2, we see that ab = lcm(a; b) ∗ gcd(a; b). Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Prime Numbers Definitions The set of prime numbers is infinite Prime factorization Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Prime numbers A prime number is an integer > 1 whose only factors are 1 and itself. The first few prime numbers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 Numbers that have other factors are called composite numbers. Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Sieve of Eratosthenes The Sieve is an algorithm for enumerating the primes by eliminating all the composite numbers. 1 To begin, make a table of the odd numbers starting with 3. Make it as long as you can, to get the biggest primes you can. Also, put the first two primes, 2 and 3, on your list of primes. 2 Now go through your table and cross out all the multiples of 3 (that is, every third number in the table, starting with 3). 3 Then add the first un-crossed out number to your list of primes and cross out all its multiples. p 4 Repeat from step 3 until the next prime >= n. Everything left is a prime because it has no factors smaller than itself. Computationally, this is very fast, but the size of the biggest prime it can compute is limited to the size of available memory. Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Sieve Illustrated PRIMES, so far: 2 ODDS, 3 5 7 9 11 13 15 17 19 21 initially: 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 PRIMES, so far: 2, 3 ODDS, 0 5 7 0 11 13 0 17 19 0 after 23 25 0 29 31 0 35 37 0 41 crossing out the 43 0 47 49 0 53 55 0 59 61 3’s: 0 65 67 0 71 73 0 77 79 0 83 85 0 89 91 0 95 97 0 101 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Sieve { Continued PRIMES, so far: 2, 3, 5 ODDS, 0 0 7 0 11 13 0 17 19 0 after crossing 23 0 0 29 31 0 0 37 0 41 out the 5’s: 43 0 47 49 0 53 0 0 59 61 0 0 67 0 71 73 0 77 79 0 83 0 0 89 91 0 0 97 0 101 PRIMES, so far: 2, 3, 5, 7 ODDS, 0 0 0 0 11 13 0 17 19 21 0 after crossing 23 0 0 29 31 0 350 37 0 41 out the 7’s: 43 0 47 490 0 53 0 0 59 61 0 0 67 0 71 73 0 770 79 0 83 0 0 89 910 0 0 97 0 101 The final chart shows all the primes up to 101.
Recommended publications
  • Black Hills State University
    Black Hills State University MATH 341 Concepts addressed: Mathematics Number sense and numeration: meaning and use of numbers; the standard algorithms of the four basic operations; appropriate computation strategies and reasonableness of results; methods of mathematical investigation; number patterns; place value; equivalence; factors and multiples; ratio, proportion, percent; representations; calculator strategies; and number lines Students will be able to demonstrate proficiency in utilizing the traditional algorithms for the four basic operations and to analyze non-traditional student-generated algorithms to perform these calculations. Students will be able to use non-decimal bases and a variety of numeration systems, such as Mayan, Roman, etc, to perform routine calculations. Students will be able to identify prime and composite numbers, compute the prime factorization of a composite number, determine whether a given number is prime or composite, and classify the counting numbers from 1 to 200 into prime or composite using the Sieve of Eratosthenes. A prime number is a number with exactly two factors. For example, 13 is a prime number because its only factors are 1 and itself. A composite number has more than two factors. For example, the number 6 is composite because its factors are 1,2,3, and 6. To determine if a larger number is prime, try all prime numbers less than the square root of the number. If any of those primes divide the original number, then the number is prime; otherwise, the number is composite. The number 1 is neither prime nor composite. It is not prime because it does not have two factors. It is not composite because, otherwise, it would nullify the Fundamental Theorem of Arithmetic, which states that every composite number has a unique prime factorization.
    [Show full text]
  • The Least Common Multiple of a Quadratic Sequence
    The least common multiple of a quadratic sequence Javier Cilleruelo Abstract For any irreducible quadratic polynomial f(x) in Z[x] we obtain the estimate log l.c.m. (f(1); : : : ; f(n)) = n log n + Bn + o(n) where B is a constant depending on f. 1. Introduction The problem of estimating the least common multiple of the ¯rstPn positive integers was ¯rst investigated by Chebyshev [Che52] when he introduced the function ª(n) = pm6n log p = log l.c.m.(1; : : : ; n) in his study on the distribution of prime numbers. The prime number theorem asserts that ª(n) » n, so the asymptotic estimate log l.c.m.(1; : : : ; n) » n is equivalent to the prime number theorem. The analogous asymptotic estimate for any linear polynomial f(x) = ax + b is also known [Bat02] and it is a consequence of the prime number theorem for arithmetic progressions: q X 1 log l.c.m.(f(1); : : : ; f(n)) » n ; (1) Á(q) k 16k6q (k;q)=1 where q = a=(a; b). We address here the problem of estimating log l.c.m.(f(1); : : : ; f(n)) when f is an irreducible quadratic polynomial in Z[x]. When f is a reducible quadratic polynomial the asymptotic estimate is similar to that we obtain for linear polynomials. This case is studied in section x4 with considerably less e®ort than the irreducible case. We state our main theorem. Theorem 1. For any irreducible quadratic polynomial f(x) = ax2 + bx + c in Z[x] we have log l.c.m.
    [Show full text]
  • Eureka Math™ Tips for Parents Module 2
    Grade 6 Eureka Math™ Tips for Parents Module 2 The chart below shows the relationships between various fractions and may be a great Key Words tool for your child throughout this module. Greatest Common Factor In this 19-lesson module, students complete The greatest common factor of two whole numbers (not both zero) is the their understanding of the four operations as they study division of whole numbers, division greatest whole number that is a by a fraction, division of decimals and factor of each number. For operations on multi-digit decimals. This example, the GCF of 24 and 36 is 12 expanded understanding serves to complete because when all of the factors of their study of the four operations with positive 24 and 36 are listed, the largest rational numbers, preparing students for factor they share is 12. understanding, locating, and ordering negative rational numbers and working with algebraic Least Common Multiple expressions. The least common multiple of two whole numbers is the least whole number greater than zero that is a What Came Before this Module: multiple of each number. For Below is an example of how a fraction bar model can be used to represent the Students added, subtracted, and example, the LCM of 4 and 6 is 12 quotient in a division problem. multiplied fractions and decimals (to because when the multiples of 4 and the hundredths place). They divided a 6 are listed, the smallest or first unit fraction by a non-zero whole multiple they share is 12. number as well as divided a whole number by a unit fraction.
    [Show full text]
  • Fundamental Arithmetic
    FUNDAMENTAL ARITHMETIC Prime Numbers Prime numbers are any whole numbers greater than 1 that can only be divided by 1 and itself. Below is the list of all prime numbers between 1 and 100: 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 Prime Factorization Prime factorization is the process of changing non-prime (composite) numbers into a product of prime numbers. Below is the prime factorization of all numbers between 1 and 20. 1 is unique 6 = 2 ∙ 3 11 is prime 16 = 2 ∙ 2 ∙ 2 ∙ 2 2 is prime 7 is prime 12 = 2 ∙ 2 ∙ 3 17 is prime 3 is prime 8 = 2 ∙ 2 ∙ 2 13 is prime 18 = 2 ∙ 3 ∙ 3 4 = 2 ∙ 2 9 = 3 ∙ 3 14 = 2 ∙ 7 19 is prime 5 is prime 10 = 2 ∙ 5 15 = 3 ∙ 5 20 = 2 ∙ 2 ∙ 5 Divisibility By using these divisibility rules, you can easily test if one number can be evenly divided by another. A Number is Divisible By: If: Examples 2 The last digit is 5836 divisible by two 583 ퟔ ퟔ ÷ 2 = 3, Yes 3 The sum of the digits is 1725 divisible by three 1 + 7 + 2 + 5 = ퟏퟓ ퟏퟓ ÷ 3 = 5, Yes 5 The last digit ends 885 in a five or zero 88 ퟓ The last digit ends in a five, Yes 10 The last digit ends 7390 in a zero 739 ퟎ The last digit ends in a zero, Yes Exponents An exponent of a number says how many times to multiply the base number to itself.
    [Show full text]
  • 3Understanding Addition and Subtraction
    Understanding Addition 3 and Subtraction Copyright © Cengage Learning. All rights reserved. SECTION Understanding Addition and 3.3 Subtraction of Fractions Copyright © Cengage Learning. All rights reserved. What do you think? • Why do we need a common denominator to add (or subtract) two fractions ? • What pictorial representations can we use for addition and subtraction with fractions? 3 Understanding Addition and Subtraction of Fractions There are many algorithms that enable us to manipulate fractions quickly : I is simply not enough for an elementary teacher to know how to compute. It is crucial that the teacher also know the whys behind the hows and can use a variety of representations to explain them. 4 Investigation 3.3a – Using Fraction Models to Understand Addition of Fractions Using the area model, the length model, or the set model, determine the sum of and then explain why we need to find a common denominator in order to add fractions. 5 Investigation 3.3a – Discussion This is an excellent place to demonstrate the role of manipulatives. Using pattern blocks How might you use pattern blocks to add and (see Figure 3.8)? Figure 3.8 6 Investigation 3.3a – Discussion continued If we let the hexagon represent 1, then the trapezoid is the parallelogram is and the triangle is Using the notion of addition as combining, we can combine the two, and we have We could be humorous and say that parallelogram + trapezoid = baby carriage! The key question , though, is to determine the value of this amount . The solution lies in realizing that to name an amount with a fraction, we must have equal - size parts.
    [Show full text]
  • Greatest Common Divisor and Least Common Multiple
    Greatest Common Divisor and Least Common Multiple Document #: WG21 N3845 Date: 2014-01-01 Revises: None Project: JTC1.22.32 Programming Language C++ Reply to: Walter E. Brown <[email protected]> Contents 1 Introduction ............. 1 4 Acknowledgments .......... 3 2 Implementation ........... 2 5 Bibliography ............. 4 3 Proposed wording .......... 3 6 Document history .......... 4 Abstract This paper proposes two frequently-used classical numeric algorithms, gcd and lcm, for header <cstdlib>. The former calculates the greatest common divisor of two integer values, while the latter calculates their least common multiple. Both functions are already typically provided in behind-the-scenes support of the standard library’s <ratio> and <chrono> headers. Die ganze Zahl schuf der liebe Gott, alles Übrige ist Menschenwerk. (Integers are dear God’s achievement; all else is work of mankind.) —LEOPOLD KRONECKER 1 Introduction 1.1 Greatest common divisor The greatest common divisor of two (or more) integers is also known as the greatest or highest common factor. It is defined as the largest of those positive factors1 shared by (common to) each of the given integers. When all given integers are zero, the greatest common divisor is typically not defined. Algorithms for calculating the gcd have been known since at least the time of Euclid.2 Some version of a gcd algorithm is typically taught to schoolchildren when they learn fractions. However, the algorithm has considerably wider applicability. For example, Wikipedia states that gcd “is a key element of the RSA algorithm, a public-key encryption method widely used in electronic commerce.”3 Note that the standard library’s <ratio> header already requires gcd’s use behind the scenes; see [ratio.ratio]: Copyright c 2014 by Walter E.
    [Show full text]
  • New Results on the Least Common Multiple of Consecutive Integers
    New results on the least common multiple of consecutive integers Bakir FARHI and Daniel KANE Département de Mathématiques, Université du Maine, Avenue Olivier Messiaen, 72085 Le Mans Cedex 9, France. [email protected] Harvard University, Department of Mathematics 1 Oxford Street, Cambridge MA 02139, USA. [email protected] Abstract When studying the least common multiple of some nite sequences of integers, the rst author introduced the interesting arithmetic functions , dened by n(n+1):::(n+k) . He gk (k 2 N) gk(n) := lcm(n;n+1;:::;n+k) (8n 2 N n f0g) proved that is periodic and is a period of . He raised gk (k 2 N) k! gk the open problem consisting to determine the smallest positive period Pk of gk. Very recently, S. Hong and Y. Yang have improved the period k! of gk to lcm(1; 2; : : : ; k). In addition, they have conjectured that Pk is always a multiple of the positive integer lcm(1;2;:::;k;k+1) . An immediate k+1 consequence of this conjecture states that if (k+1) is prime then the exact period of gk is precisely equal to lcm(1; 2; : : : ; k). In this paper, we rst prove the conjecture of S. Hong and Y. Yang and then we give the exact value of . We deduce, as a corollary, Pk (k 2 N) that Pk is equal to the part of lcm(1; 2; : : : ; k) not divisible by some prime. MSC: 11A05 Keywords: Least common multiple; arithmetic function; exact period. 1 Introduction Throughout this paper, we let N∗ denote the set N n f0g of positive integers.
    [Show full text]
  • Exploring Least Common Multiples and Divisibility Through Visual Art
    Bridges 2019 Conference Proceedings Divisible Skylines: Exploring Least Common Multiples and Divisibility through Visual Art Saara Lehto1, Anne-Maria Ernvall-Hytönen2, and Tommi Sottinen3 1Dept. of Mathematics and Statistics, University of Helsinki, Finland; saara.lehto@helsinki.fi 2Mathematics and Statistics, Åbo Akademi University, Finland; aernvall@abo.fi 3School of Technology and Innovations, University of Vaasa, Finland; tommi.sottinen@iki.fi Abstract We present an alternative way to consider number theoretic concepts through visual art. Our visualization method, Divisible Skylines, is an artistically motivated study of least common multiples. It demonstrates how beauty and mathematical understanding can join hands in the study of divisibility. We present original artwork based on our method, examine mathematical properties of Divisible Skylines through the artwork, and point out several artisti- cally interesting visual aspects. Our method opens possibilities for developing playful and creative ways to teach divisibility and number theory. Divisible Skylines offer interest for artists, educators and students alike. Introduction The basis of this paper is the artwork Divisible Dreams by Saara Lehto (Figure1). The creative process behind this work entwines mathematics and visual art in a natural and intriguing way. Divisibility has previously been embodied with rhythms [3], but not many visual representations can be found. We present a visualization method that is both mathematically illustrative and artistically pleasing. Figure 1: Divisible Dreams by Saara Lehto, 2019 335 Lehto, Ernvall-Hytönen, and Sottinen In the heart of Divisible Dreams is a visualization method designed for finding least common multiples. In this paper we will explain this method and discover how number theoretic concepts and artistically interesting questions intertwine in the exploration of the artwork.
    [Show full text]
  • (3) Greatest Common Divisor
    (3) Greatest common divisor In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor (hcf), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4. This notion can be extended to polynomials, see greatest common divisor of two polynomials. Overview Example The number 54 can be expressed as a product of two other integers in several different ways: Thus the divisors of 54 are: Similarly the divisors of 24 are: The numbers that these two lists share in common are the common divisors of 54 and 24: The greatest of these is 6. That is the greatest common divisor of 54 and 24. One writes: Reducing fractions The greatest common divisor of a and b is written as gcd(a, b), or sometimes simply as (a, b). For example, gcd(12, 18) = 6, gcd(−4, 14) = 2. 1 Two numbers are called relatively prime, or coprime if their greatest common divisor equals 1. For example, 9 and 28 are relatively prime. Calculation Using Euclid's algorithm A much more efficient method is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference. To compute gcd(48,18), divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get a remainder of 0, which means that 6 is the gcd.
    [Show full text]
  • Finite Mathematics Review 2 1. for the Numbers 360 and 1035 Find
    Finite Mathematics Review 2 1. For the numbers 360 and 1035 find a. Prime factorizations. Using these prime factorizations find next b. The greatest common factor. c. The least common multiple. Solution. a. 3602180229022245222335;=× =×× =××× =××××× 1035=× 3 345 =×× 3 3 115 =××× 3 3 5 23. The prime factorizations are 360=×× 232 3 5 and 1035 =×× 32 5 23. b. To find the greatest common factor we take each prime factor from factorizations of 360 and 1035 with the smaller of two exponents. Thus GCF(360,1035)=×= 32 5 45. c. To find the least common multiple we take each prime factor from factorizations of 360 and 1035 with the larger of two exponents. Thus LCM (360,1035)=×××= 232 3 5 23 8280. 2. Find the greatest common factor of the numbers 3464 and 5084 using the Euclidean algorithm. Solution. The following table shows the sequence of operations. Dividend Divisor Quotient Remainder 5084 3464 1 1620 3464 1620 2 224 1620 224 7 52 224 52 4 16 52 16 3 4 16 4 4 0 Thus the greatest common factor of 5084 and 3464 is 4. 3. Determine which one of the two infinite decimal fractions 0.12123123412345... and 0.473121121121.... represents a rational number. Find the irreducible fraction which corresponds to this rational number. Solution. The first infinite decimal though has a pattern but it is not a periodic pattern, no group of digits repeats in this pattern. Thus this infinite decimal represents an irrational number. In the second decimal we have a repeating group of digits – 121 and therefore this decimal represents a rational number.
    [Show full text]
  • 4.3 Primes and Greatest Common Divisors
    ICS 141: Discrete Mathematics I (Fall 2014) 4.3 Primes and Greatest Common Divisors Primes An integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite. The Fundamental Theory of Arithmetic Every integer greater than 1 can be written uniquely as a prime or as the product of two or more primes where the prime factors are written in order of nondecreasing size. Theorem 2 p If n is a composite integer, then n has a prime divisor less than or equal to n. Greatest Common Divisor Let a and b be integers, not both zero. The largest integer d such that d j a and d j b is called the greatest common divisor of a and b. The greatest common divisor of a and b is denoted by gcd(a; b). Finding the Greatest Common Divisor using Prime Factorization Suppose the prime factorizations of a and b are: a1 a2 an a = p1 p2 ··· pn b1 b2 bn b = p1 p2 ··· pn where each exponent is a nonnegative integer, and where all primes occurring in either prime factorization are included in both, with zero exponents if necessary. Then: min(a1;b1) min(a2;b2) min(an;bn) gcd(a; b) = p1 p2 ··· pn Relatively Prime The integers a and b are relatively prime if their greatest common divisor is 1. Least Common Multiple The least common multiple of the positive integers a and b is the smallest positive integer that is divisible by both a and b.
    [Show full text]
  • Diophantine Approximation Exponents and Continued Fractions for Algebraic Power Series
    Journal of Number Theory 79, 284291 (1999) Article ID jnth.1999.2413, available online at http:ÂÂwww.idealibrary.com on Diophantine Approximation Exponents and Continued Fractions for Algebraic Power Series Dinesh S. Thakur1 Tata Institute of Fundamental Research, Colaba, Bombay, India; and University of Arizona, Tucson, Arizona 85721 E-mail: thakurÄmath.arizona.edu Communicated by D. Goss Received November 1, 1998 For each rational number not less than 2, we provide an explicit family of continued fractions of algebraic power series in finite characteristic (together with the algebraic equations they satisfy) which has that rational number as its diophan- tine approximation exponent. We also provide some non-quadratic examples with bounded sequences of partial quotients. 1999 Academic Press Continued fraction expansions of real numbers and laurent series over finite fields are well studied because, for example, of their close connection with best diophantine approximations. In both the cases, the expansion terminates exactly for rationals and is eventually periodic exactly for quad- ratic irrationals. But continued fraction expansion is not known even for a single algebraic real number of degree more than two. It is not even known whether the sequence of partial quotients is bounded or not for such a number. (Because of the numerical evidence and a belief that algebraic numbers are like most numbers in this respect, it is often conjectured that the sequence is unbounded.) It is hard to obtain such expansions for algebraic numbers, because the effect of basic algebraic operations (except for adding an integer or, more generally, an integral Mobius transfor- mation of determinant \1), such as addition or multiplication or even multiple or power, is not at all transparent on the continued fraction expansions.
    [Show full text]