A colleague and I are working on a problem and part of it comes down to evaluating the residue of a rational function. In particular,
$$
\mathrm{Res} \left( z^{kn-1} \left( az^{m}+1 \right)^{-k}; r \right),
$$
where $a$, $k$, $m$ and $n$ are positive integers satisfying $a \geq 2$ and $0<m<n$ and $r$ is any $m$-th root of $-1/a$.


The residue appears to have a nice form, $r^{kn}/m^{k}$ times a polynomial in $m$ and $n$ (of total degree $k-1$, it seems), and we have been able to prove this for $k=1$ and $2$ using series expansions, etc. But this becomes increasingly complicated and messy for larger $k$ and we have not been able to find any general pattern to help us along the way.


So our question is whether readers have seen residue problems for such rational functions or know of techniques that could help us to prove the value of this residue for any positive integer $k$.



residue calculation for rational function
We want to calculate
$$\rho(k,n,m)=\operatorname\*{res}\_{w=1}\left(\frac{w^n}{1-w^m}\right)^k\frac{dw}{w}. $$
If $kn$ is divisible by $m$ then it seems that $\rho(k,n,m)=-\binom{-k}{kn/m-k}/m$. This is because in this case the residues at all $m$'th roots of unity are the same, and the sum of those residues is minus the residue at $\infty$, which is easily calculated by the substitution $w=t^{-1}$ and the binomial expansion of $(1-t^m)^{-k}$. I have checked this in Maple for a range of cases. I don't know if this method can be adapted to the case where $kn$ is not divisible by $m$.


One can also check experimentally that the denominator and numerator of $\rho(k,n,m)$ are large, but their factorisation only involves fairly small primes $p$, certainly with $p<knm$. This typically indicates that the function can be expressed in terms of binomial coefficients and factorials, rather than general polynomials.


