2.0 3.0 > doc > formula

 历史

 也许你的老师没有告诉你全部的事实？

1 + 2 + 3 + 4 + ... = 1/12

## 简短的解释

Your confusion comes from the fact that you supposed that this formula is calculated in R, the set of real numbers.

In a few words, the p-adic numbers are an extension of Q, the set of rational numbers, but not done in the same way that leads to R.

The difference is in the way the absolute value is computed, and that implies that the right part of the formula is a convergent series in the p-adic numbers set when p = 2. And the limit of this series is...-1.

And as eiπ = -1, the formula is correct.

 As for the left part of the formula, you may ask if it has sense with p-adic numbers? To be honest, I am not sure, but if I understand the Wikipedia article above correctly, it seems that it is ok. If you can confirm that, please tell me!

## 长的解释

In this explanation, your confusion comes from the fact that in mathematics you often write an algorithm and the value of a function the same way when the value of the function is calculated with that algorithm most of the time.

I know, that is not very clear. I want to talk about analytic functions and their continuation.

In a few word, the right part of the formula is not just an infinite sum. It is actually the value of a function defined this way:

f(x) = ∑ xk, k:0→+∞

You will tell me, this function is defined only for x ∈ ]0,1[!

I will agree.

But if f has a specific form, i.e. if f is an analytic function, which is the case there, then we can define a function g that is the continuation of f. That function g takes the same value as f in the interval where f is defined, and takes other values on area where f is not defined. Moreover, this continuation is unique!

See the Wikipedia articles above for more details.

So, in our specific case, our infinite sum is actually the continuation of f(x), and that continuation takes the value -1 when x = 2!

And as eiπ = -1, the formula is correct.

 As for the second shocking formula, this is the result of a continuation too. That formula was discovered by Riemann, and discovered again a few years later by Ramanujan.

## 低级解释

Gambas中运行下面程序：

```DIM S AS Integer
DIM P AS Integer

P = 1

DO

S += P
PRINT S;;
P += P

LOOP
1 3 7 15 31 63 127 ... 1073741823 2147483647 -1 -1 -1 -1 -1 -1 ...
```

## 结论

For information, eiπ = -1 is the prefered Formula of Richard Feynman. I just added my little series because I am a computer scientist and I like powers of two. :-)

Or I will explain that void and light do not exist, and that time is a pure illusion like temperature. :-p