#### Answer

$a_n=256\left(-\frac{1}{2}\right)^{n-1}$

#### Work Step by Step

$a_5=16$ and $a_{12}=-\frac{1}{8}$
$\frac{a_{12}}{a_5}=\frac{ar^{11}}{ar^{4}}=r^7=\frac{-\frac{1}{8}}{16}=-\frac{1}{128}$
$\implies r=\left(-\frac{1}{128}\right)^{\frac{1}{7}}=-\frac{1}{2}$
$a_5=ar^4=a\left(-\frac{1}{2}\right)^{4}=a\frac{1}{16}=16$
$\implies a=256$
The $n^{th}$ term is therefore given by
$a_n=256\left(-\frac{1}{2}\right)^{n-1}$