How to find the greatest common dividend. Finding GCD using the Euclidean algorithm and using prime factorization


This article is about finding the greatest common divisor (GCD) two or more numbers. First, let's look at the Euclid algorithm; it allows you to find the gcd of two numbers. After this, we will focus on a method that allows us to calculate the gcd of numbers as the product of their common prime factors. Next, we will look at finding the greatest common divisor of three or more numbers, and also give examples of calculating the gcd of negative numbers.

Page navigation.

Euclidean algorithm for finding GCD

Note that if we had turned to the table of prime numbers from the very beginning, we would have found out that the numbers 661 and 113 are prime numbers, from which we could immediately say that their largest common divisor equals 1.

Answer:

GCD(661, 113)=1 .

Finding GCD by factoring numbers into prime factors

Let's consider another way to find GCD. The greatest common divisor can be found by factoring numbers into prime factors. Let's formulate a rule: The gcd of two positive integers a and b is equal to the product of all common prime factors found in the prime factorizations of the numbers a and b.

Let's give an example to explain the rule for finding GCD. Let us know the decompositions of the numbers 220 and 600 into prime factors, they have the form 220=2·2·5·11 and 600=2·2·2·3·5·5. The common prime factors involved in factoring the numbers 220 and 600 are 2, 2 and 5. Therefore, GCD(220, 600)=2·2·5=20.

Thus, if we factor the numbers a and b into prime factors and find the product of all their common factors, then this will find the greatest common divisor of the numbers a and b.

Let's consider an example of finding GCD according to the stated rule.

Example.

Find the greatest common divisor of the numbers 72 and 96.

Solution.

Let's factor the numbers 72 and 96 into prime factors:

That is, 72=2·2·2·3·3 and 96=2·2·2·2·2·3. Common prime factors are 2, 2, 2 and 3. Thus, gcd(72, 96)=2·2·2·3=24.

Answer:

GCD(72, 96)=24 .

In conclusion of this paragraph, we note that the validity of the above rule for finding GCD follows from the property of the greatest common divisor, which states that GCD(m a 1 , m b 1)=m GCD(a 1 , b 1), where m is any positive integer.

Finding the gcd of three or more numbers

Finding the greatest common divisor of three or more numbers can be reduced to sequentially finding the gcd of two numbers. We mentioned this when studying the properties of GCD. There we formulated and proved the theorem: the greatest common divisor of several numbers a 1, a 2, …, a k equal to the number d k , which is found by sequentially calculating GCD(a 1 , a 2)=d 2 , GCD(d 2 , a 3)=d 3 , GCD(d 3 , a 4)=d 4 , …, GCD(d k- 1 , a k)=d k .

Let's see what the process of finding the gcd of several numbers looks like by looking at the solution to the example.

Example.

Find the greatest common factor of four numbers 78, 294, 570 and 36.

Solution.

In this example, a 1 =78, a 2 =294, a 3 =570, a 4 =36.

First, using the Euclidean algorithm, we determine the greatest common divisor d 2 of the first two numbers 78 and 294. When dividing, we obtain the equalities 294 = 78 3 + 60 ; 78=60·1+18 ; 60=18·3+6 and 18=6·3. Thus, d 2 =GCD(78, 294)=6.

Now let's calculate d 3 =GCD(d 2, a 3)=GCD(6, 570). Let's apply the Euclidean algorithm again: 570=6·95, therefore, d 3 = GCD(6, 570)=6.

It remains to calculate d 4 =GCD(d 3, a 4)=GCD(6, 36). Since 36 is divisible by 6, then d 4 = GCD(6, 36) = 6.

Thus, the greatest common divisor of the four given numbers is d 4 =6, that is, gcd(78, 294, 570, 36)=6.

Answer:

GCD(78, 294, 570, 36)=6 .

Factoring numbers into prime factors also allows you to calculate the gcd of three or more numbers. In this case, the greatest common divisor is found as the product of all common prime factors of the given numbers.

Example.

Calculate the gcd of the numbers from the previous example using their prime factorizations.

Solution.

Let's factor the numbers 78, 294, 570 and 36 into prime factors, we get 78=2·3·13, 294=2·3·7·7, 570=2·3·5·19, 36=2·2·3· 3. The common prime factors of all these four numbers are numbers 2 and 3. Hence, GCD(78, 294, 570, 36)=2·3=6.


The material presented below is a logical continuation of the theory from the article entitled LCM - least common multiple, definition, examples, connection between LCM and GCD. Here we will talk about finding the least common multiple (LCM), And Special attention Let's focus on solving examples. First, we will show how the LCM of two numbers is calculated using the GCD of these numbers. Next, we'll look at finding the least common multiple by factoring numbers into prime factors. After this, we will focus on finding the LCM of three or more numbers, and also pay attention to calculating the LCM of negative numbers.

Page navigation.

Calculating Least Common Multiple (LCM) via GCD

One way to find the least common multiple is based on the relationship between LCM and GCD. Existing connection between LCM and GCD allows you to calculate the least common multiple of two positive integers using a known greatest common divisor. The corresponding formula is LCM(a, b)=a b:GCD(a, b) . Let's look at examples of finding the LCM using the given formula.

Example.

Find the least common multiple of two numbers 126 and 70.

Solution.

In this example a=126 , b=70 . Let us use the connection between LCM and GCD, expressed by the formula LCM(a, b)=a b:GCD(a, b). That is, first we have to find the greatest common divisor of the numbers 70 and 126, after which we can calculate the LCM of these numbers using the written formula.

Let's find GCD(126, 70) using the Euclidean algorithm: 126=70·1+56, 70=56·1+14, 56=14·4, therefore, GCD(126, 70)=14.

Now we find the required least common multiple: GCD(126, 70)=126·70:GCD(126, 70)= 126·70:14=630.

Answer:

LCM(126, 70)=630 .

Example.

What is LCM(68, 34) equal to?

Solution.

Because 68 is divisible by 34, then GCD(68, 34)=34. Now we calculate the least common multiple: GCD(68, 34)=68·34:GCD(68, 34)= 68·34:34=68.

