Home

6174

6174, also known as Kaprekar's constant, is a fixed point of a digit-rearrangement routine applied to four-digit numbers in base 10. It arises when, starting from any four-digit number that does not have all identical digits, one repeatedly forms two numbers from its digits—one in descending order and one in ascending order—subtracts the smaller from the larger, and repeats the process with the result.

The procedure is as follows: take a four-digit number with at least two distinct digits, arrange its

6174 was discovered by Indian mathematician D. R. Kaprekar in 1949 while studying these routines. It is

digits
to
create
the
largest
and
smallest
possible
four-digit
numbers
(leading
zeros
are
allowed
in
the
ascending
form),
subtract
the
smaller
from
the
larger,
and
repeat
with
the
result.
After
several
iterations,
the
result
converges
to
6174,
and
applying
the
same
steps
again
yields
6174,
entering
a
fixed
point.
If
the
starting
number
has
all
identical
digits,
the
process
yields
0000
and
remains
there,
which
is
a
separate
degenerate
case.
the
unique
fixed
point
for
the
base-10,
four-digit
Kaprekar
operation.
In
practice,
most
starting
numbers
reach
6174
within
at
most
seven
iterations.
The
constant
has
become
a
well-known
example
in
recreational
mathematics
and
has
motivated
exploration
of
similar
routines
in
other
digit
lengths
and
numeral
bases,
such
as
495
for
three-digit
numbers.