Try This and Prepare to be Amazed

By Alex in Science & Tech on Apr 8, 2010 at 9:35 pm

If someone ever told you that the answer to the ultimate question of life, the universe and everything is "42", tell them that is wrong. The answer is "6174" and here's why (and prepare to get your mind blown):

Take any number with 4 non-repeating digits. Say 1562.

Step 1: Arrange the number in ascending and then descending order
Step 2: Subtract the smaller number from the bigger number

6521 - 1256 = 5265

Repeat the steps:

6552 - 2556 = 3996
9963 - 3699 = 6264
6642 - 2466 = 4176
7641 - 1467 = 6174

Try any 4-digit number with non-repeating digits, and you'll *always* get 6174.

Pretty cool, huh?

6174 is known as Kaprekar's constant. The math operation above, discovered by Indian mathematician D.R. Kaprekar, will reach 6174 after at most 7 steps (if you did more than 7 iterations, check your arithmetics).

See also: Math T-shirts at the NeatoShop


Email This Post
Tweet This Post 
Share This Post on Facebook

Tags: , , ,


Neat stuff from the NeatoShop:


  1. Andie
    Apr 8th, 2010 at 9:43 pm

    Just wanted to point out that the number is wrong twice in the article–it should be 6174, but at 2 places it’s 6147…

  2. Johnny Cat
    Apr 8th, 2010 at 9:45 pm

    That is amazing. Numerical constants always reassure me that math is part of the natural world in some mind-boggling way. Also, multiply 9 by any number, then add up the digits. Keep adding up the digits, and you’ll get 9.

    9 x 7 = 63. 6 + 3 = 9
    27.619 x 9 = 248.571. 2+4+8+5+7+1 = 27. 2 + 7 = 9.

  3. Alex
    Apr 8th, 2010 at 9:45 pm

    Oops – I thought I’d fixed that! Dyslexia strikes again :)

  4. Clyde
    Apr 8th, 2010 at 9:48 pm

    Meh. Its neat but not terribly amazing.
    The operation of arranging four digits into ascending or descending order essentially maps every possible ordering of four given digits to the same number.
    There are only ten different digits that could possibly appear, and by subtracting the ascending order from the descending order you’re just subtracting the smallest from the largest, second smallest from second largest, second largest from second smallest, and largest from smallest for the first, second, third, and fourth digits respectively.
    There are only so many ways that you can subtract one digit from another, especially when you’re restricted to non-repeated digits.
    There are many mathematical operations where repeating the same operation eventually settles on some particular number.
    A different mathematical technique that is similar but much more useful is “Newton’s method” which can be used to get an approximation for any formula and only gets more accurate the more you repeat it.

  5. Alex
    Apr 8th, 2010 at 9:50 pm

    What would amaze you Clyde?

  6. Clyde
    Apr 8th, 2010 at 10:30 pm

    Take two integers between two and twelve. Quintuple both and then use the Ackermann function on each. Raise them both to the i’th power and add a constant c in case you’ve accidentally taken an integral somewhere. (To be on the safe side)

    Then give both numbers weapons and make them fight a random prime no less than 7 and no greater than 139969.

    That’d be pretty cool! :)

  7. Alex
    Apr 8th, 2010 at 10:36 pm

    Tried that and got 4 8 15 16 23 42. Whoa! Clyde, you’re on to something! ;)

  8. Clyde
    Apr 8th, 2010 at 10:39 pm

    Works every time.

  9. Yola
    Apr 9th, 2010 at 12:37 am

    I chose 3824

    so…

    4283 – 3824 = 459
    954 – 459 = 495
    594 – 495 = 99
    99 – 99 = 0

    am I missing something?

  10. Alex
    Apr 9th, 2010 at 12:44 am

    Yola – so, 3824:

    8432 – 2348 = 6084
    8640 – 0468 = 8172
    8721 – 1278 = 7443
    7443 – 3447 = 3996
    9963 – 3699 = 6264
    6642 – 2466 = 4176
    7641 – 1467 = 6174

    Your first step was incorrect

  11. kruemi
    Apr 9th, 2010 at 2:36 am

    I’ve created a little spreadsheet to try it out. It’s really funny.
    If you want to try:
    http://spreadsheets.google.com/ccc?key=0AtjwtBQnQot5dC1TSDRIYVRRMnl3cD RodlpJVzFGS0E&hl=en

    And yes, ther might still be errors as there was some hand labour involved to make it work without having to use scripts! And yes, you all could edit it, please only fill in the yellowish cell A2.

  12. different Brandon
    Apr 9th, 2010 at 3:46 am

    also noticed that any 4 digit number that becomes sequential when rearranged, will always result in 3087 when this pattern is applied.

    if nobody’s figured that out yet I’d like that to be called “Brandon’s constant” please.

    i.e. 4321-1234=3087 etc.

  13. Felipe Venancio
    Apr 9th, 2010 at 7:37 am

    I like math graphics, but not long boring formulas. I love atracttors and fractals.

  14. Juice
    Apr 9th, 2010 at 7:54 am

    So why isn’t the answer to life the universe and everything 495?

  15. beek
    Apr 9th, 2010 at 8:39 am

    6174

    7641 – 1467 = 6174

    Weird.

  16. oli
    Apr 9th, 2010 at 8:50 am

    In the last line you wrote 7641, but the previous line’s number is 4176, so it should be 6741. No?

  17. MadMolecule
    Apr 9th, 2010 at 9:21 am

    @oli: Note that the instructions say to rearrange the digits from highest to lowest and lowest to highest in each step.

  18. kruemi
    Apr 9th, 2010 at 9:24 am

    @oli nope. The reason, why this stuff works is, that we sort the digits of the result after each step. Once in descending order (biggest number to be reached with four given digits) and ascending order (smallest number to be reached) and take the difference.

    Take a few tries on my web-based calculator. It might make understanding easier if you can try different values.

  19. KDinCT
    Apr 9th, 2010 at 9:45 am

    @kruemi-

    I added another sheet to your calculator. Hope you don’t mind! Have a look. I would love to know what you think.

  20. esther
    Apr 9th, 2010 at 10:19 am

    That is pretty cool!!!!

  21. AnthonyC
    Apr 9th, 2010 at 12:47 pm

    Is this trick base-dependent?

    I know @Johnny Cat’s sum-the-digits is base dependent. In base nine, 9 is writtn 10, the sum of whose digits is 1. But for multiples of 8 in base nine…
    9*9-1 -> 88 in base 9. Sum the digits:
    88
    17
    8

    Although I haven’t proven or seen it proved that this is generally true for 8 in base nine, or if the rule applies to “base minus one” in any (whole) base. Anyone know for sure?

  22. Kilockel
    Apr 9th, 2010 at 4:00 pm

    9876
    9876 is 9876-6789=3087
    3087 is 8730-0387=8343
    8343 is 8433-3348=5085
    5085 is 8550-0558=7992
    7992 is 9972-2799=7173
    7173 is 7731-1377=6354
    6354 is 6543-3456=3087

    Yeah… About that whole *ANY* number thing.

  23. D.B. Cooper
    Apr 9th, 2010 at 5:01 pm

    Reminds me of this: http://xkcd.com/710/

  24. Him
    Apr 9th, 2010 at 5:12 pm

    @D.B. Cooper
    If you look on the left, it goes 24-12-6-3-10. 3 is odd, but 3×3 is 9, not 10.

    And yeah, that’s the first thing that popped into my mind too.

  25. Biff
    Apr 9th, 2010 at 5:30 pm

    @Kilockle

    3087 is 8730-0387=8343

    Should be:

    3087 is 8730-0378=8352
    8352 is 8532-2358=6174

  26. Nimadar
    Apr 10th, 2010 at 4:05 am

    This is similar to where you can take any number, put it in word form (e.g. 500 becomes ‘five hundred’) and count the letters, (five hundred = 11 letters). Now take that number and do the same (eleven). Repeat the process (eleven = 6 letters), six = 3 letters, three = 5 letters, five = 4 letters. No matter what number you choose, you will Always get 4 in the end.

  27. kruemi
    Apr 11th, 2010 at 11:16 am

    Fun, than so many people get the math wrong (a simple subtraction) and claim to have found a flaw :-)

    On the other hand: For the idiot that destroyed the first sheet… well done!

  28. rdennis
    Apr 11th, 2010 at 2:03 pm

    5834 doesn’t work. Try it. Ends up 999.

  29. kermy
    Apr 12th, 2010 at 6:16 am

    rdennis, you may need to check you maths. If the lower number is always being subtracted from the higher, the number cannot drop to being three digits.

    Here’s the maths for yours either way:

    5834 is 8543-3458=5085
    5085 is 8550-0558=7992
    7992 is 9972-2799=7173
    7173 is 7731-1377=6354
    6354 is 6543-3456=3087
    3087 is 8730-0378=8352
    8352 is 8532-2358=(you know it) 6174.

  30. judson
    Apr 12th, 2010 at 12:49 pm

    any number x 9

    the sum of the digits in the answer always add up to nine

    3×9= 27 2+7 =9

    123×9= 1107 1+1+0+7 =9

  31. DaveO
    Sep 1st, 2010 at 2:05 am

    Clyde mentions that the result of the procedure is not amazing because its constraints mean it will eventually settle somewhere, however it is somewhat amazing that it settles on a single number and not a group of numbers… If you apply the technique to numbers in base 9 there at least two possible attractive triplets of numbers you could end up in:
    7072 –> 7432 –> 5074 –> 7072…
    or
    7252 –> 5254 –> 3076 –> 7252…
    (there may be more…these are the only ones I’ve found so far).

  32. aaron
    Sep 22nd, 2010 at 1:16 pm

    Why is it that you can write down any four digit number containg four different digits, then write down a second four digit number containg same digits in any different order..subtract the lower number from higher one, you always obtain a multiple of 9??? how does this always work for any four digit number, need an explanation please


Keep track of the comments with Comment RSS

Don't Miss: New Stuff | Bestsellers | The Cute Store
                   Funny T-Shirts | Zombie Shop

Need a gift? Get unforgettable gifts for:
Geeks | Pranksters | Kids | Hipsters | Shutterbugs

Lijit Search

Old school? Bookmark us! RSS Feed Twitter Facebook Page