help with a simple example of the Hardy-Littlewood circle method. I'm trying to understand a simple example of the circle method to solve a trivial problem: given $k \in \mathbb{N}$, determine the number of possible representations of n $\in$ N as a sum of exactly $k$ natural numbers.

Q1: I cannot see how obviously A is derived as the expansion of $z^n$ will not result in $(1-z)^{-1}$?
Q2: How is Cauchy's theorem applied to get B?
 A: (A) You certainly already know the series of equalities:
$$
\begin{aligned}
1 &=\frac{1-z}{1-z}\ ,\\
1+z &=\frac{1-z^2}{1-z}\ ,\\
1+z+z^2 &=\frac{1-z^3}{1-z}\ ,\\
1+z+z^2 +z^3 &=\frac{1-z^4}{1-z}\ ,\\
\vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ &\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \vdots\ \\
1+z+z^2 +z^3 + \dots+ z^N&=\frac{1-z^{N+1}}{1-z}\ ,
\end{aligned}
$$
and now we need $|z|<1$ to be able to pass to the limit on the right side. 
This was (A).
For (B), let us rewrite:
$$
\frac 1{(1-z)^k\ z^{n+1}}
=
\Big(\ 
1+z+z^2 +z^3 + \dots+ z^n+\dots\ \Big)^k\cdot \frac 1{z^{n+1}}\ .
$$
After we take the integral on some small contour around $0$, up to the $2\pi i$ factor, we pick the coefficient of $x^n$ in the expansion
$$
\Big(\ 
1+z+z^2 +z^3 + \dots+ z^n+\dots\ \Big)^k\ ,
$$
equivalently, in the polynomial
$$
\Big(\ 
1+z+z^2 +z^3 + \dots+ z^n\ \Big)^k\ .
$$
This polynomial is a product of $k$ factors, 
we take 


*

*each monomial from the first factor, $z^{s_1}$,
"with" (i.e. multiplied by) 

*each monomial from the second factor, $z^{s_2}$,
"with"

*and so on, "with" 

*each monomial from the last factor, $z^{s_k}$,
and we want to get $z^n$, so
$$
\begin{aligned}
&\text{Coefficient of $z^n$ in }
\Big(\ 
1+z+z^2 +z^3 + \dots+ z^n\ \Big)^k
\\
&\qquad =\sum_{
\substack{0\le s_1\le n\\0\le s_2\le n\\\vdots\\0\le s_n\le n\\s_1+s_2+\dots+s_k=n}
}1
\\
&\qquad = r_k(n)
\ .
\end{aligned}
$$
