4. Find all prime numbers $p$ such that the numbers $4 p^{2}+1$ and $6 p^{2}+1$ are also prime.
4. For $p=5$ we have $4 p^{2}+1=101$ and $6 p^{2}+1=151$, and these numbers are indeed prime. Now let's assume $p \neq 5$. Then we have $p \equiv \pm 1(\bmod 5)$ or $p \equiv \pm 2$ $(\bmod 5)$. In the first case, we get $4 p^{2}+1 \equiv 4 \cdot( \pm 1)^{2}+1=5 \equiv 0(\bmod 5)$, i.e., the number $4 p^{2}+1$ is divisible by 5, and since it is clearly greater than 5, it must be composite. In the second case, we get $6 p^{2}+1 \equiv 6 \cdot( \pm 2)^{2}+1=25 \equiv 0(\bmod 5)$, so the number $6 p^{2}+1$ is composite. Therefore, the only solution is $p=5$.