6174 – seems to be a random 4-digit number; you may be wondering what is so special about it?

**Kaprekar **showed that if you carried out the procedure below with certain 4-digit numbers, you always end up with 6174! Allow me to explain…

## The Algorithm

**Pick any 4-digit number of your choice**(as long as it does not have all 4 of the same number, e.g. 1111 is not allowed)- Write the digits of this number in
**descending order**(highest-to-lowest). This is now number**A**. - Write the digits of the original number in
**ascending order**(lowest-to-highest). This is now number**B.** - Calculate
**number A**minus**number B**. This is now number**C**. - Repeat steps 2 to 4 with number
**C**

What you will notice is that after you iterate through the steps above, you will **always**** **end up with the number 6174!!

### Examples

**Let’s take a random 4-digit number. Say 1892:**

- Start with 1892:
- Descending order: 9821
- Ascending order: 1289
- 9821 – 1289 = 8532

- REPEAT with 8532
- Descending order: 8532
- Ascending order: 2358
- 8532 – 2358 =
**6174**🎉😄

With two steps, we have found Kaprekar’s constant: 6174!

**Just so that we can be sure, let’s try again… Say 2662**

- Start with 2662:
- Descending order: 6622
- Ascending order: 2266
- 6622 – 2266 = 4356

- REPEAT with 4356
- Descending order: 6543
- Ascending order: 3456
- 6543 – 3456 = 3087

- REPEAT with 3087
- Descending order: 8730
- Ascending order: 0378
- 8730 – 0378 = 8352

- REPEAT with 8352
- Descending order: 8532
- Ascending order: 2358
- 8532 – 2358 =
**6174**🎉😄

Process was somewhat longer this time, but in four steps, we have once again found Kaprekar’s constant! I hope you are convinced now; if not, please do try it again!

## Who was D.R. Kaprekar?

D.R. Kaprekar (1905 – 1986) was an **Indian mathematician** and **schoolteacher **who discovered many notable mathematical classes of numbers, such as the Kaprekar, harshad and the Kaprekar’s constant!

What fascinated me about Kaprekar was that even though he did not receive any formal postgraduate training, he was able to discover these beautiful concepts in Maths all by himself.

### (3-digit numbers)

For 3-digit numbers, the constant is ** 495**! However, for the denary base 10 number notation, the constant only exists for 3-digit and 4-digit numbers!