Find Coefficient in expansion of $(x-1)^k(x+1)^{d-k}$ While thinking about a problem relating to the bilinear transform, I came across the following question:

Given $p$ with $0 \leq p \leq d$, find the coefficient of $x^p$ in the expansion $(x-1)^k(x+1)^{d-k}$.

Ideally, I'd like an answer in some closed form. Here are my thoughts so far: after taking a "brute force" approach via binomial expansion, I have found that
$$
(x-1)^k(x+1)^{d-k} = \sum_{p=0}^d \left[\sum_{j=0}^{d-k} (-1)^{k+j-p} 
\binom{k}{p-j} \binom{d-k}{j}
\right]x^p,
$$
which I wasn't able to simplify further.  So, our coefficient should be equal to $\sum_{j=0}^{d-k} (-1)^{k+j-p} 
\binom{k}{p-j} \binom{d-k}{j}$.
Another thought is to compute the coefficient as $\frac 1{p!} f_{k,d}^{(p)}(0)$, where $f_{k,d}(x) = (x-1)^k(x+1)^{d-k}$.  Taking derivatives leads to the interesting recurrence
$$
f_{k,d}' = kf_{k-1,d-1} + (d-k)f_{k,d-1}.
$$
So in other words, if $c^p_{k,d}$ denotes the desired coefficient, then we have
$$
c_{k,d}^p = \frac 1{p!}f^{(p)}_{k,d}(0) = 
\frac{k}{p!}f_{k-1,d-1}^{(p-1)} + \frac{d-k}{p!}f_{k,d}^{(p-1)}\\
=\frac{k}{p}c_{k-1,d-1}^{p-1} + \frac{d-k}{p}c_{k,d-1}^{p-1}.
$$
I wasn't able to see a clear path forward from there. Any ideas here would be appreciated.
 A: One can show elementarily, by taking the limits of summation carefully into consideration, that actually the following generating function given above for $k,d$ integers with $d>k$ can be written as 
$$(x+t)^k(x+1)^{d-k}=\sum_{p=0}^{d}x^p\sum_{l_1=\max(0,p+k-d)}^{\min(p,k)}t^{k-l_1}\binom{k}{l_1}\binom{d-k}{p-l_1}\doteq\sum_{p=0}^dx^pc_p(t;d,k)$$
One can compute from this generating function the sums in question by setting $t=-1$. There should be no convergence issues even when the powers $k,d$ are non-integers. 
Incidentally, the coefficient summands have precisely the functional form of the hypergeometric distribution. Also, miraculously, the support of the summation is also the same. Using known results about the hypergeometric distribution and it's generating function we find that, at least for $d-k\geq p$
$$c_p(t;d,k)=t^k\binom{d-k}{p}~_2F_1(-p,-k;d-k-p+1;\frac{1}{t})$$
Of course there are more cases to be investigated, it would be interesting to take a look at them and perhaps edit this post.
$\textbf{EDIT :}~ \text{The case $d-k<p$}$
In this case it turns out that if one shifts summation variable to $l_2=l_1-p-k+d$, we obtain a different expression but still in terms of a hypergeometric function:
$$c_p(t;d,k)=t^{d-p}\binom{k}{d-p}~_2F_1(p-d,k-d;p+k-d+1;\frac{1}{t})$$
