Please do watch 9.30 in the following video https://www.youtube.com/watch?v=MTl8djZFWE0&t=601s
The tutor has mentioned it to be a geometric progression, but I don't see how that progression directly translates to 2 * 2N - 1?
For a costly array append, we have to double the length of the array. So we get 1 -> 2 -> 4 -> 8 -> 16 -> .... -> 2N. Where N is the length of the array. But how is the cost of this 2 * 2N - 1? It's just confusing, and the tutor doesn't explain why.
That is an approximation using the following formula: $$\sum_{k=0}^{n} 2^k=2\cdot 2^n-1$$ when $2^n=N$. Therefore, $1+2+4+8+\cdots+2N=4\cdot2^n-1$.