In the April Insights puzzle, I tried to guide readers down a path that might be best described as “experimental mathematics.” The goal was to rediscover two constants by iterating simple arithmetic procedures. Readers found that the procedures ended in a repeating cycle — either in a single number (a “cycle” of one) or in a cycle of two or more numbers. The first constant, 6174, was discovered in 1946 by the Indian mathematician D.R. Kaprekar through pen-and-paper arithmetic explorations. The second, ∂ = 4.6692016…, was discovered in 1975 by the mathematical physicist Mitchell Feigenbaum with the aid of an HP-65 programmable calculator.
Both of these constants remain somewhat mysterious. The first is an interesting curiosity in recreational number theory, while the second is a universal constant central to many chaotic phenomena in the real world.
Since you’ve already done the work of trying to discover these constants, let’s sit back and experience their magic.
Puzzle 1: Kaprekar’s Constant
Let’s first learn more about Kaprekar’s constant in this four-minute video:
Now on to the puzzle solutions:
a. Find the next three numbers in the sequence: 5634 (6543, 3456), 3087 (8730, 0378), 8352 …
For each number in the series, the first number in the parentheses is obtained by arranging the digits in descending order, and the second by arranging them in ascending order. The next number in the series is obtained by subtracting the second number in parenthesis from the first. This is known as the Kaprekar procedure.
The parenthetical numbers after 8352 are: (8532, 2358), and the next numbers in the sequence are: 6174 (7641, 1467), 6174 (7641, 1467). 6174 repeats forever.
b. Follow the same procedure to generate sequences starting with the following numbers. Keep generating numbers until something interesting happens:
i. 6372, 5265, 3996, 6264, 4176, 6174
ii. 8956, 4176, 6174
iii. 5058, 7992, 7173, 6354, 3087, 8352, 6174
iv. 7191, 8532, 6174
v. 5355, 1998, 8082, 8532, 6174
c. Explore further: Why does this occur? Can you find exceptions? Can you find numbers that require more steps than any of our examples?
Let’s save the first question for the end of this section. As for exceptions, the only four-digit strings that do not end in 6174 with the Kaprekar procedure are the ones with identical digits: 0000, 1111, 2222, etc., for which the procedure ends with 0. The other 9,990 numbers all result in 6174. The maximum number of steps to reach 6174 is seven, which is required by several numbers (1040 is an example).
d. Here is a cryptarithm (digit substitution) puzzle that may help (incidentally, all these words are acceptable in Scrabble). How many solutions do you expect it to have?
Observe that the above subtraction problem exactly reflects the procedure that we have been carrying out above. The number EAST will generate the subtraction SETA − ATES to yield EAST again. The order of the digits matches that of the number 6174, so we expect 6174 to be a solution. Knowing that the only other four-digit string that yields itself is 0000, which is ruled out in this case, we expect there to be a single solution, 6174. You can actually solve the cryptarithm using conventional methods (Douglas Felix detailed one way of solving it) and confirm that 6174 is the only solution.
This only partially answers our previous question about why this occurs. We have shown that at least one four-digit number maps to itself using the Kaprekar procedure, but there could conceivably have been others. For starters, there are 24 ways that four different digits can be ordered, all of which would yield the same Kaprekar subtraction. So we would have to try 23 other cryptarithms such as SETA − ATES = TEAS or SEAT, etc., to show that they have no solution. Not only that, we would also have to show that other four-digit numbers with two or three repeated digits do not have any solutions. They obviously do not. But even if 6174 were the only nontrivial solution to such subtractions, that does not mean that our procedure has to end in it. As we shall see below, it could have ended in a repeating cycle where it bounced between two or three different numbers or even more. It does so in some cases when there are more than four digits. That it does not for the four-digit case can be investigated further, but in the end it has to be chalked up to a sweet and slightly mysterious numerical coincidence.
Can you add more (or fewer) Z’s — and corresponding E’s — to the EAST number? What does this mean in the context of the original discovery? A harder problem: Does this mean that eight-digit numbers have a similar property as four-digit numbers under our procedure?
It turns out that the number 3 fits beautifully into 6174 to yield further Kaprekar solutions when the number of digits is even and greater than four. The reason is easy to see. Z has to equal 2 or 3 because it is between 1(A) and 4(T) in value. We have to borrow a 1 for the subtraction in the tens place, so 3 in the upper number yields 6 in the answer. This is balanced at the other end of the subtraction, where there is no need to borrow 1, so 6 − 3 yields 3, as required. In order for this to work, there has to be an equal number of 3s and 6s added among the digits, so you can add fewer or as many more Z’s as you like, as long as you add an equal number of E’s.
This means that eight-digit numbers will have at least one constant that maps to itself, but that does not guarantee that it is unique for the reason explained in answer d above. We first have to exclude a lot of other possible numbers that might have the same property, and in the six- and eight-digit cases, there are other such numbers such as 549945 and 97508421. Moreover, in both the six-digit and eight-digit cases, the Kaprekar procedure can also yield repetitive cycles, as in f iii below for the six-digit case.
f. Try applying the same procedure you followed in parts a and b of this puzzle to the following numbers. Keep going until something interesting happens:
i. 53955: 53955 → 59994 → 53955 … a two-cycle
ii. 62964: 62964 → 71973 → 83952 → 74943 → 62964 … a four-cycle
iii. 420876: 420876 → 851742 → 750843 → 840852 → 860832 → 862632 → 642654 → 420876 … a seven-cycle
Kaprekar described himself as being “drunk on numbers.” He spent his whole career as a schoolteacher but performed extremely large-scale arithmetic explorations in his spare time, unearthing many other numerical gems in the process.
Puzzle 2: Feigenbaum’s Constant
Watch these two videos to understand the genesis and real-world applications of Feigenbaum’s constant. The first one covers the basics — how Feigenbaum’s constant is related to chaos and bifurcation theory:
The second one provides some real-world confirmation and shows various applications, as well as the relationship of the Feigenbaum constant to the Mandelbrot set. Both videos are about 20 minutes long, but once you start watching, chances are you’ll be hooked.
Now back to our puzzle questions, which recreate the scenarios in the above videos:
a. We start with the seed number (x) which is initially 0.5. First subtract it from 1. This gives 0.5 again. We multiply this new number by x and then multiply the product by a constant (k) such as 2.4 to evaluate the expression kx(1 − x). This gives 0.6. This is our new seed. Now we do the procedure again. Subtract 0.6 from 1 to get 0.4. Multiply 0.6 by 0.4 and multiply the product again by 2.4 to get a new seed and so on. Do the above starting with a seed of 0.5 for the following constants. Again, keep going until you see something interesting happen.
i. The constant 2.4 yields: 0.5833
ii. The constant 3.3 yields a two-cycle: 0.8236 → 0.4794 → 0.8236
iii. With 3.5, a bifurcation and a four-cycle emerge: 0.8750 → 0.3828 → 0.8269 → 0.5009 → 0.8750
iv. With 3.55, another bifurcation turns into an eight-cycle:
0.8278 → 0.5060 → 0.8874 → 0.3548 → 0.8127 → 0.5405 → 0.8817 → 0.3703 → 0.8278
This bifurcation diagram plots the expression kx(1 − x) (here called population) against the constant k (here called growth rate).
b. There is a change in behavior at each of the above steps, as the constant k increases from 2.4 to 3.55. Also notice that the change in behavior takes place more and more rapidly as k. In fact, these are the actual values of the constant when the behavior changes to what you observe above for cases i to iv:
And changes continue in a similar manner as k crosses:
You can see that the sequence of values for k seems to be converging toward a limit. Also, the ratio between successive differences, such as (3 − 1)/(3.44949 − 3) and so on, also converges to a limit.
The ratios for the above values are shown below:
The limit of the ratio is the Feigenbaum constant: 4.6692016…
As mentioned before, the amazing thing about this ratio is that it is true of all quadratic expressions that have a single hump. It is therefore universal.
There’s plenty more to explore about the nature of chaos and the mysterious Feigenbaum constant, for which we still do not have a closed expression. Here is an interesting perspective on Mitchell Feigenbaum, written after his death by his friend Stephen Wolfram, himself a wunderkind and the founder of Mathematica and Wolfram Alpha.
I hope you enjoyed these explorations and the experience of scientific discovery. See you next month for new Insights.
Correction: May 28, 2021
This puzzle solution has been revised to reflect the fact that the number 3 fits into 6174 to yield further Kaprekar solutions “when the number of digits is even and greater than four,” not “for all even numbers of more than four digits.”