Find all positive integers $x, y, z$ so that $(x+2y)(y+2z)(z+2x)$ is equal to prime power

Suppose we have a solution $(x, y, z)$. Note that if $d = \gcd(x, y, z) > 1$, then $d$ must also be a power of $p$, and we get a smaller solution $(x', y', z') = (x/d, y/d, z/d)$ with $\gcd(x', y', z') = 1$.

Thus without loss of generality we can assume our solution has $\gcd(x, y, z) = 1$. Now, if $p \neq 3$, then by the formulas $x = (4p^t - 2p^s + p^r)/9$, etc., we must have that $x, y, z$ are divisible by $p$, contradicting $\gcd(x, y, z) = 1$. It follows that there can only be solutions in the case $p = 3$.

Now suppose without loss of generality that $z$ is the largest of $x, y, z$. Again write $$x + 2y = 3^r \qquad y + 2z = 3^s \qquad z + 2x = 3^t.$$ Since $y \leq z$, we have $3^s \leq 3z$, and similarly since $x \leq z$, we have $3^t \leq 3z$. But then $3^{s-1} \leq z < z + 2x = 3^t$, so $s \leq t$, and conversely, $2(3^{t-1}) \leq 2z < y + 2z = 3^s$, so $t \leq s$, and thus we must have $s = t$. This gives $y + 2z = z + 2x$, hence $z = 2x - y \leq 2x$, so $3^t \leq 4x$, and $x \geq 3^t/4$. It follows that $3^r = x + 2y > 3^t/4 > 3^{t-2}$, so $r \geq t-1$. In the other direction, since $z-x=x-y$ and $z \geq x$, we have $x \geq y$, hence $3^r = x + 2y \leq z + 2x = 3^t$, so $r \leq t$.

Thus our only solutions for $(r, s, t)$ are of the forms $(t, t, t)$ and $(t-1, t, t)$. In the case $(t, t, t)$, it immediately follows that $x = y = z$, hence $(x, y, z) = (1, 1, 1)$. Solving the second case for $x, y, z$ gives $$(x, y, z) = (3^{t-3}(12-6+1), 3^{t-3}(4-6+3), 3^{t-3}(12-2+3)) = (3^{t-3} \cdot 7, 3^{t-3}, 3^{t-3} \cdot 13)$$ and since we assumed $\gcd(x, y, z) = 1$, our solution is $(7, 1, 13)$.

Now relaxing the assumption that $z$ was the largest, so we allow for cyclic shifts, the solutions with $\gcd(x, y, z) = 1$ are exactly $(1, 1, 1), (7, 1, 13), (1, 13, 7), (13, 7, 1)$. Relaxing the other assumption that $\gcd(x, y, z) = 1$, the general solutions are exactly all scalings of these primitive solutions by a power of $3$.


Assume the prime is $p \neq 3.$ Note that we may keep (simultaneously) dividing out $p$ from $x,y,z$ until at least one of them is not divisible by $p\; , \;$ with the result that $$ \gcd(x,y,z) = 1 $$
We do have such primitive solutions when $$ (x,y,z) = (1,1,1) \; \; , \; \; (x,y,z) = (13,7,1) $$ when both primes are $3.$

Next, add up the three items that must be powers of $p,$ we find $$ 3 (x+y+z) \equiv 0 \pmod p. $$ With the assumption $p \neq 3,$ we have $x+y+z \equiv 0 \pmod p.$ Then subtract $x+2y \equiv 0 \pmod p,$ so that $y \equiv z \pmod p.$

Repeat with the other pairs, we get $$ x \equiv y \equiv z \pmod p $$ However, we already had $x+y+z \equiv 0 \pmod p.$ We get $ 3x \equiv 0 \pmod p,$ same for $y,z,$ contradicting $\gcd(x,y,z) = 1.$ In turn, this contradicts the assumption that $p \neq 3.$