1. find all pairs of prime numbers $(p, q)$ with $3 \not p+1$ such that

$$
\frac{p^{3}+1}{q}
$$

is the square of a natural number.
1st solution It is possible to factorize $p^{3}+1=(p+1)\left(p^{2}-p+1\right)$. Since $q$ is prime, $q \mid p+1$ or $q \mid p^{2}-p+1$ must apply. Furthermore, $\operatorname{ggT}\left\{p^{2}-p+1, p+1\right\}=\operatorname{ggT}\left\{p^{2}-p+1-\right.$ $\left.(p+1)^{2}+3(p+1), p+1\right\}=\operatorname{ggT}\{3, p+1\}=1$.

Case 1: $q \mid p+1$, then $\frac{p+1}{q}$ and $p^{2}-p+1$ are not related and their product is a square of a natural number. It follows that both must be a square themselves. However, for $p>1$ :

$$
p^{2}>p^{2}-p+1>(p-1)^{2}
$$

that is, $p^{2}-p+1$ cannot itself be a square and so there is no solution in this case.

Case 2: $q \mid p^{2}-p+1$, also here $\frac{p^{2}-p+1}{q}$ and $p+1$ are divisors and their product is a square, so both are already a square themselves and it must hold $p+1=a^{2}$ for a natural $a$ but then $p=(a-1)(a+1)$ for $a>2$ is not prime. $a=2$ yields $p=3$, then $p^{3}+1=28=2^{2} \cdot 7$ and $q$ can only be 7. $a=1$ returns $p=0$.

Thus the only solution is $(3,7)$.