you can count the number of factors of p that are in (nk) for prime p. Let sp(n) be the sum of the digits of n in base p. Then, the number of factors of p in (nk) is (sp(k)+sp(n−k)−sp(n))/(p−1).
Answer
It's a corollary of Legendre's 1808 theorem that power of the prime p that divides n! is
[n/p]+[n/p2]+[n/p3]+⋯ = n−sp(n)p−1
For this and much more see Andrew Granville's very interesting survey The Arithmetic Properties of Binomial Coefficients.
A full answer is here.
No comments:
Post a Comment