# 4 digit number

1. Apr 22, 2006

### whoelsebutme

4 digit number....

Consider four distinct digits.

Construct the greatest four digit number out of those digits.

Now construct the smallest number, again from those four digits.

If the difference of the two numbers consists of the same four digits as chosen originally, can you find the four digits?

2. Apr 22, 2006

### matt grime

This doesn't belong in this forum. Try general maths.

3. Apr 22, 2006

### VietDao29

Say, you have 4 digits, namely: a1, a2, a3, and a4, and that: a1 > a2 > a3 > a4.
To compare 2 4-digit numbers, say abcd, adn efgh, one must first compare the thousands right? If a > e, then abcd > efgh.
If a = e, we continue to compare the hundreds, then... blah blah blah.
Can you get this?
---------------
Now if you want to construct the greatest number from these digits, how can you do that?
Can you go from here? :)

4. Apr 23, 2006

### geniusprahar_21

the answer is 6, 1, 7, and 4

*just for knowledge, the number 6174(the answer) is called the Kaprekar Constant. If you do with this number, exactly as written above, then you always get the number back...

5. Apr 23, 2006

### Gokul43201

Staff Emeritus
In fact, if you start with any 4-digit number and go through a bunch of iterations (of the Kaprekar Algorithm, each step involving the process described in the OP), you end up with either 0, or the number above.