Tripped across Kaprekar's number this morning, something maybe I've seen before and forgot: it's a nice convergent property of almost* all four digit base 10 number where sorting the number from high to low digits and then subtracting a low to high sort from it, iteratively, converges quickly to a stable value of 6174.
*Doesn't work four four-digit rep strings like 1111, 2222, etc; they immediately reach 0 instead.
This is one of those simultaneously lovely and probably entirely useless accidents of mathematics; I don't know if anyone has ever done anything with this besides (a) dig in in other bases and digit sizes and (b) found it lovely. I am immediately doing both; apparently for three digit base 10 numbers, 495 is the interesting Kaprekar constant (and 0 is again the boring one for rep digit strings). What about two digit base 10 though? Well, you can just try it!
And maybe you should try it, because (a) there's not that many two digit numbers to begin with and (b) if there IS a Kaprekar constant to be found you'd probably get there quite quickly, much faster than testing all 100 possibilities (or all 90 if we rule out rep digits from the get go).
I gave it a go and within about a minute found myself going...ah! Hmm. Hmm.
The answer became quickly clear to me that there isn't a Kaprekar constant for 2 digit base 10: what there is what you could call a Kaprekar cycle, where the set of five numbers 63, 27, 45, 09, and 81 create a fixed loop that you can't escape from.
And while I have only tested a small handful of starting two digit numbers, I'm convinced already that every 2 digit number will lead either to this cycle of five numbers or to boring old zero for the rep digits.
Why that is is interesting!
And that, too, is very nice when you look closer at it: the five non-loop multiples of nines are, in fact, just the reversed digits of the nine loop multiples. 27 and 72 both yield the same Kaprekar computation of 72-27 = 45.
And because EVERY 2-digit number will lead immediately to a multiple of nine (heck, this is true even for our boring 0 results, since 9*0 = 0), that means we'll get into the cycle within at MOST two steps.
Kaprekar makes efficient, if loopy, work of this digit space.
Visiting MIL, doing some literal back of the envelope calculations while they’re discussing a textile project. Wanted to see the three digit 495 result myself, and then see what emerged for five digits, which is…a loop! I haven’t read up any more on Kaprekar results yet though I saw at a glance that this and a lot of other results have already been mapped out.
Mapped out all the two digit transitions into the 5-cycle. Neat little features of the distribution of states; 3+ digits will introduce some more complicated issues it seems like in how to group classes of equivalent numbers together but I think there’s some hints here at the sort of shape of those equivalence classes.
The original server operated by the Mastodon gGmbH non-profit