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
3 answers

Finding largest number with GCD.

The question is: Find the largest number which when divided by 20,25,35 and 40 leaves a remainder of 14,19,29 and 34 respectively. The solution is to find the difference which in this case is 20-14=6,25-19=6 and similarly for others. Then finding…
1
vote
2 answers

Three numbers which are co-primes of each other such that the product of the first $2$ is $551$ and that of the last $2$ is 1073. Find the $3$ numbers

If we take a,b, and c as the three numbers then, I know the answer is got by using the fact that b will be the common factor of $551$ and $1073$. But what I don't understand is why is b taken as the gcd of $551$ and $1073$ as it can easily be just…
GRANZER
  • 583
1
vote
3 answers

The biggest $\gcd(11n+4, 7n+2)$?

I am having problems solving this problem with greatest common divisors: What is the greatest common divisor of $11n+4$ and $7n +2$? I tried Euclidean algorithm, and I tried to deduce the answer and I tried to incorporate…
1
vote
0 answers

GCD and Number Theory

I need help with a proof that begins as follows: "We are given that $(a-c)(a+c)=(d-b)(d+b)$. If $\gcd(a-c, d-b)=k$ and $\gcd(a+c, d+b)=k$, prove that $h$ and $k$ are relatively prime." Thanks for your help!
1
vote
1 answer

If gcd of two positive integers is 2 then both integers are even

The statement feels very obvious when you think about it, but I’m very stuck trying to prove it. I first tried to prove it by contradiction but I didn’t get anywhere by doing that. I’ve been told that the best way to do it is to just use an example.…
user497020
1
vote
3 answers

how to prove: every two numbers gcd can be divided by this two numbers any common divisor

for example, I have two numbers: 36 and 48. their gcd is 12. 12 can be divided by any common divisors of these two numbers: 1, 2, 3, 4, 6, 12. Is there a general proof for this? Thanks!
1
vote
1 answer

Step in proof Sum of Euler Phi Function of Divisors (part 2)

This is a follow-up question to this post: Step in proof Sum of Euler Phi Function over Divisors, so we are proving Gauss' formula. Let $d$ be a positive divisor of $n$. We show that the number of elements $\overline a\in\mathbb Z/n\mathbb Z$ with…
Sha Vuklia
  • 3,960
  • 4
  • 19
  • 37
1
vote
3 answers

Greatest common divisor relatively prime integers proof

Let $gcd(c,m)=g.$ Show that if $kc+lm=g$, then $gcd(k,l)=1$ I can see that its true with this example Let $c=5, m=15$. We have $gcd(5,15)=5$, then let $k=-2$ and $l=1$ $gcd(-2,1)=1$ but I'm not sure how to generalize it.
user777
  • 21
1
vote
1 answer

Proof Greatest Common Divisor

Question: Let $m, n, k \in \mathbb{Z}$ with $\operatorname{gcd}(m, n) = 1 = \operatorname{gcd}(n, k)$ Determine if it is true that necessarily $\operatorname{gcd}(m, k) = 1$. Answer: The statement is FALSE. Proof : [By Contradiction] Let $m=3, …
1
vote
0 answers

Find gcd (a:b) with some data

I want to know if this is correctly solved Find (a:b) knowing that the remainder from dividing $a$ by $b$ is 27and the remainder from dividing $b$ by $27$ is $21$ So, $r_{b}(a) = 27$ and $r_{27}(b) = 21$ What I did is to use the gcd property…
JorgeeFG
  • 493
1
vote
1 answer

How to find a number with no common divider between two other number

I'm trying to find a formula for calculating $n$ such that $GCD(n, p) = 1$ and $GCD(n, q) = 1$, given the numbers $p$ and $q$. I also need it to have a linear time (O(n)) implementation i.e equally complex for big or small values of $p$ and…
1
vote
3 answers

True or False: $\operatorname{gcd}(a,b) = \operatorname{gcd}(5a+b, 3a+2b)$

I'm trying to work through the above homework question ($a$ and $b$ are positive integers), and I'm not sure if my reasoning is correct. I've been told that it is true. I think that if the $\operatorname{gcd}(a,b) = d$, then we would have $ax +by =…
Rebecca
  • 398
1
vote
1 answer

Proving that the Highest Common Factor was calculated incorrectly

Three positive integers are written on a whiteboard. David calculated the HCF of two of them and obtained 1 000 004 Rose calculated the HCF of two of them and obtained 1 000 006 Stephen calculated the HCF of to of them and obtained 1 000…
Carli
  • 43
0
votes
1 answer

Closed formula for a $gcd$

Le $k≥1$ be positive integer. I am asking if it is possibe to find a closed formula for $$gcd(2^{2k+5}-3×2^{k+2}+1,2×(2^{k+2}-1)(2^{k+1}-1),2×(3×2^{k+1}-1)(2^{k+2}-1))$$ where $gcd$ is the greatest common divisor. For $k=1$, we…
Safwane
  • 3,840
0
votes
0 answers

GCF of $A= 14a+4b$ and $B=11a+3b$ , with $a, b \in \mathbb Z$ and GCF$(a,b)= d$

Source : Oudot, Maths MPSI , Hachette (ed.) ,exercice $6$, p. $195$. Let $a$ and $b$ be integers, and $d = $ GCF$(a,b)$. Let $A= 14a+4b$ and $B=11a+3b$. Question : determine GCF$(A,B)$. This is a very basic exercice , but I'm stuck. I want to…