Kummer's theorem 2026-10-18
For a prime number and integers , the P-adic valuation of the binomial coefficient equals the number of arithmetic carries in the base- addition of and .[ref]
Number Theory for Mathematical Contests by David Anthony Santos. David A. Santos, Number Theory for Mathematical Contests, revision 31 October 2007, §8.3, Theorem 246, printed p. 90: carry count for a binomial coefficient
Indeed, subtract the two denominator factorial valuations in the Legendre formula:Each arithmetic carry accounts for one unit of this quotient by subadditivity of the base-p digit sum. In particular, the binomial coefficient is divisible by exactly when at least one carry occurs.For , the factorial counts giveThe matching base-p expansions are and . Their units add to two; the next column gives , sending one carry into the nines column. That column then gives , and no further carry occurs. The result is . The base-p digit sums check the same result: . Consequently is divisible by three but not by nine.
Subadditivity of the base-p digit sum Created 2026-09-28 Updated 2026-10-18
For nonnegative integers and an integer base ,In column addition, every arithmetic carry replaces units in one numeral digit by one unit in the next position and therefore decreases the base-p digit sum by . Count each outgoing carry separately, including each step of a chain. There is equality precisely when there are no carries. For prime number bases, Kummer's theorem turns this digit-sum deficit into a prime exponent.
