Answer: 2014.
By condition, rp3=−(p2+p)+2rq2+(q2+q), and p2+p, q2+q, 2rq2 are even for all natural p and q, then rp3 is also even. Therefore, since r and p are prime, we see that either p=2 or r=2.
If p=2, then the initial equality has the form 8r+4+2=2rq2+q2+q. But this is impossible because the right-hand side of this expression is greater than its left-hand side. Indeed, since p=2 and q=p is prime, we have q>2, so 2rq2+q2+q>8r+4+2.
Thus r=2 and the initial equality has the form 2p3+p2+p=4q2+q2+q, or
p(2p2+p+1)=q(5q+1).(1)
Since p and q are distinct prime numbers, we see that p and q are coprime. Then from (1) it follows that 2p2+p+1 is divisible by q, and 5q+1 is divisible by p. Therefore 2p2+p+1=mq and 5q+1=mp for some m∈N. We put q=(mp−1)/5 into the former equality, then
10p2+(5−m2)p+(m+5)=0.(2)
Consider this equality as a quadratic equation with respect to p. Since the coefficients of (2) are integer and its root p is integer, we obtain that the discriminant of (2) is necessarily a perfect square, i.e.
D=(m2−5)2−4⋅10⋅(m+5)=m4−10m2−40m−175=n2(3)
for some nonnegative integer n. Since D<m4−175, we see that for m=1,2,3 the discriminant is negative. Moreover, for m=4 we have D=256−160−160−175<0. Therefore m≥5.
From (3) it follows that (m2−5)2>n2. Show that n2>(m2−11)2. If not, then from (3) it follows that
(m2−5)2−40(m+5)≤(m2−11)2⇔3m2−10m−74≤0.(4)
It is easy to see that the latter inequality holds only for m≤6. But m≥5, so to prove that n2>(m2−11)2 it remains to show that for m=5 and m=6 equality (2) does not hold for prime p.
If m=5, then (2) has the form 10p2−20p+10=0 and has exactly one root p=1; but 1 is not prime number. If m=6, then the discriminant of (2) is equal to D=1296−360−240−175=521; but 521 is not perfect square.
Therefore (m2−11)2<n2<(m2−5)2, i.e., taking into account that m≥7 and n≥0, we have m2−11<n<m2−5. Note that from (3) it follows that m and n have different parity, so n can admit only two values n=m2−9 or n=m2−7.
If n=m2−9, then from (3) we obtain m4−10m2−40m−175=(m2−9)2 or m2−5m−32=0. However, it is easy to see that the discriminant of this equation is equal to 153, so the equation has no integer solutions.
If n=m2−7, then from (3) we get m4−10m2−40m−175=(m2−7)2 or m2−10m−56=0. We see that m=−4 and m=14 are the roots of this equation. Since m∈N, we have m=14.
Therefore m=14, then n=m2−7=189. From (2) we obtain p=(m2−5±n)/20=(191±189)/20. Since p is integer, we have p=19 which is prime. Hence q=(mp−1)/5=(14⋅19−1)/5=265/5=53.
Thus the required value of the product is pqr=19⋅53⋅2=2014.