The formula 1+r+r^2+...+r^n=(r^(n+1)-1)/(r-1) is true for all real numbers r except r=1 and for all integers n>=0. Use this fact to solve the following problem:
If n is an integer and n>=1, find a formula for the expression
2^n-2^(n-1)+2^(n-2)-2^(n-3)+...+((-1)^(n-1))(2)+(-1)^n.
For the values of r and n, I substituted r=(-2) and n=n-1 and got
((2^n)-1)/3.
Did I use the correct substitutions?