Euclid’s lemma
We are given two numbers x and y. We know that a number p divides their product. Can we say for sure that p also divides one of them?
The answer is no. For example, consider x = 15, y = 6 and p = 9. p divides the product 15*6, but doesn’t divide any of them.
What if p is prime?
Euclid’s lemma states that if a prime p divides the product of two numbers (x*y), it must divide at least one of those numbers.
For example x = 15, y = 6 and p = 5. p divides the product 15*6, it also divides 15.
The idea is simple, since p is prime, it cannot be factorized. So it must either be completely present in x or in y.
Generalization of Euclid’s lemma:
If p divides x*y and p is relatively prime to x, then p must divide y. In the above example, 5 is relatively prime to 6, therefore it must divide 15.
Reference:
https://en.wikipedia.org/wiki/Euclid’s_lemma
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Recommended Posts:
- Count of integers in a range which have even number of odd digits and odd number of even digits
- Print all the permutation of length L using the elements of an array | Iterative
- Sum of N terms in the expansion of Arcsin(x)
- Minimize the cost of buying the Objects
- Count of all possible pairs of disjoint subsets of integers from 1 to N
- Right most non-zero digit in multiplication of array elements
- Find the remainder when First digit of a number is divided by its Last digit
- Find the remaining balance after the transaction
- Count of integers that divide all the elements of the given array
- Count number of ways to get Odd Sum
- Percentage increase in the volume of cuboid if length, breadth and height are increased by fixed percentages
- Count the number of occurrences of a particular digit in a number
- Find number of factors of N when location of its two factors whose product is N is given
- Square free semiprimes in a given range using C++ STL



