KAPREKAR CONSTANT REVISITED Tanvir Prince
Total Page:16
File Type:pdf, Size:1020Kb
International Journal of Mathematical Archive-4(5), 2013, 52-58 Available online through www.ijma.info ISSN 2229 – 5046 KAPREKAR CONSTANT REVISITED Tanvir Prince* Assistant Professor of Mathematics, Hostos Community College, City University Of New York Office Address: 500 Grand Concourse, Bronx, NY 10451, Telephone: (718)-518-6828 (Received on: 07-04-13; Revised & Accepted on: 01-05-13) ABSTRACT Given a n digits number where not all the digits are same, we arrange the digits in increasing order and let us denote this number by i(n). Similarly arrange the given n digits in decreasing order and let us denote this number by d(n). Define the Kaprekar function, k(n) by k(n)=d(n)−i(n). If this new number has less than n digits, we add necessary 0’s on the left of k(n) to make it a n digits number. Then we keep repeat this process, that is we consider the 2 3 sequence {k(n),k (n),k (n),…} D.R Kaprekar considered the case for n=4 and showed that the above sequence eventually becomes a constant and that magical constant is 6174 no matter what the four digits number you have started with. In this paper we will investigate this sequence for n=3 and n=4. We will also summarize some known results for some other values of “n”. INTRODUCTION Dattaraya Ramchandra Kaprekar was born in 17 January, 1905, in Maharashtra India. He was a school teacher in Maharastra and never received any formal training in post graduate studies. Nevertheless, he discovered many interesting properties of numbers and became quite famous in the field of recreational number theory. Beside Kaprekar constant, he also invented Kaprekar number (not to be confused with Kaprekar constant, see [2]), self number, and Harshad number. He also contributed to construct some new magic squares. To know more about the life of Kaprekar and his mathematical contribution, please see [7]. Although Kaprekar constant is very interesting, it is not as widely kown as it should be. One of my goal in this article is that we will not only re-investigate Kaprekar constant but make it more familiar to every one. We will start with the definition of Kaprekar function which can be applied to any whole number. Then we will restrict the domain of Kaprekar constant to the numbers of digits three and four. From this, we will construct Kaprekar series and investigate the end behavior. If you are interested to see the original paper of Kaprekar, which is published in Scripta mathematica in 1955, see [1]. KEPREKAR FUNCTION Given a k digit number, n, say n=a a a …a , we arrange the digits in decreasing order and denote this number by 1 2 3 k d(n). That is d(n)=b b b …b where b ≥b ≥b ≥…≥b and there is a bijection between the sets {a ,a ,a …a } and 1 2 3 k 1 2 3 k 1 2 3 k {b ,b ,b ,…b }. Similarly, we arrange the digits of n in increasing order and denote this number by i(n). That is 1 2 3 k i(n)=c c …c where c ≤c ≤…≤c and there is a bijection between the sets {a ,a ,a …a } and {c ,c ,c ,…c }. 1 2 k 1 2 k 1 2 3 k 1 2 3 k Then we define the Kaprekar function on n by k(n)=d(n)−i(n). We always demand that the resulting number, k(n), must also have k digits; if it fails to have k digits, we just add necessary number of 0’s on the left. For example, if n=33520, then d(n)=53320 and i(n)=02335 and finally, k(n) = d(n)−i(n) = 53320−02335 = 50985. If n=111110 then k(n) = 111110−011111 = 099999. Note that in the second example, we need to add a 0 on the left to make it a six digit number since the original n is six digit. Note that when applying Kaprekar function, the order of the digit does not matter. So for example, k(123)=k(213)=k(312)=k(132)=… Corresponding author: Tanvir Prince* Assistant Professor of Mathematics, Hostos Community College, City University Of New York International Journal of Mathematical Archive- 4(5), May – 2013 52 Tanvir Prince*/Kaprekar Constant Revisited/ IJMA- 4(5), May-2013. Kaprekar sequence: Given a k digit number n, the Kaprekar sequence associated with n is the 2 3 sequence {n,k(n),k (n),k (n),…} i i i−1 Here we define k (n) recursively as k (n)=k(k (n)) for i≥2. For example the Kaprekar sequence associated with n=12345 is {12345,41976,82962,75933,63954,61974,82962,…} In this example, the seventh number is 82962 which is the same as the third number. So the sequence will be a cyclic pattern of length four. Let us take another example of digit 4 say n=3444, then the kaprekar sequence associated to this n is {3444,0999,8991,8082,8532,6174,6174,6174,…} In this case the Kaprekar sequence stabilizes after the sixth term since k(6174)=7641−1467=6174. This number 6174 is known as the Kaprekar constant. We will investigate this number in great detail. THE CASE OF THREE DIGIT NUMBER Lemma 1 Kaprekar sequence of any three digit number, as long as all the digits are not same, will eventually stabilizes to the constant 495 Of course if all the digits are same then after the first term all the other terms of the Kaprekar sequence is 0 since k(aaa)=0. Proof: Let n=abc. We may assume that a≥b≥c since Kaprekar function does not depend on the order of the digits. Now, a≠c since if a=c then a=b=c but we assume not all the digits are same. So from definition, d(n)=abc and i(n)=cba. Thus, k(n)=d(n)−i(n)=abc−cba. This subtraction is given in the table 1. We will exlain this subtraction for the reader. First of all, since a<c, we need to borrow 1 from the second column. This way for the first column we have c+10−a. Now in the second column, on the top we have b−1 (since we borrow 1 from it in the previous step) and on the bottom we have b. Thus again we need to borrow 1 from the third column and get b−1+10−b=9 for the second column. Finally on the top of the third column, we have a−1 (since we borrow 1 from it in the previous step)and on the bottom we have c. Since a−1≥c we can perform the operation a−1−c. We observe two things. First, after applying the Kaprekar function, k(abc), the middle digit is 9 and second the sum of all the digits of k(abc) is 18 since a−1−c+9+c+10−a=18. So after applying Kaprekar function one time we may assume our three digit number has the form a9(9−a) where 0≤a≤9. So we only need to check five cases (remembering the order of the digit does not matter) 099,198,297,396 and 495. The Kaprekar sequence associated with these five numbers are as follows: {099,891,792,693,594,495,495,495,…} {198,792,693,594,495,495,495,…} {297,693,594,495,495,495,…} {396,594,495,495,495,…} {495,495,495,…} And of course, k(495)=495. Notice that the last four sequence is the repetition of the first one so it is enough to construct the Keprekar sequence of 099 only. So we have proved that no matter what is the three digit number you have started with, as long as all the digits are not same, the Kaprekar sequence stabilizes to the constant 495. This number 495 is the Kaprekar constant of digit three. this proof also shows that we arrive at the number 495 after at most six application of Kaprekar function. For a somewhat different proof see [5]. a b c c b a a-1-c 9 c+10-a Table 1: This table shows the process of subtraction for k(abc) © 2013, IJMA. All Rights Reserved 53 Tanvir Prince*/Kaprekar Constant Revisited/ IJMA- 4(5), May-2013. THE CASE OF FOUR DIGIT NUMBER Lemma 2 Kaprekar sequence of any four digit number, as long as all the digits are not same, will eventually stabilizes to the constant 6174. Note that 6174 is a fixed point for the Kaprekar function since k(6174)=7641−1467=6174. This number, 6174 is known as the Kaprekar constant of digit four. Proof: There are 10000 four digit numbers out of which there are 10 numbers whose digits are all same (they are 0000,1111,2222, etc). With some reasoning, we will show that to prove this lemma it is enough to check only 49 numbers out of this 10000−10=9990 four digits numbers. This is only 0.4905% of the original amount. Let us start with a four digit number say n=abcd. Without loss of generality, we may assume that a≥b≥c≥d since applying Kaprekar function the order of the digit does not matter. We must have a>d, otherwise all the digits will be same. Now we have two possibility: b>c or b=c. We will consider these two cases separately: Case b=c: In this case, n=abbd.