I was reading this Wikipedia article’s example of analytic continuation using the function: $$f(z)=\sum_{k=0}^{\infty}(-1)^k(z-1)^k$$ I was able to understand the process until this step: $$\sum_{n=0}^{\infty}(-1)^n\int_{0}^{2\pi}\frac{\sum_{m=0}^{n}{n \choose m}(a-1)^{n-m}(re^{i\theta})^m}{(re^{i\theta})^k}d\theta=(-1)^ka^{-k-1}$$
Can someone explain how these two expressions are equivalent? Note that k will always be an integer. I believe this is all the needed information to explain this equivalence but if it is not the rest should be in the above Wikipedia article. Thanks in advance.