Valuation of a binomial coefficient
Since , its prime valuation is just a difference of three Legendre’s-formula computations:
A useful shortcut (Kummer’s theorem) restates this combinatorially: equals the number of “carries” when adding and in base .
Lucas’s theorem
For a prime , Lucas’s theorem finds by working in base: write and in base as digit sequences and , then:
with the convention whenever . This turns a potentially enormous binomial coefficient into a product of small, easy binomial coefficients on individual base- digits.
Worked example
Problem: Find using Lucas’s theorem.
Solution: Write 10 and 3 in base 2: , . Compare digit by digit (from most to least significant): .
The second factor is (since ), so the whole product is 0.
So — i.e. is even, which checks out directly.
Practice problems
1.Find using Legendre’s formula on .
2.Use Lucas’s theorem to determine whether is odd or even (work mod 2).
3.Is odd or even? Use Lucas’s theorem base 2.
4.How many entries in row of Pascal’s triangle are odd? (Hint: in base 2 is .)