Online calculator. Finding (calculating) GCD and LCM. How to find the least common multiple of numbers


Let's look at three ways to find the least common multiple.

Finding by factorization

The first method is to find the least common multiple by factoring the given numbers into prime factors.

Let's say we need to find the LCM of the numbers: 99, 30 and 28. To do this, let's factor each of these numbers into prime factors:

For the desired number to be divisible by 99, 30 and 28, it is necessary and sufficient that it includes all the prime factors of these divisors. To do this, we need to take all the prime factors of these numbers to the greatest possible power and multiply them together:

2 2 3 2 5 7 11 = 13,860

Thus, LCM (99, 30, 28) = 13,860. No other number less than 13,860 is divisible by 99, 30, or 28.

To find the least common multiple of given numbers, you factor them into their prime factors, then take each prime factor with the largest exponent it appears in, and multiply those factors together.

Since relatively prime numbers do not have common prime factors, their least common multiple is equal to the product of these numbers. For example, three numbers: 20, 49 and 33 are relatively prime. That's why

LCM (20, 49, 33) = 20 49 33 = 32,340.

The same must be done when finding the least common multiple of different prime numbers. For example, LCM (3, 7, 11) = 3 7 11 = 231.

Finding by selection

The second method is to find the least common multiple by selection.

Example 1. When the largest of given numbers is divided by another given number, then the LCM of these numbers is equal to the largest of them. For example, given four numbers: 60, 30, 10 and 6. Each of them is divisible by 60, therefore:

LCM(60, 30, 10, 6) = 60

In other cases, to find the least common multiple, the following procedure is used:

  1. Determine the largest number from the given numbers.
  2. Next, we find the numbers that are multiples of the largest number by multiplying it by natural numbers in increasing order and checking whether the resulting product is divisible by the remaining given numbers.

Example 2. Given three numbers 24, 3 and 18. We determine the largest of them - this is the number 24. Next, we find the numbers that are multiples of 24, checking whether each of them is divisible by 18 and 3:

24 · 1 = 24 - divisible by 3, but not divisible by 18.

24 · 2 = 48 - divisible by 3, but not divisible by 18.

24 · 3 = 72 - divisible by 3 and 18.

Thus, LCM (24, 3, 18) = 72.

Finding by sequentially finding the LCM

The third method is to find the least common multiple by sequentially finding the LCM.

The LCM of two given numbers is equal to the product of these numbers divided by their largest common divisor.

Example 1. Find the LCM of two given numbers: 12 and 8. Determine their greatest common divisor: GCD (12, 8) = 4. Multiply these numbers:

We divide the product by their gcd:

Thus, LCM (12, 8) = 24.

To find the LCM of three or more numbers, use the following procedure:

  1. First, find the LCM of any two of these numbers.
  2. Then, the LCM of the found least common multiple and the third given number.
  3. Then, the LCM of the resulting least common multiple and the fourth number, etc.
  4. Thus, the search for LCM continues as long as there are numbers.

Example 2. Let's find the LCM of three given numbers: 12, 8 and 9. We already found the LCM of the numbers 12 and 8 in the previous example (this is the number 24). It remains to find the least common multiple of the number 24 and the third given number - 9. Determine their greatest common divisor: GCD (24, 9) = 3. Multiply the LCM with the number 9:

We divide the product by their gcd:

Thus, LCM (12, 8, 9) = 72.

Greatest common divisor

Definition 2

If a natural number a is divisible by a natural number $b$, then $b$ is called a divisor of $a$, and $a$ is called a multiple of $b$.

Let $a$ and $b$ be natural numbers. The number $c$ is called the common divisor of both $a$ and $b$.

The set of common divisors of the numbers $a$ and $b$ is finite, since none of these divisors can be greater than $a$. This means that among these divisors there is a largest one, which is called the greatest common divisor of the numbers $a$ and $b$ and is denoted by the following notation:

$GCD\(a;b)\ or \D\(a;b)$

To find the greatest common divisor of two numbers you need:

  1. Find the product of the numbers found in step 2. The resulting number will be the desired greatest common divisor.

Example 1

Find the gcd of the numbers $121$ and $132.$

    $242=2\cdot 11\cdot 11$

    $132=2\cdot 2\cdot 3\cdot 11$

    Choose the numbers that are included in the expansion of these numbers

    $242=2\cdot 11\cdot 11$

    $132=2\cdot 2\cdot 3\cdot 11$

    Find the product of the numbers found in step 2. The resulting number will be the desired greatest common divisor.

    $GCD=2\cdot 11=22$

Example 2

Find the gcd of the monomials $63$ and $81$.

We will find according to the presented algorithm. For this:

    Let's factor the numbers into prime factors

    $63=3\cdot 3\cdot 7$

    $81=3\cdot 3\cdot 3\cdot 3$

    We choose the numbers that are included in the expansion of these numbers

    $63=3\cdot 3\cdot 7$

    $81=3\cdot 3\cdot 3\cdot 3$

    Let's find the product of the numbers found in step 2. The resulting number will be the desired greatest common divisor.

    $GCD=3\cdot 3=9$

You can find the gcd of two numbers in another way, using a set of divisors of numbers.

Example 3

Find the gcd of the numbers $48$ and $60$.

Solution:

Let's find the set of divisors of the number $48$: $\left\((\rm 1,2,3.4.6,8,12,16,24,48)\right\)$

Now let's find the set of divisors of the number $60$:$\ \left\((\rm 1,2,3,4,5,6,10,12,15,20,30,60)\right\)$

Let's find the intersection of these sets: $\left\((\rm 1,2,3,4,6,12)\right\)$ - this set will determine the set of common divisors of the numbers $48$ and $60$. The largest element in this set will be the number $12$. This means that the greatest common divisor of the numbers $48$ and $60$ is $12$.

Definition of NPL

Definition 3

Common multiples natural numbers $a$ and $b$ is a natural number that is a multiple of both $a$ and $b$.

Common multiples of numbers are numbers that are divisible by the original numbers without a remainder. For example, for the numbers $25$ and $50$, the common multiples will be the numbers $50,100,150,200$, etc.

The smallest common multiple will be called the least common multiple and will be denoted LCM$(a;b)$ or K$(a;b).$

To find the LCM of two numbers, you need to:

  1. Factor numbers into prime factors
  2. Write down the factors that are part of the first number and add to them the factors that are part of the second and are not part of the first

Example 4

Find the LCM of the numbers $99$ and $77$.

We will find according to the presented algorithm. For this

    Factor numbers into prime factors

    $99=3\cdot 3\cdot 11$

    Write down the factors included in the first

    add to them multipliers that are part of the second and not part of the first

    Find the product of the numbers found in step 2. The resulting number will be the desired least common multiple

    $NOK=3\cdot 3\cdot 11\cdot 7=693$

    Compiling lists of divisors of numbers is often a very labor-intensive task. There is a way to find GCD called the Euclidean algorithm.

    Statements on which the Euclidean algorithm is based:

    If $a$ and $b$ are natural numbers, and $a\vdots b$, then $D(a;b)=b$

    If $a$ and $b$ are natural numbers such that $b

Using $D(a;b)= D(a-b;b)$, we can successively reduce the numbers under consideration until we reach a pair of numbers such that one of them is divisible by the other. Then the smaller of these numbers will be the desired greatest common divisor for the numbers $a$ and $b$.

Properties of GCD and LCM

  1. Any common multiple of $a$ and $b$ is divisible by K$(a;b)$
  2. If $a\vdots b$ , then К$(a;b)=a$
  3. If K$(a;b)=k$ and $m$ is a natural number, then K$(am;bm)=km$

    If $d$ is a common divisor for $a$ and $b$, then K($\frac(a)(d);\frac(b)(d)$)=$\ \frac(k)(d) $

    If $a\vdots c$ and $b\vdots c$ , then $\frac(ab)(c)$ is the common multiple of $a$ and $b$

    For any natural numbers $a$ and $b$ the equality holds

    $D(a;b)\cdot К(a;b)=ab$

    Any common divisor of the numbers $a$ and $b$ is a divisor of the number $D(a;b)$

