Task 3. Find all triples $(x, n, p)$ of positive integers $x$ and $n$ and prime numbers $p$ for which

$$
x^{3}+3 x+14=2 \cdot p^{n} \text {. }
$$
Solution. Since the right-hand side is a product of prime factors, it would be convenient if the left-hand side were also a product. It should then be factorizable into a first-degree and a second-degree polynomial in $x$. Trying this gives the following factorization. We can factor the left-hand side as $(x+2)\left(x^{2}-2 x+7\right)$. Therefore, it must hold that

$$
(x+2)\left(x^{2}-2 x+7\right)=2 p^{n} .
$$

First, assume that $x$ is even. Then $x+2=2 p^{a}$ for some integer $a \geq 0$ and $x^{2}-2 x+7=p^{n-a}$. (Note that this also works if $p=2$.) Since $x$ is a positive integer, $x+2 \geq 3$, so we can exclude $a=0$. Furthermore, $x^{2}-3 x+5>\left(x-\frac{3}{2}\right)^{2} \geq 0$ for all $x$, so $x^{2}-2 x+7>x+2$. This means that $n-a>a$. We now substitute $x=2 p^{a}-2$ into $x^{2}-2 x+7=p^{n-a}$:

$$
\left(2 p^{a}-2\right)^{2}-2\left(2 p^{a}-2\right)+7=p^{n-a} \text {, }
$$

or equivalently,

$$
4 p^{2 a}-12 p^{a}+15=p^{n-a} .
$$

Since $n-a>a$, $p^{a} \mid p^{n-a}$. Of course, $p^{a} \mid p^{a}$ and $p^{a} \mid p^{2 a}$ also hold. Therefore, $p^{a}$ must also be a divisor of 15. This implies $p=3$ or $p=5$ and further $a=1$. If $p=3$, the left side is 15 and the right side is $3^{n-1}$; this does not yield a solution. If $p=5$, the left side is 55 and the right side is $5^{n-1}$; this also does not yield a solution.

Now assume that $x$ is odd. Then $x+2=p^{a}$ for some integer $a \geq 0$ and $x^{2}-2 x+7=2 p^{n-a}$. Since $x$ is a positive integer, $x+2 \geq 3$, so $a=0$ can be excluded again. Furthermore, $x \neq 2$, so $x^{2}-4 x+3=(x-2)^{2}-1 \geq 0$, and thus $x^{2}-2 x+7 \geq 2(x+2)$. Therefore, $n-a \geq a$. We now substitute $x=p^{a}-2$ into $x^{2}-2 x+7=2 p^{n-a}$:

$$
\left(p^{a}-2\right)^{2}-2\left(p^{a}-2\right)+7=2 p^{n-a},
$$

or equivalently,

$$
p^{2 a}-6 p^{a}+15=2 p^{n-a} \text {. }
$$

Since $n-a \geq a$, $p^{a} \mid p^{n-a}$. Therefore, we find that $p^{a} \mid 15$, which implies $p=3$ or $p=5$ and further $a=1$. If $p=3$, the left side is 6 and the right side is $2 \cdot 3^{n-1}$, so $n=2$. We find $x=3-2=1$. Indeed, $(1,2,3)$ is a solution. If $p=5$, the left side is 10 and the right side is $2 \cdot 5^{n-1}$, so $n=2$. We find $x=5-2=3$. Indeed, $(3,2,5)$ is a solution. Therefore, there are two solutions, namely $(1,2,3)$ and $(3,2,5)$.