# Find $P + Q + R$

I was doing questions from previous year's exam paper and I'm stuck on this question.

Suppose $P, Q, R$ are positive integers such that $$PQR + PQ + QR + RP + P + Q + R = 1000$$ Find $P + Q + R$.

It seems easy but I am not getting the point from where I should start. Thank you.

• Expand $(1+p)(1+q)(1+r)$ , not sure if it may help. May 5, 2015 at 5:57
• It will help. But one should factorize 1001, and appeal to Unique Factorization Theorem May 5, 2015 at 6:00
• @Mann thank you for your comment. Your equation comes out to be the same as the question but what next!. I am not getting how to proceed further May 5, 2015 at 6:03
• @PVanchinathan Please explain. May 5, 2015 at 6:06

Note that

$(1 + P) (1 + Q) (1 + R) = 1 + P + Q + R$ $+ PQ+ PR + QR + PQR = 1 + 1000 = 1001, \tag{1}$

by the hypothesis on $P$, $Q$, $R$; also,

$1001 = 7 \cdot 11 \cdot 13, \tag{2}$

all primes; thus we may take

$P = 6; \;\; R = 10; \;\; Q = 12, \tag{3}$

or some permutation thereof; in any event, we have

$P + Q + R = 28. \tag{4}$

Note Added in Edit, Saturday 12 August 2017 10:04 PM PST: The solution is unique up to a permutation of $(P, Q, R) = (6, 10 ,12)$ by virtue of the fact that $1001$ may be factored into three non-unit positive integers in exactly one way, $1001 = 7 \cdot 11 \cdot 13$, since $7$, $11$, and $13$ are all primes. This follows from the Fundamental Theorem of Arithmetic. These remarks added at the suggestion of user21820 made 5 May 2015. Sorry about the delayed response. End of Note.

• Beat me to it. Once you spot the factorization, the rest is trivial.
– smci
May 5, 2015 at 9:08
• @amighty: you're more than welcome! Blessings to you as well! And thanks for the "acceptance"! Cheers! ;-)! May 5, 2015 at 9:40
• Do add the justification why there are no other solutions. May 5, 2015 at 13:12
• How should one go about solving this if you don't spot the factorization? May 5, 2015 at 14:20
• @GarethRees: It is possible to spot the factorization without prior knowledge - in my case, it began when I factored the first two terms into PQ(R+1), and I remarked that I could make the term (R+1) emerge elsewhere. May 5, 2015 at 14:32

If you allow some $p,q,r$ to be $0$, you also get $$p+q+r=1000$$ $$p+q+r=88$$ $$p+q+r=100$$ $$p+q+r=148$$

for $$p=1000,q=0,r=0$$ $$p=76,q=12,r=0$$ $$p=90,q=10,r=0$$ $$p=142,q=6,r=0$$

respectively, or any permutation thereof.

• Note that the question asked for positive $P, Q, R$. May 5, 2015 at 17:36
• Yep. Always fun to extend though! May 5, 2015 at 17:41
• Indeed! Excelsior! Cheers! May 5, 2015 at 17:43
• Yup, you can use the same method as before. The terms $(1+p),(1+q),(1+r)$ must be divisors of $1001$, so then we just go through them all. Location noted! May 6, 2015 at 5:20
• I haven't, but it's noted so that maybe I can get there some time in the future :) May 6, 2015 at 5:32