## Miraculous Constant 8181

This work is a special birthday gift to my sweetheart, my wife Jyoti Satpute
The ‘Kaprekar constant’ (6174) is a constant with special properties. The ‘Miraculous Constant’ is based on the ‘Kaprekar Constant’ and exhibits some special properties in addition to the properties of the ‘Kaprekar Constant’.
For any four-digit number that is made up of at least one differing digit, rearrange the digits as follows:
1)    Place the largest digit at the 1000’s place and the smallest digit at the 100’s place.
Out of the remaining 2 digits:
2)      Place the largest digit at the 10’s place and the smallest digit at the unit place.
Let's refer to this rearranged number as a Zigzag number.
Example: Let’s say the input number is 8492. Let’s form the Zigzag number from this.
Solution:
1)    The highest digit of the given number 8492 is 9 and the smallest digit is 2. So, the 1000’s placed digit of the Zigzag number will be 9, and the 100’s placed digit will be 2.
2)    Now we need to place the digits 8 and 4 where 8 is the greater and 4 is the smaller digit, so 10’s placed digit will be 8 and the units digit will be 4.
3)    So, here the zigzag number of 8492 will be 9284.
4)    Its reverse number will be 4829.

In general, if the number is 1000a + 100b + 10c + d in which, a > b > c > d, ∀ a, b, c, d ∈ W, a set of whole numbers, then the Zigzag number will be 1000a + 100d + 10b + c and its reverse number is 1000c + 100b + 10d + a. At least one digit out of a, b, c, or d must be different from others.
Now let us take the positive difference between the “Zigzag number” and the “reverse number”.
Repeat this process called iteration until you get 8181 (Miraculous constant).
Introduction
Kaprekar's constant is 6174. Our interest is to develop some other criteria to get the Miraculous Constant 8181. Let us take any 4-digit number with at least one different digit. We can take any number like 0001 which has 4 digits and one digit is different.
Method

Let us take any 4-digit number, 8492. Here, the largest digit is 9. So, the thousand-place digit will be 9. The smallest digit is 2, so the 100s place digit is 2. From 8492, digits 9 and 2 are being used, so the remaining digits are 8 and 4. To place a larger digit, 8 at the 10s place and 4 at the units place. So, our Zigzag number is 9284 and its reverse number is 4829 and we get a positive difference.
Figure-1
The number of iterations for 8492 to get the Miraculous Constant 8181 is 8.

Here in iteration 3, the number 8181 is obtained. Again, from 8181 to reach 8181 we have 5 iterations, and they are fixed.
Standard patterns of numbers and their iterations
Set-1: One digit is repeated three times, and the fourth digit is different.

1.     1000a + 100a + 10a + (a+1) for a = 0 and 1000a + 100a + 10a + (a±1) for 1 ≤ a ≤ 8 , ∀ a ∈ W, set of whole numbers.

0001, 1112 (& 1110), 2223 (& 2221), 3334 (& 3332), 4445 (& 4443), 5556 (& 5554), 6667 (& 6665), 7778 (& 7776), 8889 (& 8887). Here the number of iterations is 8.
Figure-2
The number of iterations for 7776 to obtain Miraculous Constant 8181 is 8

Note: In the 1st iteration, the Zigzag number is smaller than the Reverse Number, so a smaller number is subtracted from the bigger number. So here the modulus value of -90 is taken. So, Mod (-90) = 90.

2.   1000a + 100a + 10a + (a+2) for a = 0 or a = 1 and 1000a + 100a + 10a + (a±2) for 2 ≤ a ≤ 7, ∀ a ∈ W, set of whole numbers.

0002, 1113, 2224 (& 2220), 3335 (& 3331), 4446 (& 4442), 5557 (& 5553), 6668 (& 6664), 7779 (& 7775). Here the number of iterations is 7.

3.   1000a + 100a + 10a + (a+3) for 0 ≤ a ≤ 2 and 1000a + 100a + 10a + (a±3) for 3 ≤ a ≤ 6, ∀ a ∈ W, set of whole numbers.

0003, 1114, 2225, 3336 (& 3330), 4447 (& 4441), 5558 (& 5552), 6669 (& 6663). Here the number of iterations is 5.

4.   1000a + 100a + 10a + (a+4) for 0 ≤ a ≤ 3 and 1000a + 100a + 10a + (a±4) for 4 ≤ a ≤ 5, ∀ a ∈ W, set of whole numbers.

0004, 1115, 2226, 3337, 4448 (& 4440), 5559 (& 5551). Here the number of iterations is 6.

5.   1000a + 100a + 10a + (a+5) for 0 ≤ a ≤ 4, ∀ a ∈ W, set of whole numbers.

0005, 1116, 2227, 3338, 4449. Here the number of iterations is 8.

6.   1000a + 100a + 10a + (a+6) for 0 ≤ a ≤ 3, ∀ a ∈ W, set of whole numbers.

0006, 1117, 2228, 3339. Here the number of iterations is 8.

