## Task A-2.2.

Determine all triples of prime numbers whose sum of squares decreased by 1 is equal to the square of some natural number.
## Solution.

Let the sought triplet of prime numbers be $\mathrm{s}(p, q, r)$. Then $p^{2}+q^{2}+r^{2}-1=n^{2}$ for some natural number $n$.

We know that the squares of natural numbers, when divided by 3, give a remainder of 0 or 1.

1 point

Assume that none of the numbers $p, q$, and $r$ is equal to 3. Then their squares give a remainder of 1 when divided by 3, and $n^{2}=p^{2}+q^{2}+r^{2}-1$ gives a remainder of $1+1+1-1=2$, which is not possible.

Therefore, at least one of the numbers $p, q$, and $r$ must be equal to 3.

Similarly, we know that the squares of natural numbers, when divided by 4, give a remainder of 0 or 1.

Assume that none of the numbers $p, q$, and $r$ is equal to 2. Then their squares give a remainder of 1 when divided by 4, and $n^{2}=p^{2}+q^{2}+r^{2}-1$ gives a remainder of $1+1+1-1=2$, which is not possible.

Therefore, at least one of the numbers $p, q$, and $r$ must be equal to 2.

Without loss of generality, we can assume that $p=3$ and $q=2$, and thus

$$
n^{2}=3^{2}+2^{2}+r^{2}-1=12+r^{2}
$$

By rearranging and factoring the difference of squares, we have $(n-r)(n+r)=12$.

Note that $n-r$ and $n+r$ have the same parity because their sum is even.

Also note that $n+r > n-r$ and $n+r$ must be a positive number.

Considering the factorizations of the number 12, the only possibility is $n-r=2, n+r=6$.

Solving the system of equations gives $n=4, r=2$.

Therefore, the sought triplets are $(3,2,2),(2,3,2)$, and $(2,2,3)$.

1 point

Note: Correct proofs that one number must be 3 and one must be 2 are worth 3 points each. Completing the proof and concluding that the remaining number is also equal to 2 is worth 4 points. This completion can also be achieved by checking all possible factorizations of the number 12.

A solution that finds the solution (without proving that there are no other solutions) is worth 1 point, which corresponds to the last point in the scoring scheme.

A solution that does not list all permutations of ordered triplets of prime numbers that satisfy the conditions of the problem still earns the last 1 point from the scoring scheme.