Emanuel Keith

2022-06-28

Since everyone freaked out, I made the variables are the same.
$\sum _{x=1}^{n}{2}^{x-1}$

Ryan Newman

In this instance, without explicitly using the formula for geometric series,

Now that we know the form of the result, it is also possible to prove the result
$\sum _{x=1}^{n}{2}^{x-1}={2}^{n}-1$
more formally by induction. Clearly, the result holds when n=1 since ${2}^{0}={2}^{1}-1$. Then, if the result holds for some positive integer n, we have that
$\sum _{x=1}^{n+1}{2}^{x-1}=\sum _{x=1}^{n}{2}^{x-1}+{2}^{n}=\left({2}^{n}-1\right)+{2}^{n}={2}^{n+1}-1$
and so the result holds for n+1 as well. Since we know that the result holds when n=1, it follows by induction that it holds for all positive integers n.

Cory Patrick

You're saying you want as outputs
$1,3,7,15,31,63$
Note they are respectively ${2}^{1}-1,{2}^{2}-1,{2}^{3}-1,{2}^{4}-1,{2}^{5}-1,{2}^{6}-1$ so what you really want is
$f\left(n\right)={2}^{n}-1$
Now this is a finite geometric sum, namely
$\sum _{i=0}^{n-1}{2}^{i}={2}^{n}-1$
Now this is a finite geometric sum, namely
$\sum _{i=0}^{n-1}{2}^{i}={2}^{n}-1$
$\sum _{i=0}^{n-1}{2}^{i}={2}^{n}-1$
This follows from the geometric sum formula, that is
$\sum _{i=0}^{n-1}{a}^{i}=\frac{{a}^{n}-1}{a-1}$
The MO for this is the following. Let our sum be S
$1+a+\cdots +{a}^{n-1}=S$
Then
$a+{a}^{2}+\cdots +{a}^{n}=aS$
But
$a+{a}^{2}+\cdots +{a}^{n}=\left(1+a+\cdots +{a}^{n-1}\right)-1+{a}^{n}=S-1+{a}^{n}$
So that
$\begin{array}{rl}& S-1+{a}^{n}=aS\\ & S-aS=1-{a}^{n}\\ & \left(1-a\right)S=1-{a}^{n}\\ & S=\frac{1-{a}^{n}}{1-a}\end{array}$
as desired.

Do you have a similar question?