Answer:

LCM(68, 34)=68 .

Note that the previous example fits the following rule for finding the LCM for positive integers a and b: if the number a is divisible by b, then the least common multiple of these numbers is a.

Finding the LCM by factoring numbers into prime factors

Another way to find the least common multiple is based on factoring numbers into prime factors. If you compose a product from all the prime factors of given numbers, and then exclude from this product all the common prime factors present in the expansions of the given numbers, then the resulting product will be equal to the least common multiple of the given numbers.

The stated rule for finding the LCM follows from the equality LCM(a, b)=a b:GCD(a, b). Indeed, the product of numbers a and b is equal to the product of all factors involved in the expansion of numbers a and b. In turn, GCD(a, b) is equal to the product of all prime factors simultaneously present in the expansions of numbers a and b (as described in the section on finding GCD using the expansion of numbers into prime factors).

Let's give an example. Let us know that 75=3·5·5 and 210=2·3·5·7. Let's compose the product from all the factors of these expansions: 2·3·3·5·5·5·7 . Now from this product we exclude all the factors present in both the expansion of the number 75 and the expansion of the number 210 (these factors are 3 and 5), then the product will take the form 2·3·5·5·7. The value of this product is equal to the least common multiple of 75 and 210, that is, NOC(75, 210)= 2·3·5·5·7=1,050.

Example.

Factor the numbers 441 and 700 into prime factors and find the least common multiple of these numbers.

Solution.

Let's factor the numbers 441 and 700 into prime factors:

We get 441=3·3·7·7 and 700=2·2·5·5·7.

Now let’s compose a product from all the factors involved in the expansion of these numbers: 2·2·3·3·5·5·7·7·7. Let us exclude from this product all factors that are simultaneously present in both expansions (there is only one such factor - this is the number 7): 2·2·3·3·5·5·7·7. Thus, LCM(441, 700)=2·2·3·3·5·5·7·7=44 100.

Answer:

NOC(441, 700)= 44 100 .

The rule for finding the LCM using factorization of numbers into prime factors can be formulated a little differently. If the missing factors from the expansion of number b are added to the factors from the expansion of the number a, then the value of the resulting product will be equal to the least common multiple of the numbers a and b.

For example, let's take the same numbers 75 and 210, their decompositions into prime factors are as follows: 75=3·5·5 and 210=2·3·5·7. To the factors 3, 5 and 5 from the expansion of the number 75 we add the missing factors 2 and 7 from the expansion of the number 210, we obtain the product 2·3·5·5·7, the value of which is equal to LCM(75, 210).

Example.

Find the least common multiple of 84 and 648.

Solution.

We first obtain the decompositions of the numbers 84 and 648 into prime factors. They look like 84=2·2·3·7 and 648=2·2·2·3·3·3·3. To the factors 2, 2, 3 and 7 from the expansion of the number 84 we add the missing factors 2, 3, 3 and 3 from the expansion of the number 648, we obtain the product 2 2 2 3 3 3 3 7, which is equal to 4 536 . Thus, the desired least common multiple of 84 and 648 is 4,536.

Answer:

LCM(84, 648)=4,536 .

Finding the LCM of three or more numbers

The least common multiple of three or more numbers can be found by sequentially finding the LCM of two numbers. Let us recall the corresponding theorem, which gives a way to find the LCM of three or more numbers.

Theorem.

Let positive integer numbers a 1 , a 2 , …, a k be given, the least common multiple m k of these numbers is found by sequentially calculating m 2 = LCM(a 1 , a 2) , m 3 = LCM(m 2 , a 3) , … , m k = LCM(m k−1 , a k) .

Let's consider the application of this theorem using the example of finding the least common multiple of four numbers.

Example.

Find the LCM of four numbers 140, 9, 54 and 250.

Solution.

In this example, a 1 =140, a 2 =9, a 3 =54, a 4 =250.

First we find m 2 = LOC(a 1, a 2) = LOC(140, 9). To do this, using the Euclidean algorithm, we determine GCD(140, 9), we have 140=9·15+5, 9=5·1+4, 5=4·1+1, 4=1·4, therefore, GCD(140, 9)=1 , from where GCD(140, 9)=140 9:GCD(140, 9)= 140·9:1=1,260. That is, m 2 =1 260.

Now we find m 3 = LOC (m 2 , a 3) = LOC (1 260, 54). Let's calculate it through GCD(1 260, 54), which we also determine using the Euclidean algorithm: 1 260=54·23+18, 54=18·3. Then gcd(1,260, 54)=18, from which gcd(1,260, 54)= 1,260·54:gcd(1,260, 54)= 1,260·54:18=3,780. That is, m 3 =3 780.

All that remains is to find m 4 = LOC(m 3, a 4) = LOC(3 780, 250). To do this, we find GCD(3,780, 250) using the Euclidean algorithm: 3,780=250·15+30, 250=30·8+10, 30=10·3. Therefore, GCM(3,780, 250)=10, whence GCM(3,780, 250)= 3 780 250: GCD(3 780, 250)= 3,780·250:10=94,500. That is, m 4 =94,500.

So the least common multiple of the original four numbers is 94,500.

Answer:

LCM(140, 9, 54, 250)=94,500.

In many cases, it is convenient to find the least common multiple of three or more numbers using prime factorizations of the given numbers. In this case, you should adhere to the following rule. The least common multiple of several numbers is equal to the product, which is composed as follows: the missing factors from the expansion of the second number are added to all factors from the expansion of the first number, the missing factors from the expansion of the third number are added to the resulting factors, and so on.

Let's look at an example of finding the least common multiple using prime factorization.

Example.

Find the least common multiple of the five numbers 84, 6, 48, 7, 143.

Solution.

First, we obtain decompositions of these numbers into prime factors: 84=2·2·3·7, 6=2·3, 48=2·2·2·2·3, 7 (7 is a prime number, it coincides with its decomposition into prime factors) and 143=11·13.

