## Task 20/84

All quadruples $(p_{1} ; p_{2} ; p_{3} ; p_{4})$ of prime numbers $p_{i}$ are to be determined that are solutions to the equation $p_{1}^{2}+p_{2}^{2}+p_{3}^{2}+p_{4}^{2}=999$ (calculators are not allowed for the solution!).
1. Since $999 \equiv 1(\bmod 2)$, the number of odd primes in the quadruple is odd. If exactly one $p_{i}$ were odd (w.l.o.g. let this be $p_{4}$), then $p_{1}=p_{2}=p_{3}=2$. The equation

$$
2^{2}+2^{2}+2^{2}+p_{4}^{2}=999
$$

would not yield a prime number $p_{4}$. Therefore, exactly 3 primes are odd and one (w.l.o.g. $p_{1}$) is equal to 2. The given equation is thus reduced to

$$
p_{2}^{2}+p_{3}^{2}+p_{4}^{2}=986
$$

2. Since $995 \equiv 2(\bmod 3)$ and $p_{i}^{2} \equiv 1(\bmod 3)$ for $p_{i} \neq 3$, it follows that for exactly one $p_{i}$ (w.l.o.g. $p_{2}$), $p_{i}=3$. The given equation is thus reduced to

$$
p_{3}^{2}+p_{4}^{2}=986
$$

3. Since $986 \equiv 1(\bmod 5)$ and $p_{i}^{2} \equiv \pm 1(\bmod 5)$ for $p_{i} \neq 5$, it follows that for exactly one $p_{i}$ (w.l.o.g. $p_{3}$), $p_{i}=5$. The given equation is thus reduced to

$$
p_{4}^{2}=961
$$

with the solution $p_{4}=31$. Indeed, $p_{4}$ is a prime number.

4. Therefore, there is a basic quadruple $\left(p_{1} ; p_{2} ; p_{3} ; p_{4}\right)=(2 ; 3 ; 5 ; 31)$. If the order is not considered, there are no further solutions (as shown by the solution process). However, if the order is considered significant, 23 additional (derived) quadruples result from the basic quadruple through permutation, making a total of $4! = 24$ quadruples.