## Task 25/67

We are looking for all prime numbers $p$ for which $3 p+4=a^{2}$ (where $a$ is a natural number).
From $3 p+4=a^{2}$ it follows that $3 p=a^{2}-4=(a-2)(a+2)$. Since $p$ is a prime number,

(1) either $a+2=3$ and $a-2=p$

(2) or $a-2=3$ and $a+2=p$

(1) cannot hold, as otherwise $a=1$ and $p$ would be negative; therefore, (2) must hold. Then $a=5$ and $p=7$. Indeed, $3 \cdot 7+4=25=5^{2}$. The solution path excludes further solutions for $p$.

## Solution by Emil Donath:

From the equation $3 p+4=a^{2}$, it is clear that the left side must be a square and can be represented by the term $(n+2)^{2}$.

Now, $(n+2)^{2}=n^{2}+4 n+4=a^{2}$. By comparing coefficients of the last equation with the first, we get

$$
3 p=n^{2}+4 n \quad \text { or } \quad p=\frac{n(n+4)}{3}
$$

For $p$ to be a prime number, either $|n|$ or $|n+4|$ must be 3 and $n(n+4)>0$. If $n$ is a multiple of 3, then $\frac{n(n+4)}{3}$ remains a product that has factors other than 1 and $p$, and $p$ cannot be a prime number.

If $n=3$, then $p=7$ is the only prime number that satisfies this equation. For $n=-1$, $p=-1$, which is not a prime number. However, if $n=-7$, then $p=7$ is obtained again.

Thus, $p=7$ is the only prime number that satisfies the given equation.