Expression for sum of $n$ exponentials
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}$$
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$$
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$?