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
2
votes
1 answer

Any interesting reduction of LCM(a, b) / GCD(a, b)?

I know that $$a\cdot b = \gcd(a, b) \cdot\operatorname{lcm}(a, b)$$ where $a$ and $b$ are positive integers. I am wondering if there are any other reductions of the following expression: $$\frac{\operatorname{lcm}(a, b)}{ \gcd(a, b)}$$
user3243499
  • 369
  • 5
  • 16
2
votes
2 answers

For any positive integer $n$, let $f(n) = 70 + n^2$ and $g(n)$ be the HCF of $f(n)$ and $f(n+1)$ find the highest possible value of $g(n)$.

For any positive integer $n$, let $f(n) = 70 + n^2$ and $g(n)$ be the HCF of $f(n)$ and $f(n+1)$ find the highest possible value of $g(n)$. This question is from HKIMO prelims 2006. I didn't quite understand what was happening when I went through…
2
votes
1 answer

trying to prove that if m, n and a are in the integers then $gcd(m, n) = gcd(n, m - an)$

So in trying to formulate this proof, based on the statement that: $gcd(m, n): ∀m, n, a ∈ \mathbb Z,∃ e \in \mathbb N, ((e|m ∧ e|n) ∧ (∀ d ∈ \mathbb N, d|n ∧ d|m \Rightarrow d\leq e))$ I've attempted to translate the following statement into…
2
votes
3 answers

greatest common divisor of two elements

Find all possible values of GCD(4n + 4, 6n + 3) for naturals n and prove that there are no others 3·(4n + 4) - 2·(6n + 3) = 6, whence the desired GCD is a divisor 6. But 6n + 3 is odd, so only 1 and 3 remain. n=1 and n=2 are examples for GCD=1…
2
votes
6 answers

$\gcd (2016!+1, 2015!+1)$

Can someone tell how to do this? I know the answer when there is no additional 1 in it. But with +1, I have no clue. Can someone give insights? I tried using $\gcd(a,b) = \gcd(a, b-a)$ but could not get anywhere. Thanks in advance
2
votes
2 answers

Proof that $Z$ is a gcd ring

Recall the general definition of a gcd in a commutative ring $R$. For $a \in R$, $\mathcal D(a)$ is the set of elements that divide $a$ and if $S \subset R$, $\mathcal D(S) = \cap_{s \in S} \mathcal D(s)$ We say that $d$ is a gcd of $a$ and $b$ and…
James Well
  • 1,209
2
votes
1 answer

Step in proof Sum of Euler Phi Function over Divisors

I want to show Gauss’ formula. The proof in my book starts as follows: Let $d$ be a positive divisor of $n$. We show that the number of elements $\overline a\in\mathbb Z/n\mathbb Z$ with $\operatorname{order}(\overline a)=d$ equals $\phi(d)$ (where…
Sha Vuklia
  • 3,960
  • 4
  • 19
  • 37
2
votes
1 answer

Show: $\gcd(a,b)=\gcd(a,c)=1\implies\gcd(a,bc)=1$

Let $a,b,c\in\mathbb Z$. Then $$ \gcd(a,b)=\gcd(a,c)=1\implies\gcd(a,bc)=1. $$ I tried using Bezout's Lemma, that states: if $a$ and $b$ are relatively prime, then $a\mid bc\implies a\mid c$. This means in our case that $a\mid bc\implies a\mid…
Sha Vuklia
  • 3,960
  • 4
  • 19
  • 37
2
votes
4 answers

Assuming that $\gcd(a,b)=1$, show that $\gcd(a+b,a^2+b^2)=1$ or $2$.

My attempt: I tried to use the property $\gcd(a,b)=\gcd(a,b-a)$ but ended up with a meaningless expression. I also tried assuming that if $a$ is of the form $2k_1$ then $b$ must be of the form $2k_2+1$ where $k_1$ and $k_2$ are integers, but this…
Student
  • 9,196
  • 8
  • 35
  • 81
2
votes
3 answers

Prove that if $a = bc+1$ then $(a,b) = 1$

I started by saying that there exists an $x,y$ such that $1 = ax +by$ but I really don't know where else to go with this. Any hints?
2
votes
4 answers

There exists integers such that 200s + 567t = 1. Find s.

I am studying for my NES mathematics endorsement exam and am working through a problem which deals with the Euclidean Algorithm to find the GCD of two relatively prime numbers. Then, I need to find some s such that 200s +567t = 1. The method I am…
katstart
  • 23
  • 2
2
votes
4 answers

Proof $\gcd(a, 18) = \gcd(a + 18,\gcd(a, 18))$

I know there's some kind of theorem I'm missing here. How can one prove the above? Cheers!
Gilzy
  • 21
2
votes
3 answers

Suppose $b,c \in \textbf Z^+$ are relatively prime (i.e., $\gcd(b,c) = 1$), and $a \,|\, (b+c)$. Prove that $\gcd(a,b) = 1$ and $\gcd(a,c) = 1$

Suppose $b,c \in \textbf Z^+$ are relatively prime (i.e., $\gcd(b,c) = 1$), and $a \,|\, (b+c)$. Prove that $\gcd(a,b) = 1$ and $\gcd(a,c) = 1$. I've been trying to brainstorm how to prove this. I have determined that $\gcd(b, b + c) = 1$, but I am…
1
vote
0 answers

Addition property for GCD

I already know that gcd(a,b)=gcd(a-b,b). However, can I also say that gcd(a,b)=gcd(a+b,b)? I think this is correct and the proof is simple: consider gcd(a+b,b). Then apply this subtraction property of GCD's to say gcd(a+b,b)=gcd(a+b-b,b)=gcd(a,b) as…
1
vote
0 answers

Is it possible to eliminate $q$ from $\gcd\left(a (e-gq),(q^2-d)g-(e-gq)(q-p)\right)$?

Is it possible to eliminate the variable $q$ from the following gcd expression? $$\gcd\left(a (e-gq),(q^2-d)g+(e-gq)(q-p)\right)$$ What I tried was the following: Assuming that the gcd is $m$, I get $$\frac{a(e-gq)}{n_1}=m \tag1$$ and so…
1
2
3
11 12