We use the rectangular sequence \(x[k]=\operatorname{rect}_N[k]= \begin{cases}1,&0\le k\le N-1\\0,&\text{otherwise.}\end{cases}\)

Its Z-transform is the finite geometric sum \(X(z)=\displaystyle\sum_{k=0}^{N-1}z^{-k} =\frac{1-z^{-N}}{1-z^{-1}}.\)

Setting \(z=e^{\mathrm{j}\omega}\) gives the DTFT, and sampling that at \(\omega=\tfrac{2\pi k}{N}\) (black dots) yields the DFT.