This seems obviously related to the standard manual accounting trick employed when isolating an error in a double ledger - the first thing you do is look to see if the error is evenly divisible by 9. If it is, you've transposed 2 or more numbers somewhere.
To prove why this is so:
For any numbers x and y:
The correct value is 10x + y
The transposed value is x + 10y
The difference is (10x - x) + (y - 10y)
Reduces to 9x - 9y
Factors to 9(x - y)
Yes i think there's two components to this and that's the first part. Each digit sum on the left and right side converges to 18.
Each side of the equation a - rev_a = b has digit sums to that iteratively get closer to each other (sometimes stay the same distance but never getting further). Additionally that convergence only happens at 18. Eg.
5200 (sums to 7) - 0025 = 5175 (sums to 18, 11 apart)
7551 (sums to 18) - 1557 = 5994 (sums to 27, 9 apart)
9954 (sums to 27) - 4599 = 5355 (sums to 18, 9 apart)
5553 (sums to 18) - 3555 = 1998 (sums to 27, 9 apart)
9981 (sums to 27) - 1899 = 8082 (sums to 18, 9 apart)
8820 (sums to 18) - 0288 = 8532 (sums to 18, 0 apart)
8532 (sums to 18) - 2358 = 6174 (sums to 18, 0 apart)
7641 (sums to 18) - 1467 = 6174 (sums to 18, 0 apart)
I think this is the first clue. The digits can only be equal on each side when they are 18 and the sum of each side progressively gets closer on each side, eventually equalling each other which has to happen at 18. I think if you dive in it's a variation of the classic 'digits sum to 0 mod 9'.
Then once the digits on each side sum to 18 i think they must converge onto 6174 from there.
So first we have digits always converging to have the same digit sum on each side and that convergence is always when the digit sum is 18 on each side of the equation. I think property is going to be provable by the classic mod 9 rules but it'd take some work.
Then i believe we have a second property kicking in that all 4 digit numbers that have digits that sum to 18 on both sides of this equation will converge on 6174. This is a more limited set of numbers. Only numbers of the form a - a_rev = b that have digits that sum to 18 for both a and b need to be considered since we can separately see the convergence to 18 on both sides above.
Say the correct value is 42. He broke the number down into 10x4 + 2. It is just writing the correct number in a form that emphasises the important elements for the transposition.
I don't understand the significance of this at all other than its the coolest thing I've seen on HN in a while.
I couldn't be farther from a math nerd.... I avoided it as much as I could throughout school.... but things like that are just so interesting and weird. How on earth (and for what reason) did they find this out? The properties of this number are interesting enough but the process to discover it is just so crazy.
I have a similar background with math as the commenter. +1 to Lockhart. If the commenter finds numbers interesting they may also really enjoy his book “Arithmatic.” I found it so refreshing. It truly reoriented my whole relationship with mathematics.
I had a sitdown in the sofa today with my seven year old boy talking about 6174 and how all those numbers end up there, as well as three digits with 495. I wrote a simple python sript that we could use to go through a lot of numbers to show this. We also talked about how many steps needed to reach those constants. Then we talked about if there were eight steps for any number and we improved the script further, but found none. Goodl talk and sofa-time ;-)
At that age, I think it is less about the material used and more about how the parent, guardian, and similar figures approach the material. Are they telling the child, be it directly, indirectly, or just through body language, that math is fun and safe or boring and scary? Once they are older, kids will seek out their own peer circle for approval while also forming their own opinions and personal preferences, but at that young an age it is more about associating math with positivity and giving the child positive attention when they engage in math.
In a similar vein I got really hooked in school on Lychrel numbers => take a number x and reverse its digits to form y. Add x and y, repeat. Eventually this process leads to numbers that are palindromic (they are the same if you reverse their digits). Except some numbers like 196 do not seem to ever form a palindrome. No one knows if this is true or if the palindrome is so big that computers have yet to find it.
That's surprising. Any informal thoughts why would even a single 4-digit constant exist with this property?
The intuition would be there are multiple cycles in this graph.
One thing that makes it less surprising is that there are lots of numbers which map to the same result - for example all permutation of a bag of digits. I checked, and there are only 55 distinct results (54 excluding 0000) from applying the process to all 4-digit numbers, which leaves less space for lots of cycles.
At a glance, there seem to be some patterns, like how for those bases with a 2-digit Kaprekar number the sum of the digits is base-1. There must be some number theory explanation for it.
Not an answer but a very good clue I can see is that the sum of the digits on each side of the equation consistently gets closer and closer.
9541 – 1459 = 8082
Left hand digit sum = 19. Right = 18. They are 1 apart.
8820 – 0288 = 8532
Both sides now = 18. Now 0 apart and they'll stay there. They are only 0 apart when at 18.
8532 – 2358 = 6174
Both sides = 18
7641 – 1467 = 6174
Both sides = 18
You can play with this a bit and it's consistent. The sum of digits of the left and right hand side consistency get closer to each other iteratively (but not necessarily closer to 18). Eventually they lock in at being equal to each other when their digits sum to 18.
This seems to be one property to look at.
I think there's then a second thing happening. Once the values on both sides have digits that sum to 18 the process from there converges on to 6174.
So first the digits of the two sides to the equation converge to equal the same which always only occurs when the digit sum is 18. The digit sum locks into being at 18 at that point. And then subsequently once the digits are 18 they converge on to 6174.
I would start by working out why digits on each side of the equation converge to summing to 18 on both sides of the equation and never being equal at any other value in this process. It reminds me of https://math.stackexchange.com/questions/99725/every-integer...
Now the next thing I would do is ask why does every number with digits that sum to 18 eventually end up at 6174. 4 digit numbers with digits that sum to 18 is a very limited set so it should be easy to figure out the combinations and why they all reach 6174.
Put those two together and you'd have an answer. (I'm thinking about it now but it really doesn't seem too hard).
The follow-up article appears to give some hints though:
> A number of readers emailed to say they had discovered that repeatedly adding up the digits of any of the kernels of Kaprekar's operation always equalled 9 (...) Professor Nishiyama has provided an explanation why this happens: it is because the result of performing Kaprekar's operation on any number is a multiple of 9.
This is starting to look very similar to "if you repeatedly add all the digits of an integer represented in base 10 representation until you have a single digit, and the result is 3, 6 or 9, then it is divisible by 3". I forgot the exact explanation for that one, but IIRC has to do with the implicit calculation that is embedded in base 10 positional notation, other bases have a different number you can quickly verify the divisibility of this way.
So maybe that (the "implicit calculation in base 10 representation" thing) is one part of the explanation. I mean whatever it is, it feels like a mix of all these operations imposing constraints upon each other and interacting with the recursive feedback loop to result in the convergence as an emergent property.
>This is starting to look very similar to "if you repeatedly add all the digits of an integer represented in base 10 representation until you have a single digit, and the result is 3, 6 or 9, then it is divisible by 3". I forgot the exact explanation for that one, but IIRC has to do with the implicit calculation that is embedded in base 10 positional notation
Yes. The number "xyz" is 100x + 10y + z. Each power of 10 can be split into 1 plus a multiple of 9, ie (x + y + z) + (99x + 9y). The second group where all the components are a multiple of 9 is of course divisible by 9 and by 3. The first group is the sum of the digits. So if the sum of the digits is divisible by 3, then the original number was divisible by 3. If the sum of the digits is also divisible by 9, then the original number was also divisible by 9. If the sum of the digits is not divisible by 3, the original number was not divisible by 3 either.
This generalizes to any number of digits, and to any base N for testing divisibility by N-1 or factors of N-1.
Layman’s guess: if there’s no generalizable proof describing why this works and the only method of proof is enunerating every case. That said, I kinda doubt that that is the case here, we probably just need a craft way of describing this so that we may come up with a crafty way of proving it :)
If there is a proof of no generalizable proof, that is interesting in and of itself. If there is not, then doesn't that mean we haven't found it yet (or proven it impossible, or proven it impossible to prove if impossible...). If we are still at the point of enumerating each case, that means our knowledge of the subject matter is lacking the deeper understanding to solve it in a nicer fashion.
Reminds me of some cylindrical contraption I saw at the Exploratorium in San Francisco over a decade ago. I believe too it was described even earlier in a "Scientific American" column — either Mathematical Recreations or Computer Recreations.
It was some kind of device where a large horizontal cylinder was perhaps covered with numbers? Maybe there were rings or some other kind of "cursor" on the contraption? And I think as you rotated it there was some kind of math performed and, like this "6174" thing, it would seem to converge on a single number after so many iterations regardless of the starting state.
"The device you're referring to is likely the "Kaprekar Machine" at the Exploratorium in San Francisco. It's an interactive exhibit demonstrating Kaprekar's Routine and the convergence to the number 6174 through mathematical operations on a four-digit number." (ChatGPT 3.5)
Yeah, I asked ChatGPT 3.5 as well. My prompt though yielded: "Yes, what you're describing sounds like an exhibit known as the "Ratchet Effect" at the Exploratorium in the Bay Area."
Closest thing I found with some manual searching was a blog that included an article on Kaprekar and a separate article on Exploratorium. The person seemed to be involved at some level so it suggested it was feasible, rather than providing evidence.
6174 is only remarkable if you count in base 10. This is HackerNews, so we all use hexadecimal. Sadly, according to https://kaprekar.sourceforge.net/output/sample_hex.php, there is not a simple Kaprekar Constant in base 16.
This process doesn't just reverse the digits (leaving a palindrome unchanged) - first you sort the digits (which does change a palindrome), then reverse them.
6174 isn't super special. Or should I say, isn't canonical. It is special but for base 10. But there are other numbers like this for other bases, and of course number lengths.
In university I learned that every integer is interesting. Proof: If there are non-interesting integers, there must be a smallest non-interesting integer, which is an interesting property. ■
When I give a monetary gift, I like to make it start with an interesting number. And then I ask the recipient (e.g., my kids, or neices/nephews, etc) if they can figure out what the number is.
The word "digit" is defined as 0-9, and specifically refers to base-10. This meaning of the word comes from one of its other definitions, referring to fingers and thumbs. We have 10 of those (usually), hence its use as as a reference to the symbols used in base-10 numbers.
("Binary digit" and "hexadecimal digit" are weird terms that abuse the language a bit.)
Similar numbers (I presume) exist for other number bases, and it's an interesting question of whether they constitute some sort of strange attractor. istm quite a few mathematical discoveries have emerged from just farting around with inconsequential-seeming numerical oddities.
I do feel your frustration though. I'm into electronic music and math, but I regularly run into people who insist that tuning to 432hz instead of 440hz (the common default for western tonality) is better because 432 is numerologically interesting. I've wasted a lot of time trying to persuade people that yes, 432 is a very cool number, but the interval of a second (from which we derive tuning frequencies) is fundamentally arbitrary. I suppose it's true that if you tune everything slightly flat people will subconsciously feel like time is expanding, man.
A lot of numbers have representations in base-10. A fact about the base-10 digits is a fact about the base-10 representation of the number, which is also a fact about the number.
You might be able to satisfy yourself by replacing "the digits of" with "the decimal digits in the base-10 representation of".
The point is that most of the time when digits are mentioned, it’s only a coincidental fact about one inelegant representation of the number — and often people are insufficiently aware of that.
It's only a coincidence if you ignore the fact that "digit" first and foremost refers to the things sticking out of your hands, and so was repurposed to talk about numbers because we have 10 digits on our hands.
That's the word's origin, not its current mathematical meaning. Also, number systems that are not base IIIIIIIIII have been used historically. That humans can only compute in a base that matches the number of fingers we have is a relatively recent myth.
Rational fractions will terminate only if the denominator’s prime factors are the base’s factors.
So for example, 1/2 = 0.5 and 1/5 = 0.2, but 1/3 = 0.333… and 1/7 = 0.142857….
1/4 = 0.25 works because the prime factors of 4 are 2 and 2… but 1/6 fails because 6 is infected by 3.
Now, base 12 has 2 prime factors (2 and 3) so it much any better than 10 really. But may I introduce base 30 (235)? Or perhaps base 210 will strike your fancy?
In some cases, the fact in base-10 has analogous facts in other bases. A trivial example that adding N-1 to any base-N number yields a value with the same digit sum. That makes it a bit more interesting. But I can't think of an example that doesn't pivot on the representation rather than something more fundamental.
Right, the digit sum of 10 is 1...perhaps I should have said "final digit sum." Same for 10000, or 1 with any number of zeroes after it.
The point of this trickery is that N-1 added to any number is really adding N (which adds 1 to the second position, by definition) and adding -1 (which subtracts 1 from the first position).
In base 10, this is the adding 9 trick. It can be extended by using any multiple of 9. That applies to the N-1 version, so that adding M*(N-1) to a base N number yields the same digit sum.
While I do personally find tricks involving numbers only in a specific representation to be worth a bit less, often the underlying pattern of the trick generalizes into a more interesting problem.
For example, per another's link in these comments, this 'trick' works for 3 digits, but hits 1 of 3 possible loops for 5 digits. From this, interesting but likely useless questions can arise, such as finding an easy way to test for these loops, seeing if there is a way to calculate the loop without brute forcing it, and understanding the problem enough to know how much of this holds true when swapping to a new base.
In general, most of this is just for fun and doesn't lead to anything serious. But sometimes a fun problem can be hard to solve, possibly leading to discovering something new, which ends up being applicable to more serious mathematics. Other times it can become a trap that just seems to waste time without ever leading anywhere, like the 3n+1 problem.
I don't think this should be considered numerology, though I do think sometimes people treat tricks as if they have some more serious meaning that they don't deserve, at least not based on how they are presented. 3 Blue 1 Brown goes into the spiral pattern of the primes as something that appears to be deep, but ends up being an unique way to present an otherwise boring tidbit about prime numbers.
> There’s no such thing as a “four-digit number”, only a four-digit base-10 numeral
Being further pedantic - aren't all digits base ten? I thought that was part of the definition of digit.
Other bases would have different words for their numbers - bit in binary, for example (which, yeah, I know, it a combination of the words "binary" and "digit").
Eh, I don't know - it doesn't really add much value most of the time, because these days more or less everyone uses base 10 by default, so it's entirely reasonable to assume base 10 unless stated otherwise.
An argument against being overly pedantic in this case is that this is a neat and accessible example of something quirky about numbers, and so even people who don't know much about numbering systems can approach it. If you instead emphasize that it's base 10 or that there is "no such thing as a 4 digit number", the main thing you'll probably do is cause disinterest in anyone who is sometimes overwhelmed by math. :)
Randomly, one of my sons told me about 6174 just a week ago, and it turned into an interesting conversation following by a little programming to find more of these numbers. After we went down that rabbit hole for awhile, then the conversation shifted to how these numbers might look in e.g. hexadecimal, and that seemed about the right time for that topic to come up.
> it's entirely reasonable to assume base 10 unless stated otherwise
The point of the parent comment is that this is not a property of numbers in general. It's just a coincidence that only works in base-10.
For example, a prime number is prime in every base. An irrational number is irrational in every base. Collatz conjecture is valid in every base. This one is not.
> It's just a coincidence that only works in base-10.
What? Not at all. In fact, trying it in other bases, as well as with other numbers of digits (in both base 10 and other bases), is a useful way to get some insights into why it happens.
Yes at all. 6174 is specific to base-10 and 4 digits. For 4 digit numerals in base-9 there are 2 cycles. Same for 4 digit numerals in base-8. It's unlikely that there's any special meaning for 4-digit numbers in base-10 having a single cycle of length 1, but even if there is (possibility which I cannot just deny, of course) — it doesn't translate to other bases.
So, yes, the described "special" thing about 6174 is actually a special thing about the string 6174 (representing a number in base-10). And I'd say the fact so many people in this very thread don't understand it is exactly the proof that the GPs comment actually has some merit. People kinda mix up properties of numbers and properties of some other mathematical objects — like their representations in base-10. Most of numerological games are concerned with the latter. Which is why it's especially interesting, when something like that happens to hold in other bases, which sadly just isn't the case with Kaprekar's constant.
Hehe, to me these contrarian comments are strongly reinforcing my point about overzealous pedantry. :) Of course the specific string '6174' is specific to base 10, but the idea itself can be applied to other bases.
Whether or not things settle on a single number, the number of loops that exist, etc. are a function of the base and the number of desired digits, but in the cases where inputs do settle on a specific number, there are patterns that emerge (regardless of the base) as the number of digits go up.
I think you're pointing out something true and worth mentioning, but - I'm not sure why you're comparing this to numerology. People can be interested in fun facts about numbers, whether about their digital representation or not, without any wrong or mystic beliefs.
Comparing this to numerology is just combative and doesn't help get your point across (as you can see by the downvotes).
Besides, going to a place where people are discussing something fun and explaining to them why it isn't really fun is just not a good way to get points across to people, no matter how valid you think they are.
A much better way to approach this IMO - don't say this is wrong, give something analogous that would work for all bases, which by the way would teach people this concept. E.g. extending "do all digits appear infinitely and evenly in the decimal representation of pi" to talking about "normal numbers".
True. However, this problem can be formulated in other bases, and yield results of similar (in)significance. For example, for 4-digit numbers in base-9 there are apparently just 2 cycles: 7252 → 5254 → 3076 → 7252 and 7072 → 7432 → 5074 → 7072.
If you follow the link in the second paragraph to https://en.wikipedia.org/wiki/Kaprekar%27s_routine, there are some statements on how this routine plays out in different bases. For base 8, there is no fixed point with 4 digits (i.e. any number that immediately loops back to itself), but apparently there are some cycles (e.g. 3065 → 6152 → 5243 → 3065).
So that means it pretty meaningless, right? The procedure has to yield cycles, and in some bases with some numbers of digit lengths you always get the same cycle of length one, and in others you don't.
Yep, seems to be so. I mean, it shouldn't be very surprising that among all possible lengths and bases there are some of length 1, would be more astonishing if there wasn't any.
But it's not like it's somehow less worthy than other mathematical games. After all, there could have been some meaningful property hidden in there. Doesn't appear so in this case, but you'd never know beforehand.
It's not really numerology though. Yes it's a dumb trick with base-10 math but that doesn't make it numerology. It's not trying to draw any connections between otherwise unrelated things. I think of numerology as trying to use stupid-glue to connect things that aren't connected. Like, I was born on the 8th day of the 2nd month, 8 - 2 is 6, the sixth planet is Saturn which also has 6 letters, and Jeffrey Epstein's first pet fish was named Saturn! OMG! That's numerology.
Numerology is far stupider than this admittedly useless arithmetic game.
> Like, I was born on the 8th day of the 2nd month, 8 - 2 is 6, the sixth planet is Saturn which also has 6 letters, and Jeffrey Epstein's first pet fish was named Saturn! OMG! That's numerology
no that's highly opinionated compressionn in the domain of crazy
To prove why this is so: