[tex]\begin{gathered} \text{ Compute the ratios of all the adjacent terms,} \\ \frac{18}{6}=3,\frac{54}{18}=3 \\ \text{ Common ratio between the terms is 3} \\ \text{ The first element of the sequence is} \\ a_1=6 \\ a_n=a_1\cdot r^{n-1} \\ \text{ Therefore, the nth term is computed by} \\ r=3,a_n=6\cdot3^{n-1} \\ a_n=6(3^{n-1}) \end{gathered}[/tex]