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,) \gcd(a, b, \ldots) . 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 aa and bb are

a=p1α1p2α2pkαk,b=p1β1p2β2pkβk,\begin{aligned} a & = p_1 ^{\alpha_1} p_2 ^{\alpha_2} \ldots p_k ^{\alpha_k}, \\ b & = p_1 ^{\beta_1} p_2 ^ {\beta_2} \ldots p_k ^ {\beta_k}, \\ \end{aligned}

then the GCD of the numbers is equal to

gcd(a,b)=p1min(α1,β1)p2min(α2,β2)pkmin(αk,βk). \gcd(a,b) = p_1 ^{\min(\alpha_1, \beta_1)} p_2 ^{\min(\alpha_2, \beta_2)} \ldots p_k ^{\min(\alpha_k, \beta_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,) \mbox{lcm}(a, b, \ldots). 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). \mbox{lcm}(a,b) = p_1 ^{\max(\alpha_1, \beta_1)} p_2 ^{\max(\alpha_2, \beta_2)} \ldots p_k ^{\max(\alpha_k, \beta_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). G = p_1 ^{\min(\alpha_1, \beta_1)} p_2 ^{\min(\alpha_2, \beta_2)} \ldots p_n ^{\min(\alpha_n, \beta_n)} .

Solution: Clearly, GG is a divisor of both aa and bb, and so Ggcd(a,b) G \leq \gcd(a,b) .

We will now show that there is no greater common divisor, by considering the prime factorization of gcd(a,b)\gcd(a,b) . Any prime divisor of gcd(a,b)\gcd(a,b) is also a prime divisor of aa and bb. Hence, it is sufficient for us to simply consider the primes that divide aa or bb.

Given any prime pip_i that divides aa or bb, let piαi p_i ^ {\alpha_i} and piβip_i ^{\beta_i} be the largest powers of pp that divide aa and bb respectively. Note that we could have αi,βi=0 \alpha_i, \beta_i = 0. Clearly, pmin(αi,βi)a p^{\min(\alpha_i, \beta_i) } \mid a and pmin(αi,βi)b p^{\min(\alpha_i, \beta_i) } \mid b , hence pmin(αi,βi)gcd(a,b) p^{\min(\alpha_i, \beta_i) } \mid \gcd(a,b) . Furthermore, since pmin(αi,βi)+1 p^{\min(\alpha_i, \beta_i) +1 } does not divide either aa or bb by construction, thus pmin(αi,βi)+1 p^{\min(\alpha_i, \beta_i) +1 } does not divide gcd(a,b) \gcd(a,b) . Hence, gcd(a,b)G \gcd (a,b) \leq G .

As such, we have gcd(a,b)=G \gcd(a,b) = G.

Note: You can use a similar method to prove the claim for lcm(a,b)\mbox{lcm}(a,b) .


2. Show that gcd(a,b)×lcm(a,b)=a×b \gcd(a,b) \times \mbox{lcm}(a,b) = a \times b .

First, we show that m+n=min(m,n)+max(m,n) m+ n = \min(m,n) + \max (m,n) . Without loss of generality, nmn\leq m. Hence, min(m,n)=n \min (m,n) = n and max(m,n)=m \max(m,n) = m , thus m+n=min(m,n)+max(m,n) m + n = \min(m,n) + \max (m,n) .

Applying this to each of the pairs m=αi,n=βi m = \alpha_i, n = \beta _i , we get that

a×b=i=1kpiαi+βi=i=1kpimin(αi,βi)+max(αi,βi)=gcd(a,b)×lcm(a,b). a \times b = \prod_{i=1}^k p_i ^{\alpha_i + \beta_i } = \prod_{i=1}^k p_i ^ { \min(\alpha_i, \beta_i) + \max(\alpha_i , \beta_i)} = \gcd(a,b) \times \mbox{lcm}(a,b).


3. Given that aa and bb are 2 integers such that 13gcd(a,b)=lcm(a,b) 13 \gcd(a,b) = \mbox{lcm}(a,b) and a+b=2016 a + b = 2016, what are the values of aa and bb?

Let G=gcd(a,b) G = \gcd(a,b) and L=lcm(a,b) L = \mbox{lcm}(a,b).
Let a=aG a = a^* G and b=bG b = b^* G where gcd(a,b)=1 \gcd(a^*, b^*) = 1 by construction. Since (aG)×(bG)=ab=GL=G×13G (a^*G)\times (b^*G) = ab = GL = G \times 13 G , we get that ab=13 a^* b^* = 13 . Hence, we have {a,b}={1,13} \{ a^*, b^* \} = \{ 1, 13\} . WLOG, we may assume that aba\leq b, and thus a=G,b=13G a = G, b = 13 G .

Since 2016=a+b=G+13G=14G 2016 = a + b = G + 13G = 14 G , thus G=201614=144G = \frac{2016} { 14} = 144 . Thus, {a,b}={144,1872} \{a, b\} = \{ 144, 1872 \} .

Note by Arron Kau
7 years, 4 months ago

No vote yet
1 vote

  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:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}


Sort by:

Top Newest

From where do you get so much information???

Anuj Shikarkhane - 7 years ago

Log in to reply

Books. E.g. Introduction to number theory by CJ Bradley (from UKMT) or Elementary Number Theory by Jones (yellow book).

Curtis Clement - 6 years, 8 months ago

Log in to reply

@Arron Kau What is the least lcm\normalsize lcm of nn numbers adding upto mm. Do we have a subjective approach for it?

Satvik Golechha - 7 years ago

Log in to reply


Shatrughna Kumar - 7 years ago

Log in to reply


Problem Loading...

Note Loading...

Set Loading...