1

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.

UPS
  • 569
  • There should be $|z|=1$ below the integral everywhere. And $\int_{|z|=1}f(z),dz = \int_0^{2\pi}f(e^{it})ie^{it},dt$. – amsmath Apr 17 '19 at 12:19
  • @amsmath I don't understand. Is there a mistake in my question that you are referring to or is something else? Could you please elaborate. – UPS Apr 17 '19 at 12:21
  • I just gave you the definition of a complex line integral. – amsmath Apr 17 '19 at 12:23
  • BTW: Instead of the circle you can use a square. That might make integration easier. – amsmath Apr 17 '19 at 12:28
  • Note that you want to evaluate a special polynomial of degree $D$ at $-y$. So, it might be advantageous to find the zeros of that polynomial (in case that's possible -- I guess not). Otherwise you can use Horner's scheme of course. – amsmath Apr 17 '19 at 12:38
  • @amsmath Thank you. A (possibly stupid) question -- is it ok to replace the integral by $|z|=1$? Numerically this expression as a function of $k$ increases (if you take the modulus -- its alternating) and then decreases until k=n. For y=1, this critical k=n/2. My motivation is to find this critical $k$, and I was hoping to differentiate the closed form to get arrive at this critical value. Do you think this complex integration solution will help with that? – UPS Apr 17 '19 at 12:46

2 Answers2

2

We show the difference between the variant with general $y$ and $y=1$. We use the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ in a series. This way we can write for instance \begin{align*} [z^k](1+z)^n=\binom{n}{k}=\oint_{0<|z|<1} \frac{(1+z)^n}{z^{k+1}}\frac{dz}{2\pi i} \tag{1} \end{align*}

We obtain \begin{align*} \color{blue}{\sum_{k=0}^D(-y)^k\binom{n}{k}} &=\sum_{k=0}^D[z^k](1-yz)^n\tag{2}\\ &=[z^0](1-yz)^n\sum_{k=0}^Dz^{-k}\tag{3}\\ &=[z^0](1-yz)^n\frac{z^{-(D+1)}-1}{z^{-1}-1}\\ &=[z^{-1}](1-yz)^n\frac{z^{-(D+1)}-1}{1-z}\\ &=\left([z^D]-[z^{-1}]\right)\frac{(1-yz)^n}{1-z}\tag{4}\\ &\,\,\color{blue}{=[z^D]\frac{(1-yz)^n}{1-z}}\tag{5} \end{align*}

We see in (5) that in case $y=1$ we get \begin{align*} [z^D]\left.\frac{(1-yz)^n}{1-z}\right|_{y=1}=[z^D](1-z)^{n-1}=(-1)^D\binom{n-1}{D} \end{align*} but there is no way to make similar simplifications with general $y$.

Comment:

  • In (2) we apply the coefficient of operator according to (1).

  • In (3) we use the rule $[z^{p-q}]A(z)=[z^p]z^qA(z)$.

  • In (4) we note $\frac{(1-yz)^n}{1-z}=(1-yz)^n\sum_{j=0}^\infty z^j$ is a power series in $z$ so that the residue $[z^{-1}]$ is zero.

Markus Scheuer
  • 108,315
1

You could write it using a hypergeometric function:

$$ \left( 1-y \right) ^{n}-{n\choose D+1} \left( -y \right) ^{D+1} {\mbox{$_2$F$_1$}(1,-n+D+1;\,D+2;\,y)} $$

Robert Israel
  • 448,999
  • Do you think this is better in numerical terms? – amsmath Apr 17 '19 at 12:32
  • Not particularly, though it might depend on how good your library's hypergeometric function evaluator is. – Robert Israel Apr 17 '19 at 12:35
  • Also might be useful if $D$ is close to $n$, especially if $y$ is small. – Robert Israel Apr 17 '19 at 12:45
  • @RobertIsrael Thank you for this closed form. So in my schemes, $D$ is much smaller than $n$, and $y\geq 1$. As mentioned in the comments above, this expression increases as a function of $n$ and then decreases. For $y=1$ this critical value is $n/2$. Is there a good way to differentiate this hypergeometric expression to arrive at the critical value (even numerically)? Sorry for repeating earlier comment. By the way, should I edit my question to explain this motivation? – UPS Apr 17 '19 at 12:49
  • Correction -- I mean it increases as a function of $k$, and then decreases ($n,y$ are fixed). – UPS Apr 17 '19 at 12:57
  • What function of $k$? Do you mean $y^k {n \choose k}$? Since $$\frac{y^{k+1} {n \choose {k+1}}}{y^k {n \choose k}} = \frac{y(n-k)}{k+1}$$ the maximum will occur at $k =\left \lfloor \dfrac{yn-1}{y+1}\right\rfloor$. – Robert Israel Apr 18 '19 at 15:08