Is the numerator of $\sum_{k=0}^n \frac{(-1)^k}{2k+1}\binom{n}{k}$ a power of $2$?

I stumbled on something numerically, and was just starting to work on it, but it seemed fun enough to share.

Let $$f(n)=\sum_{k=0}^{n} \frac{(-1)^{k}}{2k+1}\binom{n}{k}$$

It appears, from the first few values, that $f(n)$ always has numerator equal to a power of $2$. Is this true? If so, why?

The first values: $$\frac{1}{1}, \frac{2}{3}, \frac{8}{15}, \frac{16}{35}, \frac{128}{315}, \frac{256}{693}, \frac{1024}{3003}, \frac{2048}{6435}, \frac{32768}{109395},\\ \frac{65536}{230945}, \frac{262144}{969969}, \frac{524288}{2028117}, \frac{4194304}{16900975} $$

Alternative ways you can see this value: $$f(n)=\int_0^{1}(1-x^2)^n\,dx=\int_{0}^{\pi/2}\cos^{2n+1} t\,dt=\frac{1}{2^{2n}}\sum_{k=0}^{n}\frac{(-1)^k}{2k+1}\binom{2n+1}{n-k}$$


To summarize some of the comments, the sequence above appears to match:

$$\begin{align} f(n)&=\frac{(2n)!!}{(2n+1)!!} \\ &= \frac{2}{3}\cdot \frac{4}{5}\cdot \frac{6}{7}\cdots \frac{2n}{2n+1} \end{align}$$

Thus, if this is correct (and the answer below proves it is,) we have $$f(n)=f(n-1)\cdot \frac{2n}{2n+1}=f(n-1)\left(1-\frac{1}{2n+1}\right).$$

There might be a proof of this recursion using integration by parts for one of the integral forms above.


$$\begin{eqnarray*} f(n) = \sum_{k=0}^{n}\frac{(-1)^k}{2k+1}\binom{n}{k}&=&\int_{0}^{1}\sum_{k=0}^{n}(-1)^k x^{2k}\binom{n}{k}\,dx\\&=&\int_{0}^{1}(1-x^2)^n\,dx\\&=&\frac{1}{2}\int_{0}^{1}z^{-1/2}(1-z)^{n}\,dz\\&=&\frac{\Gamma\left(\frac{1}{2}\right)\Gamma(n+1)}{2\,\Gamma\left(n+\frac{3}{2}\right)}\\&=&\frac{4^n\,n!^2}{(2n+1)!}\\&=&\frac{2^{2n}}{(2n+1)\binom{2n}{n}}\end{eqnarray*}$$ hence it is enough to check that $\nu_2\left(\binom{2n}{n}\right)<2n$ to prove your conjecture.

As a matter of fact, $$\nu_2\left(\binom{2n}{n}\right) = \sum_{k\geq 1}\left(\left\lfloor\frac{2n}{2^k}\right\rfloor-2\left\lfloor\frac{n}{2^k}\right\rfloor\right)\leq 2+\log_2(n),$$ since the terms of the last sum can be only $0$ or $1$, and they are zero as soon as $k$ is big enough.

As stated by the OP in the comments, a careful analysis of the previous formula reveals that $\nu_2\left(\binom{2n}{n}\right)$ is just the number of non-zero bits in the binary representation of $n$.


You can derive it directly from the earlier question, which gives the first step:

$$\sum_k\frac{(-1)^k}{2k+1}\binom{n}k=\frac{n!2^n}{(2n+1)!!}=\frac{n!^22^{2n}}{n!2^n(2n+1)!!}=\frac{n!^22^{2n}}{(2n+1)!}=\frac{2^{2n}}{(2n+1)\binom{2n}n}\;.$$


Posting my own answer to my question after a few months because:

  1. This answer is directly related to the source of the question.
  2. This answer shows the numerator is a power of 2 without finding the explicit closed formula for the value.

This question originally came from taking this question and asking myself the obvious generalization:

Find $g(x)$, a polynomial of degree $2n+1$, such that $g(x)+1$ is divisible by $(x-1)^{n+1}$ and $g(x)-1$ is divisible by $(x+1)^{n+1}$.

One answer is to note that $g'(x)$ must be divisible by $(1-x)^n$ and $(1+x)^n$, hence must be a multiple of $(1-x^2)^{n}$. Find the anti-derivative $G(x)$ of $(1-x^2)^n$ with $G(0)=0$, and then your answer is $g(x)=\frac{1}{G(1)}G(x)$.

Turns out, $G(1)$ is the value in my question above. Indeed, that was the origin of my question. I started computing these values and saw the pattern.

But one new answer to that original question gives a clear reason why there is a power of $2$ in the numerator of $G(1)$. I've adjusted that argument to handle the more general case:

Note that $$\begin{align}2^{2n+1} &= \left((1+x)+(1-x)\right)^{2n+1}\\ &=\sum_{k=0}^{n}\binom{2n+1}{k}\left((1+x)^k(1-x)^{2n+1-k} +(1+x)^{2n+1-k}(1-x)^{k}\right)\\ &=\sum_{j=0}^{n}\binom{2n+1}{n-j}\left((1+x)^{n-j}(1-x)^{n+1+j} + (1+x)^{n+1+j}(1-x)^{n-j}\right) \end{align}$$

Dividing by $2^{2n}$ and rearranging, we get: $$1-\frac{1}{2^{2n}}\sum_{j=0}^{n} \binom{2n+1}{n-j}(1+x)^{n+1+j}(1-x)^{n-j} = -1 + \frac{1}{2^{2n}}\sum_{j=0}^{n} \binom{2n+1}{n-j}(1+x)^{n-j}(1-x)^{n+1+j}$$

So if $g(x)=1-\frac{1}{2^{2n}}\sum_{j=0}^{n} \binom{2n+1}{n-j}(1+x)^{n+1+j}(1-x)^{n-j}$, then $g(x)-1$ is divisible by $(1+x)^{n+1}$ and $g(x)+1$ is divisible by $(x-1)^{n+1}$.

Now, the lead coefficient of $g(x)$ is $\frac{(-1)^n}{(2n+1)G(1)}$ in the original solution for $g(x)$, and it is $$\frac{1}{2^{2n}}\sum_{j=0}^{n}\binom{2n+1}{n-j}(-1)^{n-j+1}=\frac{M}{2^{2n}}$$ for an integer $M$ in this new solution.

So we only need to know that there is a unique solution for $g(x)$. That's relatively easy to do: If $g_1,g_2$ are solutions, then $g_1(x)-g_2(x)$ must be divisibly by both $(x-1)^{n+1}$ and $(x+1)^{n+1}$, and hence must be zero since it is of degree at most $2n+1.$

So this shows that $G(1)$ must have a numerator equal to a power of $2$.

Indeed, we get the general formula for $f(n)$ if we prove:

$$M=\sum_{j=0}^n (-1)^{j+1}\binom{2n+1}{j} = (-1)^n\binom{2n}{n}$$

Then we get that $f(n)=\frac{2^{2n}}{(2n+1)\binom{2n}{n}}$.