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

Finding the highest common factor in a set of numbers

Let M be the set of all nine-digit positive integers that contain each digit from 1 to 9 once. Find the highest common factor of all elements of M. I understand the context of the question but I am not sure where to start or proceed. A step by step…
Lh Lee
  • 153
0
votes
2 answers

If $k$ and $l$ are positive integers such that $k\mid l$, show that for every positive integer $m$, $1+(k+m)l$ and $1+ml$ are relatively prime.

If $k$ and $l$ are positive integers such that $k\mid l$, show that for every positive integer $m$, $1+(k+m)l$ and $1+ml$ are relatively prime. My approach: I wrote $(k+m)(1+ml)-m(1+(k+m)l)=k=la$ where $a>0$ Now, I took both sides modulo $l$. The…
user321656
0
votes
1 answer

Abstract Algebra GCD and division.

Suppose $a$ and $d$ are integers and $m$ and $n$ are natural numbers such that $d|a^{m}-1$ and $d|a^{n}-1$. Prove that $d|a^{\text{gcd(m,n)}}-1$. I just need some help getting started. I'm wondering if there is some theorem or lemma that I can cite…
Alex
  • 649
0
votes
1 answer

If ad = bc, (a, b) = 1, (c, d) = 1, and a, b, c, and d are all positive, show a = c and b = d.

So far I have that Since we known that (a,b) = 1 by definition we can write it as ax+by=1. We also know that (c,d) = 1, so cx+dy=1. Since they are both equal to 1 I can set them equal to each other where ax+by=cx+dy. Now I am unsure what my next…
bella
  • 121
0
votes
1 answer

Polynomial quotient ring elements with no GCD

From Wikipedia, a GCD domain is an integral domain in which every pair of elements has a GCD. Let us consider some polynomial quotient ring $R=K[X]/(pq)$ where $K$ is a field and $p$, $q$ are (irreducible) polynomials. Then $R$ is not an integral…
Bruno
  • 317
0
votes
3 answers

Suppose $\gcd(a,y)=s$ and $\gcd(b,y)=t$. Prove that $\gcd(\gcd(a,b),y)=\gcd(s,t)$.

All I have so far is that $$s|a, s|y, t|b, \text{ and } t|y.$$ I also know $$\gcd(\gcd(a,b),y)=\gcd(a,b,y)=\gcd(a,gcd(b,y))$$ by the associative property of gcd. It would suffice to show $$\gcd(a,b,y)=\gcd(gcd(a,y),\gcd(b,y)).$$ I'm just not sure…
0
votes
4 answers

Greatest common divisor of 11n+24 and 5n+11

I found out that the answer is 1 from http://www.wolframalpha.com/input/?i=gcd%2811n%2B24%2C5n%2B11%29, but I cannot find a way to prove that on my own. I think that it is 1 because: gcd(11n+24)=1 and gcd(5n+11)=1 so gcd(11n+24,5n+11)=1 Do I assume…
sam
  • 17
0
votes
3 answers

Prove that if $c|gcd(a,b)$, then $c|a$ and $c|b$.

Prove that if $c|gcd(a,b)$, then $c|a$ and $c|b$. I have already been able to prove that if $c|a$ and $c|b$ then $c|gcd(a,b)$. However, I am not sure to prove the converse of this (the question I asked).
Ben Knoll
  • 243
0
votes
1 answer

Suppose a is a number > 1 with the following property: for all b,c, if a divides bc and a does not divide b, then a divides c. Show a must be prime

I know that $ax+by = d$ by Bezout's theorem but I really don't know how to proceed with this one. I tried saying $bc = ak_1$ and $c = ak_2$
0
votes
1 answer

Termination state while subtracting two numbers

Let a and b be positive integers such that $a > b$. Then I replace $a$ with $a-b$. If I repeat this process, how do I prove that both numbers will be equal to x such that x=gcd(a, b)?
rkabhishek
  • 115
  • 6
-1
votes
1 answer

Find gcd of two multivariate polynomials

Is there a simple way to find the $\gcd$ of $x^2y$ and $xy^2+1$? I tried adding multiples of $x^2y$ to the other and vice-versa but I found no easy way to find the gcd. For another example I found $(xy,x^3y+1)=(xy,x^3y+1-x^3y)=1$ by adding $-x^2$ of…
-1
votes
1 answer

If we know $\gcd(a,b,c)=1$, does it mean $\gcd\left(\frac{a}{\gcd\left(a,b\right)},\gcd\left(c,\frac{b}{\gcd\left(a,b\right)}\right)\right)=1$

If we know $gcd(a,b,c)=1$, how to prove that $gcd\left(\frac{a}{gcd\left(a,b\right)},gcd\left(c,\frac{b}{gcd\left(a,b\right)}\right)\right)=1$? Where $a, b, c$ are any positive integers. I have test two specific examples, looks it is true: Example…
xMath
  • 95
-1
votes
1 answer

How do I prove that $\gcd(a,b)=\gcd(-a,b)$

How do I prove that $\gcd(a,b)=\gcd(-a,b)$? Here is what I have tried: Let $d=\gcd(a,b)$ and $d'=\gcd(-a,b)$ Then $d|a$, $d|b$, $d'|(-a)$, $d'|b$ $\implies d'|(b-a)$ and $d|(a+b)$. Then there is some $k,t\in\mathbb{Z}$ such that $b-a=kd'$ and…
Jason Xu
  • 581
-1
votes
2 answers

I'm not sure about the method for finding LCM using Venn diagram. Why didn't what I did work for finding the LCM of 68 and 96?

It seems that using Venn diagrams for finding the LCM of two numbers using Venn diagrams only works for some numbers, not all. Can someone please clarify? For example, for finding the LCM of 12 and 20 I use the prime factors of both, eliminating…
-1
votes
1 answer

Question about stacking sweets.

Question: "A sweet seller has 420 kaju barfis and 130 badam barfis. She wants to stack them in such a way that each stack has the same number of sweets, and they take up the least area of the tray. What is the maximum number of barfis that can be…