# 1 + 2 + 4 + 8 + 16 + 32... = -1 ?!

**URL:** <https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341>\
**Category:** Factual Questions\
**Created:** [March 6, 2008, 4:54pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341 "2008-03-06T16:54:28Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![The\_Them](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@The\_Them](https://boards.straightdope.com/u/The_Them)\
**Post date:** [March 6, 2008, 9:36pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/21 "2008-03-06T21:36:10Z")

</div>

Did _I_ start all this? Good thing I have the excuse that my math education was a long time ago.  
The only point I was trying to make was the fallacy of treating infinity as an algebraic number. Use it as a solution in a polynomial, I dare you.  
A lot of what is being said here may be different nomenclature. **CalMeacham** , what you said sounds almost like Fourier Transform, and I don’t remember that either.

---

<div class="post-metadata">

**Author:** ![Liberal](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@Liberal](https://boards.straightdope.com/u/Liberal)\
**Post date:** [March 7, 2008, 11:26am UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/22 "2008-03-07T11:26:14Z")

</div>

I don’t understand the jump from this

x = 1+2+4+8+16+…

to this

x = 1+2(1+2+4+8+…).

How is the “1+2” introduced on the right without being introduced on the left?

---

<div class="post-metadata">

**Author:** ![jovan](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jovan](https://boards.straightdope.com/u/jovan)\
**Post date:** [March 7, 2008, 11:53am UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/23 "2008-03-07T11:53:16Z")

</div>

[QUOTE=Liberal]  
How is the “1+2” introduced on the right without being introduced on the left?  
[/QUOTE]

Because 2(1+2+4+8+…) is just another way of writing 2+4+8+16+…

---

<div class="post-metadata">

**Author:** ![Liberal](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@Liberal](https://boards.straightdope.com/u/Liberal)\
**Post date:** [March 7, 2008, 1:16pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/24 "2008-03-07T13:16:12Z")

</div>

D’oh! Must learn to read digits.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [March 7, 2008, 1:52pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/25 "2008-03-07T13:52:06Z")

</div>

This demonstrates the Universe is being run on two’s-complement hardware, as opposed to one’s-complement or signed-magnitude. Further demonstration is the fact there is no such algebraic entity as negative zero.

---

<div class="post-metadata">

**Author:** ![RickJay](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@RickJay](https://boards.straightdope.com/u/RickJay)\
**Post date:** [March 7, 2008, 1:53pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/26 "2008-03-07T13:53:02Z")

</div>

I don’t understand things like “P-adic,” which sounds to me like a remedy for urinary tract infections. However, I found the intrinsic problem easy to understand if I just replaced the infinite-sums set with “infinity,” which is what it is. Unfortunately, I do not know how to make the infinity symbol appear with my keyboard, so instead I am going to use a tilde - ~ - so just pretend that’s the infinity symbol:

X = ~  
X= 1 + ~

Since 1 plus infinity is more infinity,

X = ~

No matter how you slice this, if you acknowledge the identity of infinity, the equation always simplifies to:

X = ~ (infinity.)

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [March 7, 2008, 3:39pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/27 "2008-03-07T15:39:01Z")

</div>

[QUOTE=Hypnagogic Jerk]  
A metric is a function that gives you the distance between two points (in a _metric space_). Now, given that every rational x can be written as x = 2[sup]n[/sup] u/v, with u and v indivisible by 2, with n being a unique choice, we can then define the _2-adic valuation_ in this way: |x|[sub]2[/sub] = (1/2)[sup]n[/sup]. If x = 0, then |x|[sub]2[/sub] = 0. In the same way that the absolute value defines a metric on the rationals (d(x,y) = |x-y|), the 2-adic valuation does the same.

[/QUOTE]

Thanks, this is _really_ interesting. I don’t quite understand the role of u and v i n what you wrote above, though. You say they must be indivisible by two. This seems to mean they can be anything as long as they are odd. Does each choice of values for u and v give you a different 2-adic valuation, or do they all somehow collapse into giving the same 2-adic valuation?

So in other words: from x = 2[sup]n[/sup] u/v I get n = log[sub]2/sub, so the metric would be (1/2)[sup]log[sub]2/sub[/sup]. My question is, does it make a difference what you pick for u and v? Do different choices mean different metrics?

Also, why is there not both an x and a y in the formula for the metric? How can it be a measure of distance if it only takes a single point as “input” so to speak?

-FrL-

---

<div class="post-metadata">

**Author:** ![Giles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/giles/32/60_2.png) [@Giles](https://boards.straightdope.com/u/Giles)\
**Post date:** [March 7, 2008, 3:55pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/28 "2008-03-07T15:55:58Z")

</div>

[QUOTE=Frylock]  
Also, why is there not both an x and a y in the formula for the metric? How can it be a measure of distance if it only takes a single point as “input” so to speak?  
[/QUOTE]

Thinking just in terms of Euclidean geometry (which was what gave rise to the more general idea of metric spaces), a line is just as much a metric space as is a plane, 3-dimensional space, or a higher dimensional space. On a line, you just need one variable x to define a point.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [March 7, 2008, 4:25pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/29 "2008-03-07T16:25:33Z")

</div>

[QUOTE=Giles]  
Thinking just in terms of Euclidean geometry (which was what gave rise to the more general idea of metric spaces), a line is just as much a metric space as is a plane, 3-dimensional space, or a higher dimensional space. On a line, you just need one variable x to define a point.  
[/QUOTE]

Yes, on a line you need only one variable to define a point. But I thought a metric was supposed to give a way of measuring the distance between _two_ points.

(I didn’t take us to be talking about anything other than a line–though it did occur to me that the distance formula must be a metric for planes. Notice that no matter how many dimensions are in your space, the distance between two points is the distance between _two_ points. 😉 )

-FrL-

---

<div class="post-metadata">

**Author:** ![Hypnagogic\_Jerk](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hypnagogic_jerk/32/4252_2.png) [@Hypnagogic\_Jerk](https://boards.straightdope.com/u/Hypnagogic_Jerk)\
**Post date:** [March 7, 2008, 5:09pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/30 "2008-03-07T17:09:58Z")

</div>

[QUOTE=Frylock]  
Thanks, this is _really_ interesting. I don’t quite understand the role of u and v i n what you wrote above, though. You say they must be indivisible by two. This seems to mean they can be anything as long as they are odd. Does each choice of values for u and v give you a different 2-adic valuation, or do they all somehow collapse into giving the same 2-adic valuation?  
[/quote]

Each integer has a unique prime factorisation. So if you have a rational x, you can write x = p/q, where p = 2[sup]n[sub]1[/sub][/sup] \* 3[sup]n[sub]2[/sub][/sup] \* 5[sup]n[sub]3[/sub][/sup] \* … and q = 2[sup]m[sub]1[/sub][/sup] \* 3[sup]m[sub]2[/sub][/sup] \* 5[sup]m[sub]3[/sub][/sup] \* … Therefore, x = 2[sup]n[sub]1[/sub] - m[sub]1[/sub][/sup] \* u / v, where u = 3[sup]n[sub]2[/sub][/sup] \* 5[sup]n[sub]3[/sub][/sup] \* … and v = 3[sup]m[sub]2[/sub][/sup] \* 5[sup]m[sub]3[/sub][/sup] \* … u and v are basically the “junk” left in the prime factorisation of x (_i.e._ everything that is not a power of 2). You could define the p-adic valuation for any prime p in the same way.

> [@](#):
>
> Also, why is there not both an x and a y in the formula for the metric? How can it be a measure of distance if it only takes a single point as “input” so to speak?

In the same way that we can define a metric d on the rationals using the absolute value (d(x,y) = |x-y|), we can also define another metric d[sub]p[/sub] on the rationals using the p-adic valuation (d[sub]p[/sub] = |x-y|[sub]p[/sub]).

Now, there are a number of properties that a function must satisfy in order to be a [metric](http://en.wikipedia.org/wiki/Metric_(mathematics)). (The properties are shown near the beginning of the page.) Most of them are easy to show for the p-adic metric d[sub]p[/sub], but we will show that this metric satisfies the ultrametric inequality (a stronger version of the triangle inequality). Let x, y, z be three rational numbers such that x = p[sup]l[/sup] u[sub]1[/sub]/v[sub]1[/sub], y = p[sup]m[/sup] u[sub]2[/sub]/v[sub]2[/sub], z = p[sup]n[/sup] u[sub]3[/sub]/v[sub]3[/sub].  
d[sub]p[/sub](x, z) = |x-z|[sub]p[/sub] = |p[sup]min(l,n)[/sup]|[sub]p[/sub] |p[sup]l - min(l,n)[/sup] u[sub]1[/sub]/v[sub]1[/sub] - p[sup]n - min(l,n)[/sup] u[sub]3[/sub]/v[sub]3[/sub]|[sub]p[/sub] = (1/p)[sup]min(l,n)[/sup], since we can show that p[sup]l - min(l,n)[/sup] u[sub]1[/sub]/v[sub]1[/sub] - p[sup]n - min(l,n)[/sup] u[sub]3[/sub]/v[sub]3[/sub] is not divisible by p. In the same way, d[sub]p[/sub](x, y) = (1/p)[sup]min(l,m)[/sup] and d[sub]p[/sub](y, z) = (1/p)[sup]min(m,n)[/sup]. Then, we can see that (1/p)[sup]min(l,n)[/sup] \<= max((1/p)[sup]min(l,m)[/sup], (1/p)[sup]min(m,n)[/sup]), and therefore the p-adic metric satisfies the ultrametric inequality. (I’ve left out many of the steps.)

Here we’ve only worked with the p-adic metric on the rationals. Defining the p-adic numbers is more complicated. I’ve seen them defined as equivalence classes of Cauchy sequences of rationals in the p-adic metric. I will compare this construction with the construction of the reals. Consider the following sequence: (3, 3.1, 3.14, 3.141, 3.1415, 3.14159, …). This sequence appears to converge to pi (using the usual metric on the rationals, as defined by the absolute value), but if we’re working in the rationals, it doesn’t, since pi isn’t a rational. Still, it is what we call a _Cauchy sequence_: the points in the sequence get arbitrarily close to each other. So what we can do is consider the space of equivalence classes of these Cauchy sequences of rationals. We will call this space the _real numbers_, and in the reals we call “pi” the equivalence class of Cauchy sequences of rationals that contains this sequence and every other sequence that eventually gets arbitrarily close to it. We can then show that, with a suitable definition of the addition and multiplication on the reals, it remains an algebraic field, and it is also _complete_: every Cauchy sequence of reals converges to a real. This construction should be done (and in more detail) in any good analysis book. And now, the construction of the p-adic numbers is similar, except that we’re using the p-adic metric on the rationals instead of the usual metric.

I see that **ultrafilter** has also offered a definition of the p-adic _integers_, which I will have to read again.

---

<div class="post-metadata">

**Author:** ![C\_K\_Dexter\_Haven](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@C\_K\_Dexter\_Haven](https://boards.straightdope.com/u/C_K_Dexter_Haven)\
**Post date:** [March 7, 2008, 5:37pm UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/31 "2008-03-07T17:37:00Z")

</div>

[QUOTE=Sunspace]  
But you can also do this:

x = 1+2+4+8+16+…  
x = 1+2+4(1+2+4+8+…)  
x = 1+2+4x  
x-4x = 3  
-3x = 3  
x = -1

Oh, wait. It comes out the same. So… um… I dunno. I thought it was going to come out with a different value of x, and then it would be like dividing by zero, where if you allow it, you can prove that 1 = 2.  
[/QUOTE]

Since the sum of 1 + 2 + 4 + … + 2[sup]n[/sup] = 2[sup]n+1[/sup]-1, that trick will always produce -1, methinks.

---

<div class="post-metadata">

**Author:** ![dtilque](https://avatars.discourse-cdn.com/v4/letter/d/d6d6ee/32.png) [@dtilque](https://boards.straightdope.com/u/dtilque)\
**Post date:** [March 8, 2008, 7:57am UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/32 "2008-03-08T07:57:34Z")

</div>

[QUOTE=Derleth]  
This demonstrates the Universe is being run on two’s-complement hardware, as opposed to one’s-complement or signed-magnitude. Further demonstration is the fact there is no such algebraic entity as negative zero.  
[/QUOTE]

OK, but how many bits are in the Universal Computer’s registers? And does it ever crash (BSOD?) so that God has to reboot the Universe?

---

<div class="post-metadata">

**Author:** ![Malacandra](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Malacandra](https://boards.straightdope.com/u/Malacandra)\
**Post date:** [March 8, 2008, 8:54am UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/33 "2008-03-08T08:54:15Z")

</div>

[QUOTE=dtilque]  
OK, but how many bits are in the Universal Computer’s registers? And does it ever crash (BSOD?) so that God has to reboot the Universe?  
[/QUOTE]

Yeah, he rebooted it [last Thursday](http://en.wikipedia.org/wiki/Omphalos_(theology)). Ran a full restore, though, so it was nice and seamless.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [March 10, 2008, 2:12am UTC](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341/34 "2008-03-10T02:12:38Z")

</div>

[QUOTE=dtilque]  
OK, but how many bits are in the Universal Computer’s registers?  
[/quote]  
It’s a Lisp Machine, so it automatically rolls over to bignums on overflow.

> [@](#):
>
> And does it ever crash (BSOD?) so that God has to reboot the Universe?

No, Lisp Machines invoke a debugger. god can inspect stack frames, local variables, and the heap from the console and make changes in real-time.

[Previous page](https://boards.straightdope.com/t/1-2-4-8-16-32-1/440341.md?page=1)