To find the LCM of these numbers, to the factors of the first number 84 (they are 2, 2, 3 and 7), you need to add the missing factors from the expansion of the second number 6. The decomposition of the number 6 does not contain missing factors, since both 2 and 3 are already present in the decomposition of the first number 84. Next, to the factors 2, 2, 3 and 7 we add the missing factors 2 and 2 from the expansion of the third number 48, we get a set of factors 2, 2, 2, 2, 3 and 7. There will be no need to add multipliers to this set in the next step, since 7 is already contained in it. Finally, to the factors 2, 2, 2, 2, 3 and 7 we add the missing factors 11 and 13 from the expansion of the number 143. We get the product 2·2·2·2·3·7·11·13, which is equal to 48,048.

Finding the greatest common divisor of three or more numbers can be reduced to sequentially finding the gcd of two numbers. We mentioned this when studying the properties of GCD. There we formulated and proved the theorem: the greatest common divisor of several numbers a 1 , a 2 , …, a k equal to the number dk, which is found by sequential calculation GCD(a 1 , a 2)=d 2, GCD(d 2 , a 3)=d 3, GCD(d 3 , a 4)=d 4, …,GCD(d k-1 , a k)=d k.

Let's see what the process of finding the gcd of several numbers looks like by looking at the solution to the example.

Example.

Find the greatest common divisor of four numbers 78 , 294 , 570 And 36 .

Solution.

In this example a 1 =78, a 2 =294, a 3 =570, a 4 =36.

First, using the Euclidean algorithm, we determine the greatest common divisor d 2 first two numbers 78 And 294 . When dividing we get the equalities 294=78 3+60; 78=60 1+18;60=18·3+6 And 18=6·3. Thus, d 2 =GCD(78, 294)=6.

Now let's calculate d 3 =GCD(d 2, a 3)=GCD(6, 570). Let's use the Euclidean algorithm again: 570=6·95, hence, d 3 =GCD(6, 570)=6.

It remains to calculate d 4 =GCD(d 3, a 4)=GCD(6, 36). Because 36 divided by 6 , That d 4 =GCD(6, 36)=6.

Thus, the greatest common divisor of the four given numbers is d 4 =6, that is, GCD(78, 294, 570, 36)=6.

Answer:

GCD(78, 294, 570, 36)=6.

Factoring numbers into prime factors also allows you to calculate the gcd of three or more numbers. In this case, the greatest common divisor is found as the product of all common prime factors of the given numbers.

Example.

Calculate the gcd of the numbers from the previous example using their prime factorizations.

Solution.

Let's break down the numbers 78 , 294 , 570 And 36 by prime factors, we get 78=2·3·13,294=2·3·7·7, 570=2 3 5 19, 36=2·2·3·3. The common prime factors of all given four numbers are the numbers 2 And 3 . Hence, GCD(78, 294, 570, 36)=2·3=6.

Answer:

GCD(78, 294, 570, 36)=6.

Top of page

Finding gcd of negative numbers

If one, several, or all of the numbers whose greatest divisor is to be found are negative numbers, then their gcd is equal to the greatest common divisor of the moduli of these numbers. This is due to the fact that opposite numbers a And −a have the same divisors, as we discussed when studying the properties of divisibility.

Example.

Find the gcd of negative integers −231 And −140 .

Solution.

The absolute value of a number −231 equals 231 , and the modulus of the number −140 equals 140 , And GCD(−231, −140)=GCD(231, 140). The Euclidean algorithm gives us the following equalities: 231=140 1+91; 140=91 1+49; 91=49 1+42; 49=42 1+7 And 42=7 6. Hence, GCD(231, 140)=7. Then the desired greatest common divisor of negative numbers is −231 And −140 equals 7 .


Answer:

GCD(−231, −140)=7.

Example.

Determine the gcd of three numbers −585 , 81 And −189 .

Solution.

When finding the greatest common divisor, negative numbers can be replaced by their absolute values, that is, GCD(−585, 81, −189)=GCD(585, 81, 189). Number expansions 585 , 81 And 189 into prime factors have the form 585=3·3·5·13, 81=3·3·3·3 And 189=3·3·3·7. The common prime factors of these three numbers are 3 And 3 . Then GCD(585, 81, 189)=3·3=9, hence, GCD(−585, 81, −189)=9.

Answer:

GCD(−585, 81, −189)=9.

35. Roots of a polynomial. Bezout's theorem. (33 and above)

36. Multiple roots, criterion for multiplicity of roots.

The largest natural number by which the numbers a and b are divided without remainder is called greatest common divisor these numbers. Denote GCD(a, b).

