#### Answer

$a_5=36 \text{ and } a_n=\dfrac{9}{4}(2^{n-1})$

#### Work Step by Step

$\bf{\text{Solution Outline:}}$
To find $a_5$ and $a_n$ for the given geometric sequence described as \begin{array}{l}\require{cancel} a_4=18 \\ r=2 ,\end{array} use the formula for finding the $n^{th}$ term of a geometric sequence.
$\bf{\text{Solution Details:}}$ Using the formula for finding the $n^{th}$ term of a geometric sequence, which is given by $a_n=a_1r^{n-1},$ then \begin{array}{l}\require{cancel} a_n=a_1r^{n-1} \\\\ a_4=a_1r^{4-1} \\\\ a_4=a_1r^{3} .\end{array}
Subtituting the given values, $a_4=18$ and $r=2,$ the equation above results to \begin{array}{l}\require{cancel} 18=a_1(2^{3}) \\\\ 18=a_1(8) \\\\ \dfrac{18}{8}=a_1 \\\\ a_1=\dfrac{9}{4} .\end{array}
With $a_1=\dfrac{9}{4}$ and $r=2,$ then \begin{array}{l}\require{cancel} a_n=a_1r^{n-1} \\\\
a_n=\dfrac{9}{4}(2^{n-1})
.\end{array}
With $n=5,$ the equation above bcomes \begin{array}{l}\require{cancel}
a_5=\dfrac{9}{4}(2^{5-1})
\\\\
a_5=\dfrac{9}{4}(2^{4})
\\\\
a_5=\dfrac{9}{4}(16)
\\\\
a_5=9(4)
\\\\
a_5=36
.\end{array}
Hence, $
a_5=36 \text{ and } a_n=\dfrac{9}{4}(2^{n-1})
.$