PrepShorts · Study sheet · Class 6 Mathematics · Chapter 3, Number PlayPrepShorts

Chapter 3 · Number Play

Kaprekar's 6174: a process that always ends in the same place

यह वीडियो हिंदी में भी · Watch in Hindi

Playing with digits10 min

This video could not be loaded. Reload the page to try again.

Sign in with Google

10 min.

Also recorded in Hindi.Englishहिन्दी

6174 rebuilds itself out of its own digits — and it is the only four-digit number that does. Which is why every start, all 8991 of them, has nowhere else to end up.

The idea

The surprising thing is not that 6174 turns up. It is that everybody's number turns up there. Thirty children start from thirty different four-digit numbers, run the same four instructions, and all thirty converge — so the procedure has exactly one place it can come to rest. And you can see why that place is 6174 without running a single other case: rearrange 6174's own digits into the largest and smallest numbers they make, subtract, and 6174 comes back. Finding where a process stops is a different and much easier job than proving that everything gets there, and this section is where the chapter first shows the difference.

What you should be able to do

  • Carry out one round of the procedure on a given four-digit number
  • Repeat the procedure and record how many rounds a start takes
  • Explain why the starting number must not have all four digits the same
  • Show that 6174 reproduces itself under the procedure
  • Explain what it means for a procedure to have a resting place
  • Distinguish "6174 is where it stops" from "every start gets there", and say which the book asserts
  • Run the same procedure on three-digit numbers and identify where it settles
  • State the effect of keeping or dropping a leading zero on the round count
  • Recount who D.R. Kaprekar was and when he found this

Words to know

TermDefinition in one lineFirst introduced
Kaprekar constant6174, the number the four-digit procedure comes to rest on§3.6, p.63 — printed there in bold
magic numberthe book's phrase for 6174 before it gives the formal name§3.6, pp.62–63 — printed there, and in the section title
Devlalithe town in Maharashtra where Kaprekar taught§3.6, p.62 — printed there
largest numberthe biggest number the four given digits can be arranged into§3.6, p.63 — printed there, in the second instruction
smallest numberthe smallest number the same four digits can be arranged into§3.6, p.63 — printed there, in the third instruction
repeatingwhat a number does when the procedure returns it unchanged§3.6, p.63 — printed there, in the closing three-digit question
roundone complete pass through the four instructions§3.7, p.65 — printed there, in the question about 5683
resting placethe explanation's name for a number the procedure sends to itselfan added term, not printed anywhere in the book
leading zerothe explanation's name for a 0 standing at the front of the smallest arrangementan added term, not printed anywhere in the book

Where people slip up

  • "6174 is special because of what it is made of." It is special because of what the procedure does to it. Any other number moves; 6174 stays. Show the fixed-point subtraction rather than hunting for properties of the digits.
  • "You have to try every four-digit number to believe it." You cannot, and the book does not ask you to. What the class can do is check that 6174 stays put and that everybody's chain lands there — which is evidence, not proof, and the chapter is content with that distinction. §3.10 is where it becomes the point.
  • "Any four-digit number works." Not one with four identical digits. The book states the condition in the same sentence as the example, and it is easy to skip.
  • "Bigger starting numbers take more rounds." They do not. The chain from 6382 is done in three; other, smaller starts take more. Round count is not related to size.
  • "The largest and smallest are just the digits sorted." They are — but sorting the smallest one can put a 0 at the front, and whether that is allowed changes the arithmetic. See Notes; this is the one place in the chapter where two honest readings give two different answers.
  • "The three-digit version also gives 6174." It does not; it settles somewhere else, and finding out where is the book's own closing question.
Transcript1,318 words

Last time we finished on an unsolved problem. This time we finish on a solved one, and the contrast is the whole point. In the nineteen forties, a mathematics teacher called D. R. Kaprekar taught at a state school in Devlali, in Maharashtra. He was not a professor at a university. He taught school, and in his spare time he played with numbers. Not metaphorically. He genuinely tried things and looked at what came out.

And he found patterns nobody had noticed before. Several of them. This is the most famous. Your book prints his photograph, which is unusual, and worth noticing. Somebody who taught in a classroom is in your textbook for something he discovered. In nineteen forty-nine, he noticed something about four-digit numbers. He had a procedure. Four instructions you apply to a number, which give you a new number. And then you apply the same four instructions to that one. And again. And again.

What he noticed is where it ends up. Not roughly where. Exactly where. Every single time, from any starting number you like. Let me show you the procedure first, and then we will find out what he saw. Here it is. Take any four-digit number. Step one. Rearrange its digits to make the largest number you can. Call that A. Step two. Rearrange the same digits to make the smallest number you can. Call that B.

