How to get the last line?

71 Views Asked by At

I'm supposed to find the following equality:

$\sum_{r=1}^{s-1}2^{2r-1} -\sum_{r=1}^{s-1}2^{r-1} +(n-2^{s-1}+1)(2^s-1)$ $=\frac{2}{3}(4^{s-1}-1)-(2^{s-1}-1)+(2^s-1)n-2^{2s-1}+3*2^{s-1}-1$

I understand that:$\sum_{r=1}^{s-1}2^{r-1}=(2^{s-1}-1)$ and that $(n-2^{s-1}+1)(2^s-1)=n(2^s-1)-2^{2s-1}+2^{s-1}+(2^s-1)$

But I don't know how to get the $\frac{2}{3}(4^{s-1}-1) $ on the second line from the $\sum_{r=1} ^{s-1} 2^{2r-1}$.

Does someone has an idea ?

Sincerely,

Arty

1

There are 1 best solutions below

2
On

It might help if we re-write it like this: $$\sum_{r=1}^{s-1} 2^{2r-1} = \sum_{r=1}^{s-1} 2^{-1} \cdot 2^{2r} = \frac{1}{2}\sum_{r=1}^{s-1}4^r$$

which is a standard geometric series.