Let be an ordered pair of positive integers such that is a perfect square. Find the maximum possible value of .
If you think there is no maximum value, i.e. there are infinitely many pairs that satisfy the condition, input as your answer.
Note: A perfect square must be nonnegative.
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.
Obviously, one such pair is ( 4 , 2 ) since 5 4 − 7 2 = 2 5 2 − 7 2 = 2 4 2 . But, there may be more. Let's let ( m , n ) be an arbitrary pair of positive integers such that
5 m − 7 n = k 2 ,
for some nonnegative integer k . First, we take m o d 5 of both sides of the equation to get 2 n ≡ k 2 ( m o d 5 ) . Checking powers of 2, we find that n has to be even, since otherwise 2 n is congruent to either 2 or 3 , but no perfect square is congruent to either of those m o d 5 . Similarly, if we take m o d 7 of the equation, we get ( − 2 ) m ≡ k 2 ( m o d 7 ) , which implies that m is also even.
Let m = 2 a and n = 2 b for some nonnegative integers a , b . Now our equation becomes
5 2 a − 7 2 b = k 2 .
Subtracting 5 2 a from both sides and factoring, we get
− 7 2 b = ( k + 5 a ) ( k − 5 a ) .
This equation implies that both ∣ k + 5 a ∣ and ∣ k − 5 a ∣ are powers of 7 . Also, exactly one of k + 5 a and k − 5 a is negative. Suppose that neither ∣ k + 5 a ∣ nor ∣ k − 5 a ∣ are equal to 1 . Then, the difference between k + 5 a and k − 5 a is also a multiple of 7 . However, ( k + 5 a ) − ( k − 5 a ) = 2 ( 5 a ) , which is never a multiple of 7 . Thus, one of ∣ k + 5 a ∣ and ∣ k − 5 a ∣ is equal to 1 . Since k − 5 a < k + 5 a , we let ∣ k − 5 a ∣ = 1 , or k = 5 a − 1 since k − 5 a must be negative.
Now, we can substitute this expression for k into our equation to get
7 2 b = 2 ( 5 a ) − 1 .
Rearranging gives
2 ( 5 a ) = 7 2 b + 1 .
If we take m o d 5 of both sides of this equation, we get ( − 1 ) b ≡ − 1 ( m o d 5 ) , which means b is odd. Let b = 2 c + 1 . Since b is odd, we can factor the expression 7 2 b + 1 :
7 2 b + 1 = ( 7 2 ) b + 1 = ( 7 2 ) 2 c + 1 + 1 = ( 7 2 + 1 ) ( 7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 ) = ( 5 0 ) ( 7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 ) .
From this factorization, we immediately get a ≥ 2 . Suppose a > 2 , and let d = a − 2 . Dividing both sides of our equation by 5 0 , we get
5 d = 7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 .
If we analyze powers of 7 m o d 5 , we find
7 4 x − 7 4 x + 1 7 4 x + 2 − 7 4 x + 3 ≡ 1 ( m o d 5 ) ≡ − 2 ( m o d 5 ) ≡ − 1 ( m o d 5 ) ≡ 2 ( m o d 5 ) ,
for all nonnegative integers x . Notice that − 7 4 x + 3 + 7 4 x + 2 − 7 4 x + 1 + 7 4 x ≡ 0 ( m o d 5 ) .
Using these equivalences, we get either
7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 ≡ 1 + 2 − 1 − 2 + 1 ⋯ − 2 + 1 ≡ 1 ( m o d 5 )
or 7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 ≡ − 1 − 2 + 1 + 2 − 1 − 2 + 1 ⋯ − 2 + 1 ≡ − 2 ( m o d 5 ) .
Thus, 7 2 c − 7 2 c − 1 + ⋯ − 7 + 1 can never be a multiple of 5 , let alone a power of 5 .
This means that c = 0 , or b = 2 ( 0 ) + 1 = 1 and n = 2 ( 1 ) = 2 . Also, d = 0 , a = 0 + 2 = 2 , and m = 2 ( 2 ) = 4 . Therefore, the only pair of positive integers ( m , n ) that satisfies 5 m − 7 n = k 2 is ( 4 , 2 ) , and the maximum value of m + n is 2 + 4 = 6 .