Counting odd entries in a row of Pascal's triangle
Statement
Let be the number of ones in the binary expansion of . Prove that exactly of the numbers are odd.
Hint
Work with polynomials modulo . Why is ?
Show solutionHide solution
Solution
Idea. The coefficients of are the binomial coefficients; reducing modulo turns the expansion into a product of very simple factors.
Frobenius step. Modulo , . Repeating, for all .
Factorising. Write with the set of positions of ones in the binary expansion, so . Then
Counting. The exponents for different subsets are pairwise different. So the right side is a sum of distinct monomials with coefficient , and every other coefficient is modulo . Thus exactly coefficients are odd.
Check. : row has odd entries.
Remark. In particular the whole row consists of odd numbers iff .
Lesson. Reduce a polynomial identity modulo a prime and use ; binary expansions turn into a product.