Grinstead-Snell-Probability · Problem 38

Combinatorics

Mathematics · binomial-coefficients-lucas-theorem

Problem

Lucas proved the following general result relating to Exercise 37. If pp is any prime number, then (nj)(modp)\binom{n}{j} \pmod{p} can be found as follows: Expand nn and jj in base pp as n=s0+s1p+s2p2+⋯+skpkn = s_0 + s_1 p + s_2 p^2 + \cdots + s_k p^k and j=r0+r1p+r2p2+⋯+rkpkj = r_0 + r_1 p + r_2 p^2 + \cdots + r_k p^k, respectively. (Here kk is chosen large enough to represent all numbers from 0 to nn in base pp using kk digits.) Let s=(s0,s1,s2,…,sk)s = (s_0, s_1, s_2, \ldots, s_k) and r=(r0,r1,r2,…,rk)r = (r_0, r_1, r_2, \ldots, r_k). Then (nj)(modp)=∏i=0k(siri)(modp).\binom{n}{j} \pmod{p} = \prod_{i=0}^{k} \binom{s_i}{r_i} \pmod{p}. For example, if p=7p = 7, n=12n = 12, and j=9j = 9, then 12=5⋅70+1⋅71,9=2⋅70+1⋅71,\begin{aligned} 12 &= 5 \cdot 7^0 + 1 \cdot 7^1, \\ 9 &= 2 \cdot 7^0 + 1 \cdot 7^1, \end{aligned} so that s=(5,1)s = (5,1), r=(2,1)r = (2,1), and this result states that (129)(modp)=(52)(11)(mod7).\binom{12}{9} \pmod{p} = \binom{5}{2}\binom{1}{1} \pmod{7}. Since (129)=220=3(mod7)\binom{12}{9} = 220 = 3 \pmod{7}, and (52)=10=3(mod7)\binom{5}{2} = 10 = 3 \pmod{7}, we see that the result is correct for this example. Show that this result implies that, for p=2p = 2, the (pk−1)(p^k - 1)st row of your triangle in Exercise 37 has no zeros.

Related theory

Browse the problem library