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


What I have tried.

$3^9+3^{12}+3^{15}+3^n$

$=3^9(757+3^{n-9})$

Let $757+3^{n-9}=a^3$

Taking modulo $3$:

$a^3\equiv 1 \pmod 3$

$\implies a\equiv 1 \pmod 3$

Also, $a^3&gt;757&gt;729=9^3$

$\therefore a =10+3k$

$a=10$ gives $n=14$ 

Now, how can I know if there is any other $n&gt;14$ satisfying the given condition.

PS: Please not use computer programmes to answer. I want pure mathematical solution.
Check manually if there exist any solution with $n \le 9$.
Now assume $n&gt;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)$
Only long comment.

Let $n-9=x$, then we have equation $757+3^x=a^3$ for positive integers $a,x$.

$2\mid a$ and $a\equiv 1\pmod3$, then some prime $2&lt;p\mid a$ and $p\equiv 2\pmod3$.

Find suitable primes $p$ and related $x$ using descrete logarithm, multiplicative order and CRT in pari/gp.

First, $x$ is odd, becose $8\mid a^3$, $ord_8(3)=2$ and $zlog_{3_{8}}(-757)=1$:

? m=Mod(3,8);
?
? h=znorder(m)
%1 = 2
?
? znlog(-757,m,h)
%2 = 1


gp-code for finding $p$ and $x$:

 forprime(p=5,100, if(p%3==2,
  m=Mod(3,p);
  h=znorder(m);
  z=znlog(-757,m,h);
  if(z,
   c=iferr(chinese(Mod(1,2),Mod(z,h)), E, 0);
   if(c,
    m=Mod(3,p^2);
    h=znorder(m);
    z=znlog(-757,m,h);
    if(z,
     c=chinese(c,Mod(z,h));
     m=Mod(3,p^3);
     h=znorder(m);
     z=znlog(-757,m,h);
     if(z,
      c=chinese(c,Mod(z,h));
      j=c.mod; c=lift(c);
      print("p = "p"    x = "c" + k*"j);
     )
    )
   )
  )
 ))


Output:

p = 5    x = 5 + k*100
p = 23    x = 8169 + k*11638
p = 29    x = 11719 + k*23548
p = 47    x = 28121 + k*101614
p = 71    x = 332919 + k*352870


I.e. if $23\mid a$, then $x=8169 + k\cdot 11638$, where $k$ is 0,1,2,....