Kaprekar constant

from Wikipedia, the free encyclopedia

Procedure for calculating the Kaprekar constant

In order to get the Kaprekar constant of a three-, four-, six-, eight-, nine- or ten-digit decimal number , in which not all digits are the same, the digits of the number in question are arranged once (with leading zeros if necessary) so that the largest possible number is obtained, and then such that the smallest possible number is obtained. Then one forms the difference by subtraction and applies the procedure again to the result. After a finite number of steps, you get a certain number, regardless of the starting number. This number is called the “Kaprekar constant”, which was named after the Indian mathematician DR Kaprekar (1905–1986) who first found this property in 1949 for four-digit numbers.

Three-digit Kaprekar constant

The Kaprekar constant for three-digit numbers is always 495.

Example 1:

Starting number:

Example 2:

Starting number: (= 029)

Four-digit Kaprekar constant

The Kaprekar constant for four-digit numbers is always 6174.

Example 1:

Starting number:

Example 2:

Starting number: (= 0001)

Further examples

  • In the case of n-digit numbers in which all digits are the same, the procedure described always leads to the number 0 , provided it is carried out for n-digit numbers .
Example 1:
Starting number: when used for 4-digit numbers
Example 2:
Starting number: when used for 5-digit numbers
how you arrived in a cycle (see 4 lines before)
  • There are no Kaprekar constants for two-, five-, and seven-digit numbers.
  • With two-digit numbers, the procedure described leads to the following cycle:
9 → 81 → 63 → 27 → 45 → 9
  • With five-digit numbers, the procedure described leads to one of the following three cycles:
71973 → 83952 → 74943 → 62964 → 71973 (for example with the initial number 33363)
75933 → 63954 → 61974 → 82962 → 75933 (for example with the initial number 33364)
59994 → 53955 → 59994 (for example with the output number 33371)
  • In the case of six-digit numbers, the procedure described leads either to one of two Kaprekar constants or to a cycle of length 7:
549945 (for example with the starting number 333838)
631764 (for example with the starting number 333718)
420876 → 851742 → 750843 → 840852 → 860832 → 862632 → 642654 → 420876 (for example with the initial number 333717)
  • With seven-digit numbers, the procedure described leads to a cycle of length 8:
7509843 → 9529641 → 8719722 → 8649432 → 7519743 → 8429652 → 7619733 → 8439552 → 7509843
  • In the case of eight-digit numbers, the procedure described leads either to one of two Kaprekar constants or to a cycle of length 3 or length 7:
63317664 (for example with the starting number 33371999)
97508421 (for example with the starting number 33372113)
64308654 → 83208762 → 86526432 → 64308654 (for example with the initial number 33372000)
43208766 → 85317642 → 75308643 → 84308652 → 86308632 → 86326632 → 64326654 → 43208766 (for example with the initial number 33372001)
  • With nine-digit numbers, the procedure described leads either to one of two Kaprekar constants or (more often) to a cycle of length 14:
554999445 (for example with the starting number 333722277)
864197532 (for example with the starting number 333722294)
865296432 → 763197633 → 844296552 → 762098733 → 964395531 → 863098632 → 965296431 → 873197622 → 865395432 → 753098643 → 954197541 → 883098612 → 976494321 → 874197522 → 865296432 (for example 3722 at the starting number)
  • With ten-digit numbers, the procedure described leads either to one of three Kaprekar constants or (more often) to one of five cycles of length 3 or length 7:
6333176664 (for example with the starting number 3337239999)
9753086421 (for example with the starting number 3337240018)
9975084201 (for example with the starting number 3337400599)
8655264432 → 6431088654 → 8732087622 → 8655264432 (for example with the initial number 3337240004)
8653266432 → 6433086654 → 8332087662 → 8653266432 (for example with the initial number 3337240001)
8765264322 → 6543086544 → 8321088762 → 8765264322 (for example with the initial number 3337240023)
9775084221 → 9755084421 → 9751088421 → 9775084221 (for example with the initial number 3337240017)
8633086632 → 8633266632 → 6433266654 → 4332087666 → 8533176642 → 7533086643 → 8433086652 → 8633086632 (for example with the initial number 3337240000)

Graphical representation

The following is a representation of the three-digit numbers ending in the number 495:

Three-digit numbers end in the Kaprekar constant 495

The following is a representation of the four-digit numbers ending in the number 6174:

Four-digit numbers end in the Kaprekar constant 6174

useful information

The smallest Kaprekar constants are the following:

0, 495, 6174, 549945, 631764, 63317664, 97508421, 554999445, 864197532, 6333176664, 9753086421, 9975084201, 86431976532, 555499994445, 633331766664, 975330866421, 997530864201, 999750842001, 8643319766532, 63333317666664, ... (sequence A099009 in OEIS )

Not to be confused with

Web links