I was working on a question and a though came across my mind.
In the question, we had to prove that if n is odd, the gcd(3n, 3n + 2) = 1. So what I did was I said let a = gcd(3n, 3n + 2). Then we know a | 3n and a | 3n + 2 so a must divide any linear combination of 3n and 3n + 2, i.e., a | y(3n) + z(3n+2). Now, suppose y =-1 and z = 1 then a | 2 and so a must only equal 1 as n is odd and so a ≠ 2.
My question is, why are we allowed to take a particular value of y = -1 and z =1 and say that a divides a particular linear combination and then say that the rule that comes from that particular case, applies to all other cases? I.e., why can we say that because the a | 2 and so a must equal 1, then the gcd = 1. What if the linear combination was divisible by some other value that also divides 3n and 3n + 2?
Because I know that it does work through trial and error of various values, but I want to know why. Is there some sort of mathematical principal I am unaware of?
If someone could shed some light on this, it'd be greatly appreciated.
Thank you in advance.
P.s.My professors working out has been attached below.
- Prove that if n is odd, then gcd(3n,3n+2)=1. What if n is even?
Solution. Let d = gcd(3n,3n + 2). Since d | 3n and d | 3n + 2, it follows that d | (3n+2)−3n = 2. Since the only divisors of 2 are 1 and 2, it follows that d = 1 or 2. But if n is odd, then 3n is also odd, so we cannot have d=2(since d|3n). It follows that d = 1 if n is odd. (If n is even, then 2 divides both 3n and 3n+2, so d = 2 in this case.)