Find the largest possible value of the greatest common divisor of the numbers 5 n + 6 and 8 n + 7 , where n is an arbitrary positive integer.
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.
Really crisp and elegant solution. Thanks.
Great approach Brent...
Truely brilliant approach
For the ≡ sign, you could type \equiv. Good solution, I say.
wow nice
Thumbs up dude!
But if you plug in an integer into 8n+7 and 5n+6, neither actually gives you a number divisible by 13. What am I missing?
Log in to reply
The problem asks for the maximum possible value of the GCD; that is, that value may not be achieved for all n , but there is some value of n for which it is achieved. (In this problem, n = 4 is a possible value for which g cd ( 8 n + 7 , 5 n + 6 ) = 1 3 . )
>>in the 2nd last line i understand how two gcd's are equal but i can't understand how this proves that 13 is the maximum possible ?
the answer may mean that if x divides 13(n+1), and then x divides 13 or (n+1). if x divides (n+1), then gcd(8n+7,5n+6) = gcd(n+1,5n+6) = gcd(n+1,1), which means 1.since 13>1,so that is all.
Great solution Uncle Brent.I am completely grounded. T h a n k s
Using the Euclidean Algorithm, g cd ( 5 n + 6 , 8 n + 7 ) = g cd ( 5 n + 6 , 3 n + 1 ) = g cd ( 2 n + 5 , 3 n + 1 ) = g cd ( 2 n + 5 , n − 4 ) = g cd ( n + 9 , n − 4 ) = g cd ( 1 3 , n − 4 ) Therefore, the greatest common divisor must be a factor of 13, the largest of which is 1 3 . The maximum is achieved, for example, when n = 1 7 , as g cd ( 1 3 , 2 6 ) = 1 3 .
cool1
yeah, first time have seen this..thnx :)
Dint knew this algorithm thankz
I also solved the problem in the same way.Nice approach!
Nice approach... I would just add to it the fact that 'the maximum' can also be achieved when n=4(as worked out in other solutions), as the GCD of 13 and 0 is equal to 13.
This can also be done as:
Let the gcd be x.
5 n − 6 ≡ 0 m o d x
⟹ 5 n ≡ 6 m o d x
⟹ 4 0 n ≡ 4 8 m o d x
8 n − 7 ≡ 0 m o d x
⟹ 8 n ≡ 7 m o d x
⟹ 4 0 n ≡ 3 5 m o d x
So, 4 8 ≡ 3 5 m o d x
Now, 4 8 − 1 3 = 3 5
∴ x = 1 3
This question is a direct application of the Euclidean Algorithm. We can continue to simplify the equation which expresses the G C D of the 2 binomials until we get something we can work with.
8 n + 7 = 1 × ( 5 n + 6 ) + ( 3 n + 1 )
5 n + 6 = 1 × ( 3 n + 1 ) + ( 2 n + 5 )
3 n + 1 = 1 × ( 2 n + 5 ) + ( n − 4 )
2 n + 5 = 2 × ( n − 4 ) + ( 1 3 )
Now that we have simplified the expression for the GCD of the two binomials, we can rewrite it.
G C D ( 8 n + 7 , 5 n + 6 ) = G C D ( n − 4 , 1 3 )
We want to find the maximum value for n such that n − 4 shares a common factor with 1 3 .
The maximum possible value for n can be found this way by setting n − 4 equal to 1 3 .
Therefore, n = 1 7 and the greatest possible value for the GCD is 1 3 .
Given that the number x we are searching for is a G.C.D., it divides 5n+6 and 8n+7. This mathematically speaking means that there are two, possibly, different numbers m and L such that mx = 5n + 6 and Lx = 8n +7. Solve for n in each equation and compare both values: n=(mx-6)/5=(Lx-7)/8. From here, by solving for x we get to the equation x(8y-5z)=13. This is telling us that whatever number x is, it must divide 13 also. Due to the fact that the other factor must be positive given that x is positive and that 13 is only divisible by the positive integers 13 and 1. It must be then that the x is the greatest of the two. Hence x is 13.
By using Euclidean algorithm, we get
g c d ( 5 n + 6 , 8 n + 7 )
= g c d ( 5 n + 6 , 3 n + 1 )
= g c d ( 2 n + 5 , 3 n + 1 )
= g c d ( 2 n + 5 , n − 4 )
= g c d ( n + 9 , n − 4 )
= g c d ( 1 3 , n − 4 )
From here, we can say that 1 3 ∣ n − 4 , or else the gcd would be 1 .Therefore the largest possible value is 1 3
Applying the Euclidean Algorithm again and again, we can reach our desired answer... ( a , b ) means the greatest common divisor of a and b ...
( 8 n + 7 , 5 n + 6 )
= ( 5 n + 6 , 3 n + 1 )
= ( 3 n + 1 , 2 n + 5 )
= ( 2 n + 5 , n − 4 )
= ( n − 4 , 1 3 )
Hence, the largest possible value is 1 3 ...
Remark: The largest value is attained for any multiple of 1 3 and so n − 4 = 1 3 m for some integer m ...
awesome!!
Let, d = g cd ( 5 n + 6 , 8 n + 7 ) = g cd ( 5 m + 1 , 8 m − 1 ) where m = n + 1 . Now, we observe that 8 ( 5 m + 1 ) − 5 ( 8 m − 1 ) = 1 3 ⇒ d ∣ 1 3 ⇒ d = 1 or, 1 3 . A simple check now reveals that for m = 5 , d = 1 3 . So 1 3 is the answer.
We use Euler's algorithim for calculating GCD's. g cd ( 5 n + 6 , 8 n + 7 ) = g cd ( 5 n + 6 , 3 n + 1 ) = g cd ( 2 n + 5 , 3 n + 1 ) = g cd ( 2 n + 5 , n − 4 ) = g cd ( n + 9 , n − 4 ) = g cd ( 1 3 , n − 4 ) Since the GCD cannot be greater than the absolute value of any of the integers themselves, we know that the GCD cannot be greater than 1 3 .
A quick test reveals that a GCD of 1 3 is indeed possible with n = 4 , so the answer is thus 1 3 .
Is Euclid's algo also called Euler's?
I solved this problem by Euclidean Algorithm.
By Euclidean Algorithm to calculate g c d ( 8 n + 7 , 5 n + 6 ) ,
8 n + 7 = ( 5 n + 6 ) + ( 3 n + 1 )
5 n + 6 = ( 3 n + 1 ) + ( 2 n + 5 )
3 n + 1 = ( 2 n + 5 ) + ( n − 4 )
2 n + 5 = 2 ( n − 4 ) + 1 3
Interestingly, we get a beautiful number 1 3 which is the answer we want!
Let the g.c.d. be x .
5 n − 6 ≡ 0 m o d x
⟹ 5 n ≡ 6 m o d x
⟹ 4 0 n ≡ 4 8 m o d x
8 n − 7 ≡ 0 m o d x
⟹ 8 n ≡ 7 m o d x
⟹ 4 0 n ≡ 3 5 m o d x
So, 4 8 ≡ 3 5 m o d x
Now, 4 8 − 1 3 = 3 5
∴ x = 1 3
If d is a common divisor of 8n+7 and 5n+6. Then It is a divisor of 8(5n+6) - 5(8n+7) = 13. Therefore, d=1$ or d=13. We are looking the largest value so d=13.
A really simple solution! Let e be the gcd of the two numbers. Since e divides both numbers, we have: 5n + 6 = e k, 8n + 7 = e m, (k and m are some integers) Multiply 1st equation by 8, 2nd by 5 and subtract 2nd from 1st. Thus, we have: 13 = e*(8k - 5m), e = 13 / (8k - 5m) The gcd e takes the largest value when the denominator is minimal. Obviously, it can't be 0, negative or fractional, then is is 1, so the largest gcd is 13 (answer).
The GCD of (5n + 6) and (8n + 7) can be found out by Euclids' Division Algorithm. 8n + 7 = 1 x (5n + 6) + 3n + 1
5n + 6 = 1 x (3n + 1) + 2n + 5
3n + 1 = 1 x (2n + 5) + n - 4
2n + 5 = 2 x (n - 4) + 13
As furhter division is not possible, we can say that 13 is the GCD.
Problem Loading...
Note Loading...
Set Loading...
This question asks what is the largest X such that:
8 n + 7 ≡ 0 ( m o d x ) 5 n + 6 ≡ 0 ( m o d x )
Applying modular arithmetic , we get that
0 ≡ ( 8 n + 7 ) + ( 5 n + 6 ) = 1 3 n + 1 3 = 1 3 ( n + 1 ) ( m o d x )
Since we know that g cd ( n + 1 , 5 n + 6 ) = g cd ( n + 1 , 1 ) , hence the largest GCD that is possible is 13.
This occurs when n = 4 , which gives us 5 n + 6 = 2 6 and 8 n + 7 = 3 9 .