Mathematical expressions and problems require a lot of additional knowledge. NOC is one of the main ones, especially often used in The topic is studied in high school, and it is not particularly difficult to understand material; a person familiar with powers and the multiplication table will not have difficulty identifying the necessary numbers and discovering the result.

Definition

A common multiple is a number that can be completely divided into two numbers at the same time (a and b). Most often, this number is obtained by multiplying the original numbers a and b. The number must be divisible by both numbers at once, without deviations.

NOC is the short name adopted for the designation, collected from the first letters.

Ways to get a number

The method of multiplying numbers is not always suitable for finding the LCM; it is much better suited for simple single-digit or two-digit numbers. It is customary to divide into factors; the larger the number, the more factors there will be.

Example #1

For the simplest example, schools usually use prime, single- or double-digit numbers. For example, you need to solve the following task, find the least common multiple of the numbers 7 and 3, the solution is quite simple, just multiply them. As a result, there is a number 21, there is simply no smaller number.

Example No. 2

The second version of the task is much more difficult. The numbers 300 and 1260 are given, finding the LOC is mandatory. To solve the problem, the following actions are assumed:

Decomposition of the first and second numbers into simple factors. 300 = 2 2 * 3 * 5 2 ; 1260 = 2 2 * 3 2 *5 *7. The first stage is completed.

The second stage involves working with already obtained data. Each of the numbers received must participate in calculating the final result. For each factor, the largest number of occurrences is taken from the original numbers. NOC is total number, therefore, the factors from the numbers must be repeated in it, every single one, even those that are present in one copy. Both initial numbers contain the numbers 2, 3 and 5, in different degrees, 7 is present in only one case.

To calculate the final result, you need to take each number in the largest of the powers represented into the equation. All that remains is to multiply and get the answer; if filled out correctly, the task fits into two steps without explanation:

1) 300 = 2 2 * 3 * 5 2 ; 1260 = 2 2 * 3 2 *5 *7.

2) NOC = 6300.

That’s the whole problem, if you try to calculate the required number by multiplication, then the answer will definitely not be correct, since 300 * 1260 = 378,000.

Examination:

6300 / 300 = 21 - correct;

6300 / 1260 = 5 - correct.

The correctness of the result obtained is determined by checking - dividing the LCM by both original numbers; if the number is an integer in both cases, then the answer is correct.

What does NOC mean in mathematics?

As you know, there is not a single useless function in mathematics, this one is no exception. The most common purpose of this number is to reduce fractions to a common denominator. What is usually studied in grades 5-6 of secondary school. It is also additionally a common divisor for all multiples, if such conditions are present in the problem. A similar expression can find multiples not only of two numbers, but also of much larger numbers - three, five, and so on. The more numbers, the more actions in the task, but this does not increase the complexity.

For example, given the numbers 250, 600 and 1500, you need to find their common LCM:

1) 250 = 25 * 10 = 5 2 *5 * 2 = 5 3 * 2 - this example describes factorization in detail, without reduction.

2) 600 = 60 * 10 = 3 * 2 3 *5 2 ;

3) 1500 = 15 * 100 = 33 * 5 3 *2 2 ;

In order to compose an expression, it is necessary to mention all the factors, in this case 2, 5, 3 are given - for all these numbers it is necessary to determine the maximum degree.

Attention: all factors must be brought to full simplification, if possible, decomposed to the single-digit level.

Examination:

1) 3000 / 250 = 12 - correct;

2) 3000 / 600 = 5 - true;

3) 3000 / 1500 = 2 - correct.

This method does not require any tricks or genius level abilities, everything is simple and clear.

Another way

In mathematics, many things are connected, many things can be solved in two or more ways, the same goes for finding the least common multiple, LCM. The following method can be used in the case of simple two-digit and single digit numbers. A table is compiled into which the multiplicand is entered vertically, the multiplier horizontally, and the product is indicated in the intersecting cells of the column. You can reflect the table using a line, take a number and write down the results of multiplying this number by integers, from 1 to infinity, sometimes 3-5 points are enough, the second and subsequent numbers undergo the same computational process. Everything happens until a common multiple is found.

