The number 6174
Tonight's idea
Pick four digits that are not all the same. Say 3, 5, 2 and 4. Now follow three steps.
Big. Sort the digits biggest first: 5432.
Small. Sort them smallest first: 2345.
Subtract. \(5432 - 2345 = 3087\).
Do the same three steps to the answer, and again to the next answer.
Once you reach 6174 you are stuck, because \(7641 - 1467 = 6174\).
The surprise is that every start ends here. There are fewer than ten thousand starts, so a computer can try them all. Each one reaches 6174, and none needs more than seven subtractions. The number is named Kaprekar's constant, after D. R. Kaprekar, the Indian mathematician who found it.
One rule: always keep four digits. If an answer is 999, write it as 0999. The zero counts as a digit.
Watch one: start at 2111
Big is 2111 and small is 1112. The answer has only three digits, so put a zero in front.
\(2111 - 1112 = 0999\)
\(9990 - 0999 = 8991\)
\(9981 - 1899 = 8082\)
\(8820 - 0288 = 8532\)
\(8532 - 2358 = 6174\)
Five subtractions. Notice the zero is sorted like any other digit: it goes last in the big number and first in the small one.
Your turn
- Start at 1234. Keep going until you reach 6174. How many subtractions did you need?
- Start at 9998. Do the first subtraction. Then look at the example: you can finish without any more working. How many subtractions is it in all?
- (a) What goes wrong if you start with 3333? (b) The starts 1234, 4321 and 2413 all give the same first answer. Why?
- Try the same game with three digits. Start at 352 and keep going until the answer stops changing. Which number are you stuck at? Check that it leads back to itself.
Stretch: two digits
With two digits there is no number to get stuck at. Start at 52 and keep two digits each time, so 9 is written 09. Carry on until you see an answer for the second time. What happens instead of getting stuck?
Answers
- \(4321 - 1234 = 3087\), then \(8730 - 0378 = 8352\), then \(8532 - 2358 = 6174\). Three subtractions.
- \(9998 - 8999 = 0999\). The example also reached 0999 after one subtraction and needed four more. So 9998 takes five in all: 0999, 8991, 8082, 8532, 6174.
- (a) Big and small are both 3333, so the answer is 0000, and you stay at zero for ever. That is why the digits must not all be the same. (b) They use the same four digits. Sorting throws away the order, so all three give \(4321 - 1234 = 3087\).
- \(532 - 235 = 297\), \(972 - 279 = 693\), \(963 - 369 = 594\), \(954 - 459 = 495\). You are stuck at 495, because \(954 - 459 = 495\) again. Every three-digit start (digits not all the same) ends at 495.
Stretch. \(52 - 25 = 27\), \(72 - 27 = 45\), \(54 - 45 = 09\), \(90 - 09 = 81\), \(81 - 18 = 63\), \(63 - 36 = 27\). You are back at 27. Instead of one resting number there is a loop of five: 27, 45, 09, 81, 63, round and round.