<s>[INST] positive integer solutions to $x^3+y^3=3^z$ I am seeking all positive integer solutions to the equation $x^3+y^3=3^z$.
After doing number crunching, I think there are no solutions. But I am unable to prove it.
Attempt
If $x$ and $y$ have common divisor $d$, we have $d^3(m^3+n^3)=3^z$. So $d$ must be a power of $3$, and we are back to where we started. So we assume $x$ and $y$ are coprime.
Testing the parity, we have sum of 2 cubes to be odd. WLOG, we can assume $x$ is even and $y$ is odd.
Trying mod $3$, we have $x+y=0 \pmod 3$. Since $x$ and $y$ are coprime, $x$ and $y$ must be congruent to $1$ and $-1$ or vice-versa.
If I assume $x=3m+1$ and $y=3n-1$, expand out and simplify, I get $27(m^3+n^3)+27(m^2-n^2)+9(m+n)=3^z$. If I assume $z \geq 3$, this gives $(m^3+n^3)+(m^2-n^2)+\frac{m+n}{3}=3^{z-3}$. But I don't see how to proceed.
I also tried mod $9$ but didn't get anywhere, it didn't cut down the possibilities by much.
I also tried letting $y=x+r$. Then
\begin{align*}
x^3+y^3 &= x^3+(x+r)^3 \\
&= x^3 + (x^3+3x^2r+3xr^2+r^3) \\
&= 2x^3+3x^2r+3xr^2+r^3 \\
&= 3^z
\end{align*}
Then $3\mid 2x^3+3x^2r+3xr^2+r^3$, and $3\mid 3x^2r+3xr^2$, so this implies $3 \mid 2x^3+r^3$. But this doesn't yield any contradiction.
Can anyone supply a proof? Or if my hypothesis is wrong, how to derive all the integer solutions?
Thank you.
 [/INST] $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.
</s>