← Back to list

The Magic of Kaprekar’s constant — 6174

The Kaprekar’s constant (6174), Discovered by Indian mathematician D. R. Kaprekar in 1949, has a unique property.

Mathonymics · 2026-05-24 17:05 · 0 claps · 1.3 min read paywalled
#mathematics #math #math-tricks #puzzle #riddles
Open on Medium ↗
Wiki topics: 📐 · Mathematics

The Magic of Kaprekar’s constant — 6174

The Kaprekar’s constant (6174), Discovered by Indian mathematician D. R. Kaprekar in 1949, has a unique property.

Any four-digit number (with at least two distinct digits) will inevitably reach 6174 within seven iterations or fewer when processed through a specific arithmetic routine.

Once the loop lands on 6174, the process permanently loops back onto itself (7641–1467 = 6174)

How the Kaprekar Routine Works? To begin with, we will follow a set of rules using any starting number

— Pick a 4-digit number and ensure it uses at least two different digits (e.g., avoid 1111, 2222).

— Leading zeros are permitted, arrange the digits.

— Create the highest possible value by arranging the digits in descending order.

— Reverse the digits and create the lowest possible value by arranging the same digits in ascending order

— Deduct the smallest number from the largest number.

— Repeat, run the exact same sequence again using the resulting calculation answer.

Here’s how it actually works with example :

If we take the starting number say 3524, the routine maps out as follows

— Arrange the digits to form the maximum value (5432) and minimum value (2345).

5432–2345 = 3087

— Reorder the new digits of 3087 (using zero as a placeholder).

8730–0378 = 8352

— Reorder the digits of 8352.

8532–2358 = 6174

— Reorder the digits of 6174 to check the fixed point loop. 7614–1467 = 6174

This is the magic of While Kaprekar’s constant!!

While 6174 uniquely belongs to four-digit iterations, Kaprekar’s process applies to other lengths too. They always reach the single constant 495 within six steps. : They do not have a single destination. They map to one of 10 different constants or stable repeating loops (e.g., 53955 or 61974).


메타데이터
post_id
e95fb265196b
slug
the-magic-of-kaprekars-constant-6174-e95fb265196b
url
https://medium.com/@mathonymics/the-magic-of-kaprekars-constant-6174-e95fb265196b
canonical_url
https://medium.com/@mathonymics/the-magic-of-kaprekars-constant-6174-e95fb265196b
author_url
https://medium.com/@mathonymics
status
ok
fetched_at
2026-06-09 15:37:30