{"id":541,"date":"2019-06-29T22:21:23","date_gmt":"2019-06-29T22:21:23","guid":{"rendered":"http:\/\/funfacts.104.42.120.246.xip.io\/?page_id=541"},"modified":"2019-12-03T19:53:32","modified_gmt":"2019-12-03T19:53:32","slug":"lucas-theorem","status":"publish","type":"page","link":"https:\/\/math.hmc.edu\/funfacts\/lucas-theorem\/","title":{"rendered":"Lucas&#8217; Theorem"},"content":{"rendered":"\n<p>Lucas&#8217; Theorem: If p is a prime number, and N has base p representation (a<sub>j<\/sub>,&#8230;,a<sub>1<\/sub>,a<sub>0<\/sub>) and k has base p representation (b<sub>j<\/sub>,&#8230;,b<sub>1<\/sub>,b<sub>0<\/sub>), then (N CHOOSE k) is congruent [mod p] to<br>(a<sub>j<\/sub>&nbsp;CHOOSE b<sub>j<\/sub>)&#8230;(a<sub>1<\/sub>&nbsp;CHOOSE b<sub>1<\/sub>)(a<sub>0<\/sub>&nbsp;CHOOSE b<sub>0<\/sub>).<\/p>\n\n\n\n<p>Example: Let N = 588, k = 277, p = 5.&nbsp;<br>N = 588 has base 5 representation (4323).&nbsp;<br>k = 277 has base 5 representation (2102).&nbsp;<br>Thus by Lucas&#8217; Theorem, (588 CHOOSE 277) is congruent [mod 5] to(4 CHOOSE 2) (3 CHOOSE 1) (2 CHOOSE 0) (3 CHOOSE 2)which is 54 = 4 [mod 5].<\/p>\n\n\n\n<p>Fun Corollary: If p is prime and N has base p representation (a<sub>j<\/sub>,&#8230;,a<sub>1<\/sub>,a<sub>0<\/sub>), then there are exactly (1+a<sub>j<\/sub>)&#8230;(1+a<sub>1<\/sub>)(1+a<sub>0<\/sub>) values of k for which (N CHOOSE k) is NOT a multiple of p. This is the number of non-multiples of p in the N-th row of\u00a0Pascal&#8217;s Triangle.<\/p>\n\n\n\n<p>Example: Since 588 = (4323) in base 5, then (588 CHOOSE k) is a non-multiple of 5 for exactly 5*4*3*4 = 240 values of k. The 588th row of Pascal&#8217;s Triangle will have 589 &#8211; 240 = 349 multiples of 5.<\/p>\n\n\n\n<p>A special case of this is\u00a0Odd Numbers in Pascal&#8217;s Triangle.<\/p>\n\n\n\n<p><strong>The&nbsp;Math&nbsp;Behind&nbsp;the&nbsp;Fact:<\/strong><br>The proof of Lucas&#8217; Theorem is based on this observation: for p prime and r &gt; 0, (p<sup>r<\/sup>&nbsp;CHOOSE k) is a multiple of p for all 0 &lt; k &lt; p<sup>r<\/sup>. To show this, note for 0 &lt; k &lt; N that (N CHOOSE k) = (N\/k)(N-1 CHOOSE k-1). So when N = p<sup>r<\/sup>, we havek*(p<sup>r<\/sup>&nbsp;CHOOSE k) = p<sup>r<\/sup>&nbsp;(p<sup>r<\/sup>-1 CHOOSE k-1).At least r powers of p divide the right side of the equation above, whereas at most r-1 powers of p divide k. Thus p must divide (p<sup>r<\/sup>&nbsp;CHOOSE k). (Note this argument only works when p is prime.)<\/p>\n\n\n\n<p>When k = 0 or p<sup>r<\/sup>, then (p<sup>r<\/sup>&nbsp;CHOOSE k)=1. Otherwise (p<sup>r<\/sup>&nbsp;CHOOSE k)=0 [mod p]. Then the binomial theorem shows that when p is prime,(1+x)<sup>p^r<\/sup>&nbsp;= 1 + x<sup>p^r<\/sup>&nbsp;[mod p].(This is sometimes called the &#8220;Freshman Binomial Theorem&#8221;.)<\/p>\n\n\n\n<p>Now we show that (588 CHOOSE 277) is congruent to 54 [mod 5]. The general case is similar. In the polynomial (1+x)<sup>588<\/sup>, the coefficient of x<sup>277<\/sup>&nbsp;will be (588 CHOOSE 277) [mod 5]. But(1+x)<sup>588<\/sup>&nbsp;= (1+x)<sup>4(125)<\/sup>&nbsp;(1+x)<sup>3(25)<\/sup>&nbsp;(1+x)<sup>2(5)<\/sup>&nbsp;(1+x)<sup>3<\/sup>and our observation above shows that this is congruent [mod 5] to(1+x<sup>125<\/sup>)<sup>4<\/sup>&nbsp;(1+x<sup>25<\/sup>)<sup>3<\/sup>&nbsp;(1+x<sup>5<\/sup>)<sup>2<\/sup>&nbsp;(1+x)<sup>3<\/sup>.Now how can we create an x<sup>277<\/sup>&nbsp;term? Only by using exactly two x<sup>125<\/sup>&nbsp;terms, one x<sup>25<\/sup>, no x<sup>5<\/sup>&nbsp;terms, and two x<sup>1<\/sup>&nbsp;terms. How many ways can we do that? Exactly (4 CHOOSE 2)(3 CHOOSE 1)(2 CHOOSE 0)(3 CHOOSE 2) ways, as predicted!<\/p>\n\n\n\n<p><strong>How to Cite this Page:<\/strong>&nbsp;<br>Su, Francis E., et al. &#8220;Lucas&#8217; Theorem.&#8221;&nbsp;<em>Math Fun Facts<\/em>. &lt;http:\/\/www.math.hmc.edu\/funfacts&gt;.<\/p>\n\n\n\n<p><strong>References:<\/strong><br>R. P. Stanley, <em><a href=\"https:\/\/www.amazon.com\/exec\/obidos\/ASIN\/0521663512\/ref=nosim\/mathfunfacts-20\">Enumerative Combinatorics<\/a><\/em>, Wadsworth &amp; Brooks\/Cole, 1986.<\/p>\n\n\n\n<p><strong>Fun Fact suggested by:   <\/strong><br>Arthur Benjamin <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lucas&#8217; Theorem: If p is a prime number, and N has base p representation (aj,&#8230;,a1,a0) and k has base p&#46;&#46;&#46;<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"tags":[57,9,10,15,49],"class_list":["post-541","page","type-page","status-publish","hentry","tag-advanced","tag-combinatorics","tag-numtheory","tag-polynomial","tag-prime"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/comments?post=541"}],"version-history":[{"count":3,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/541\/revisions"}],"predecessor-version":[{"id":1512,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/541\/revisions\/1512"}],"wp:attachment":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/media?parent=541"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/tags?post=541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}