Let $D=\{ z \in \mathbb{C}: |z|<2\}$ and $f:D\rightarrow\mathbb{C}$ be a complex-valued function such that $f$ is analytic at all points of $D$ except a simple pole at $z=1.$ Given that $f$ has series expansion $$f(z)=\sum_{n=0}^{\infty}a_n z^n , |z|<1.$$ Show that $$\lim_{n \rightarrow\infty} a_n=-c,$$ where $c$ is the residue of $f$ at $z=1.$
$\textbf{My attempt:}$ From the given details, we can write $f(z)=\frac{g(z)}{z-1},$ where $g(z)$ is analytic in whole of $D.$ Now we have that $$Res(f,1)=c=\lim_{z \rightarrow1}\bigg((z-1)\frac{g(z)}{z-1}\bigg)=g(1).$$ Also, we can write $$f(z)=-g(z)\sum_{n=0}^{\infty}z^n, |z|<1.$$
I'm stuck here and not able to proceed. Any hints would be highly appreciated. Thanks.
Let $g(z) = (z-1)f(z)$, $g$ is analytic on $D$ and the residue of $f$ at $z=1$ is $g(1)$. Let $g(z) = g_0+g_1z+g_2z^2+...$ be the expansion of $g$ around $z=0$. Note that $g(1) = g_0+g_1+...$. Let $r \in (0,1)$ and let $C$ be the circle of radius $r$ about $z=0$. Then $a_n = {1 \over 2 \pi i} \int_C {g(z) \over z^{n+1} (z-1) } dz = -\sum_k {1 \over 2 \pi i} \int_C {g(z) \over z^{n+1} } z^k dz = - \sum_{k=0}^n g_k$ and so $a_n \to -g(1)$.