positive integer solutions to $x^3+y^3=3^z$

$27(m^3+n^3) +27(m^2-n^2) + 9(m+n) = 3^z$

$(m+n)(3m^2 +3n^2-3mn+3m-3n+1) = 3^{z-2}$

since $z \ne 2$, we have $3(m^2 +n^2-mn+m-n)+1$ divides a power of $3$ or is equal to $1$, both of which is not possible.


You already proved that we can assume that $x,y$ are relatively prime.

We can find easly solution for $n\leq 2$. Let $n\geq 3$.

So $x+y = 3^a$ and $x^2-xy+y^2=3^b$ for some nonegative integers $a+b=n$.

If $b\geq 2$ then $9\mid x^2-xy+y^2$ and $3\mid x+y$, so $$9\mid (x+y)^2-(x^2-xy+y^2)=3xy\implies 3\mid xy$$ A contradiction. So $b\leq 2$ and this should be easly done.