Math Fun Facts!
hosted by the Harvey Mudd College Math Department created, authored and ©1999-2010 by Francis Su
Subscribe to our RSS feed   or follow us on Twitter.
Get a random Fun Fact!
or
No subject limitations
Search only in selected subjects
    Algebra
    Calculus or Analysis
    Combinatorics
    Geometry
    Number Theory
    Probability
    Topology
    Other subjects
  Select Difficulty  
Enter keywords 

  The Math Fun Facts App!
 
  List All : List Recent : List Popular
  About Math Fun Facts / How to Use
  Contributors / Fun Facts Home
© 1999-2010 by Francis Edward Su
All rights reserved.

From the Fun Fact files, here is a Fun Fact at the Easy level:

Kaprekar's Constant

Take any four digit number (whose digits are not all identical), and do the following:

  1. Rearrange the string of digits to form the largest and smallest 4-digit numbers possible.
  2. Take these two numbers and subtract the smaller number from the larger.
  3. Use the number you obtain and repeat the above process.
What happens if you repeat the above process over and over? Let's see...

Suppose we choose the number 3141.
4311-1134=3177.
7731-1377=6354.
6543-3456=3087.
8730-0378=8352.
8532-2358=6174.
7641-1467=6174...
The process eventually hits 6174 and then stays there!

But the more amazing thing is this: every four digit number whose digits are not all the same will eventually hit 6174, in at most 7 steps, and then stay there!

Presentation Suggestions:
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.

The Math Behind the Fact:
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 sequence that 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).

How to Cite this Page:
Su, Francis E., et al. "Kaprekar's Constant." Math Fun Facts. <http://www.math.hmc.edu/funfacts>.

Keywords:    iteration, functions, dynamical systems
Subjects:    number theory, other
Level:    Easy
Fun Fact suggested by:   Byron Walden
Suggestions? Use this form.
4.00
 
current
rating
Click to rate this Fun Fact...
    *   Awesome! I totally dig it!
    *   Fun enough to tell a friend!
    *   Mildly interesting
    *   Not really noteworthy
and see the most popular Facts!
Get the Math Fun Facts
iPhone App!

Want another Math Fun Fact?

For more fun, tour the Mathematics Department at Harvey Mudd College!