Consider all prime pairs ( p , q ) such that p 3 − q 5 = ( p + q ) 2 . Find the sum of all such p .
Note: Inspired by a Russian mathematical olympiad problem.
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.
Sorry for a lengthy solution. I just want to explain every step that I did in solving the problem. Thanks
Log in to reply
Best type of solution. Really appreciate it. Could you tell me the way to learn to write such solutions?
And is it necessary to start with 3 only or something like that? And when simplifying expressions with large powers like power 4 or 5, modulo to which number would be useful? Can you give me some tips on that- like choosing the correct modulo,,,etc. THX :) @Rindell Mabunga
@Rindell Mabunga Thank you for such a marvelous solution. Please tell me how did you guess that let the numbers be greater than 3. I know its some sort of great intuition, but still, how did you think of 3??
I too cant guess your choice of three.Is there a general algorithm for such solutions,Untill i get that i will fail to put such a good solution to any of my use.Plz reveal.
I just considered logic in using modulo 3 because there will be no primes p greater than 3 such that p = 0(mod 3).
And I think using the statement "All primes greater than 3 are always 1(mod 3) and 2(mod 3)" is very useful in dealing with prime numbers and modulo arithmetic. Thanks!
The question is not as difficult as it seems to be. The equation clearly shows p and q cannot be very large values , so you need to try small values of primes. The smallest pair which satisfies the equation is , p= 7 and q=3.Above these values , the difference between the LHS and RHS of equation is highly unequal, so you need not check further. so, we have only one value of p satisfying the equation, i.e. 7, and that is the answer.But the question is ,no doubt, interesting.
Let's make a table in mod 3.
Problem Loading...
Note Loading...
Set Loading...
We must consider 3 cases in this problem.
Case 1: Assume that p and q be primes greater than 3.
If p and q are primes greater than 3, then the two primes must be = 1 ( m o d 3 ) or = 2 ( m o d 3 ) . Now, we will have 4 sub cases.
Sub case 1: Assume that p = 1 ( m o d 3 ) ; q = 1 ( m o d 3 )
By Substitution and Properties of Modulo:
p 3 − q 5 = ( p + q ) 2
1 3 − 1 5 = ( 1 + 1 ) 2
1 − 1 = 2 2
1 − 1 = 4
1 − 1 = 1 (Since 4 = 1 ( m o d 3 ) )
0 = 1
which is false so our assumption is incorrect
Sub case 2: Assume that p = 1 ( m o d 3 ) ; q = 2 ( m o d 3 )
By Substitution and Properties of Modulo:
p 3 − q 5 = ( p + q ) 2
1 3 − 2 5 = ( 1 + 2 ) 2
1 − 3 2 = 3 2
1 − 3 2 = 9
1 − 2 = 0 (Since 3 2 = 2 ( m o d 3 ) ; 9 = 0 ( m o d 3 ) )
− 1 = 0
which is also false so our assumption is incorrect
Sub case 3: Assume that p = 2 ( m o d 3 ) ; q = 1 ( m o d 3 )
By Substitution and Properties of Modulo:
p 3 − q 5 = ( p + q ) 2 2 3 − 1 5 = ( 2 + 1 ) 2 8 − 1 = 3 2 8 − 1 = 9 2 − 1 = 0 (Since 8 = 2 ( m o d 3 ) ; 9 = 0 ( m o d 3 ) ) 1 = 0
which is also false so our assumption is incorrect
Sub case 4: Assume that p = 2 ( m o d 3 ) ; q = 2 ( m o d 3 )
By Substitution and Properties of Modulo:
p 3 − q 5 = ( p + q ) 2
2 3 − 2 5 = ( 2 + 2 ) 2
8 − 3 2 = 4 2
8 − 3 2 = 1 6
2 − 2 = 1 (Since 1 6 = 1 ( m o d 3 ) )
0 = 1
which is also false so our assumption is incorrect
Therefore, our assumption in case 1 is incorrect.
Case 2: let p be a prime less than or equal to 3
2 and 3 are the only primes less than or equal to 3
Sub case 1: p = 2
By substitution using p = 2 :
p 3 − q 5 = ( p + q ) 2
2 3 − q 5 = ( 2 + q ) 2
8 − q 5 = 4 + 4 q + q 2
0 = q 5 + q 2 + 4 q − 4
All of the roots of q 5 + q 2 + 4 q − 4 = 0 are not rational by the use of Rational Root Test
Therefore, our assumption is incorrect
Sub case 2: p = 3
By substitution using p = 3 :
p 3 − q 5 = ( p + q ) 2
3 3 − q 5 = ( 3 + q ) 2
2 7 − q 5 = 9 + 6 q + q 2
0 = q 5 + q 2 + 6 q − 1 8
All of the roots of q 5 + q 2 + 6 q − 1 8 = 0 are not rational by the use of Rational Root Test
Therefore, our assumption is incorrect
Case 3: let q be a prime less than or equal to 3
Sub case 1: q = 2
By substitution using q = 2 :
p 3 − q 5 = ( p + q ) 2
p 3 − 2 5 = ( p + 2 ) 2
p 3 − 3 2 = p 2 + 4 p + 4
p 3 − p 2 − 4 p − 3 6 = 0
All of the roots of p 3 − p 2 − 4 p − 3 6 = 0 are not rational by the use of Rational Root Test
Sub case 2: q = 3
By substitution using q = 3 :
p 3 − q 5 = ( p + q ) 2
p 3 − 3 5 = ( p + 3 ) 2
p 3 − 2 4 3 = p 2 + 6 p + 9
p 3 − p 2 − 6 p − 2 5 2 = 0
One of the root of p 3 − p 2 − 6 p − 2 5 2 = 0 is rational which is 7 and 7 is also a prime therefore ( p , q ) = ( 7 , 3 ) satisfies all the given conditions.
Therefore, the sum of all primes p which is also the only possible value of p is 7 .