Powers of Two
While trying to figure out the number of ancestors a person has at a given generation, I realized it might be useful to have a shorthand for approximating powers of 2. Unlike powers of 10, powers of 2 don’t follow any immediately obvious rule, but I thought it might be possible to get most of the way there with a minimal amount of thought (always my goal). I’m not a mathematician, but I like to think that makes this exercise that much more compelling for its coming from a place of profound ignorance.
The first thing I realized was that 210 is conveniently close to 103 at 1,024. This led me to suspect, baselessly, that 220 would be similarly close to a nice round number. As it turned out, 220 is near to 106 (1,048,576), and 230 is near to 109 (1,073,741,824). This pattern generally holds, at least for a while: each incremented multiple of 10 gives us about three orders of magnitude. As a formula, I would say
210n ≅ 103n
So far, this is great! A very simple formula. If we want to know (after the old parable) how many grains of rice we would have if we received a doubled quantity each day for 100 consecutive days, we could say, with some confidence, a bit more than 1,000,000,000,000,000,000,000,000,000,000. Or more than the whole Earth could supply, realistically. This could also be an aid with other values of n. To find 265, for instance, we could just take 260 (or 1018) and double it five times.
1018 * 25
1,000,000,000,000,000,000 * 32 ≅ 32,000,000,000,000,000,000
My calculator says the actual answer is 36,893,488,147,419,103,232. Not bad, but not great. Evidently, the little spare change has compounded to become a significant problem. This shouldn’t come as a surprise to me, since the remainder already grew in proportion to the approximate value in the progression from 210 → 220 → 230.
To find a way to account for the spare change, I started looking at later instances of 210n, hoping to find a useful pattern like my 210 one. I was curious to see if that spare change would add up to anything in predictable way. Specifically, my thought was to see when the spare change would accumulate enough to “flip” the leading digit, so that 2x would be not 1 * 10y, but 2 * 10y. To my disappointment, 2100 and 2200 did not seem to yield any meaningful patterns. It ended up being 2300 (2.037035… * 1090) that finally flipped the leading digit. As I looked at some of the other 210n values, I also started to notice multiples of three popping out in the values of the second and third digits. 240 starts 109, 250 starts 112, 260 starts 115, 270 starts 118, etc. Eventually (after following a few dead ends) I put these facts together and realized my “spare change” constituted ⅟30 of a whole leading digit. 30 pieces of pie would be enough to flip the digit and start a new pie, mmmm. As a formula, this would be
210n ≅ (1+.0333n) * 103n
However, when I tested this formula I got some wrong values. For instance, I used n = 11:
2110 ≅ (1+.0333*11) * 10(3*11) ≅ 1.33 * 1033. The actual value, per the Windows 10 calculator, is closer to 1.298 * 1033. After some time (and distractions, as I was working on this during idle moments while running AV for an expo livestream) I recognized a classic off-by-one error, since 240 was 1.09… and not 1.12… The first three 210n values don’t really follow the formula anyway. So now the completed formula is
210n ≅ (1+.0333(n-1)) * 103n
Does the formula hold for further doublings? The short answer is unfortunately no. If we look at the number of doublings required to “flip” the digit later on, the only discernible pattern is that they get closer and closer together (See Table 1). In other words, there is some spare change on top of the spare change we already accounted for. Even this pattern seems to be broken between 21020 and 21090, but I suspect this is an artifact of my using rounded figures, and that a closer examination of the values would find a digit flipped earlier than n = 1050.
At any rate, I haven’t been able to crack this case any further, but I have to imagine most cases will be addressed with the work already done. This is especially true if we use the technique of splitting up larger doublings into values covered by our formula. For instance, 2510 is 2(300+210), which is also 2300 * 2210:
2300 = (1+.0333*29)*1090
2210 = (1+.0333*20)*1063
2510 = (1.9657*1090)*(1.666*1063)
2510 ≅ 3.6317*10153
My calculator gives me 3.35 * 10153. Remarkably close!
Table 1. Important Milestones in Powers of Two Series
Power of 2 | Leading Digit | Difference to Next Digit Flip |
---|---|---|
10-299 | 1.x | +290 |
300 | 2.x | +170 |
470 | 3.x | +120 |
590 | 4.x | +90 |
680 | 5.x | +80 |
760 | 6.x | +60 |
820 | 7.x | +60 |
880 | 8.x | +50 |
930 | 9.x | +50 |
980 | 10.x | +40 |
1020 | 11.x | +40 |
1050 | 12.x | +30 |
1090 | 13.x | +40 |