One fascinating lesser-known fact in mathematics is Kaprekar's constant: 6174. Indian mathematician D.R. Kaprekar discovered it in 1949 through patient experimentation.
Take any four-digit number where not all digits are the same (e.g., 3141, but not 1111). Rearrange its digits to form the largest and smallest possible numbers, then subtract the smaller from the larger.
Repeat the process with the result. Within at most 7 steps, you'll always reach 6174; and once there, it stays at 6174 forever (it's a fixed point).
Quick example with 3141:
4311 − 1134 = 3177
7731 − 1377 = 6354
6543 − 3456 = 3087
8730 − 0378 = 8352
8532 − 2358 = 6174
7641 − 1467 = 6174 (and it loops here)
This works for every qualifying four-digit number due to the finite set of possibilities and the structure of the operation in base 10.