(a) Let N be an even integer, prove that GCD (N + 2, N) = 2.
(b) What’s the GCD (N + 2, N) if N is an odd integer?
(a) If N is a an even integer , N= 2x where x is an integer
We know that GCD(a,b) = GCD(a-b,b) if a>=b Until a or b is 0
So, GCD(N+2,N)= GCD(N+2-N,N)= GCD(2,N) = 2 (Since N is even)
Other Way:
So, N+2= 2x +2 = 2(x+1)
So, GCD(N+2,N ) = GCD( 2(x+1), 2x)
GCD of two consecutive integers is always 1. So, GCD of x and x+1 is 1.
And So, GCD(N+2,N) =
GCD( 2(x+1), 2x)
= 2
(b) GCD(N+2,N) if N is an odd integer is 1.
GCD(N+2,N)
= GCD(N+2-N, N)
= GCD(2,N) = 1 (Since N is a odd integer)
Get Answers For Free
Most questions answered within 1 hours.