7.   1000a + 100a + 10a + (a+7) for 0 ≤ a ≤ 2, ∀ a ∈ W, set of whole numbers.

0007, 1118, 2229. Here the number of iterations is 6.

8.   1000a + 100a + 10a + (a+8) for 0 ≤ a ≤ 1, ∀ a ∈ W, set of whole numbers.

0008, 1119. Here the number of iterations is 5.

9.   1000a + 100a + 10a + (a+9) for a=0, ∀ a ∈ W, set of whole numbers.

0009. Here the number of iterations is 7.

Set-2: Two digits are repeated 2 times. Each number in every group is incremented by 1111. So, each group has the same number of iterations.

1.     1000a + 100a + 10(a+1) + (a+1) for 0 ≤ a ≤ 8, ∀ a ∈ W, set of whole numbers.

0011, 1122, 2233, 3344, 4455, 5566, 6677, 7788, 8899. Here, the number of iterations is 2.

2.     1000a + 100a + 10(a+2) + (a+2) for 0 ≤ a ≤ 7, ∀ a ∈ W, set of whole numbers.

0022, 1133, 2244, 3355, 4466, 5577, 6688, 7799. Here the number of iterations is 6.

3.     1000a + 100a + 10(a+3) + (a+3) for 0 ≤ a ≤ 6, ∀ a ∈ W, set of whole numbers.

0033, 1144, 2255, 3366, 4477, 5588, 6699. Here the number of iterations is 4.

4.     1000a + 100a + 10(a+4) + (a+4) for 0 ≤ a ≤ 5, ∀ a ∈ W, set of whole numbers.

0044, 1155, 2266, 3377, 4488, 5599. Here the number of iterations is 5.

5.     1000a + 100a + 10(a+5) + (a+5) for 0 ≤ a ≤ 4, ∀ a ∈ W, set of whole numbers.

0055, 1166, 2277, 3388, 4499. Here, the number of iterations is 3.

6.     1000a + 100a + 10(a+6) + (a+6) for 0 ≤ a ≤ 3, ∀ a ∈ W, set of whole numbers.

0066, 1177, 2288, 3399. Here the number of iterations is 3.

7.     1000a + 100a + 10(a+7) + (a+7) for 0 ≤ a ≤ 2, ∀ a ∈ W, set of whole numbers.

0077, 1188, 2299. Here the number of iterations is 5.

8.     1000a + 100a + 10(a+8) + (a+8) for 0 ≤ a ≤ 1, ∀ a ∈ W, set of whole numbers.

0088, 1199. Here the number of iterations is 4.

9.     1000a + 100a + 10(a+9) + (a+9) for a = 0, ∀ a ∈ W, set of whole numbers.

0099. Here the number of iterations is 6.

Set-3: One digit is repeated two times. See the following form of numbers: Each number in every group is incremented by 1111. So, each group has the same number of iterations.

1.     1000a + 100a + 10(a+1) + (a+2), 0 ≤ a ≤ 7, ∀ a ∈ W, set of whole numbers.

0012, 1123, 2234, 3345, 4456, 5567, 6678, 7789. Here the number of iterations is 5.

2.     1000a + 100a + 10(a+1) + (a+3), 0 ≤ a ≤ 6, ∀ a ∈ W, set of whole numbers.

0013, 1124, 2235, 3346, 4457, 5568, 6679. Here the number of iterations is 6.

3.     1000a + 100a + 10(a+1) + (a+4), 0 ≤ a ≤ 5, ∀ a ∈ W, set of whole numbers.

0014, 1125, 2236, 3347, 4458, 5569. Here the number of iterations is 4.

4.     1000a + 100a + 10(a+1) + (a+5), 0 ≤ a ≤ 4, ∀ a ∈ W, set of whole numbers.

0015, 1126, 2237, 3348, 4459. Here the number of iterations is 4.

5.     1000a + 100a + 10(a+1) + (a+6), 0 ≤ a ≤ 3, ∀ a ∈ W, set of whole numbers.

0016, 1127, 2238, 3349. Here the number of iterations is 4.

6.     1000a + 100a + 10(a+1) + (a+7), 0 ≤ a ≤ 2, ∀ a ∈ W, set of whole numbers.

0017, 1128, 2239. Here the number of iterations is 4.

7.     1000a + 100a + 10(a+1) + (a+8), 0 ≤ a ≤ 1, ∀ a ∈ W, set of whole numbers.

0018, 1129. Here the number of iterations is 6.

8.     1000a + 100a + 10(a+1) + (a+9), a = 0, ∀ a ∈ W, set of whole numbers.

0019. Here the number of iterations is 5.

Reference

1)    The concept of Kaprekar constant 6174 - Numberphile.

Keywords

Numbers, Fun with Mathematics, iterations, Zigzag Numbers, Reverse Numbers.

Acknowledgments

Thanks to: Jyoti Satpute, Aaswad Satpute, Priyanka Satpute, and Abhishek Satpute.