For $m=1$, this is the residue: $$\mathrm{Res} \left( z^{kn-1} \left( az+1 \right)^{-k}; -1/a \right)=\frac{(-1)^{k n-k} }{a^{kn}(k-1)!}\prod _{p=1}^{k-1} (k n-p).$$$$\operatorname{Res} \left( z^{kn-1} \left( az+1 \right)^{-k}; -1/a \right)=\frac{(-1)^{k n-k} }{a^{kn}(k-1)!}\prod _{p=1}^{k-1} (k n-p).$$