The number

** 6174** arises in the following famous problem :

Take any 4-digit number

which uses more than one digit and find the difference

between the numbers formed by writing the digits in descending order and ascending order.

For example, starting with

yields

. Iterate this process using the difference

as the new 4-digit number. In other words,

[i ]Kaprekar's constant[/i], a fixed point of the iteration.

QUESTION:

** Justify the Kaprekar's routine. Try to find generalizations of this algorithm .****Remarks:** 1) Regarding Kaprekar's original publications: He self-published most of his results, via a small Indian publishing company at his own expense.

2) It seems that by using Kaprekar's routine , exactly 77 four-digit numbers, namely 1000, 1011, 1101, 1110, 1111, 1112, 1121, 1211, ...

(see [13] Sloane's A069746), reach 0, while the remainder give

**6174** in at most 8 iterations.

**REFERENCES:**[1] Deutsch D. and Goldman B. ,

*Kaprekar's Constant,* Math. Teacher 98,(2004) 234--242.

[2] Eldridge, K. E. and Sagong, S.

*The Determination of Kaprekar Convergence and Loop Convergence of All 3-Digit Numbers,* Amer. Math. Monthly 95, (1988) 105--112.

[3] Furno A.L. , J. Number Theory 13, no.2, (1981) 255--261.

[4] Hasse H. ,

* Iterierter Differenzbetrag fÃ¼r -stellige -adische Zahlen,*

(German, Spanish summary) Rev. Real Acad. Cienc. Exact. FÃs. Natur. Madrid 72 (1978), no. 2, 221--240.

[5] Hasse H. and Prichett G. D. ,

* The determination of all four-digit Kaprekar constants,* J. Reine Angew. Math. 299/300 (1978), 113--124.

[6] Kaprekar D. R. ,

*An Interesting Property of the Number 6174,* Scripta Math. 15,(1955) 244--245.

[7] Kiyoshi Iseki ,

* Note on Kaprekar's constant,* Math. Japon. 29 (1984), no. 2, 237--239.

[8] Lapenta J. F., Ludington A. L. and Prichett G. D.,

* An algorithm to determine self-producing -digit -adic integers,* J. Reine Angew. Math. 310 (1979) 100--110.

[9] Ludington Anne L.,

* A bound on Kaprekar constants,* J. Reine Angew. Math. 310 (1979), 196--203.

[10] Prichett G. D., Ludington A. L. and Lapenta J. F.,

*The determination of all decadic Kaprekar constants,* Fibonacci Quart. 19 , no. 1,(1981) 45--52.

[11] Rosen Ken,

* Elementary Number Theory Book*, (4-th. ed, see page 47)

[12] A. Rosenfeld, Scripta Mathematica 15 (1949), 241--246,

[13] Sloane, N. J. A.

*Sequences A069746,A090429, A099009, and A099010 *, in

*The On-Line Encyclopedia of Integer Sequences,* http://www.research.att.com/~njas/sequences/.

[14] Trigg, C. W. ,

*All Three-Digit Integers Lead to...,* The Math. Teacher, 67 (1974) 41-45.

[15] Young, A. L. ,

*A Variation on the 2-digit Kaprekar Routine,* Fibonacci Quart. 31,(1993) 138--145.

[ Perhaps of interest ,Alex]