Mathematical Advent Calendar (December 3): Do Black Holes Exist Among Numbers?

⚡️ Mathematical Fact of the Day: Do Black Holes Exist Among Numbers? 🌑

Pick any four-digit number where not all the digits are the same. 🔢
Form two numbers from its digits:
🔹 the first — arrange the digits from largest to smallest;
🔹 the second — from smallest to largest.
Subtract the smaller number from the larger one.
Repeat this over and over again (if the result has fewer than 4 digits, add a leading 0).
No matter which starting number you chose — in at most 7 steps, you will arrive at 6174! 🤯

For example, 3254:
1️⃣ 5432 − 2345 = 3087
2️⃣ 8730 − 0378 = 8352
3️⃣ 8532 − 2358 = 6174 🎯

The number 6174 is called Kaprekar’s constant.
Indian mathematician D. R. Kaprekar described this fact in 1949. Any four-digit number subjected to the steps described above leads to 6174 in at most 7 steps and cannot escape it:
7641 − 1467 = 6174.
🕳 The trap has snapped shut!

🔹 For three-digit numbers, a similar mathematical “black hole” is the number 495. You can fall into it in at most 6 steps.

🔥 When mathematics turns on gravity — resistance is futile! 💥