- #1
Bassalisk
- 947
- 2
I posted a related thread, in the same forum regarding matlab, but I want to discuss this here separately.
Few minutes ago I became very confused baffled and surprised at the same time.
consider function [itex]2^{x}[/itex].
Now consider the sum of this function for n iterations.(from 0 to n)
[itex]\sum_{x=0}^n 2^{x}[/itex].
Using my humble knowledge of c++ I found that you need 19 iterations (including zero as iteration) for a number 524287.
so 1+2+4+8+16...+262144=524287
By case, found that this sum is 1 less than the [itex]2^{19}[/itex].
so [itex]524287=2^{19}-1[/itex]
Why? I am not best mathematician you will come across but this i found very interesting.
Few minutes ago I became very confused baffled and surprised at the same time.
consider function [itex]2^{x}[/itex].
Now consider the sum of this function for n iterations.(from 0 to n)
[itex]\sum_{x=0}^n 2^{x}[/itex].
Using my humble knowledge of c++ I found that you need 19 iterations (including zero as iteration) for a number 524287.
so 1+2+4+8+16...+262144=524287
By case, found that this sum is 1 less than the [itex]2^{19}[/itex].
so [itex]524287=2^{19}-1[/itex]
Why? I am not best mathematician you will come across but this i found very interesting.