Questions tagged [gcd-and-lcm]

For questions related to gcd (greatest common divisor, also known as the hcf, the highest common factor), lcm (least common multiple), and related concepts from integer and ring theory.

The greatest common divisor (also known as highest common factor) of two or more integers is the largest integer that divides all of them. It may be computed using the Euclidean algorithm.

Bézout's identity states that for non-zero integers $a$ and $b$ there exist integers $x$ and $y$ with $ax+by=\gcd(a,b)$.


If $a, b \in \mathbb{N}$, write $a \mid b$ if $a$ divides $b$, i.e. there is $k \in \mathbb{N}$ such that $b = ka$.

The least (or lowest) common multiple of $a_1, \dots, a_k \in \mathbb{N}$ is the smallest positive integer $N$ such that $a_i \mid N$ for $i = 1, \dots, k$. We usually denote $N$ by $\operatorname{lcm}(a_1, \dots, a_k)$. Note that $\operatorname{lcm}(a_1, \dots, a_k)$ can be defined recursively from a binary definition. That is,

$$\operatorname{lcm}(a_1, \dots, a_k) = \operatorname{lcm}(\operatorname{lcm}(\dots\operatorname{lcm}(\operatorname{lcm}(a_1, a_2), a_3), \dots, a_{k-1}), a_k).$$

If $a, b \in \mathbb{N}$ and $a = p_1^{r_1}\dots p_m^{r_m}$, $b = p_1^{s_1}\dots p_m^{s_n}$ are their prime decompositions (where some of the $r_i$ and $s_j$ can be zero), we have

$$\operatorname{lcm}(a, b) = p_1^{\max(r_1, s_1)}\dots\ p_m^{\max(r_m, s_m)}.$$

Note that $\operatorname{lcm}(a, b)\operatorname{gcd}(a, b) = ab$.


These notions can be generalised to any commutative ring; the above is just the particular case of (positive elements of) the ring $\mathbb{Z}$.

2686 questions
1
vote
1 answer

Does it follow from $\gcd(a,c) \mid \gcd(b,c)$ that $a \mid b$? If not, under what conditions on $a,b,c$ does this implication hold?

Let $a, b,$ and $c$ be positive (odd) integers. I know that the implication $$a \mid b \implies \gcd(a,c) \mid \gcd(b,c)$$ holds. Here is my: INITIAL QUESTION: Does the converse $$\gcd(a,c) \mid \gcd(b,c) \implies a \mid b$$ also hold? If not,…
1
vote
0 answers

Is the order of the product of two commutating elements x, y; xy = yx, of the finite order of any group always equal to lcm (ord x, ord y)?

Apparently $ord (xy)$ divides the least common multiple of $ord(x)$ and $ord(y)$. It can be easily proved that if $ord(x)$ and $ord(y)$ are coprime, then $$ord (xy) = ord(x).ord(y) = lcm (ord(x), ord(y)).$$ Must always be $$ord (xy) = lcm (ord(x),…
Ivos
  • 11
1
vote
2 answers

Dividing two numbers by their GCD to obtain relative primes

If we divide $15$ and $81$ by $(15, 81) = 3$, we obtain two relatively prime integers, $5$ and $27$. This is no surprise because we have removed all common factors. This illustrates the following theorem, which tells us that we obtain two relatively…
Fuheybady
  • 19
  • 3
1
vote
2 answers

Does lcm of multiple numbers also divide any common multiple of these numbers?

I know that this is true for two numbers, but does this also hold for more than two? I.e. if $m$ is a common multiple of several numbers $n_1, \ldots , n_k$, does it hold that lcm$(n_1,\ldots,n_k)$ divides $m$? If so, how would one go about proving…
1
vote
0 answers

Equality for GCD and LCM of integers

[Update: I see that the equality is wrong: Assume that p divide the right hand side. If p|(c,e) and p|(d,e), then p need not to divide the left hand side. Thank you all for your comments] Let $a,b,c,d,e$ be integers. I am digging the following…
John Watts
  • 37
  • 4
1
vote
4 answers

Find numbers from GCD and LCM

two numbers gcd and lcm are respectively 6 and 600. What is the possible pairs of two numbers?
1
vote
1 answer

Prove $\gcd(4,10)≠1$

I am trying to write a proof that shows that $\gcd(4,10)≠1$ using only the definition of gcd below. $$\gcd(a,b) = \min(\{k∈\mathbb N : k = ax + by \text{ for some } x,y ∈ \mathbb Z\}) $$ Here is what I have so far: By the definition, Let $S$ be the…
sam
  • 123
1
vote
2 answers

Proving $\gcd(4k+2,k^2+k) = 2$ by direct proof

I came across this problem in a textbook (not an assignment) and was interested in how to solve it. I imagine $\gcd(4k+2,k^2+k)$ can easily be proved to be an even integer because: $4k+2 = 2(2k+1)$, which would be even because its $2$ times and…
mathjohnn
  • 181
  • 11
1
vote
5 answers

GCD with two big large numbers

How to find the $\gcd(2020^{1830} +2, 2020^{1830} -2)$? I can't seem to find the gcd because of the large numbers.
user815501
1
vote
0 answers

GCD( LCM(a,b) , LCM(a,c) ) = LCM(b, GCD(b,c)) , why?

I was doing this problem on codeforces, and as I was trying to simplify the formula, I arrived at the above conclusion. But now that I think of it, I actually arrived at that conclusion by mistake. Here are my workings. $$ GCD\bigl(( LCM(a,b) ,…
1
vote
1 answer

Circular track problem (LCM)

A question in my text book:- A circular field has a circumference of $360 \;km$. Three cyclists start together and can cycle $48$, $60$ and $72$ km a day, round the field. When will they meet again? Solution: We first find out the time taken by…
1
vote
2 answers

Line in proof: $\gcd(a,b) \le \gcd(b,r)$ - why?

Looking at the following GCD proof, I'm unsure I understand why line 4 and 8 are necessarily true. How is it that $\text{gcd}(a,b) \leq \text{gcd}(b,r)$? $$\begin{align} &\text{gcd}(a,b) \setminus a \wedge \text{gcd}(a,b) \setminus b…
Evan
  • 113
  • 5
1
vote
1 answer

if $(a,4)=(b,4)=2$, then $(a+b,4)= 4$

Simple question and I did it too by brute force but is there way to do using identities. Question is if $(a,4)=(b,4)=2$, then $(a+b,4)= 4$, where $(a,b)$ stands for the gcd of $a$ and $b$. Clearly possibilities of $a$ and $b$ are {2,6}, so it…
ogirkar
  • 2,681
  • 14
  • 27
1
vote
1 answer

If $x|yz$ and $\gcd(x, y)$ = 1 then $x|z, x, y, z \in \mathbb{Z}$

If $x|yz$ and gcd$(x, y) = 1$ then $x|z $ $ , x, y, z \in \mathbb{Z}$ My thoughts: $yz= dx$ and $mx +ny = \gcd(x, y)= 1$ where $d, m, n \in \mathbb{Z} \implies z =dx/y \text{ and } y = (mx-1)/n$ but I cannot prove it.
Jimmy
  • 13
1
vote
2 answers

Suppose $A,B$,and $C$ are integers greater than or equal to $2$. If $\gcd(A,B)=12, \text{lcm}(A,B)=396$ and $\gcd(B,C)= 33$,what is the $\gcd(11A,B)$?

Suppose $A,B$,and $C$ are integers greater than or equal to $2$. If $\gcd(A,B)=12, \text{lcm}(A,B)=396$ and $\gcd(B,C)= 33$, what is the $\gcd(11A,B)$?
1 2
3
11 12