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

Number Theory prove gcd[(gcd(x,y),y)] = gcd(x,y)

$$gcd[(gcd(x,y),y)] = gcd(x,y)$$ Intuitively, I realize that GCD has these same properties, but I assume that this is not enough. normally showing that one operation is the same as another, we must prove that these functions have the same price in…
Igor
  • 1
-1
votes
1 answer

How to find the GCD(Greatest common Divisor) of the numbers given as algebraic expressions

I am not able to establish that the GCD will not depend upon the value of $n$. Although by taking some initial values of $n$, the GCD is always 1, how do we prove that it is always 1 whatever be the value of $n$.
Kings
  • 1
  • 2
-1
votes
1 answer

Having trouble with HCF prime factorization

I'm getting through a HCF problem and I'm having trouble taking the primes and determining what way to string them to sum up to the HCF. Here's what I have 270 and 900 are the targets 270 = 2 X 3 X 3 X 3 X 5 900 = 2 X 2 X 3 X 3 X 5 X 5 The HCF is…
-1
votes
1 answer

HCF and prime factorization

I'm following along in a math book I'm reading and the task at hand is to find the HCF of $270$ and $900$ using prime factorization. I know the answer is $90$ because I checked the answer at the back of the book and got it wrong. I know that the…
-1
votes
2 answers

prove that prime factorization allows to give you the gcd of two numbers

I would like to prove that, given two integers: $a = p_1^{\alpha_1}p_2^{\alpha_2}\cdots{p_t}^{\alpha_t}$ $b = p_1^{\beta_1} p_2^{\beta_2} \cdots p_s^{\beta_s}$ Then $\gcd(a,b)$ $=$ ${p_1}^{\min(\alpha_1, \beta_1)}{p_2}^{\min(\alpha_2,…
PwNzDust
  • 468
-1
votes
1 answer

gcd of $X^a - 1$ and $X^b - 1$

I can prove that $X^a - 1 \mid X^b - 1$ if $a\mid b$, and even that the integer division of $a$ by $b$ translates in some sense into a division of $X^a$ by $X^b$. However, I do not know how to deduce $$\gcd(X^a-1, X^b-1) = X^{\gcd(a,b)}-1$$ I would…
TheStudent
  • 1,255
-1
votes
3 answers

If $m$ is a positive integer, show that $3m+2$ and $5m+3$ are relatively prime

I tried proving it by assuming the opposite. So (3m+2 , 5m+3)= k , k>1 3m+2=ka ; 5m+3=kb; 5m+3=3m+2+2m+1; 5m+3=ka + 2m+1; kb=ka +2m+1; 2m+1=kb-ka; 2m+1= 5m+3-3m+2; 2m+1=2m+1; Which means that they arent relatively prime , but if you test this with…
-1
votes
1 answer

How do I answer a question when only one number is given and the other we need to find and the lcm and hcf are given

How do I answer a question when only one number is given and the other we need to find and the lcm and gcd are given. $X$ is a integer. The lcm of $x$ and $12$ is $120$. The $\gcd$ of $x$ and $12$ is $4$. Work the value of $x$.
daniel D
  • 1
  • 1
-1
votes
2 answers

gcd(a,b) explanation using the set $\{ax+by : x,y \in \mathbb{Z}\}$

I'm reviewing a proof of the greatest common divisor. The textbook describes $\gcd(a,b)$ as the smallest positive element in the set $\{ax+by : x,y \in \mathbb{Z}\}$. I'm not quite understanding this. I tried to play with some numbers for example,…
-1
votes
1 answer

How do I solve $\gcd(k+8,18)=1$ when $k$ is an integer

I was trying to find all integers $k$ that verify $\gcd(k+8,18)=1$ and I have no idea where to start. I tried thinking of Bezout but it doesn't lead me anywhere.
OUCHNA
  • 429
-1
votes
1 answer

How to find one unknown number while LCM and GCD is given?

help me find unknown integer number n such as LCM(n,50) = 200 and GCD(n,50) = 10 how do you solve? I tried factoring each numbers such as $200 = 2^3*5^2$ $10 = 2*5$ $50 = 2 * 5^2$ but idk whats next... edit: ok thanks for the help I am now able to…
Taiki
  • 1
-1
votes
2 answers

this came in my exam and i could not answer it . any help is appreciated.

The LCM of165, 176, 385 and 495 is k. When is divided by the HCF of the numbers, the quotientis p. What is the value of p? A 2520 B 5040 C 6720 D 3360 i have familiar with basic concepts of lcm and hcf but these numbers seem terrifying to me.
-1
votes
2 answers

Maximum number if the GCD is known

if it is known that the GCD(a,2008) = 251, and a<4036 whats the biggest number for a? a. 3263 b. 4016 c. 2259 d. 3765 e. 3514 i know that the answer is d, after a long math. but does anybody have any other ways to do it?
Godlixe
  • 333
-1
votes
1 answer

If gcd$(a,b)=$1 and $p$ is a odd prime then show that gcd$\left(a+b,\frac{a^p+b^p}{a+b}\right)=1$

I only know the expansion of $a^p+b^p=(a+b)(a^p-1 -a^p-2×b^1......b^p-1)$ but I don't know how to proceed furthur.thankhs in advance.
-1
votes
1 answer

Trying to compute the greatest value of $x$.

$a,b,c,x,k$ are positive natural numbers. $$86 = ax+k$$ $$142 = bx + k$$ $$252 = cx+k$$ I'm trying to compute the greatest value of $x$. Let's assume $ k = 1$ (we want x to take its greatest value), we have that $$85 = ax$$ $$141 = bx$$ $$251 =…
Melz
  • 792
1 2 3
11
12