Is $\gcd(n, n+2) = 1$ or $2$ for any integer $n$?

In summary, for (a) it is true and for (b) it is false, with a counterexample being $\gcd(3,5) = 1$. For (c) it is true that $\gcd(n, n+2)$ can be either $1$ or $2$, depending on whether $n$ is odd or even. For (d) it is true that $\gcd(n, n^2+m) = \gcd(n, m)$, using the identity $\gcd(a,b)=\gcd(a,b-a)$.
  • #1
Guest2
193
0
Decide which of the following is true or false. If false, provide a counterexample.

(a) For any integer $n$, $\gcd(n, n+1) = 1$.

(b) For any integer $n$, $\gcd(n, n+2) = 2$.

(c) For any integer $n$, $\gcd(n, n+2) = 1$ or $2$.

(d) For all integers $n, m:$ $\gcd(n, n^2+m) = \gcd(n,m)$.

I think (a) is true and (b) is false since $\gcd(3,5) = 1.$
 
Mathematics news on Phys.org
  • #2
Guest said:
I think (a) is true and (b) is false since $\gcd(3,5) = 1.$
I agree.

Guest said:
(d) For all integers $n, m:$ $\gcd(n, n^2+m) = \gcd(n,m)$.
This can be answered using the identity $\gcd(a,b)=\gcd(a,b-a)$.
 
  • #3
Evgeny.Makarov said:
I agree.

This can be answered using the identity $\gcd(a,b)=\gcd(a,b-a)$.
Thank you. Is it

$\gcd(n, n^2+m) = \gcd(n, n^2+m-n) =\gcd(n, n^2+m-n-n)= \cdots = \gcd(n, n^2+m-\ell)$ where $\displaystyle \ell = \sum_{k=1}^{n}n = n^2$?
 
  • #4
Yes, your reasoning for (d) is correct.
 
  • #5
Evgeny.Makarov said:
Yes, your reasoning for (d) is correct.
For (c) I get $\gcd(n, n+2) = \gcd(n, 2)$ which is $2$ if $n$ is even, or $1$ if $n$ is odd. So it's true, I think.
 
  • #6
Guest said:
For (c) I get $\gcd(n, n+2) = \gcd(n, 2)$ which is $2$ if $n$ is even, or $1$ if $n$ is odd. So it's true, I think.
Yes.
 

1. What is the definition of Greatest Common Divisor (GCD)?

The Greatest Common Divisor (GCD) of two or more integers is the largest positive integer that divides evenly into all of the given numbers.

2. How is the GCD calculated?

The GCD can be calculated using various methods, such as the Euclidean algorithm or prime factorization. The most commonly used method is the Euclidean algorithm, which involves finding the remainder when one number is divided by the other and repeating the process until the remainder is 0. The last non-zero remainder is the GCD.

3. What is the relationship between GCD and Least Common Multiple (LCM)?

The GCD and LCM are related by the formula GCD(a, b) x LCM(a, b) = a x b. This means that the product of the GCD and LCM of two numbers is equal to the product of the numbers themselves.

4. How is GCD used in mathematics?

GCD is used in various mathematical concepts, such as simplifying fractions, finding common denominators, and solving linear Diophantine equations. It is also used in computer algorithms and cryptography.

5. Can the GCD of three or more numbers be calculated?

Yes, the GCD can be calculated for any number of integers. The process involves finding the GCD of two numbers and then finding the GCD of that result and the next number, and so on until all numbers have been considered.

Similar threads

Replies
1
Views
1K
  • General Math
Replies
4
Views
2K
  • Precalculus Mathematics Homework Help
Replies
1
Views
758
  • Calculus and Beyond Homework Help
Replies
2
Views
960
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • General Math
Replies
1
Views
739
  • Calculus and Beyond Homework Help
Replies
20
Views
2K
  • Precalculus Mathematics Homework Help
Replies
3
Views
805
  • Precalculus Mathematics Homework Help
Replies
2
Views
973
Replies
5
Views
2K
Back
Top