5 p − q = r + 1 , r 7 p + q = p + 1
Let p , q and r be prime numbers satisfying the system of equations above. Find the maximum value of p + q + r .
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.
To justify " We see that as we take smaller values of r , the value of p , q reduces", we should write p , q in terms of r . E.g. p = 1 2 − r 2 r + 1 , and in the domain ( 0 , 1 2 ) it is an increasing function.
Note: The first sentence is unjustified and need not be true. However, prime numbers are assumed to be positive, unless otherwise stated.
My solution! +1
Log in to reply
I know, unfortunately my solution is being a bit harsh on your solution :( :P
Yes ! Your method is same as mine
with dr/dp=0 =25/(p+2)^2 thats impossible out range but if it =1 >>>p=3 >>>>or-7 , iwont soultion this questions with dr/dp iam not will try again because i am will sleep u can try dp/dr or dq/dr or ....... i will go .... ok may be tan90 its unknown other soultion maybe we can draw 3eqoul and find piont put you can find when me put dr/dp #1 it give me 3 or -7 also i will try again
I'll call first equation A and second equation B.
Substitute the value of r from A in B to get 5 p 2 − p ( q + 3 ) − ( 2 q + 1 ) = 0
Consider the new equation as a quadratic in p .
For p to be an integer, its discriminant must be a perfect square.(Let's say k )
⟹ ( q + 3 ) 2 − 4 ( 5 ) ( − ( 2 q + 1 ) ) = k 2
5 0 0 = ( 2 3 + q + k ) ( 2 3 + q − k )
Using some modular arithmetic and breaking 500 into its factors, we can get possible values of q as 1 0 3 and 7 .
Thus after getting values of q, we can solve for p and r.
Of all triples, ( p , q , r ) = ( 2 3 , 1 0 3 , 1 1 ) gives maximum sum as 1 3 7 .
This is a great solution, where we've reduced it to an equation in one term, which helps us determine all of the possible solutions.
Nice solution using quadratic and factoring +1
Good solution! +1
I too did the same.... nice.. (+1)
I started basically the same as Harsh Shrivastava, solving the first equation for r plugging it into the second equation, and cross-multiplying to get an equation in p and q .
However, when I got the quadratic in p and q I multiplied it out to get 5 p 2 − 3 p − 2 q − p q − 1 = 0 and then basically factored/completed the square (ignoring the constant) as ( 5 p − q − 1 3 ) ( p + 2 ) + 2 5 = 0 . Thus, ( 5 p − q − 1 3 ) ( p + 2 ) = − 2 5 .
This means that these two multiplied terms must be factors of − 2 5 , but p > 0 , so p + 2 = 5 or p + 2 = 2 5 . From this, p = 3 or 2 3 , and plugging back in gives q = 7 or 1 0 3 , respectively, and then r = 7 or 1 1 , respectively. The larger sum is 2 3 + 1 0 3 + 1 1 = 1 3 7 .
7p + q = (p + 1) × r
= (p + 1)(5p – q – 1)
= 5p² + 4p – 1 – pq – q
pq + 2q = 5p² – 3p – 1
= q × (p + 2)
q = (5p² – 3p – 1) / (p + 2)
= (5p – 13) + 25/(p + 2)
25/(p + 2) must be a positive integer, and p a prime, so p = 3 or p = 23.
p = 3, q = 7, r = 7
or
p = 23, q = 103, r = 11
3 + 7 + 7 < 23 + 103 + 11
Answer = 137
i made the same steps as Nihar Mahajan but when i arrived at 12p = rp + 2r + 1 , i took r common factor instead which leads to the equation : r = 12 - p + 2 2 5 so either p + 2 = 25 or p + 2 = 5 , by solving for q and r , we find that either p = 3 , r = 7 , q = 7 or q = 103 , r = 11 , p = 23 so the answer is 103 + 11 + 23 = 137
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Quadratic Diophantine Equations - Solve by Factoring
Since we want maximum value we assume p , q , r to be positive primes. Rewrite second equation as 7 p + q = r p + r and add this to the given first equation to get 1 2 p = r p + 2 r + 1 ⇒ p ( 1 2 − r ) = 2 r + 1 . Note that since RHS and p is positive we have r < 1 2 so lets first check for r = 1 1 substituting this in the above equations we get p = 2 3 and q = 1 0 3 . We see that as we take smaller values of r , the value of p , q reduces, so ( p , q , r ) = ( 2 3 , 1 0 3 , 1 1 ) gives the maximum p + q + r = 2 3 + 1 0 3 + 1 1 = 1 3 7