(math) Alternating Binary Expansions are Unique
It is an undeniable truth of the universe that every natural number can be expressed uniquely as a sum of decreasing powers of 2. This decomposition is known as the binary expansion of . For instance, the number 45 can be written as which is . We can write this snugly using binary notation as .
A natural number can can also be decomposed using an alternate binary expansion, which is an alternating sum of decreasing powers of 2. The word alternating here means that you add the first term, subtract the second, then add the third, then subtract the fourth and so on. The number 45 has the alternating binary expansion which in numbers is . In alternating binary notation, we write My emphasis on the in the previous sentence should convey that even this alternate binary expansion is unique. Let's see why. Take this time to think about the above example and if you can figure out what I did to come up with the expansion. We also pose the constraint that an alternating sum must contain at least two terms otherwise something like messes up with uniqueness.
The following is due to my friend, C. Consider a section of repeating 1s in the binary expansion which begins with a 0 to the left. Note that the first chunk of 1s begins with an implicit 0. We replace each chunk of (containing 1s) by (containing 0s). This is the same as replacing by . To show that this indeed works, we add to the long expression, and the rightmost entry becomes which then adds to the adjacent to give and so on. Much like the game 2048, all the terms collapse into each other leaving us with . So, in the following example
Let us now show that the alternating binary expansions are unique using induction on the natural number for which we are finding the expansion. The base case of is trivial as , and we assume uniqueness for all . What can the leading power of 2 in the expansion of be? If we begin with , then by the alternating condition it is not possible for us to bring the sum down below . This constraint means that must be the binary power closest to and bigger than . Once we have that sorted, let . As is bigger than , we have . By the induction hypothesis, the alternating binary expansion of is unique! Let , which means that has a unique alternating binary expansion given by .
And that shows our result! I don't think this statement is true for other bases. For instance in ternary, we have as . Maybe there is an analog of alternating that is true in these bases, but that remains to be seen!