Simultaneous Prime Equations

5 p q = r + 1 , 7 p + q r = p + 1 \large 5p-q=r+1 , \qquad \dfrac{7p+q}{r}=p+1

Let p p , q q and r r be prime numbers satisfying the system of equations above. Find the maximum value of p + q + r p+q+r .


The answer is 137.

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.

5 solutions

Nihar Mahajan
Apr 30, 2016

Relevant wiki: Quadratic Diophantine Equations - Solve by Factoring

Since we want maximum value we assume p , q , r p,q,r to be positive primes. Rewrite second equation as 7 p + q = r p + r 7p+q=rp+r and add this to the given first equation to get 12 p = r p + 2 r + 1 p ( 12 r ) = 2 r + 1 12p=rp+2r+1 \Rightarrow p(12-r)=2r+1 . Note that since RHS and p p is positive we have r < 12 r<12 so lets first check for r = 11 r=11 substituting this in the above equations we get p = 23 p=23 and q = 103 q=103 . We see that as we take smaller values of r r , the value of p , q p,q reduces, so ( p , q , r ) = ( 23 , 103 , 11 ) (p,q,r)=(23,103,11) gives the maximum p + q + r = 23 + 103 + 11 = 137 p+q+r=23+103+11=\boxed{137}

Moderator note:

To justify " We see that as we take smaller values of r r , the value of p , q p,q reduces", we should write p , q p,q in terms of r r . E.g. p = 2 r + 1 12 r p = \frac{2r+1}{12-r} , and in the domain ( 0 , 12 ) (0, 12) 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

Sharky Kesa - 5 years, 1 month ago

This solution makes my solution look dumb.

+1!

Harsh Shrivastava - 5 years, 1 month ago

Log in to reply

I know, unfortunately my solution is being a bit harsh on your solution :( :P

Nihar Mahajan - 5 years, 1 month ago

Yes ! Your method is same as mine

Aakash Khandelwal - 5 years, 1 month ago

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

Patience Patience - 5 years, 1 month ago
Harsh Shrivastava
Apr 30, 2016

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 5p^2 -p(q+3)-(2q+1) =0

Consider the new equation as a quadratic in p p .

For p p to be an integer, its discriminant must be a perfect square.(Let's say k k )

( q + 3 ) 2 4 ( 5 ) ( ( 2 q + 1 ) ) = k 2 \implies (q+3)^2 -4(5)(-(2q+1)) = k^2

500 = ( 23 + q + k ) ( 23 + q k ) 500=(23+q+k)(23+q-k)

Using some modular arithmetic and breaking 500 into its factors, we can get possible values of q q as 103 103 and 7 7 .

Thus after getting values of q, we can solve for p and r.

Of all triples, ( p , q , r ) = ( 23 , 103 , 11 ) {(p,q,r)}={(23,103,11)} gives maximum sum as 137 137 .

Moderator note:

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

Nihar Mahajan - 5 years, 1 month ago

Good solution! +1

Sharky Kesa - 5 years, 1 month ago

I too did the same.... nice.. (+1)

Raushan Sharma - 5 years, 1 month ago
Anthony Ritz
May 1, 2016

I started basically the same as Harsh Shrivastava, solving the first equation for r r plugging it into the second equation, and cross-multiplying to get an equation in p p and q q .

However, when I got the quadratic in p p and q q I multiplied it out to get 5 p 2 3 p 2 q p q 1 = 0 5p^2-3p-2q-pq-1=0 and then basically factored/completed the square (ignoring the constant) as ( 5 p q 13 ) ( p + 2 ) + 25 = 0 (5p-q-13)(p+2)+25=0 . Thus, ( 5 p q 13 ) ( p + 2 ) = 25 (5p-q-13)(p+2)=-25 .

This means that these two multiplied terms must be factors of 25 -25 , but p > 0 p>0 , so p + 2 = 5 p+2=5 or p + 2 = 25 p+2=25 . From this, p = 3 p=3 or 23 23 , and plugging back in gives q = 7 q=7 or 103 103 , respectively, and then r = 7 r=7 or 11 11 , respectively. The larger sum is 23 + 103 + 11 = 137 23+103+11=\boxed{137} .

Saya Suka
Apr 8, 2021

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

Ahmed Abdelaal
May 6, 2016

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 - 25 p + 2 \frac{25}{p+2} 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

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...