I’ll begin by providing an answer to the first of the three questions I posed in a previous post.

To recap, the question in question went as follows:

*Given a positive integer n, in how many ways can n be written as a sum of powers of two, when each power is allowed to occur at most once?*

Before I give the solution, let me ask a slightly different question instead: given a positive integer *n*, in how many ways can *n* be written as a sum of powers of ten, when each power is allowed to occur at most nine times?

Well, let’s see… we’ll try an example. Let’s try writing 436 as a sum of powers of ten, with at most nine copies of each power. Well, notice that since all powers of ten from and up are divisible by ten, the only way to get the ‘6’ at the end of 436 is to use six copies of , leaving us with 430. Now, about that 30… we can only use or , since any higher powers of ten will be divisible by 100. But we can’t use since we don’t have enough of them to add up to 30. So we’ll have to use three copies of . Finally, we have to use four copies of . So, all told, it seems as though there’s only one way to write 436:

.

…waaaait a minute…! That’s exactly what the notation ‘436’ *means* — four hundreds, three tens, and six ones! And the answer to the question is, of course, that there is *exactly one way* to write any number *n* as a sum of powers of ten when at most nine copies of each power are allowed — *and this is why our base-ten system of writing numbers works*! We take it completely for granted, but it’s actually fairly remarkable that such a simple system for uniquely representing integers exists. And as natural as it seems to us, it isn’t obvious — it was invented by Indian mathematicians as early as 500 AD, but didn’t really catch on in Europe until about a thousand years later!

So, going back to the original question, it turns out that there is exactly one way to write any given positive integer as a sum of powers of two, with each power occurring at most once; this system of uniquely representing positive integers is called *base two*, or *binary*. As you may know, this is the system that computers use to represent data. Every single piece of data stored by a computer — videos, images, software, text, this blog post itself — is ultimately encoded as a series of numbers, which are in turn encoded in binary.

How can we prove this? Let denote the number of ways to write the positive integer *n* as a sum of powers of two with each power occurring at most once. Clearly (there’s only one way to write ). Now suppose we have some positive integer *n* which is even, so we can write for some integer *k*. Any way of expressing *n* as a sum of powers of two cannot include , since any sum that includes exactly once must be odd (all the other powers of two are even, and even + even = even, even + odd = odd). (Of course, a sum which includes twice could be even — but we are only allowed one copy of each power.) Therefore, given powers of two summing to *n*, we can just divide each of them by two (so e.g. becomes , and so on) to get a list of powers of two which add up to . Conversely, any powers of two summing to *k* can all be multiplied by two to give powers of two summing to *n*. Since each way of writing *n* corresponds to a way of writing *k* and vice versa, the number of ways of writing them must be the same: .

Now suppose is odd. Any list of powers of two summing to an odd number must include . If we remove the , we are left with ways of summing to . And vice versa, any way of summing to can be made into a way of summing to by just adding . So .

But since , and is always equal to the value of *b* for some smaller number, it is not hard to see that for all *n*. For example, .

All in all, this is a rather roundabout way to show that there is only one way to write each number as a sum of powers of two with at most one copy of each power! There are probably easier ways to demonstrate this. However, a generalization to the above approach can be used profitably to attack the other two problems, so you can additionally consider this post as a hint. =)

…Didn’t catch on until about 1500 AD? What did they do in the interim? I suppose they used Roman numerals, but what names did they have, say, in Chaucer’s England for numbers, I wonder?

Yup, I’m pretty sure they used Roman numerals. But I don’t know how they pronounced the numbers, that’s a really good question! I’d guess that they actually used something very close to the number-names that we still use today — the Roman numeral system is still strongly related to powers of ten. But maybe for 367 they said something like “three hundreds, fifty, and seventeen”. This is complete and utter speculation on my part. Maybe I will ask my friend who studies medieval literature.

Well, if you want to see what Chaucer himself wrote, try his Treatise on the Astrolabe.

A line from Canterbury Tales has the first known example of the word “degree”; it also appears in this work.

From page 34 of the edition I linked to:

The yere of oure Lorde a thousand thre hundred ninetie and one, the twelveth daie of March, I would knowe the tide of the daie. I toke the altitude of my sonnne and founde that it was XXV degrees and XXX minutes of height of the bordure in the bakksyde: tho tourned I myne astrolabie, and bicause it was before middaie I tourned my rete and sette the degre of the sonne, that is to saie the firste degre of Aries, in the righte side in myne astrolabie, upon the XXV degre and XXX minutys of height emong my almicanteras.If Chaucer said “ninetie,” then they must have had a base-10 system by that time.

The Romans also used base 10. Take a look at their Latin words for numbers.

It’s not like base 10 wasn’t understood; it was only the *notation* that “1391” is equivalent to “one thousand three hundred ninety and one” wasn’t used yet. (Reading over the original blog entry, I do see how there is a bit of confusion over this; mathmatically, the ancients were already there as far as understanding base systems. The big missing piece of the puzzle was zero-as-placeholder, which the Babylonians hit at one point [still not getting zero as a solitary number] and from my recollection this convention pops in and out of history at that point until it becomes standard.)

Yeah, after studying this some more and talking to a friend who studies medieval literature, I realized that Jason is exactly right: I had initially conflated the ideas of having a

base tensystem of numbers, and having apositional notationfor writing numbers, where the same symbol can be used to represent different quantities depending on its position (e.g. the ‘3’ in ’43’ means ‘three’ but in ’35’ it means ‘thirty’). The former has been around for a long time (it’s quite natural given various obvious anatomical facts), but the latter is relatively much more recent.“Base 10 works because it uniquely represents numbers” was enough to blow

mymind.Pingback: Math Teachers at Play #21 « The Math Less Traveled