Determining the maximum GCD

Let a , b , c a, b, c be distinct positive integers such that a + b + c 3000000 a+b+c \leq 3000000 . Find the maximum value of gcd ( a b + 1 , b c + 1 , c a + 1 ) \text{gcd}(ab+1, bc+1, ca+1) .


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


The answer is 998285.

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.

2 solutions

Mark Hennings
Sep 3, 2017

Without loss of generality, we can assume that a < b < c a < b< c . If n n is the greatest common divisor of a b + 1 , a c + 1 , b c + 1 ab+1,ac+1,bc+1 , then since n n divides a b + 1 ab+1 it follows that n n and a a are coprime. Similarly n n and b b are coprime and n n and c c are coprime. Also note that n n divides a ( b c ) = ( a b + 1 ) ( a c + 1 ) a(b-c) = (ab+1)-(ac+1) , and so n n divides b c b-c . Similarly we can show that n n divides a b a-b . Thus we must have b = a + u n b = a+un , c = a + v n c = a+vn where u , v u,v are positive integers with u < v u < v . Since n n divides a b + 1 ab+1 we deduce that n n divides a 2 + 1 a^2+1 .

Since n n divides a 2 + 1 a^2+1 we deduce that n 1 a \sqrt{n-1} \le a . Since b a + n b \ge a+n and c a + 2 n c \ge a+2n we deduce that 3000000 a + b + c 3 ( a + n ) 3000000 \ge a+b+c \ge 3(a+n) , so that a 1000000 n a \le 1000000 - n . Thus n n must be such that n 1 1000000 n \sqrt{n-1} \le 1000000 - n , and hence n 1 2 ( 2000001 3999997 ) = 999000.5004 n \le \tfrac12 \big(2000001 - \sqrt{3999997}\big) = 999000.5004 , so that n 999000 n \le 999000 . We note that n = 99 9 2 + 1 = 998002 a = 999 b = a + n = 999001 c = a + 2 n = 1997003 n \; = \; 999^2 + 1 = 998002 \hspace{1cm} a \; = \; 999 \hspace{1cm} b = a + n = 999001 \hspace{1cm} c = a + 2n = 1997003 is a particular solution, and hence 998002 n 999000 998002 \le n \le 999000 .

At this point we only need conduct a computer search to find the largest value of n n giving a solution to the problem (there are fewer than 1000 1000 cases to check): n = 998285 a = 1413 b = a + n = 999698 c = a + 2 n = 1997983 n \; = \; \boxed{998285} \hspace{1cm} a \; = \; 1413 \hspace{1cm} b = a + n = 999698 \hspace{1cm} c = a + 2n = 1997983

I did exactly what you did up until the "at this point" part.

Writing n = a 2 + 1 k , n = \frac{a^2+1}{k}, we get a = n k 1 . a = \sqrt{nk-1}. So n + n k 1 1000000. n+\sqrt{nk-1} \le 1000000.

For k = 1 , k=1, it's easy to check that n = 99 9 2 + 1 = 998002 n=999^2+1=998002 is the max.

For k = 2 , k=2, it's easy to check that n = 141 3 2 + 1 2 = 998285 n=\frac{1413^2+1}2 = 998285 is the max.

For k 3 , k \ge 3, we get n + 3 n 1 n + n k 1 1000000. n + \sqrt{3n-1} \le n+\sqrt{nk-1} \le 1000000. The left side is an increasing function of n , n, and if we evaluate at n = 998285 n=998285 we get 1000015.56 , 1000015.56\ldots, so any value of n n that corresponds to k 3 k \ge 3 is smaller than 998285. 998285.

So we're done.

Patrick Corn - 3 years, 8 months ago
Sharky Kesa
Oct 30, 2019

We can assume that a > b > c a>b>c , let b c = x , a b = y b-c=x,a-b=y . We have 3 c + 2 x + y 3000000 3c+2x+y\leq 3000000 .

Let d = gcd ( a b + 1 , b c + 1 , c a + 1 ) d=\text{gcd} (ab+1,bc+1,ca+1) , we get gcd ( d , a ) = gcd ( d , b ) = gcd ( d , c ) = 1 \text{gcd} (d,a)=\text{gcd} (d,b)=\text{gcd} (d,c)=1 .

So d a c , a b d gcd ( x , y ) d\mid a-c,a-b\Rightarrow d\mid \text{gcd} (x,y) .

Also, d c 2 + 1 d\mid c^2+1 . We get d c 2 + 1 , x , y 3000000 3 c + 3 d 3 d 1 + 3 d d\leq c^2+1,x,y\Rightarrow 3000000\geq 3c+3d\geq 3\sqrt{d-1} +3d .

This gives us d 999001 d\leq 999001 .

If d = c 2 + 1 d=c^2+1 , we have d 99 9 2 + 1 = 998002 d\leq 999^2+1=998002 .

If d = c 2 + 1 2 d= \frac{c^2+1}{2} , we get 3000000 3 2 d 1 + 3 d 3000000\geq 3\sqrt{2d-1}+3d . This gives us d 998587 d\leq 998587 , so d 141 3 2 + 1 2 = 998285 d\leq \frac{1413^2+1}{2}=998285 .

If d c 2 + 1 5 d\leq \frac{c^2+1}{5} , we get 3000000 3 5 d 1 + 3 d 3000000\geq 3\sqrt{5d-1}+3d . This gives us d 997766 d\leq 997766 .

So, the maximum value of d d is 998285 998285 . Equality holds at c = 1413 , x = y = 998285 c=1413,x=y=998285 .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...