B2. Find all natural numbers $n$ and prime numbers $p$ for which $\sqrt[3]{n+\frac{8 p}{n}}$ is a natural number.
B2. Let $\sqrt[3]{n+\frac{8 p}{n}}=k$, where $k$ is a natural number, so $n+\frac{8 p}{n}=k^{3}$. From this, it follows that $n$ divides $8 p$. Since $p$ is a prime number, $n$ must be $1, 2, 4, 8, p, 2 p, 4 p$, or $8 p$. If $n=1$ or $n=8 p$, we get the equation $1+8 p=k^{3}$ or $8 p=(k-1)\left(k^{2}+k+1\right)$. Since $k^{2}+k+1$ is an odd natural number, $k-1$ must be 8 and $p=k^{2}+k+1$, so $p=91$, which is not a prime number. If $n=2$ or $n=4 p$, we get the equation $2+4 p=k^{3}$. From this, it follows that $k$ must be even, so the right side is divisible by 4, but the left side is not. If $n=4$ or $n=2 p$, we get the equation $4+2 p=k^{3}$. From this, it follows that $k$ must be even, so the right side is divisible by 4, and thus $p$ must be even, so $p=2$. From this, we get the solution $n=4, p=2$. If $n=8$ or $n=p$, we get the equation $8+p=k^{3}$ or $p=(k-2)\left(k^{2}+2 k+4\right)$. From this, it follows that $k$ must be 3, so $p=19$. From this, we get the solutions $n=8, p=19$ and $n=19, p=19$.

Writing the equation $n+\frac{8 p}{n}=k^{3}$ and noting that $n$ divides $8 p \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots$ point

![](https://cdn.mathpix.com/cropped/2024_06_07_66bdf7a61d9bfcb32ca4g-15.jpg?height=57&width=1579&top_left_y=891&top_left_x=273)
Noting that the possibilities $n=1$ or $n=8 p$ do not solve the equation . . . . . . . . . . 1 point Noting that the possibilities $n=2$ or $n=4 p$ do not solve the equation . . . . . . . . . . 1 point Concluding that from $n=4$ or $n=2 p$ we get the solution $n=4$ and $p=2 \ldots \ldots \ldots \ldots \ldots$. Concluding that from $n=8$ or $n=p$ we get the solutions $n=8, p=19$ and $n=19, p=19 \ldots \mathbf{1}$ point (If the contestant simply writes all three solutions, award 1 point.)