Answer
$a_n=2(1+i)^{n-1}$
Work Step by Step
We are given the geometric sequence $\{a_n\}$:
$$2,2+2i,4i,-4+4i,-8,\dots$$
Determine the common ratio $r$:
$$r=\dfrac{a_2}{a_1}=\dfrac{2+2i}{2}=1+i.$$
The elements of the geometric sequence are:
$$\begin{cases}
a_1=2\\
r=1+i.
\end{cases}$$
Calculate the $n$th term:
$$a_n=a_1r^{n-1}=2(1+i)^{n-1}.$$