Let's consider finding GCD using the example of two natural numbers 18 and 60:

  • 1 Let's factor the numbers into prime factors:
    18 = 2×3×3
    60 = 2 × 2 × 3 × 5
  • 2 Eliminate from the expansion of the first number all factors that are not included in the expansion of the second number, we get 2×3×3 .
  • 3 We multiply the remaining prime factors after crossing out and get the greatest common divisor of the numbers: gcd( 18 , 60 )=2×3= 6 .
  • 4 Note that it doesn’t matter if we cross out the factors from the first or second number, the result will be the same:
    18 = 2×3×3
    60 = 2 × 2 × 3 × 5
  • 324 , 111 And 432

    Let's factor the numbers into prime factors:

    324 = 2 × 2 × 3 × 3 × 3 × 3

    111 = 3×37

    432 = 2 × 2 × 2 × 2 × 3 × 3 × 3

    Crossing out from the first number the factors of which are not in the second and third numbers, we get:

    2 × 2 × 2 × 2 × 3 × 3 × 3 = 3

    As a result, GCD( 324 , 111 , 432 )=3

    Finding GCD using the Euclidean algorithm

    The second way to find the greatest common divisor is using Euclidean algorithm. The Euclid algorithm is the most effective way finding GCD, using it you need to constantly find the remainder of dividing numbers and apply recurrence formula.

    Recurrence formula for GCD, GCD(a, b)=GCD(b, a mod b), where a mod b is the remainder of a divided by b.

    Euclid's algorithm
    Example Find the greatest common divisor of numbers 7920 And 594

    Let's find GCD( 7920 , 594 ) using the Euclidean algorithm, we will calculate the remainder of division using a calculator.

  • GCD( 7920 , 594 )
  • GCD( 594 , 7920 mod 594 ) = GCD( 594 , 198 )
  • GCD( 198 , 594 mod 198 ) = GCD( 198 , 0 )
  • GCD( 198 , 0 ) = 198
    • 7920 mod 594 = 7920 - 13 × 594 = 198
    • 594 mod 198 = 594 – 3 × 198 = 0
    • As a result, we get GCD( 7920 , 594 ) = 198

      Least common multiple

      In order to find common denominator when adding and subtracting fractions with different denominators you need to know and be able to calculate least common multiple(NOK).

      A multiple of the number “a” is a number that is itself divisible by the number “a” without a remainder.

      Numbers that are multiples of 8 (that is, these numbers are divisible by 8 without a remainder): these are the numbers 16, 24, 32...

      Multiples of 9: 18, 27, 36, 45…

      There are infinitely many multiples of a given number a, in contrast to the divisors of the same number. There is a finite number of divisors.

      The common multiple of two natural numbers is a number that is divisible by both of these numbers..

      Least common multiple(LCM) of two or more natural numbers is the smallest natural number that is itself divisible by each of these numbers.

      How to find NOC

      LCM can be found and written in two ways.

      The first way to find the LOC

      This method is usually used for small numbers.

    1. We write down the multiples for each number on a line until we find a multiple that is the same for both numbers.
    2. The multiple of the number “a” is denoted by the capital letter “K”.

    Example. Find LCM 6 and 8.

    The second way to find the LOC

    This method is convenient to use to find the LCM for three or more numbers.

    The number of identical factors in decompositions of numbers can be different.

  • In the expansion of the smaller number(s), highlight the factors that are not included in the expansion of the larger number (in our example, this is 2) and add these factors to the expansion of the larger number.
    LCM(24, 60) = 2 2 3 5 2
  • Write down the resulting product as an answer.
    Answer: LCM (24, 60) = 120
  • You can also formalize finding the least common multiple (LCM) as follows. Let's find the LOC (12, 16, 24).

    24 = 2 2 2 3

    As we see from the decomposition of numbers, all factors of 12 are included in the decomposition of 24 (the largest of the numbers), so we add only one 2 from the decomposition of the number 16 to the LCM.

    LCM (12, 16, 24) = 2 2 2 3 2 = 48

    Answer: LCM (12, 16, 24) = 48

    Special cases of finding an NOC

  • If one of the numbers is divisible by the others, then the least common multiple of these numbers is equal to that number.
  • For example, LCM (60, 15) = 60
    Since it's mutual prime numbers have no common prime factors, then their least common multiple is equal to the product of these numbers.

    On our website you can also use a special calculator to find the least common multiple online to check your calculations.

    If a natural number is divisible only by 1 and itself, then it is called prime.

    Any natural number is always divisible by 1 and itself.

    The number 2 is the smallest prime number. This is the only even prime number, the rest of the prime numbers are odd.

    There are many prime numbers, and the first among them is the number 2. However, there is no last prime number. In the “For Study” section you can download a table of prime numbers up to 997.

    But many natural numbers are also divisible by other natural numbers.

    • the number 12 is divisible by 1, by 2, by 3, by 4, by 6, by 12;
    • The number 36 is divisible by 1, by 2, by 3, by 4, by 6, by 12, by 18, by 36.
    • The numbers by which the number is divisible by a whole (for 12 these are 1, 2, 3, 4, 6 and 12) are called divisors of the number.

      The divisor of a natural number a is a natural number that divides given number"a" without remainder.

      A natural number that has more than two divisors is called composite.

      Please note that the numbers 12 and 36 have common factors. These numbers are: 1, 2, 3, 4, 6, 12. The greatest divisor of these numbers is 12.

      The common divisor of two given numbers “a” and “b” is the number by which both given numbers “a” and “b” are divided without remainder.

      Greatest common divisor(GCD) of two given numbers “a” and “b” is greatest number, by which both numbers “a” and “b” are divided without a remainder.

      Briefly, the greatest common divisor of the numbers “a” and “b” is written as follows::

      Example: gcd (12; 36) = 12.

      Divisors of numbers in the solution record are denoted by the capital letter “D”.

      The numbers 7 and 9 have only one common divisor - the number 1. Such numbers are called coprime numbers.

      Coprime numbers- these are natural numbers that have only one common divisor - the number 1. Their gcd is 1.

      How to find the greatest common divisor

      To find the gcd of two or more natural numbers you need:

    • decompose the divisors of numbers into prime factors;
    • It is convenient to write calculations using a vertical bar. To the left of the line we first write down the dividend, to the right - the divisor. Next, in the left column we write down the values ​​of the quotients.

      Let's explain it right away with an example. Let's factor the numbers 28 and 64 into prime factors.

      We emphasize the same prime factors in both numbers.
      28 = 2 2 7

    64 = 2 2 2 2 2 2
    Find the product of identical prime factors and write down the answer;
    GCD (28; 64) = 2 2 = 4

    Answer: GCD (28; 64) = 4

    You can formalize the location of the GCD in two ways: in a column (as done above) or “in a row”.

    The first way to write GCD

    Find gcd 48 and 36.

    GCD (48; 36) = 2 2 3 = 12

    The second way to write gcd

    Now let's write down the solution to the GCD search in a line. Find gcd 10 and 15.

    On our information site you can also use the Greatest Common Divisor online helper to check your calculations.

    Finding the least common multiple, methods, examples of finding the LCM.

    The material presented below is a logical continuation of the theory from the article entitled LCM - least common multiple, definition, examples, connection between LCM and GCD. Here we will talk about finding the least common multiple (LCM), and we will pay special attention to solving examples. First, we will show how the LCM of two numbers is calculated using the GCD of these numbers. Next, we'll look at finding the least common multiple by factoring numbers into prime factors. After this, we will focus on finding the LCM of three or more numbers, and also pay attention to calculating the LCM of negative numbers.

    Page navigation.

    Calculating Least Common Multiple (LCM) via GCD

    One way to find the least common multiple is based on the relationship between LCM and GCD. The existing connection between LCM and GCD allows us to calculate the least common multiple of two positive integers through a known greatest common divisor. The corresponding formula is LCM(a, b)=a b:GCD(a, b). Let's look at examples of finding the LCM using the given formula.

    Find the least common multiple of two numbers 126 and 70.

    In this example a=126 , b=70 . Let's use the connection between LCM and GCD, expressed by the formula LCM(a, b)=a·b:GCD(a, b) . That is, first we have to find the greatest common divisor of the numbers 70 and 126, after which we can calculate the LCM of these numbers using the written formula.

    Let's find GCD(126, 70) using the Euclidean algorithm: 126=70·1+56, 70=56·1+14, 56=14·4, therefore, GCD(126, 70)=14.

    Now we find the required least common multiple: LCM(126, 70)=126·70:GCD(126, 70)= 126·70:14=630.

    What is LCM(68, 34) equal to?

    Since 68 is divisible by 34, then GCD(68, 34)=34. Now we calculate the least common multiple: LCM(68, 34)=68·34:GCD(68, 34)= 68·34:34=68.

    Note that the previous example fits the following rule for finding the LCM for positive integers a and b: if a is divisible by b, then the least common multiple of these numbers is a.

    Finding the LCM by factoring numbers into prime factors

    Another way to find the least common multiple is based on factoring numbers into prime factors. If you compose a product from all the prime factors of given numbers, and then exclude from this product all the common prime factors present in the expansions of the given numbers, then the resulting product will be equal to the least common multiple of the given numbers.

    The stated rule for finding the LCM follows from the equality LCM(a, b)=a·b:GCD(a, b) . Indeed, the product of numbers a and b is equal to the product of all factors involved in the expansion of numbers a and b. In turn, GCD(a, b) is equal to the product of all prime factors simultaneously present in the expansions of numbers a and b (as described in the section on finding GCD using the expansion of numbers into prime factors).

    Let's give an example. Let us know that 75=3·5·5 and 210=2·3·5·7. Let's compose the product from all the factors of these expansions: 2·3·3·5·5·5·7 . Now from this product we exclude all the factors present in both the expansion of the number 75 and the expansion of the number 210 (these factors are 3 and 5), then the product will take the form 2·3·5·5·7. The value of this product is equal to the least common multiple of the numbers 75 and 210, that is, LCM(75, 210)= 2·3·5·5·7=1050.

    Factor the numbers 441 and 700 into prime factors and find the least common multiple of these numbers.

    Let's factor the numbers 441 and 700 into prime factors:

    We get 441=3·3·7·7 and 700=2·2·5·5·7.

    Now let’s compose a product from all the factors involved in the expansion of these numbers: 2·2·3·3·5·5·7·7·7. Let us exclude from this product all factors that are simultaneously present in both expansions (there is only one such factor - this is the number 7): 2·2·3·3·5·5·7·7. Thus, LCM(441, 700)=2·2·3·3·5·5·7·7=44 100 .

    NOC(441, 700)= 44 100 .

    The rule for finding the LCM using factorization of numbers into prime factors can be formulated a little differently. If the missing factors from the expansion of number b are added to the factors from the expansion of the number a, then the value of the resulting product will be equal to the least common multiple of the numbers a and b.

    For example, let's take the same numbers 75 and 210, their decompositions into prime factors are as follows: 75=3·5·5 and 210=2·3·5·7. To the factors 3, 5 and 5 from the expansion of the number 75 we add the missing factors 2 and 7 from the expansion of the number 210, we obtain the product 2·3·5·5·7, the value of which is equal to LCM(75, 210).

    Find the least common multiple of 84 and 648.

    We first obtain the decompositions of the numbers 84 and 648 into prime factors. They look like 84=2·2·3·7 and 648=2·2·2·3·3·3·3. To the factors 2, 2, 3 and 7 from the expansion of the number 84 we add the missing factors 2, 3, 3 and 3 from the expansion of the number 648, we obtain the product 2 2 2 3 3 3 3 7, which is equal to 4 536 . Thus, the desired least common multiple of 84 and 648 is 4,536.

    Finding the LCM of three or more numbers

    The least common multiple of three or more numbers can be found by sequentially finding the LCM of two numbers. Let us recall the corresponding theorem, which gives a way to find the LCM of three or more numbers.

    Let positive integer numbers a 1 , a 2 , …, a k be given, the least common multiple m k of these numbers is found by sequentially calculating m 2 = LCM(a 1 , a 2) , m 3 = LCM(m 2 , a 3) , … , m k = LCM(m k−1 , a k) .

    Let's consider the application of this theorem using the example of finding the least common multiple of four numbers.

    Find the LCM of four numbers 140, 9, 54 and 250.

    First we find m 2 = LCM(a 1 , a 2) = LCM(140, 9) . To do this, using the Euclidean algorithm, we determine GCD(140, 9), we have 140=9·15+5, 9=5·1+4, 5=4·1+1, 4=1·4, therefore, GCD(140, 9)=1, from which LCM(140, 9)=140·9:GCD(140, 9)= 140·9:1=1,260. That is, m 2 =1 260.

    Now we find m 3 = LCM(m 2 , a 3) = LCM(1 260, 54). Let's calculate it through GCD(1 260, 54), which we also determine using the Euclidean algorithm: 1 260=54·23+18, 54=18·3. Then gcd(1,260, 54)=18, from which gcd(1,260, 54)= 1,260·54:gcd(1,260, 54)= 1,260·54:18=3,780. That is, m 3 =3 780.

    It remains to find m 4 = LCM(m 3 , a 4) = LCM(3 780, 250). To do this, we find GCD(3,780, 250) using the Euclidean algorithm: 3,780=250·15+30, 250=30·8+10, 30=10·3. Therefore, GCD(3,780, 250)=10, from which GCD(3,780, 250)= 3,780·250:GCD(3,780, 250)= 3,780·250:10=94,500. That is, m 4 =94,500.

    So the least common multiple of the original four numbers is 94,500.

    LCM(140, 9, 54, 250)=94,500 .

    In many cases, it is convenient to find the least common multiple of three or more numbers using prime factorizations of the given numbers. In this case, you should adhere to the following rule. The least common multiple of several numbers is equal to the product, which is composed as follows: the missing factors from the expansion of the second number are added to all factors from the expansion of the first number, the missing factors from the expansion of the third number are added to the resulting factors, and so on.

    Let's look at an example of finding the least common multiple using prime factorization.

    Find the least common multiple of the five numbers 84, 6, 48, 7, 143.

    First, we obtain decompositions of these numbers into prime factors: 84=2·2·3·7, 6=2·3, 48=2·2·2·2·3, 7 (7 is a prime number, it coincides with its decomposition into prime factors) and 143=11·13.

    To find the LCM of these numbers, to the factors of the first number 84 (they are 2, 2, 3 and 7), you need to add the missing factors from the expansion of the second number 6. The decomposition of the number 6 does not contain missing factors, since both 2 and 3 are already present in the decomposition of the first number 84. Next, to the factors 2, 2, 3 and 7 we add the missing factors 2 and 2 from the expansion of the third number 48, we get a set of factors 2, 2, 2, 2, 3 and 7. There will be no need to add multipliers to this set in the next step, since 7 is already contained in it. Finally, to the factors 2, 2, 2, 2, 3 and 7 we add the missing factors 11 and 13 from the expansion of the number 143. We get the product 2·2·2·2·3·7·11·13, which is equal to 48,048.

    Therefore, LCM(84, 6, 48, 7, 143)=48,048.

    LCM(84, 6, 48, 7, 143)=48,048 .

    Finding the least common multiple of negative numbers

    Sometimes there are tasks in which you need to find the least common multiple of numbers, among which one, several or all numbers are negative. In these cases, all negative numbers must be replaced by their opposite numbers, and then the LCM of positive numbers must be found. This is the way to find the LCM of negative numbers. For example, LCM(54, −34) = LCM(54, 34) and LCM(−622, −46, −54, −888) = LCM(622, 46, 54, 888) .

    We can do this because the set of multiples of a is the same as the set of multiples of −a (a and −a are opposite numbers). Indeed, let b be some multiple of a, then b is divisible by a, and the concept of divisibility states the existence of an integer q such that b=a·q. But the equality b=(−a)·(−q) will also be true, which, due to the same concept of divisibility, means that b is divisible by −a, that is, b is a multiple of −a. The converse is also true: if b is some multiple of −a, then b is also a multiple of a.

    Find the least common multiple of negative numbers −145 and −45.

    Let's replace the negative numbers −145 and −45 with their opposite numbers 145 and 45. We have LCM(−145, −45) = LCM(145, 45) . Having determined GCD(145, 45)=5 (for example, using the Euclidean algorithm), we calculate GCM(145, 45)=145·45:GCD(145, 45)= 145·45:5=1 305 . Thus, the least common multiple of the negative integers −145 and −45 is 1,305.

    www.cleverstudents.ru

    We continue to study division. IN this lesson we will look at concepts such as GCD And NOC.

    GCD is the greatest common divisor.

    NOC is the least common multiple.

    The topic is quite boring, but you definitely need to understand it. Without understanding this topic, you will not be able to work effectively with fractions, which are a real obstacle in mathematics.

    Greatest common divisor

    Definition. Greatest common divisor of numbers a And b a And b divided without remainder.

    To understand this definition well, let’s substitute for the variables a And b any two numbers, for example, instead of a variable a Let's substitute the number 12, and instead of the variable b number 9. Now let's try to read this definition:

    Greatest common divisor of numbers 12 And 9 is the largest number by which 12 And 9 divided without remainder.

    From the definition it is clear that we are talking about the common divisor of the numbers 12 and 9, and this divisor is the largest of all existing divisors. This greatest common divisor (GCD) needs to be found.

    To find the greatest common divisor of two numbers, three methods are used. The first method is quite labor-intensive, but it allows you to clearly understand the essence of the topic and feel its full meaning.

    The second and third methods are quite simple and make it possible to quickly find a GCD. We will look at all three methods. And which one to use in practice is up to you to choose.

    The first method is to find all possible divisors of two numbers and choose the largest one. Let's look at this method following example: find the greatest common divisor of the numbers 12 and 9.

    First, we will find all possible divisors of the number 12. To do this, we will divide 12 by all divisors in the range from 1 to 12. If the divisor allows us to divide 12 without a remainder, then we will highlight it in blue and make an appropriate explanation in parentheses.

    12: 1 = 12
    (12 is divided by 1 without a remainder, which means 1 is a divisor of the number 12)

    12: 2 = 6
    (12 is divided by 2 without a remainder, which means 2 is a divisor of the number 12)

    12: 3 = 4
    (12 is divided by 3 without a remainder, which means 3 is a divisor of the number 12)

    12: 4 = 3
    (12 is divided by 4 without a remainder, which means 4 is a divisor of the number 12)

    12: 5 = 2 (2 leftover)
    (12 is not divided by 5 without a remainder, which means 5 is not a divisor of the number 12)

    12: 6 = 2
    (12 is divided by 6 without a remainder, which means 6 is a divisor of the number 12)

    12: 7 = 1 (5 leftover)
    (12 is not divided by 7 without a remainder, which means 7 is not a divisor of the number 12)

    12: 8 = 1 (4 leftover)
    (12 is not divided by 8 without a remainder, which means 8 is not a divisor of 12)

    12: 9 = 1 (3 leftover)
    (12 is not divided by 9 without a remainder, which means 9 is not a divisor of the number 12)

    12: 10 = 1 (2 leftover)
    (12 is not divided by 10 without a remainder, which means 10 is not a divisor of the number 12)

    12: 11 = 1 (1 leftover)
    (12 is not divided by 11 without a remainder, which means 11 is not a divisor of 12)

    12: 12 = 1
    (12 is divided by 12 without a remainder, which means 12 is a divisor of the number 12)

    Now let’s find the divisors of the number 9. To do this, check all the divisors from 1 to 9

    9: 1 = 9
    (9 is divided by 1 without a remainder, which means 1 is a divisor of the number 9)

    9: 2 = 4 (1 leftover)
    (9 is not divided by 2 without a remainder, which means 2 is not a divisor of the number 9)

    9: 3 = 3
    (9 is divided by 3 without a remainder, which means 3 is a divisor of the number 9)

    9: 4 = 2 (1 leftover)
    (9 is not divided by 4 without a remainder, which means 4 is not a divisor of the number 9)

    9: 5 = 1 (4 leftover)
    (9 is not divided by 5 without a remainder, which means 5 is not a divisor of the number 9)

    9: 6 = 1 (3 leftover)
    (9 is not divided by 6 without a remainder, which means 6 is not a divisor of the number 9)

    9: 7 = 1 (2 leftover)
    (9 is not divided by 7 without a remainder, which means 7 is not a divisor of the number 9)

    9: 8 = 1 (1 leftover)
    (9 is not divided by 8 without a remainder, which means 8 is not a divisor of the number 9)

    9: 9 = 1
    (9 is divided by 9 without a remainder, which means 9 is a divisor of the number 9)

    Now let's write down the divisors of both numbers. The numbers highlighted in blue are divisors. Let's write them down:

    By writing out the divisors, you can immediately determine which is the largest and most common.

    By definition, the greatest common divisor of the numbers 12 and 9 is the number that divides 12 and 9 without a remainder. The greatest and common divisor of the numbers 12 and 9 is the number 3

    Both the number 12 and the number 9 are divisible by 3 without a remainder:

    So gcd (12 and 9) = 3

    The second way to find GCD

    Now let's look at the second method of finding the greatest common divisor. The essence this method is to factor both numbers into prime factors and multiply the common ones.

    Example 1. Find the gcd of numbers 24 and 18

    First, let's factor both numbers into prime factors:

    Now let's multiply their common factors. To avoid confusion, common factors can be emphasized.

    We look at the expansion of the number 24. Its first factor is 2. We look for the same factor in the expansion of the number 18 and see that it is there too. We emphasize both twos:

    We look again at the expansion of the number 24. Its second factor is also 2. We look for the same factor in the expansion of the number 18 and see that for the second time it is no longer there. Then we don’t emphasize anything.

    The next two in the expansion of the number 24 is also absent in the expansion of the number 18.

    Let's move on to the last factor in the expansion of the number 24. This is factor 3. We look for the same factor in the expansion of the number 18 and see that it is there too. We emphasize both threes:

    So, the common factors of the numbers 24 and 18 are the factors 2 and 3. To get GCD, these factors must be multiplied:

    So gcd (24 and 18) = 6

    The third way to find GCD

    Now let's look at the third way to find the greatest common divisor. The essence of this method is that the numbers to be found for the greatest common divisor are decomposed into prime factors. Then, from the expansion of the first number, factors that are not included in the expansion of the second number are crossed out. The remaining numbers in the first expansion are multiplied and obtained GCD.

    For example, let's find GCD for the numbers 28 and 16 using this method. First of all, we decompose these numbers into prime factors:

    We obtained two expansions: and

    Now from the decomposition of the first number we will delete the factors that are not included in the decomposition of the second number. The expansion of the second number does not include seven. Let’s cross it out from the first expansion:

    Now we multiply the remaining factors and get GCD:

    The number 4 is the greatest common divisor of the numbers 28 and 16. Both of these numbers are divisible by 4 without a remainder:

    Example 2. Find the gcd of numbers 100 and 40

    Factoring the number 100

    Factoring the number 40

    We got two expansions:

    Now from the decomposition of the first number we will delete the factors that are not included in the decomposition of the second number. The expansion of the second number does not include one five (there is only one five). Let’s cross it out from the first expansion

    Let's multiply the remaining numbers:

    We received the answer 20. This means that the number 20 is the greatest common divisor of the numbers 100 and 40. These two numbers are divisible by 20 without a remainder:

    GCD (100 and 40) = 20.

    Example 3. Find the gcd of numbers 72 and 128

    Factoring the number 72

    Factoring the number 128

    2 × 2 × 2 × 2 × 2 × 2 × 2

    Now from the decomposition of the first number we will delete the factors that are not included in the decomposition of the second number. The expansion of the second number does not include two triplets (they are not there at all). Let’s cross them out from the first expansion:

    We received the answer 8. This means that the number 8 is the greatest common divisor of the numbers 72 and 128. These two numbers are divisible by 8 without a remainder:

    GCD (72 and 128) = 8

    Finding GCD for several numbers

    The greatest common divisor can be found for several numbers, not just two. To do this, the numbers to be found for the greatest common divisor are decomposed into prime factors, then the product of the common prime factors of these numbers is found.

    For example, let's find GCD for the numbers 18, 24 and 36

    Let's factorize the number 18

    Let's factorize the number 24

    Let's factorize the number 36

    We got three expansions:

    Now let’s highlight and underline the common factors in these numbers. Common factors must appear in all three numbers:

    We see that the common factors for the numbers 18, 24 and 36 are the factors 2 and 3. Multiplying these factors, we get the gcd we are looking for:

    We received the answer 6. This means that the number 6 is the greatest common divisor of the numbers 18, 24 and 36. These three numbers are divisible by 6 without a remainder:

    GCD (18, 24 and 36) = 6

    Example 2. Find GCD for numbers 12, 24, 36 and 42

    Let's factor each number into prime factors. Then we find the product of the common factors of these numbers.

    Let's factorize the number 12

    Let's factorize the number 42

    We got four expansions:

    Now let’s highlight and underline the common factors in these numbers. Common factors must appear in all four numbers:

    We see that the common factors for the numbers 12, 24, 36, and 42 are the factors of 2 and 3. Multiplying these factors together gives us the gcd we are looking for:

    We received the answer 6. This means that the number 6 is the greatest common divisor of the numbers 12, 24, 36 and 42. These numbers are divisible by 6 without a remainder:

    GCD (12, 24, 36 and 42) = 6

    From the previous lesson we know that if a number is divided by another without a remainder, it is called a multiple of this number.

    It turns out that several numbers can have a common multiple. And now we will be interested in the multiple of two numbers, and it should be as small as possible.

    Definition. Least common multiple (LCM) of numbers a And b- a And b a and number b.

    Definition contains two variables a And b. Let's substitute any two numbers instead of these variables. For example, instead of a variable a Let's substitute the number 9, and instead of the variable b Let's substitute the number 12. Now let's try to read the definition:

    Least common multiple (LCM) of numbers 9 And 12 - This smallest number, which is a multiple 9 And 12 . In other words, this is such a small number that is divisible without a remainder by the number 9 and by number 12 .

    From the definition it is clear that the LCM is the smallest number that is divisible by 9 and 12 without a remainder. This LCM needs to be found.

    To find the least common multiple (LCM), you can use two methods. The first way is that you can write down the first multiples of two numbers, and then choose among these multiples a number that will be common to both numbers and small. Let's apply this method.

    First of all, let's find the first multiples of the number 9. To find the multiples of 9, you need to multiply this nine one by one by numbers from 1 to 9. The resulting answers will be multiples of the number 9. So, let's begin. We will highlight multiples in red:

    Now we find the multiples of the number 12. To do this, we multiply 12 one by one by all numbers 1 to 12.

    But many natural numbers are also divisible by other natural numbers.

    For example:

    The number 12 is divisible by 1, by 2, by 3, by 4, by 6, by 12;

    The number 36 is divisible by 1, by 2, by 3, by 4, by 6, by 12, by 18, by 36.

    The numbers by which the number is divisible by a whole (for 12 these are 1, 2, 3, 4, 6 and 12) are called divisors of numbers. Divisor of a natural number a- is a natural number that divides a given number a without a trace. A natural number that has more than two divisors is called composite. Please note that the numbers 12 and 36 have common factors. These numbers are: 1, 2, 3, 4, 6, 12. The greatest divisor of these numbers is 12.

    Common divisor of two given numbers a And b- this is the number by which both given numbers are divided without remainder a And b. Common divisor of several numbers (GCD) is a number that serves as a divisor for each of them.

    Briefly greatest common divisor of numbers a And b write it like this:

    Example: GCD (12; 36) = 12.

    Divisors of numbers in the solution record are denoted by the capital letter “D”.

    Example:

    GCD (7; 9) = 1

    The numbers 7 and 9 have only one common divisor - the number 1. Such numbers are called mutually primechi slami.

    Coprime numbers- these are natural numbers that have only one common divisor - the number 1. Their gcd is 1.

    Greatest common divisor (GCD), properties.

    • Basic property: greatest common divisor m And n is divisible by any common divisor of these numbers. Example: For numbers 12 and 18, the greatest common divisor is 6; it is divided by all common divisors of these numbers: 1, 2, 3, 6.
    • Corollary 1: set of common divisors m And n coincides with the set of GCD divisors( m, n).
    • Corollary 2: set of common multiples m And n coincides with the set of multiple LCMs ( m, n).

    This means, in particular, that to reduce a fraction to an irreducible form, you need to divide its numerator and denominator by their gcd.

    • Greatest common divisor of numbers m And n can be defined as the smallest positive element of the set of all their linear combinations:

    and therefore represent it as a linear combination of numbers m And n:

    This ratio is called Bezout's relation, and the coefficients u And vBezout coefficients. Bezout coefficients are calculated efficiently by the extended Euclidean algorithm. This statement generalizes to sets of natural numbers - its meaning is that the subgroup of the group generated by the set is cyclic and generated by one element: GCD ( a 1 , a 2 , … , a n).

    Calculate the greatest common divisor (GCD).

    Efficient ways to calculate the gcd of two numbers are Euclidean algorithm And binaryalgorithm. In addition, the value of gcd ( m,n) can be easily calculated if the canonical expansion of numbers is known m And n into prime factors:

    where are distinct prime numbers, and and are non-negative integers (they can be zeros if the corresponding prime is not in the expansion). Then GCD ( m,n) and NOC ( m,n) are expressed by the formulas:

    If there are more than two numbers: , their gcd is found using the following algorithm:

    - this is the desired GCD.

    Also, in order to find greatest common divisor, you can factor each of the given numbers into prime factors. Then write down separately only those factors that are included in all given numbers. Then we multiply the written numbers together - the result of the multiplication is the greatest common divisor .

    Let's look at the calculation of the greatest common divisor step by step:

    1. Decompose the divisors of numbers into prime factors:

    It is convenient to write calculations using a vertical bar. To the left of the line we first write down the dividend, to the right - the divisor. Next, in the left column we write down the values ​​of the quotients. Let's explain it right away with an example. Let's factor the numbers 28 and 64 into prime factors.

    2. We emphasize the same prime factors in both numbers:

    28 = 2 . 2 . 7

    64 = 2 . 2 . 2 . 2 . 2 . 2

    3. Find the product of identical prime factors and write down the answer:

    gcd (28; 64) = 2. 2 = 4

    Answer: GCD (28; 64) = 4

    You can formalize the location of the GCD in two ways: in a column (as done above) or “in a row”.

    The first way to write GCD:

    Find gcd 48 and 36.

    GCD (48; 36) = 2. 2. 3 = 12

    The second way to write GCD:

    Now let's write down the solution to the GCD search in a line. Find gcd 10 and 15.

    D (10) = (1, 2, 5, 10)

    D (15) = (1, 3, 5, 15)

    D (10, 15) = (1, 5)