{"id":230,"date":"2019-06-26T23:06:20","date_gmt":"2019-06-26T23:06:20","guid":{"rendered":"http:\/\/funfacts.104.42.120.246.xip.io\/?page_id=230"},"modified":"2019-12-03T17:48:01","modified_gmt":"2019-12-03T17:48:01","slug":"kaprekars-constant","status":"publish","type":"page","link":"https:\/\/math.hmc.edu\/funfacts\/kaprekars-constant\/","title":{"rendered":"Kaprekar&#8217;s Constant"},"content":{"rendered":"\n<p>Take any four digit number (whose digits are not all identical), and do the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Rearrange the string of digits to form the largest and smallest 4-digit numbers possible.<\/li><li>Take these two numbers and subtract the smaller number from the larger.<\/li><li>Use the number you obtain and repeat the above process.<\/li><\/ol>\n\n\n\n<p>What happens if you repeat the above process over and over? Let&#8217;s see&#8230;<\/p>\n\n\n\n<p>Suppose we choose the number 3141.&nbsp;<br>4311-1134=3177.&nbsp;<br>7731-1377=6354.&nbsp;<br>6543-3456=3087.&nbsp;<br>8730-0378=8352.&nbsp;<br>8532-2358=6174.&nbsp;<br>7641-1467=6174&#8230;&nbsp;<br>The process eventually hits 6174 and then stays there!<\/p>\n\n\n\n<p>But the more amazing thing is this:&nbsp;<em>every<\/em>&nbsp;four digit number whose digits are not all the same will eventually hit 6174, in at most 7 steps, and then stay there!<\/p>\n\n\n\n<p><strong>Presentation&nbsp;Suggestions:<\/strong><br>Remember that if you encounter any numbers with fewer than has fewer 4 digits, it must be treated as though it had 4 digits, using leading zeroes. Example: if you start with 3222 and subtract 2333, then the difference is 0999. The next step would then consider the difference 9990-0999=8991, and so on. You might ask students to investigate what happens for strings of other lengths or in other bases.<\/p>\n\n\n\n<p><strong>The\u00a0Math\u00a0Behind\u00a0the\u00a0Fact:<\/strong><br>Each number in the sequence uniquely determines the next number in the sequence. Since there are only finitely many possibilities, eventually the sequence must return to a number it hit before, leading to a cycle. So any starting number will give a\u00a0sequence\u00a0that eventually cycles. There can be many cycles; however, for length 4 strings in base 10, there happens to be 1 non-trivial cycle, and it has length 1 (involving the number 6174).<\/p>\n\n\n\n<p><strong>How to Cite this Page:<\/strong>&nbsp;<br>Su, Francis E., et al. &#8220;Kaprekar&#8217;s Constant.&#8221;&nbsp;<em>Math Fun Facts<\/em>. &lt;http:\/\/www.math.hmc.edu\/funfacts&gt;.<\/p>\n\n\n\n<p><strong>Fun Fact suggested by:   <\/strong><br>Byron Walden <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Take any four digit number (whose digits are not all identical), and do the following: Rearrange the string of digits&#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":[131,3,130,129,10,12],"class_list":["post-230","page","type-page","status-publish","hentry","tag-dynamical-systems","tag-easy","tag-functions","tag-iteration","tag-numtheory","tag-other"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/230","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=230"}],"version-history":[{"count":3,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/230\/revisions"}],"predecessor-version":[{"id":1499,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/pages\/230\/revisions\/1499"}],"wp:attachment":[{"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/media?parent=230"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/math.hmc.edu\/funfacts\/wp-json\/wp\/v2\/tags?post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}