Given the numbers 30, 35, 42, you need to find the LCM connecting all the numbers:

1) Multiples of 30: 60, 90, 120, 150, 180, 210, 250, etc.

2) Multiples of 35: 70, 105, 140, 175, 210, 245, etc.

3) Multiples of 42: 84, 126, 168, 210, 252, etc.

It is noticeable that all the numbers are quite different, the only common number among them is 210, so it will be the NOC. Among the processes involved in this calculation there is also a greatest common divisor, which is calculated according to similar principles and is often encountered in neighboring problems. The difference is small, but quite significant, LCM involves calculating the number that is divided by all given initial values, and GCD involves calculating the largest value by which the original numbers are divided.

Let's continue the conversation about the least common multiple, which we started in the section “LCM - least common multiple, definition, examples.” In this topic, we will look at ways to find the LCM for three or more numbers, and we will look at the question of how to find the LCM of a negative number.

Yandex.RTB R-A-339285-1

Calculating Least Common Multiple (LCM) via GCD

We have already established the relationship between the least common multiple and the greatest common divisor. Now let's learn how to determine the LCM through GCD. First, let's figure out how to do this for positive numbers.

Definition 1

You can find the least common multiple through the greatest common divisor using the formula LCM (a, b) = a · b: GCD (a, b).

Example 1

You need to find the LCM of the numbers 126 and 70.

Solution

Let's take a = 126, b = 70. Let's substitute the values ​​into the formula for calculating the least common multiple through the greatest common divisor LCM (a, b) = a · b: GCD (a, b) .

Finds the gcd of numbers 70 and 126. For this we need the Euclidean algorithm: 126 = 70 1 + 56, 70 = 56 1 + 14, 56 = 14 4, therefore GCD (126 , 70) = 14 .

Let's calculate the LCM: LCD (126, 70) = 126 70: GCD (126, 70) = 126 70: 14 = 630.

Answer: LCM(126, 70) = 630.

Example 2

Find the number 68 and 34.

Solution

GCD in this case is not difficult to find, since 68 is divisible by 34. Let's calculate the least common multiple using the formula: LCM (68, 34) = 68 34: GCD (68, 34) = 68 34: 34 = 68.

Answer: LCM(68, 34) = 68.

In this example, we used the rule for finding the least common multiple of positive integers a and b: if the first number is divisible by the second, the LCM of those numbers will be equal to the first number.

Finding the LCM by factoring numbers into prime factors

Now let's look at the method of finding the LCM, which is based on factoring numbers into prime factors.

Definition 2

To find the least common multiple, we need to perform a number of simple steps:

  • we compose the product of all prime factors of the numbers for which we need to find the LCM;
  • we exclude all prime factors from their resulting products;
  • the product obtained after eliminating the common prime factors will be equal to the LCM of the given numbers.

This method of finding the least common multiple is based on the equality LCM (a, b) = a · b: GCD (a, b). If you look at the formula, it will become clear: the product of the numbers a and b is equal to the product of all the factors that participate in the decomposition of these two numbers. In this case, the gcd of two numbers equal to the product all prime factors that are simultaneously present in the factorizations of given two numbers.

Example 3

We have two numbers 75 and 210. We can factor them as follows: 75 = 3 5 5 And 210 = 2 3 5 7. If you compose the product of all the factors of the two original numbers, you get: 2 3 3 5 5 5 7.

If we exclude the factors common to both numbers 3 and 5, we get a product of the following form: 2 3 5 5 7 = 1050. This product will be our LCM for the numbers 75 and 210.

Example 4

Find the LCM of numbers 441 And 700 , factoring both numbers into prime factors.

Solution

Let's find all the prime factors of the numbers given in the condition:

441 147 49 7 1 3 3 7 7

700 350 175 35 7 1 2 2 5 5 7

We get two chains of numbers: 441 = 3 3 7 7 and 700 = 2 2 5 5 7.

