Find all natural number $n$ for which $3^9+3^{12}+3^{15}+3^n$ is a perfect cube.

Check manually if there exist any solution with $n \le 9$.

Now assume $n>9$, and look at the equation $3^m+757=a^3$ modulo 7 (with $m=n-9$):

$3^m+1 \equiv 3^m+757 \equiv a^3 \equiv \{0,-1,1\} \pmod 7$

$3^m \equiv \{0,-1,-2\} \pmod 7$

$n \equiv \{3,5\} \pmod 6$

If $m=6k+3$,

$ 757 = a^3-(3^{2k+1})^3 = (a-b)(a^2+ab+b^2)$

where $b=3^{2k+1}$. Factoring 757, you can check there is no solutions.

Else, if $m=6k+5$,

$757 = a^3-3^5(3^{2k})^3 = a^3-3^5b^3$

where $b=3^{2k}$. This is a Thue equation, effectively solvable:

using PARI/GP

tnf = thueinit(x^3-243)

thue(tnf, 757)

[[10, 1]]

you can check the only solution is $(a,b)=(10,1)$, hence $(a,n)=(10,14)$


Not a full solution, I am simply reducing the problem to that of listing integer points on two elliptic curves. IIRC this is implemented in some dedicated CAS, and therefore this gives us a route to a definite answer.

With small values of $n$ checked by brute force, we can cancel the factor $3^9$. We are thus left with the equation $$ 1+3^3+3^6+3^{n-9}=x^3\Longleftrightarrow 757+3^{n-9}=x^3.\qquad(*) $$ Depending on the residue class of $n$ modulo three we can write $3^{n-9}=3^\epsilon y^3$ with $\epsilon\in\{0,1,2\}$. This means that any integer solution of $(*)$ will give rise to an integer solution of one of the following Diophantine equations $$ \begin{aligned} x^3&=y^3+757,\\ x^3&=3y^3+757,\\ x^3&=9y^3+757. \end{aligned} $$ Each of these defines an elliptic curve. Those are known to have only finitely many integer points $(x,y)$, and (IIRC) algorithms for finding them exist (and are available in CAS's heavily used by number theorists).

Given such finite lists, we can quickly check whether $y$ can be a power of three in any of them.

Further remarks:

  • The first elliptic curve won't produce solutions. We have $$y^3<y^3+757<(y+1)^3$$ whenever $y>16$, and it is easy to check that the powers of three in this range won't give us any solutions.
  • Peter did an extensive computer verification for a largish range of values of $n$ (see the comments under main). So even an upper bound on the integer points (don't remember whether useful ones are known) will help us settle the main question