<s>[INST] Demonstration of sum of powers of $2$ Theorem : For every natural number $p$:
$$\sum^p_{i=0} 2^i = 2^{p+1}-1$$
I trieed to demonstrate the theorem using induction
Demonstration :
$1)$ If we have $p=0$ then we get $2^0=2^{0+1}-1$ that is always true.
$2)$ Supposing that the first statement is true then we get that
$$\sum^{p+1}_{i=0} 2^i = 2^{p+2}-1$$
Now we know that:
$$\sum^{p+1}_{i=0} 2^i - \sum^p_{i=0} 2^i = 2^{p+1}$$
and if that is true, must be also true that:
$$2^{p+2}-1-(2^{p+1}-1) = 2^{p+1}$$
$$2^{p+2}-1-(2^{p+1}-1)=2^{p+2}-2^{p+1}=2^{p+1}(2^1-2^0)=2^{p+1}$$
QED
Is this a valid demonstration?
 [/INST] Inductive hypothesis: $\quad\displaystyle\sum_{i=0}^p 2^i=2^{p+1}-1$ for some $p\ge 0$.
We must deduce that $\quad\displaystyle\sum_{i=0}^{p+1} 2^i=2^{p+2}-1$.
Decompose the sum: \begin{align*}\sum_{i=0}^{p+1} 2^i=2^{p+2}-1 &= \sum_{i=0}^p 2^i+2^{p+1}\\
&=2^{p+1}-1 +2^{p+1}\qquad\scriptstyle(\text{inductive hypothesis)}\\
&=2\cdot2^{p+1}-1=2^{p+2}-1.
\end{align*}
</s>