Skip to content

Conversation

@xingarr
Copy link

@xingarr xingarr commented Nov 4, 2025

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:

  1. Take any 4-digit number with at least two different digits
  2. Arrange digits in descending order (largest number)
  3. Arrange digits in ascending order (smallest number)
  4. Subtract smaller from larger
  5. Repeat with the result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant