Partial fraction of $\prod_{j=1}^{N}\frac{1}{(x-a_{j})^{n_{j}}}$ Does anybody know the partial fraction decomposition of 
$$
\prod_{j=1}^{N}\ \frac{1}{(x-a_{j})^{n_{j}}}
$$ 
with all $a_{j}$ different and $n_j$ positive integers? I know you can get it with the residue but the differentiation is awkward. 
 A: New answer
If we write the partial fraction decomposition as 
$$
\prod_{j=1}^N\ \frac{1}{(x-a_j)^{n_j}}
=\sum_{j=1}^N\ \sum_{p=0}^{n_j-1}\ \frac{c_{j,p}}{(x-a_j)^{n_j-p}}\quad,
$$ 
then we have
$$
c_{j,p}=(-1)^p\sum_{u\in S(j,p)}\ \prod_{k\neq j}\ 
\binom{n_k-1+u_k}{n_k-1}\ \frac{1}{(a_j-a_k)^{n_k+u_k}}\quad,
$$
where $S(j,p)$ is the set of those maps 
$$
u:\{1,\dots,N\}\setminus\{j\}\to\mathbb N,\quad k\mapsto u_k
$$
which satisfy 
$$
\sum_{k\neq j}\ u_k=p.
$$
To prove this, it suffices to observe that, for $1\le j\neq k\le N$, the degree less than $n_j$ Taylor polynomial of 
$$
\frac{1}{(x-a_k)^{n_k}}
$$
at $a_j$ is 
$$
\sum_{q=0}^{n_j-1}\ \binom{n_k-1+q}{n_k-1}\ \frac{(-1)^q}{(a_j-a_k)^{n_k+q}}\ (x-a_j)^q\quad.
$$
Old answer
An expression for the partial fraction decomposition is obtained by combining Robert's answer with Theorem $11$ p. $8$ in this pdf document (Internet Archive), accessible from this html page (Internet Archive).
A: Let $P(x) = \prod_{j=1}^N (x-a_j)^{n_j}$, and for each $k \in \{1 \ldots N\}$ let
$U_k(x) = P(x)/(x-a_k)^{n_k}$ be the product of the terms not involving $x-a_j$. 
The coefficient of $(x-a_k)^{-m}$, where $1 \le m \le n_k$, is the coefficient of
$t^{n_k - m}$ in the Maclaurin series of $1/U_k(t+a_k)$.
EDIT: In the case $N=2$, $1/U_1(t+a_1) = (t+a_1 - a_2)^{-n_2}$ so the coefficient
of $(x-a_1)^{-m}$ is ${n_1 + n_2 - m - 1 \choose n_2 - 1} \frac{(-1)^{n_2}}{(a_2 - a_1)^{n_1 + n_2 - m}}$ for $1 \le m \le n_1$ (and similarly for the coefficient of $(x -a_2)^{-m}$ with $1$ and $2$ interchanged).  The general case can be reduced to this one, since if 
$$\frac{1}{\prod_{j=1}^{N-1} (x-a_j)^{n_j}} = \sum_{j=1}^{N-1} \sum_{k=1}^{n_j} \frac{b_{j,k}}{(x - a_j)^k}$$
$$\frac{1}{\prod_{j=1}^N (x-a_j)^{n_j}} = \sum_{j=1}^{N-1} \sum_{k=1}^{n_j} \frac{b_{j,k}}{(x-a_j)^k (x-a_N)^{n_N}}$$
