[Math] Addition or subtraction in GCD and LCM

elementary-number-theorygcd-and-lcm

Suppose that we have two integers $a$ and $b$. Now say that $G = \gcd(a,b)$ and $L = \mathrm{lcm}(a,b)$. Now the value of $G$ and $L$ is given and another integer $c$'s value is given. How can we find $\gcd(a+c,b+c)$ and $\mathrm{lcm}(a+c,b+c)$ from $G$, $L$ and $c$?

What if we have $n$ arbitrary numbers. I know the GCD and LCM of those numbers but not the actual values of those numbers. Now I want to add $c$ with all of those numbers, what will be the new GCD, LCM of those numbers?

Best Answer

@PAD has indicated that $\gcd(a +c , b + c)$ is a divisor of $a-b$. Let us show that all divisors of $a - b$ occur as $\gcd(a +c , b + c)$, for a suitable choice of $c$.

Let $\lambda \mid a - b$. Choose $c = \lambda - b$, so that $b + c = \lambda$, and $a + c = (b + c) + (a - b)$ is divisible by $\lambda$. It follows that $\gcd(a +c , b + c) = \lambda$.

Related Question