Answer
$a_n=(21)(\frac{1}{3})^{n-1}.$
Work Step by Step
We know that $a_n=a_1r^{n-1}.$
where $r$=common ration (we can get this by dividing any two consecutive terms) and $a_1$= the first term
Here $a_2=a_1r^{2-1}=7\\a_1\cdot(\frac{1}{3})^1=7\\a_1=21$
Hence $a_n=(21)(\frac{1}{3})^{n-1}.$