The greatest common divisor of a set of integers is the largest number that divides each integer in the set. We denote the greatest common divisor by gcd(a,b,…). We can attempt to find this value by listing all divisors of the integers and finding the largest divisor. However, such a procedure can get tedious.
If we know the prime factorization, then there is a simpler approach. If the prime factorizations of a and b are
ab=p1α1p2α2…pkαk,=p1β1p2β2…pkβk,
then the GCD of the numbers is equal to
gcd(a,b)=p1min(α1,β1)p2min(α2,β2)…pkmin(αk,βk).
A similar formula holds for finding the GCD of several integers, by taking the smallest exponent for each prime.
Similarly, the least common multiple of a set of integers is the smallest (positive) number which is a multiple of each integer in the set. We denote this value as lcm(a,b,…). We can attempt to find this value by listing all multiples of the integers in the set, and then finding the one which is the smallest.
However, as above, if we know the prime factorization, then computing the least common multiple is much simpler:
lcm(a,b)=p1max(α1,β1)p2max(α2,β2)…pkmax(αk,βk).
Note: Another approach to find the GCD of 2 numbers is through the Euclidean Algorithm.
Worked Examples
1. Show that the GCD of 2 numbers is indeed equal to
G=p1min(α1,β1)p2min(α2,β2)…pnmin(αn,βn).
Solution: Clearly, G is a divisor of both a and b, and so G≤gcd(a,b).
We will now show that there is no greater common divisor, by considering the prime factorization of gcd(a,b). Any prime divisor of gcd(a,b) is also a prime divisor of a and b. Hence, it is sufficient for us to simply consider the primes that divide a or b.
Given any prime pi that divides a or b, let piαi and piβi be the largest powers of p that divide a and b respectively. Note that we could have αi,βi=0. Clearly, pmin(αi,βi)∣a
and pmin(αi,βi)∣b, hence pmin(αi,βi)∣gcd(a,b). Furthermore, since pmin(αi,βi)+1 does not divide either a or b by construction, thus pmin(αi,βi)+1 does not divide gcd(a,b). Hence, gcd(a,b)≤G.
As such, we have gcd(a,b)=G.
Note: You can use a similar method to prove the claim for lcm(a,b).
2. Show that gcd(a,b)×lcm(a,b)=a×b.
First, we show that m+n=min(m,n)+max(m,n). Without loss of generality, n≤m. Hence, min(m,n)=n and max(m,n)=m, thus m+n=min(m,n)+max(m,n).
Applying this to each of the pairs m=αi,n=βi, we get that
a×b=i=1∏kpiαi+βi=i=1∏kpimin(αi,βi)+max(αi,βi)=gcd(a,b)×lcm(a,b).
3. Given that a and b are 2 integers such that 13gcd(a,b)=lcm(a,b) and a+b=2016, what are the values of a and b?
Let G=gcd(a,b) and L=lcm(a,b).
Let a=a∗G and b=b∗G where gcd(a∗,b∗)=1 by construction.
Since (a∗G)×(b∗G)=ab=GL=G×13G, we get that a∗b∗=13. Hence, we have {a∗,b∗}={1,13}. WLOG, we may assume that a≤b, and thus a=G,b=13G.
Since 2016=a+b=G+13G=14G, thus G=142016=144. Thus, {a,b}={144,1872}.
#NumberTheory
#GreatestCommonDivisor(GCD/HCF/GCF)
#KeyTechniques
Easy Math Editor
This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.
When posting on Brilliant:
*italics*
or_italics_
**bold**
or__bold__
paragraph 1
paragraph 2
[example link](https://brilliant.org)
> This is a quote
\(
...\)
or\[
...\]
to ensure proper formatting.2 \times 3
2^{34}
a_{i-1}
\frac{2}{3}
\sqrt{2}
\sum_{i=1}^3
\sin \theta
\boxed{123}
Comments
From where do you get so much information???
Log in to reply
Books. E.g. Introduction to number theory by CJ Bradley (from UKMT) or Elementary Number Theory by Jones (yellow book).
@Arron Kau What is the least lcm of n numbers adding upto m. Do we have a subjective approach for it?
thanks.............