Python
Python copied to clipboard
Add Kaprekar's Constant (6174) Algorithm to Special Numbers
Description
This PR adds an implementation of Kaprekar's Constant (6174) algorithm to the maths/special_numbers directory.
What is Kaprekar's Constant?
Kaprekar's Constant is a fascinating mathematical property discovered by Indian mathematician D. R. Kaprekar in 1949. When you:
- Take any 4-digit number with at least two different digits
- Arrange digits in descending order (largest number)
- Arrange digits in ascending order (smallest number)
- Subtract smaller from larger
- Repeat with the result