2. Determine all pairs $(m, p)$ of natural numbers such that $p$ is a prime number and

$$
2^{m} p^{2}+27
$$

is the cube of a natural number.
Solution The third power $n^{3}$ is odd, so is $n$. Rearranging leads to

$$
2^{m} p^{2}=n^{3}-3^{3}
$$

The right side can be factored as

$$
2^{m} p^{2}=(n-3)\left(n^{2}+3 n+9\right)
$$

The second factor is odd, hence $2^{m} \mid (n-3)$. Moreover, $p^{2} \mid \left(n^{2}+3 n+9\right)$, since $n^{2}+3 n+9$ is greater than $n-3$. Now the second factor lies between $(n+1)^{2}$ and $(n+3)^{2}$. Since the factor itself is a square, we have $p^{2}=(n+2)^{2}$. Thus, we get $n^{2}+3 n+9=n^{2}+4 n+4$, which leads to $n=5$. Consequently, $2^{m}=2$, so $m=1$ and $p^{2}=49$. The only solution is thus $(1,7)$.