Find all triples $(p; q; r)$ of primes such that $pq = r+ 1$ and $2(p ^ 2+q ^ 2) =r ^ 2 + 1$. We have to find all triples $(p; q; r)$ of primes such that $pq = r+ 1$ and $2(p ^ 2+q ^ 2) =r ^ 2 + 1$. This question was asked in the 2013 mumbai region RMO but i could not find a solution to it. Can you please help me out with this?
 A: Well, $r^2+1=2(p^2+q^2)$ is even, so $r^2$ is odd, and so $r$ is odd. But then $pq=r-1$ is even. Thus, $p$ and/or $q$ must be an even prime.
What happens next depends on whether you are considering negative numbers as potential primes. I will proceed as though you are. Let's assume that $p$ is an even prime, so that $p^2=4.$ Squaring the first equation then shows us that $$4q^2=r^2+2r+1,$$ while multiplying the second equation by $2$ gives us $$16+4q^2=2r^2+2,$$ meaning $$4q^2=2r^2-14.$$ Thus, $$2r^2-14=r^2+2r+1\\r^2-2r-15=0\\(r-5)(r+3)=0$$ and so either $r=5$ or $r=-3.$ But we cannot have $r=-3,$, though, since then we would have $$4q^2=r^2+2r-1=9-6+1=4,$$ so $q^2=1,$ which is impossible, since $q$ is prime. Thus, we must have $r=5.$ So, our original equations become $$pq=6$$ and $$8+2q^2=26.$$ Hence, we find the triples $(2,3,5)$ and $(-2,-3,5).$
Assuming that $q$ is an even prime likewise gets us the triples $(3,2,5)$ and $(-3,-2,5).$
From the work above, we can also see that there are only two viable triples if we are not considering negative numbers as potential primes.
A: Hint $\,\ r = pq-1\, $ must be odd, so, wlog, $\,q=2$. The rest is easy.
A: First, we square the first equation. We have: $p^2q^2=r^2+2r+1$. If we plug $r^2+1$ we would have: $p^2q^2=2(p^2+q^2+r)$. Since $p$ and $q$ are prime numbers and the RHS is even, at least one of them should be $2$. Without loss of generality we take $p=2$. We have: $4q^2=2(4+q^2+r)$ so $q^2=r+4$. If we plug this into the second equation, we have: $2(4+r+4)=r^2+1$ so $r^2-2r+15=0$. The solutions are $r=-3,5$ but $-3$ is not a prime number so $r=5$. Plugging this into the first equation, we get $2q=6$ so $q=3$. Thus, the only triplets would be: $(p,q,r)=(2,3,5),(3,2,5)$P.S.: As Singhal suggested, Technically −3 is a prime. But in here it does not lead to any solutions
A: Solution.If p and q are both odd, then r = pq - 1 is even so r= 2. But in this case pq>=3*3 = 9 and hence there are no solutions. This proves that either p= 2 or q= 2. If p= 2 then we have 2q = r + 1 and 8 + 2q^2 = r^2+ 1. Multiplying the second equation by 2 we get 2r^2+ 2 = 16 + (2q)^2 = 16 + (r+ 1)^2. Rearranging the terms, we have r^2-2r-15 = 0,or equivalently (r+ 3)(r-5) = 0. This proves that r= 5 and hence q= 3. Similarly,if q= 2 then r= 5 and p= 3. Thus the only two solutions are (p;q;r) = (2;3;5) and(p;q;r) = (3;2;5).