Step three. Subtract. A minus B. Call the answer C. Step four. Take C, and go back to step one with it. That is the loop. Your book draws it as a flow chart, with an arrow curling back round. Four instructions and one arrow. There is nothing else to it — no cleverness, no choices to make. Given a number, the next number is completely decided. One condition, and your book states it. The four digits must not all be the same.

Here is why. Suppose you start with one one one one. The largest number you can make from those digits is one one one one. And the smallest is also one one one one. So A and B are the same number, and A minus B is zero. The procedure has nowhere to go. It is dead on round one. So you need at least two different digits. That is the only thing being ruled out.

Your book works an example and leaves the last bit for you. Start with six three eight two. Round one. What is the largest number you can make from the digits six, three, eight and two? Put them in decreasing order. Eight six three two. And the smallest? Increasing order. Two three six eight. Now subtract. Eight thousand six hundred and thirty-two, minus two thousand three hundred and sixty-eight. Six thousand two hundred and sixty-four.

That is C. And now, straight back to the top with it. Round two, starting from six two six four. Largest: six six four two. Smallest: two four six six. Six thousand six hundred and forty-two, minus two thousand four hundred and sixty-six, is four thousand one hundred and seventy-six. Round three, from four one seven six. Largest: seven six four one. Smallest: one four six seven. Seven thousand six hundred and forty-one, minus one thousand four hundred and sixty-seven.

Six thousand one hundred and seventy-four. And that is where your book stops, and leaves a blank column for you to fill in. So let's fill it in. Round four. We start from six one seven four. Largest number from six, one, seven and four? Seven six four one. Smallest? One four six seven. But hang on. Those are the same two numbers we used a moment ago. Seven thousand six hundred and forty-one, minus one thousand four hundred and sixty-seven. Six thousand one hundred and seventy-four.

The same answer. The machine has stopped moving. Run it a fifth time and you get six one seven four again. And a sixth. And forever. So why this number? And here is the lovely part. You can see why without trying a single other case. Six one seven four is made of the digits six, one, seven and four. Put them in decreasing order and you get seven six four one. That is the largest.

Put them in increasing order and you get one four six seven. The smallest. Subtract, and you get six one seven four. Which is exactly where you started. So six one seven four sends itself to itself. It is a resting place — once you land on it, you cannot leave. And it turns out to be the only one. Out of every four-digit number there is, six one seven four is the single one this procedure hands back unchanged.

Now, that is a different claim from the one your book is really making. Finding where a machine stops is easy. You look for a number that repeats. Showing that everything reaches that stop is much harder. Two different questions, and this is where the chapter first shows you the difference. Picture a class of thirty. Everybody picks a different four-digit number. Everybody runs the same four instructions. All thirty land on six one seven four.

And this one really is settled, because there are only so many four-digit numbers to try. Eight thousand nine hundred and ninety-one of them qualify, once you throw out the ones with four identical digits. Every single one arrives. And not one of them takes more than seven rounds. Now something your book does not mention, and it matters if you are doing this by hand. Try starting from two one one one.

The largest is two one one one. The smallest is one one one two. Subtract, and you get nine hundred and ninety-nine. And there is your problem. Nine hundred and ninety-nine has three digits, not four. If you treat it as three digits and carry on, you get nine hundred and ninety-nine minus nine hundred and ninety-nine. Zero. Dead. But if you write it as zero nine nine nine — keeping all four positions, with a leading zero — then the largest is nine nine nine zero, the smallest is zero nine nine nine, and off you go again.

Do that, and two one one one reaches six one seven four in five rounds. So the rule is: keep four digits, even when one of them is a zero. Drop it and the machine breaks. Your book then asks a good follow-up. Run the same machine on three-digit numbers. What starts repeating? Same self-check as before. Try four nine five. The largest number from four, nine and five is nine five four. The smallest is four five nine.

Nine hundred and fifty-four, minus four hundred and fifty-nine, is four hundred and ninety-five. Itself again. So four nine five is the three-digit resting place. And again it is the only one. And again every start reaches it — this time in at most six rounds. So here is yours, and it is the nicest version of this exercise. Take your year of birth. It is a four-digit number, and unless you were born in a year like two two two two, it qualifies.

Run the four instructions. Largest, smallest, subtract, repeat. Count your rounds and put the number in the comments. It will be somewhere between one and seven. Everybody's is. For what it is worth, nineteen forty-nine — the year Kaprekar found this — takes seven. The slowest there is. And notice the difference from last time. One hundred and ninety-six is still open, because there are infinitely many numbers to check and nobody has found the argument.

Six one seven four is closed, because there were only eight thousand nine hundred and ninety-one numbers to check, and somebody checked them. Next time, patterns you can only have because of the way we write the time and the date.

Where this fits

Taken from the notes each video was made from, not from the reading order — these are the ideas this one rests on and the ones that later rest on it.

Builds on

Comes up again in

Either side of this one

The book

Open in a new tab