# conditional moment generating function author transforms solution

At the last step of the provided solution to this problem the author transforms $$\frac{e^{t(n+1)}-1}{e^t-1}=(1+e^t+e^{2t}+...+e^{nt})$$ It is probably something simple, but I am having trouble figuring it out. I tried dividing the numerator by denominator :

$$\frac{e^{t(n+1)}-1}{e^t-1}=e^{n+1}+e^{(n+1)/t}+e^{(n+1)t^2}+...$$

its not the same, can someone tell me what the author did?

It's just the formula for the geometric sum $$\sum_{k=0}^n x^k=\begin{cases}n+1&\text{if }x=1\\\frac{x^{n+1}-1}{x-1}&\text{if }x\ne 1\end{cases}$$ applied to $x=e^t$. The formula is typically proved by induction on $n\ge 0$ or like this.
$1+x+x^2+x^3+ . . . +x^{n-2}+x^{n-1}+ x^{n}=\frac{x^{n+1}-1}{x-1}$
$x= e^t$
$\frac{e^{t(n+1)}-1}{e^t-1}=1+e^t+e^{2t}+e^{3t}+e^{4t}+ . . .+e^{nt}$