Find prime numbers $p$, $q$, $r$ and $s$, pairwise distinct, such that their sum is prime number and numbers $p^2+qr$ and $p^2+qs$ are perfect squares
Problem
Source: Regional Olympiad - Federation of Bosnia and Herzegovina 2017
Tags: number theory, prime numbers
19.09.2018 17:43
Hint: one of the prime numbers $p,q,r,s$ it is $2$ Also we have $(a-p)(a+b)=qr,(b-p)(b+p)=qs\Rightarrow a-p=q,a+b=r\text{ or viceversa}\text{, etc}\text{.}$ and analogous for the second equation too.
19.09.2018 22:25
It is obvious that one of the primes is $2$ (otherwise their sum $t=p+q+r+s$ isn't prime). We will use that fact later. We have the following equalities: $(a+p)(a-p)=q*r$ and $(b+p)(b-p)=q*s$. WLOG $a, b$ are naturals. Let's first consider the 2 annoying cases: $1)$ $a-p=1 => p=a-1$ and $p$ isn't $2$, because then $a$ would be $3$, a contradiction with the first equality(since $p^2+qr>=4+3*5>9$). Then we have $ q*r=2a-1=2p+1 $ and so $q$ and $r$ aren't $2$. Therefore $ s=2 $. From the second equality we have $ q*s=(b+a-1)(b-a+1) $ and if $ b-a+1=1 $ then $ b=a $ and so $ q*s=2a-1=q*r $ and then $ s=r $, a contradiction. So since we have only 2 relatively prime numbers (you can also take the $ gcd $ of the two parentheses on the $ RHS $) we have either $ q=b+a-1 $, $ s=2=b-a+1 $ or $ q=b-a+1 $, $ s=2=b+a-1 $. In the first case we get $ b=a+1 $ and so $ q=2a $ which isn't a prime since $ a>1 $. In the second $ b=3-a $ and so $ q=4-2a $ which can be prime iff $a=1$, but we already stated that $q$ is odd. Then we have the following 4 cases: $2)$ Like TuZo suggested, $a+p=q, a-p=r, b+p=q$ and $b-p=s$. But then it's clear that $a=b$ and so $r=s$, contradiction. $3)$ $a+p=r, a-p=q, b+p=s$ and $b-p=q$ and again $a=b$ so $r=s$, contradiction. $4)$ $a+p=q, a-p=r, b+p=s, b-p=q$. We get $b-a=2p$. If either $r$ or $s$ is $2$ (WLOG $r=2$), we have $p^2+qs=b^2$ and so $b$ is obviously even, so $a$ also must be even and from $p^2+2q=a^2$ we get that $p$ must be even(so $p=2$), a contradiction, because $p$ and $r$ are distinct. If $q=2$, then $a+p=2$, impossible, since $p >= 3$. So we get that $p=2$. Therefore $b-a=4, r=a-2, q=a+2=b-2, s=b+2=a+6$. It is easy to see that if $a$ is $1, 2$ or $3$ $mod 3$ then exactly one of $q, r, s$ is divisible by $3$ so that number must be $3$. Since $r$ is the smallest of them, $r=3$ and so $a=5, q=7, s=11$ and $t=2+3+7+11=23$ is prime so this is the only solution to the problem. $4)$ Analogous to case 4. So the solution is $(p, q, r, s)=(2, 3, 7, 11)$.
20.08.2020 17:25
Nice problem. So $p + q + r + s = \phi$ where $\phi$ is prime number. $\phi > 3$ and so it is odd so one of numbers $(p, q, r, s)$ is even and consequently equal to $2$. Now this solution becomes long. Let $p^2 + qr = a^2$ and $p^2 + qs = b^2$. Now we have consequently $qr = (a - p)(a + p)$ and $qs = (b - p)(b + p)$. We now eliminate cases. Case 1: $a - p = 1$ In this case we get that $qr = 2p + 1$. $p$ mustn't be equal to $2$ because it would mean that $q$ or $r$ is equal to $1$. And $q$ and $r$ are odd because $RHS$ is odd. So $s = 2$, from this we have that $(b - p)(b + p)$ is divisible by $2$ but it is possible if it is divisible by $4$ and so $q$ is even and that gives contradiction. Case 2: $b - p = 1$ Analogous to Case 1. Case 3: $q = (a - p) = (b - p)$ From this we obtain $a = b$ and consequently $r = s$ which gives contradiction. Case 4: $q = (a + p) = (b + p)$ Like in Case 3 we get $a = b$ and consequently $r = s$. Case 5: $q = (a - p) = (b + p)$ From this we have $a = b + 2p$, $r = a + p = b + 3p$ and $s = b - p$. Now more cases... Let $r = 2$ then it would mean that $a$ is odd and so $b$ is odd and from there $q$ is even which gives contradiction. If $s = 2$ then $b$ is odd and so again $q$ is even which gives contradiction. If $q = 2$ then $a$ and $b$ are odd and so $r$ is even and we get contradiction. Final stand is $p = 2$. Then our 4-touple would look like $(p, q, r, s) = (2, b + 2, b + 6, b - 2)$ It is easy to see that one of numbers $q, r, s$ is divisible by $3$ and so equal to $3$. Because $s$ is the smallest it follows that $s = 3$. From there we have $(p, q, r, s) = (2, 7, 11, 3)$. Case 6: $q = a + p = b - p$ Analogous to Case 5 and we get contradiction on all cases but on $p = 2$. Our 4-touple looks like $(p, q, r, s) = (2, b - 2, b + 2, b + 6)$ Now again as $r$ is the smallest it is equal to $3$ and we get second solution $(p, q, r, s) = (2, 3, 7, 11)$ Hence we are done!