Solving a recurrence formula

103 Views Asked by At

I'm trying to find a simpler form for $\sum_{i=0}^{n} 2^x$ this is what I have so far:

$\sum_{i=0}^{n} 2^i = 1 +2(1+2(1+... + 2(1 + 2)))$

And from this I got the following recurrence formula $x_n=1+2x_{n-1} => x_n-2x_{x-1}-1=0$. Now I'm assuming $x_n$ has some exponential form $b^n$ and I'll further add a offset $a$ so that I can get a nice quadratic equation so $x_n$ should be $b^n+a$

Now I have: $b^n-2b^{n-1}-a-1=0 => b^{n-2}(b^2-2b)=a+1$ and now im using $a=-1$ so I can get a quadratic equation with solutions $b=2,0$ so now my sum should be $2^n -1$ which is incorrect.

Can someone point to me the mistakes I have made and some correction would be very much appreciated. Thanks.

2

There are 2 best solutions below

0
On BEST ANSWER

As Ronald Blaak explained well in the comments, you need to assume $x_n = cb^n + a$. The equation you had then becomes $$ cb^{n-1}(b-2) = a+1 $$ This implies that $b=2$, which further implies $a=-1$ as before. Therefore, you know $x_n=c2^n -1$. To solve for $c$, use the fact that you know $x_0=1$.

1
On

$$1+1+2+4+8+16 \\=2+2+4+8+16 \\=4+4+8+16 \\=8+8+16 \\=16+16 \\=32$$

and

$$1+2+4+8+16=32-1.$$

The generalization is obvious.