Originally Posted by

**Archie Meade** Hi Sosi,

you can create a formula as follows

$\displaystyle S=e^0+e^{-k}+e^{-2k}+e^{-3k}+....+e^{-(n-1)k}+e^{-nk}$

$\displaystyle =1+e^{-k}\left(e^{-k}+e^{-2k}+....e^{-(n-2)k}+e^{-(n-1)k}\right)

$

In brackets is the sum itself with the last term removed

$\displaystyle S=1+e^{-k}\left(S-e^{-nk}\right)$

$\displaystyle S=1+Se^{-k}-e^{-(n+1)k}$

$\displaystyle S\left(1-e^{-k}\right)=1-e^{-(n+1)k}$

$\displaystyle S=\frac{1-e^{-(n+1)k}}{1-e^{-k}}$

Alternatively, you could use the formula for summing a geometric series.

$\displaystyle S=\frac{a\left(1-r^n\right)}{1-r}$

where "a" is the first term, "r" is the common ratio and "n" is the number of terms.

$\displaystyle a=e^0=1$

$\displaystyle r=\frac{e^{-2k}}{e^{-k}}=e^{-k}$

There are (n+1) terms as i ranges from 0 to n.

$\displaystyle S=\frac{1\left(1-e^{-(n+1)k}\right)}{1-e^{-k}}$