Maths WorkshopMaths problems with full solutions
Exercise 799Combinatorics › Binomial coefficientsL1Added 3 Nov 2026

Parity of binomial coefficients

#parity#binomial#Lucas

Statement

When is (nk)\binom{n}{k} odd?

Hint

Use Lucas's theorem mod 22.

Show solutionHide solution

Solution

Lucas mod 2. (nk)≡1(mod2)\binom{n}{k}\equiv1\pmod2 iff every binary digit of kk is ≤\le the corresponding digit of nn.

Equivalent. The binary expansion of kk is a submask of that of nn.

Conclusion. (nk)\binom{n}{k} is odd iff no bit of kk exceeds the corresponding bit of nn in binary (i.e. k & n=kk\,\&\,n=k in bitwise AND).