Arrangements and Combinations · Lucas Theorem and the Sierpiński Triangle (Optional)

Lesson 10

Nikolai Chukhin · Alexander S. Kulikov

This also counts the nonzero entries in a row. Suppose \[n=n_{0}+n_{1}p+\dotsb+n_{r}p^{r}.\] For \(\binom{n}{k}\) not to be divisible by \(p\), each digit \(k_{i}\) can be chosen independently from \[0,1,\dotsc,n_{i}.\] Therefore the number of nonzero entries in row \(n\) modulo \(p\) equals \[(n_{0}+1)(n_{1}+1)\dotsm(n_{r}+1).\]