The product of all factors that participated in the decomposition of these numbers will have the form: 2 2 3 3 5 5 7 7 7. Let's find common factors. This is the number 7. Let's exclude it from the total product: 2 2 3 3 5 5 7 7. It turns out that NOC (441, 700) = 2 2 3 3 5 5 7 7 = 44 100.

Answer: LOC(441, 700) = 44,100.

Let us give another formulation of the method for finding the LCM by decomposing numbers into prime factors.

Definition 3

Previously, we excluded from the total number of factors common to both numbers. Now we will do it differently:

  • Let's factor both numbers into prime factors:
  • add to the product of the prime factors of the first number the missing factors of the second number;
  • we obtain the product, which will be the desired LCM of two numbers.

Example 5

Let's return to the numbers 75 and 210, for which we already looked for the LCM in one of the previous examples. Let's break them down into simple factors: 75 = 3 5 5 And 210 = 2 3 5 7. To the product of factors 3, 5 and 5 numbers 75 add the missing factors 2 And 7 numbers 210. We get: 2 · 3 · 5 · 5 · 7 . This is the LCM of the numbers 75 and 210.

Example 6

It is necessary to calculate the LCM of the numbers 84 and 648.

Solution

Let's factor the numbers from the condition into simple factors: 84 = 2 2 3 7 And 648 = 2 2 2 3 3 3 3. Let's add to the product the factors 2, 2, 3 and 7 numbers 84 missing factors 2, 3, 3 and
3 numbers 648. We get the product 2 2 2 3 3 3 3 7 = 4536. This is the least common multiple of 84 and 648.

Answer: LCM(84, 648) = 4,536.

Finding the LCM of three or more numbers

Regardless of how many numbers we are dealing with, the algorithm of our actions will always be the same: we will sequentially find the LCM of two numbers. There is a theorem for this case.

Theorem 1

Let's assume we have integers a 1 , a 2 , … , a k. NOC m k these numbers are 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).

Now let's look at how the theorem can be applied to solve specific problems.

Example 7

You need to calculate the least common multiple of four numbers 140, 9, 54 and 250 .

Solution

Let us introduce the notation: a 1 = 140, a 2 = 9, a 3 = 54, a 4 = 250.

Let's start by calculating m 2 = LCM (a 1 , a 2) = LCM (140, 9). Let's apply the Euclidean algorithm to calculate the GCD of the numbers 140 and 9: 140 = 9 15 + 5, 9 = 5 1 + 4, 5 = 4 1 + 1, 4 = 1 4. We get: GCD (140, 9) = 1, GCD (140, 9) = 140 9: GCD (140, 9) = 140 9: 1 = 1,260. Therefore, m 2 = 1,260.

Now let’s calculate using the same algorithm m 3 = LCM (m 2 , a 3) = LCM (1 260, 54). During the calculations we obtain m 3 = 3 780.

We just have to calculate m 4 = LCM (m 3 , a 4) = LCM (3 780, 250). We follow the same algorithm. We get m 4 = 94 500.

The LCM of the four numbers from the example condition is 94500.

Answer: NOC (140, 9, 54, 250) = 94,500.

As you can see, the calculations are simple, but quite labor-intensive. To save time, you can go another way.

Definition 4

We offer you the following algorithm of actions:

  • we decompose all numbers into prime factors;
  • to the product of the factors of the first number we add the missing factors from the product of the second number;
  • to the product obtained at the previous stage we add the missing factors of the third number, etc.;
  • the resulting product will be the least common multiple of all numbers from the condition.

Example 8

You need to find the LCM of five numbers 84, 6, 48, 7, 143.

Solution

Let's factor all five numbers into prime factors: 84 = 2 2 3 7, 6 = 2 3, 48 = 2 2 2 2 3, 7, 143 = 11 13. Prime numbers, which is the number 7, cannot be factored into prime factors. Such numbers coincide with their decomposition into prime factors.

Now let's take the product of the prime factors 2, 2, 3 and 7 of the number 84 and add to them the missing factors of the second number. We decomposed the number 6 into 2 and 3. These factors are already in the product of the first number. Therefore, we omit them.

