Closed-form summation of exponential

270 Views Asked by At

I have the following formula:

$f(k) =\sum_{i=0}^{k}3^{i}$

Therefore,

$f(0) = 1$

$f(1) = 4$

$f(2) = 13$

$f(3) = 40$

Is it possible to rewrite this to avoid having to do the summation?

1

There are 1 best solutions below

0
On BEST ANSWER

As lulu's question comment states, you have the sum of a Geometric series. The general formula for a finite sum is, for $r \neq 1$,

$$\sum_{i=0}^n ar^i = a\left(\frac{r^{n+1} - 1}{r - 1}\right) \tag{1}\label{eq1A}$$

Thus, using that your first term is $a = 1$ and the common ratio is $r = 3$, you get in your case

$$f(k) =\sum_{i=0}^{k}3^{i} = \frac{3^{k+1} - 1}{3 - 1} = \frac{3^{k+1} - 1}{2} \tag{2}\label{eq2A}$$