HOME

TheInfoList



OR:

6174 is known as Kaprekar's constant after the
India India, officially the Republic of India (Hindi: ), is a country in South Asia. It is the seventh-largest country by area, the second-most populous country, and the most populous democracy in the world. Bounded by the Indian Ocean on the so ...
n
mathematician A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems. Mathematicians are concerned with numbers, data, quantity, structure, space, models, and change. History On ...
D. R. Kaprekar Dattatreya Ramchandra Kaprekar ( mr, दत्तात्रेय रामचंद्र कापरेकर; 17 January 1905 – 1986) was an Indian recreational mathematician who described several classes of natural numbers incl ...
. This number is renowned for the following rule: # Take any four-digit number, using at least two different digits (leading zeros are allowed). # Arrange the digits in descending and then in ascending order to get two four-digit numbers, adding leading zeros if necessary. # Subtract the smaller number from the bigger number. # Go back to step 2 and repeat. The above process, known as
Kaprekar's routine In number theory, Kaprekar's routine is an iterative algorithm that, with each iteration, takes a natural number in a given number base, creates two new numbers by sorting the digits of its number by descending and ascending order, and subtracts th ...
, will always reach its fixed point, 6174, in at most 7 iterations. Hanover 2017, p. 1, Overview. Once 6174 is reached, the process will continue yielding 7641 – 1467 = 6174. For example, choose 1459: :9541 – 1459 = 8082 :8820 – 0288 = 8532 :8532 – 2358 = 6174 :7641 – 1467 = 6174 The only four-digit numbers for which Kaprekar's routine does not reach 6174 are
repdigit In recreational mathematics, a repdigit or sometimes monodigit is a natural number composed of repeated instances of the same digit in a positional number system (often implicitly decimal). The word is a portmanteau of repeated and digit. Example ...
s such as 1111, which give the result
0000 0000 may refer to: *the year 10,000 problem *a null train reporting number or headcode *a suffix to a time indicating Coordinated Universal Time, rather than a local time zone *the null character The null character (also null terminator) is a con ...
after a single iteration. All other four-digit numbers eventually reach 6174 if leading zeros are used to keep the number of digits at 4. For numbers with three identical numbers and a fourth number that is one number higher or lower (such as 2111), it is essential to treat 3-digit numbers with a leading zero; for example: 2111 – 1112 = 0999; 9990 – 999 = 8991; 9981 – 1899 = 8082; 8820 – 288 = 8532; 8532 – 2358 = 6174.


Other "Kaprekar's constants"

There can be analogous fixed points for digit lengths other than four; for instance, if we use 3-digit numbers, then most sequences (i.e., other than repdigits such as 111) will terminate in the value
495 __NOTOC__ Year 495 ( CDXCV) was a common year starting on Sunday (link will display the full calendar) of the Julian calendar. At the time, it was known as the Year of the Consulship of Viator without colleague (or, less frequently, year 1248 ...
in at most 6 iterations. Sometimes these numbers (495, 6174, and their counterparts in other digit lengths or in bases other than 10) are called "Kaprekar constants".


Other properties

* 6174 is a 7-
smooth number In number theory, an ''n''-smooth (or ''n''-friable) number is an integer whose prime factors are all less than or equal to ''n''. For example, a 7-smooth number is a number whose every prime factor is at most 7, so 49 = 72 and 15750 = 2 × 32 × ...
, i.e. none of its prime factors are greater than 7. * 6174 can be written as the sum of the first three degrees of 18: *: 18 + 18 + 18 = 5832 + 324 + 18 = 6174, and coincidentally, 6 + 1 + 7 + 4 = 18. * The sum of squares of the prime factors of 6174 is a square: *: 2 + 3 + 3 + 7 + 7 + 7 = 4 + 9 + 9 + 49 + 49 + 49 = 169 = 13


References


External links

* {{cite web, last=Bowley, first=Roger, title=6174 is Kaprekar's Constant, url=https://www.youtube.com/watch?v=d8TRcZklX_Q, work=Numberphile, publisher=
Brady Haran Brady John Haran (born 18 June 1976) is an Australian-British independent filmmaker and video journalist who produces educational videos and documentary films for his YouTube channels, the most notable being ''Periodic Videos'' and ''Number ...
, location=
University of Nottingham The University of Nottingham is a public university, public research university in Nottingham, United Kingdom. It was founded as University College Nottingham in 1881, and was granted a royal charter in 1948. The University of Nottingham belongs t ...

Sample (Perl) code to walk any four-digit number to Kaprekar's Constant

Sample (Python) code to walk any four-digit number to Kaprekar's Constant

Sample (C) code to walk the first 10000 numbers and their steps to Kaprekar's Constant
Arithmetic dynamics
Kaprekar's constant In number theory, Kaprekar's routine is an iterative algorithm that, with each iteration, takes a natural number in a given number base, creates two new numbers by sorting the digits of its number by descending and ascending order, and subtracts th ...
Integers