Prime Valuations of Factorials and Binomial Coefficients
Legendre’s formula counts multiples of successive prime powers inside a factorial. Subtraction gives the valuation of a binomial coefficient.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 1
- Reading time
- 1 min
Each \(j\) from one to \(n\) contributes one for every power \(p^r\) dividing it. Counting by powers rather than terms gives the floor sum, which has only finitely many nonzero terms.
\[v_p(n!)=\sum_{r\ge1}\left\lfloor\frac n{p^r}\right\rfloor.\]
A binomial coefficient without multiplication
For \(\binom{20}{8}\), \(v_2(20!)=18\), \(v_2(8!)=7\), and \(v_2(12!)=10\). The result has exactly one factor of two. Writing \(n\) in base \(p\) turns the floor sum into \((n-s_p(n))/(p-1)\), where \(s_p\) is the digit sum. This is the valuation regime that controls the denominators of \(p\)-adic power series.[1]