GCD of Sum and Difference

For any two coprime positive integers a a and b b , find the maximum value of gcd ( a + b , a b ) \gcd(a+b,a-b) .

Notation: gcd ( ) \gcd(\cdot) denotes the greatest common divisor function.


The answer is 2.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

g c d ( a + b , a b ) gcd(a+b,a-b)

= g c d ( 2 a , a b ) =gcd(2a,a-b) [As g c d ( x , y ) = g c d ( x + y , y ) gcd(x,y)=gcd(x+y,y) ]

As a a and b b are coprime, g c d ( a , b ) = 1 gcd(a,b)=1 . That means, no factor of a a , other than 1 1 , divides ( a b ) (a-b) . So, g c d ( a + b , a b ) = g c d ( 2 a , a b ) = g c d ( 2 , a b ) gcd(a+b,a-b)=gcd(2a,a-b)= gcd(2,a-b) . Hence, g c d gcd is either 1 1 or 2 2 .

Now 2 2 divides ( a b ) (a-b) when both a a and b b is odd.

So, the maximum possible value of g c d ( a + b , a b ) gcd(a+b, a-b) is 2 \boxed{2} .

N i c e s o l u t i o n Nice solution :)

Prokash Shakkhar - 4 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...