I have the statement:
$$\sum_{i=1}^{k} \frac{1}{p^i} = \frac{p^{-k}-1}{1-p}$$
without a clear step explanation why.
I've tried expanding the LHS and rewriting the RHS, but I don't see it yet.
$$\sum_{i=1}^{k} \frac{1}{p^i}= ? =\frac{p^{-k}-1}{1-p}$$
I'd appreciate an intermediary step "?" to help understand the result.
You simply apply the formula for the sum of a geometric series: $$x+x^2+\dots+x^k=x\bigl(1+x+\dots+x^{k-1}\bigr)=x\,\frac{x^k-1}{x-1},$$ substitute $\dfrac1p$ to $x$ in this formula and simplify.