We continue to add the missing multipliers. Let's move on to the number 48, from the product of whose prime factors we take 2 and 2. Then we add the prime factor of 7 from the fourth number and the factors of 11 and 13 of the fifth. We get: 2 2 2 2 3 7 11 13 = 48,048. This is the least common multiple of the original five numbers.

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

Finding the least common multiple of negative numbers

To find the least common multiple negative numbers, these numbers must first be replaced with numbers with the opposite sign, and then the calculations must be carried out using the above algorithms.

Example 9

LCM (54, − 34) = LCM (54, 34) and LCM (− 622, − 46, − 54, − 888) = LCM (622, 46, 54, 888).

Such actions are permissible due to the fact that if we accept that a And − a– opposite numbers,
then the set of multiples of a number a matches the set of multiples of a number − a.

Example 10

It is necessary to calculate the LCM of negative numbers − 145 And − 45 .

Solution

Let's replace the numbers − 145 And − 45 to their opposite numbers 145 And 45 . Now, using the algorithm, we calculate the LCM (145, 45) = 145 45: GCD (145, 45) = 145 45: 5 = 1 305, having previously determined the GCD using the Euclidean algorithm.

We get that the LCM of the numbers is − 145 and − 45 equals 1 305 .

Answer: LCM (− 145, − 45) = 1,305.

If you notice an error in the text, please highlight it and press Ctrl+Enter

To understand how to calculate the LCM, you must first determine the meaning of the term “multiple”.


A multiple of A is a natural number that is divisible by A without a remainder. Thus, numbers that are multiples of 5 can be considered 15, 20, 25, and so on.


There can be a limited number of divisors of a particular number, but there are an infinite number of multiples.


A common multiple of natural numbers is a number that is divisible by them without leaving a remainder.

How to find the least common multiple of numbers

The least common multiple (LCM) of numbers (two, three or more) is the smallest natural number that is divisible by all these numbers.


To find the LOC, you can use several methods.


For small numbers, it is convenient to write down all the multiples of these numbers on a line until you find something common among them. Multiples are denoted by the capital letter K.


For example, multiples of 4 can be written like this:


K (4) = (8,12, 16, 20, 24, ...)


K (6) = (12, 18, 24, ...)


Thus, you can see that the least common multiple of the numbers 4 and 6 is the number 24. This notation is done as follows:


LCM(4, 6) = 24


If the numbers are large, find the common multiple of three or more numbers, then it is better to use another method of calculating the LCM.


To complete the task, you need to factor the given numbers into prime factors.


First you need to write down the decomposition of the largest number on a line, and below it - the rest.


In the expansion of each number there may be different quantity multipliers.


For example, let's factor the numbers 50 and 20 into prime factors.




In the expansion of the smaller number, it is necessary to emphasize the factors that are absent in the expansion of the first one. large number, and then add them to it. In the example presented, a two is missing.


Now you can calculate the least common multiple of 20 and 50.


LCM(20, 50) = 2 * 5 * 5 * 2 = 100


So, the product of prime factors more and the factors of the second number that were not included in the expansion of the larger number will be the least common multiple.


To find the LCM of three or more numbers, you should factor them all into prime factors, as in the previous case.


As an example, you can find the least common multiple of the numbers 16, 24, 36.


36 = 2 * 2 * 3 * 3


24 = 2 * 2 * 2 * 3


16 = 2 * 2 * 2 * 2


Thus, only two twos from the expansion of sixteen were not included in the factorization of a larger number (one is in the expansion of twenty-four).


Thus, they need to be added to the expansion of a larger number.


LCM(12, 16, 36) = 2 * 2 * 3 * 3 * 2 * 2 = 9


There are special cases of determining the least common multiple. So, if one of the numbers can be divided without a remainder by another, then the larger of these numbers will be the least common multiple.


For example, the LCM of twelve and twenty-four is twenty-four.


If it is necessary to find the least common multiple of coprime numbers that do not have identical divisors, then their LCM will be equal to their product.


For example, LCM (10, 11) = 110.