What are all the even positive integers $n$ such that for $1 \le r \le n-1 $ , $2n \choose r$ is odd for exactly one $r$ ?

115 Views Asked by At

Motivated from this To find all odd integers $n>1$ such that $2n \choose r$ , where $1 \le r \le n$ , is odd only for $r=2$ ; what are all the even positive integers $n$ such that for $1 \le r \le n-1 $ , $2n \choose r$ is odd for exactly one $r$ ?

1

There are 1 best solutions below

2
On

The binomial coefficient $\binom{m}{k}$ is odd if and only if $k$ and $m-k$ have no common terms in their binary expansions. That is the case if and only if the set of $1$-bits in the binary expansion of $k$ is a subset of the set of $1$-bits in the binary expansion of $m$.

To see that, let us more generally consider with what power a prime $p$ divides $n!$. Using Legendre's formula in the form

$$v_p(n!) = \frac{n - s_p(n)}{p-1},$$

where $v_p(r)$ is the exponent of $p$ in the prime factorisation of $r$ and $s_p(r)$ is the sum of the digits in the $p$-ary expansion of $r$, from

\begin{align} v_p\Biggl[\binom{m}{k}\Biggr] &= v_p(m!) - v_p(k!) - v_p((m-k)!)\\ &= \frac{\bigl(m-s_p(m)\bigr) - \bigl(k-s_p(k)\bigr) - \bigl((m-k) - s_p(m-k)\bigr)}{p-1}\\ &= \frac{s_p(k) + s_p(m-k) - s_p(m)}{p-1} \end{align}

it immediately follows that $\binom{m}{k}$ is not divisible by $p$ if and only if $s_p(m) = s_p(k) + s_p(m-k)$. If we write

$$k = \sum_{\lambda = 0}^\ell a_\lambda p^\lambda,\quad m-k = \sum_{\lambda = 0}^\ell b_\lambda p^\lambda\quad\text{and}\quad m = \sum_{\lambda = 0}^\ell c_\lambda p^\lambda,$$

where $\ell$ is "sufficiently large" (so large that $m < p^{\ell+1}$) and $a_\lambda,\,b_\lambda,\,c_\lambda \in \{0,1,\dotsc,p-1\}$ for $0 \leqslant \lambda \leqslant \ell$, then we see

$$s_p(k) = \sum_{\lambda = 0}^\ell a_\lambda,\quad s_p(m-k) = \sum_{\lambda = 0}^\ell b_\lambda\quad\text{and}\quad s_p(m) = \sum_{\lambda = 0}^\ell c_\lambda.$$

The addition $k + (m-k)$ has no carry in base $p$ if and only if $a_\lambda + b_\lambda < p$ for $0 \leqslant \lambda \leqslant \ell$, and then we see that $c_\lambda = a_\lambda + b_\lambda$ for all $\lambda$, hence $s_p(m) = s_p(k) + s_p(m-k)$. If on the other hand the addition has carries, that is, $a_\lambda + b_\lambda \geqslant p$ for some $\lambda$, say the first carry occurs at the digit with index $\delta$, then we have $c_\lambda = a_\lambda + b_\lambda$ for $0 \leqslant \lambda < \delta$, and $c_\delta = a_\delta + b_\delta - p$. If no further carries occur, then we have $c_{\delta+1} = a_{\delta+1} + b_{\delta+1} + 1$ and $c_\lambda = a_\lambda + b_\lambda$ for $\lambda > \delta+1$ and $s_p(m) = s_p(k) + s_p(m-k) - (p-1)$. If further carries occur, each carry reduces the digit sum by $p-1$, so we have

$$\frac{s_p(k) + s_p(m-k) - s_p(m)}{p-1} = \text{ number of carries in the base-$p$ addition}.$$

For base $2$, a carry occurs if and only if $k$ and $m-k$ have a common $1$-bit.

Thus there is exactly one odd binomial coefficient $\binom{m}{k}$ for $1 \leqslant k \leqslant \left\lfloor \frac{m}{2}\right\rfloor$ if and only if $m$ has exactly two $1$-bits in its binary expansion. If $m$ is a power of $2$ (has only one $1$-bit), then every nontrivial addition $k + (m-k) = m$ has carry in base $2$, and if $m$ has at least three $1$-bits, then at least two of the powers of $2$ in the binary expansion of $m$ are $\leqslant \left\lfloor\frac{m}{2}\right\rfloor$ and the corresponding binomial coefficients are both odd.

So the even $n$ such that $\binom{2n}{r}$ is odd for exactly one $1 \leqslant r \leqslant n-1$ are precisely the numbers $n = 2^a + 2^b$ with $1 \leqslant a < b$. Then the binomial coefficient $\binom{2n}{2^{a+1}}$ is odd, and all other are even.