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

Click For Summary
The discussion centers on the properties of the greatest common divisor (gcd) for various integer pairs. It concludes that for any integer n, gcd(n, n+1) is always 1, making statement (a) true. Statement (b) is deemed false, as gcd(n, n+2) can be either 1 or 2, depending on whether n is odd or even. Statement (c) is confirmed as true, since gcd(n, n+2) equals gcd(n, 2), which is 2 for even n and 1 for odd n. Finally, statement (d) is validated using the gcd identity, confirming that gcd(n, n^2+m) equals gcd(n,m) for all integers n and m.
Guest2
Messages
192
Reaction score
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
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)$.
 
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$?
 
Yes, your reasoning for (d) is correct.
 
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.
 
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 19 ·
Replies
19
Views
5K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
1K
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
20
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K