MarketLucas's theorem
Company Profile

Lucas's theorem

In number theory, Lucas's theorem expresses the remainder of division of the binomial coefficient by a prime number p in terms of the base p expansions of the integers m and n.

Statement
For non-negative integers m and n and a prime p, the following congruence relation holds: :\binom{m}{n}\equiv\prod_{i=0}^k\binom{m_i}{n_i}\pmod p, where :m=m_kp^k+m_{k-1}p^{k-1}+\cdots +m_1p+m_0, and :n=n_kp^k+n_{k-1}p^{k-1}+\cdots +n_1p+n_0 are the base p expansions of m and n respectively. This uses the convention that \tbinom{m}{n} = 0 if m < n. == Proofs ==
Proofs
There are several ways to prove Lucas's theorem. {{Math proof|title=Combinatorial proof using a group action|drop=hidden|proof= Let M be a set with m elements, and arbitrarily divide it into mi cycles of length pi for the various values of i. Then each of these cycles can be rotated separately by a cyclic group Cpi, so that the group G which is the Cartesian product of all these cyclic groups (one for each cycle) acts on M. It thus also acts on the set of n-element subsets N of M, the number of which is \tbinom{m}{n}. This is the group action we consider in the sequel. Since the number of elements in G is a power of p, the same is true of any of its orbits, by the orbit-stabilizer theorem. Hence, \tbinom{m}{n} is congruent modulo p to the number of sets N whose orbit is of size 1, i.e., to the number of fixed points of the group action. Since all cycles can be independently rotated by our group G, the fixed points of the action are those subsets N that are a union of some of the cycles. This means that N must consist of exactly ni cycles of size pi for each i, for the same reason that the integer n has a unique representation in base p. Thus the number of choices for N is exactly \prod_{i=0}^k\binom{m_i}{n_i}. }} {{Math proof|title=Proof based on generating functions|drop=hidden|proof= This proof is due to Nathan Fine. If p is a prime and n is an integer with 1 ≤ np − 1, then the numerator of the binomial coefficient : \binom p n = \frac{p \cdot (p-1) \cdots (p-n+1)}{n \cdot (n-1) \cdots 1} is divisible by p but the denominator is not. Hence p divides \tbinom{p}{n}. Because of the binomial theorem, this means that :(1+X)^p\equiv1+X^p\pmod{p}. Continuing by induction, we have for every nonnegative integer i that :(1+X)^{p^i}\equiv1+X^{p^i}\pmod{p}. Now let m be a nonnegative integer, and let p be a prime. Write m in base p, so that m=\sum_{i=0}^{k}m_ip^i for some nonnegative integer k and integers mi with 0 ≤ mip − 1. Then :\begin{align} \sum_{n=0}^{m}\binom{m}{n}X^n & =(1+X)^m=\prod_{i=0}^{k}\left((1+X)^{p^i}\right)^{m_i}\\ & \equiv \prod_{i=0}^{k}\left(1+X^{p^i}\right)^{m_i}\\ &=\prod_{i=0}^{k}\left(\sum_{j_i=0}^{m_i}\binom{m_i}{j_i}X^{j_ip^i}\right)\\ & =\sum_{n=0}^{m}\left(\prod_{i=0}^{k}\binom{m_i}{n_i}\right)X^n \pmod{p}. \end{align} In the last equality we use distributivity and the fact that the representation of n in base p is unique, where ni is the i-th digit in the base p representation of n. Comparing the coefficients of Xn in the very first and last sum, we obtain Lucas's theorem. }} == Consequences ==
Consequences
One consequence of Lucas's theorem is that the binomial coefficient \tbinom{m}{n} is divisible by the prime p if and only if at least one of the digits of the base-p representation of n is greater than the corresponding digit of m. In particular, \tbinom{m}{n} is odd if and only if the positions of the ones in the binary expansion of n are a subset of the positions of the ones in that of m. This leads to a peculiar distribution of odd numbers in Pascal's triangle, resembling Sierpiński 's triangle, shown to the right. == Non-prime moduli ==
Non-prime moduli
Lucas's theorem can be generalized to give an expression for the remainder when \tbinom mn is divided by a prime power pk. However, the formulas become more complicated. If the modulus is the square of a prime p, the following congruence relation holds for all 0 ≤ srp − 1, a ≥ 0, and b ≥ 0: :\binom{pa+r}{pb+s}\equiv\binom ab\binom rs(1+pa(H_r-H_{r-s})+pb(H_{r-s}-H_s))\pmod{p^2}, where H_n=1+\tfrac12+\tfrac13+\cdots+\tfrac1n is the nth harmonic number. Generalizations of Lucas's theorem for higher prime powers pk are also given by Davis and Webb (1990) and Granville (1997). Kummer's theorem asserts that the largest integer k such that pk divides the binomial coefficient \tbinom{m}{n} (or in other words, the valuation of the binomial coefficient with respect to the prime p) is equal to the number of carries that occur when n and m − n are added in the base p. == q-binomial coefficients ==
q-binomial coefficients
There is a generalization of Lucas's theorem for the q-binomial coefficients. It asserts that if a, b, r, s, k are integers, where 0 ≤ b, s \begin{bmatrix} ka+b \\ kr+s \end{bmatrix}_q \equiv \binom{a}{r} \begin{bmatrix} b \\ s \end{bmatrix}_q \mod{\Phi_k}, where {{tmath|\begin{bmatrix} ka+b \\ kr+s \end{bmatrix}_q}} and {{tmath|\begin{bmatrix} b \\ s \end{bmatrix}_q}} are q-binomial coefficients, \binom{a}{r} is a usual binomial coefficient, and is the kth cyclotomic polynomial (in the variable q). ==References==
tickerdossier.comtickerdossier.substack.com