Problem 4. Find all prime numbers $p$ for which $p^{2}+2 p+11$ and $p^{2}+p+13$ are prime numbers.
Solution. For $p=2$ we have $4+4+11=19$ and $4+2+13=19$. Therefore, one solution is $p=2$.

For $p=3$ we have $9+6+11=26=2 \cdot 13$, so $p=3$ is not a solution to the problem.

If $p>3$, then $p$ is of the form $p=6k \pm 1$. Let $p=6k+1$. Then

$$
p^{2}+p+13=(6k+1)^{2}+6k+1+13=36k^{2}+18k+15=3\left(12k^{2}+6k+5\right)
$$

and since $12k^{2}+6k+5 \geq 23$, we conclude that $p^{2}+p+13$ is a composite number. Let $p=6k-1$. Then

$$
p^{2}+2p+11=(6k-1)^{2}+2(6k-1)+11=36k^{2}+10=2\left(18k^{2}+5\right)
$$

and since $18k^{2}+5 \geq 23$, we conclude that $p^{2}+2p+11$ is a composite number.

It follows that $p=2$ is the only solution.