{"id":297,"date":"2019-06-26T23:29:49","date_gmt":"2019-06-26T23:29:49","guid":{"rendered":"http:\/\/funfacts.104.42.120.246.xip.io\/?page_id=297"},"modified":"2019-11-20T22:08:06","modified_gmt":"2019-11-20T22:08:06","slug":"fermats-little-theorem","status":"publish","type":"page","link":"https:\/\/math.hmc.edu\/funfacts\/fermats-little-theorem\/","title":{"rendered":"Fermat&#8217;s Little Theorem"},"content":{"rendered":"\n<p>Fermat&#8217;s little theorem gives a condition that a prime must satisfy:<\/p>\n\n\n\n<p>Theorem. If P is a prime, then for any integer A, (A<sup>P<\/sup>&nbsp;&#8211; A) must be divisible by P.<\/p>\n\n\n\n<p>Let&#8217;s check:&nbsp;<br>2<sup>9<\/sup>&nbsp;&#8211; 2 = 510, is not divisible by 9, so it cannot be prime.&nbsp;<br>3<sup>5<\/sup>&nbsp;&#8211; 3 = 240, is divisible by 5, because 5 is prime.<\/p>\n\n\n\n<p><strong>Presentation&nbsp;Suggestions:<\/strong><br>This may be a good time to explain the difference between a necessary and sufficient condition.<\/p>\n\n\n\n<p><strong>The&nbsp;Math&nbsp;Behind&nbsp;the&nbsp;Fact:<\/strong><br>This theorem can be used as a way to test if a number is&nbsp;<em>not<\/em>&nbsp;prime, although it cannot tell you if a number is prime.<\/p>\n\n\n\n<p>Fermat&#8217;s theorem is a special case of a result known as Euler&#8217;s theorem: that for any positive integer N, and any integer A relatively prime to N: (A<sup>phi(N)<\/sup>&nbsp;&#8211; A) must be divisible by N, where phi(N) is&nbsp;<em>Euler&#8217;s totient function<\/em>&nbsp;that returns the number of positive integers less than or equal to N that are relatively prime to N. So when N is prime, phi(N)=N.<\/p>\n\n\n\n<p>Fermat&#8217;s &#8220;little&#8221; theorem should not be confused with&nbsp;Fermat&#8217;s Last Theorem.<\/p>\n\n\n\n<p><strong>How to Cite this Page:<\/strong>\u00a0<br>Su, Francis E., et al. &#8220;Fermat&#8217;s Little Theorem.&#8221;\u00a0<em>Math Fun Facts<\/em>. &lt;http:\/\/www.math.hmc.edu\/funfacts>.<\/p>\n\n\n\n<p><strong>Fun Fact suggested by:   <\/strong><br>Lesley Ward<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fermat&#8217;s little theorem gives a condition that a prime must satisfy: Theorem. If P is a prime, then for any&#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":[3,10,103,49],"class_list":["post-297","page","type-page","status-publish","hentry","tag-easy","tag-numtheory","tag-primality-test","tag-prime"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/297","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=297"}],"version-history":[{"count":4,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/297\/revisions"}],"predecessor-version":[{"id":1438,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/297\/revisions\/1438"}],"wp:attachment":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/media?parent=297"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/tags?post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}