Let $D,n\in \mathbb N$ with $0<D<n$, and $y>0$ is a real number.
Question: Is there a closed-form for the following alternating sequence \begin{equation} \sum_{k=0}^D (-y)^k {n\choose k}? \end{equation}
This question is related to a similar question where $y=1$.
Motivation: These kind of expressions arrive in numerical schemes that I am working on.
First attempt: I tried to repeat some of the techniques from $y=1$ case. For instance, using the complex integral argument, we have \begin{align} \sum_{k=0}^D (-y)^k {n\choose k} &= \sum_{k=0}^D (-y)^k \oint_{0<|z|<1} \frac{(1+z)^n}{z^{k+1}}\frac{dz}{2\pi i} = \oint_{0<|z|<1} \frac{(1+z)^n}{z} \sum_{k=0}^D \left(-\frac{y}{z}\right)^k \frac{dz}{2\pi i} \\ &= \oint_{0<|z|<1} \frac{(1+z)^n}{z} \left[\frac{z+y(-y/z)^D}{z+y}\right] \frac{dz}{2\pi i} \\ &= \oint_{0<|z|<1} \frac{(1+z)^n}{z+y} \frac{dz}{2\pi i} + y(-y)^D \oint_{0<|z|<1} \frac{(1+z)^n}{z^{D+1}(z+y)} \frac{dz}{2\pi i}. \end{align} I don't know much about complex integrals and so don't know how to complete this argument. Any ideas?
Or are their any other techniques that will work here? Any ideas/hints are appreciated.