495 (number)

495 (four hundred [and] ninety-five) is the natural number following 494 and preceding 496. It is a pentatope number (and so a binomial coefficient $$ \tbinom {12}4 $$). The maximal number of pieces that can be obtained by cutting an annulus with 30 cuts.

Kaprekar transformation
The Kaprekar's routine algorithm is defined as follows for three-digit numbers:


 * 1) Take any three-digit number, other than repdigits such as 111. Leading zeros are allowed.
 * 2) Arrange the digits in descending and then in ascending order to get two three-digit numbers, adding leading zeros if necessary.
 * 3) Subtract the smaller number from the bigger number.
 * 4) Go back to step 2 and repeat.

Repeating this process will always reach 495 in a few steps. Once 495 is reached, the process stops because 954 – 459 = 495.

Example
For example, choose 495:


 * 495

The only three-digit numbers for which this function does not work are repdigits such as 111, which give the answer 0 after a single iteration. All other three-digit numbers work if leading zeros are used to keep the number of digits at 3:


 * 211 – 112 = 099
 * 990 – 099 = 891 (rather than 99 – 99 = 0)
 * 981 – 189 = 792
 * 972 – 279 = 693
 * 963 – 369 = 594
 * 954 − 459 = 495

The number 6174 has the same property for the four-digit numbers, albeit has a much greater percentage of workable numbers. Sometimes these numbers (495, 6174, and their counterparts in other digit lengths or in bases other than 10) are called "Peyush constants" named after Peyush Dixit who solved this routine as a part of his IMO 2000 (International Mathematical Olympiad, Year 2000) thesis.