# Expression for sum of $n$ exponentials

So I have this sum of exponentials and I would like to find an expression for it.

$$\sum^n_{i=1} e^{\mu(i-1)}$$

Note that $$i$$ is not an imaginary indicator. I am aware there is a formula for summing a purely exponential sum, but I am not clear as to what happens to the $$\mu$$.

Define $$a=e^\mu$$ when $$\mu\ne 0$$. Then you have $$\sum^n_{i=1} e^{\mu(i-1)} =\sum^n_{i=1} a^{i-1}=1+a+\cdots+a^{n-1}={a^n-1\over a-1}={e^{\mu n}-1\over e^\mu -1}$$For $$\mu =0$$ we obtain$$\sum^n_{i=1} e^{\mu(i-1)}=n$$
The sum $$S$$ can be rewritten as $$S= \sum_{i=0}^{n-1} e^{\mu i}=\sum_{i=0}^{n-1} (e^{\mu})^i=\frac{1-e^{\mu n}}{1-e^{\mu}}$$ since the geometric series $$\sum_{i=0}^{n-1} x^{i}=\frac{1-x^n}{1-x}$$
One may recall that $$\sum_{i=1}^nx^{i-1}=\frac{1-x^n}{1-x},\qquad x\neq1.$$ What if you put $$x=e^\mu$$?
This the sum of the $$n$$ first terms of the geometric series with ratio $$\mathrm e^\mu$$, since $$\;\mathrm e^{\mu(i-1)}=(\mathrm e^{\mu})^{i-1}$$.