# \ #
# "Recall the result (formula) for the sum of a finite geometric" #
# "series:" #
# \quad sum_{k = 0}^n \ r^n \ = \ { r^{ n + 1 } - 1 } / { r - 1 }; \qquad \qquad \qquad "where" \ r \ "is the common ratio". #
# "The sum you have fits exactly this, with some small" #
# "adjustments." #
# "Notice that the fundamental formula above starts with the" #
# "index variable" \ [ k ] \ \ "at "0," and your sum starts with the" #
# "index variable" \ [ n ] \ \ "at "1." #
# "So let's start with your sum, and make the small adjustments" #
# "so we can use the fundamental formula above:" #
# \qquad \qquad \qquad sum_{ n = 1 }^9 \ 2^{ n - 1 } \ = \ [ 2^{ 0 - 1 } \ + \ sum_{ n = 1 }^9 \ 2^{ n - 1 } ] \ - \ 2^{ 0 - 1 }. #
# "Continuing, absorb the" \ \ 2^{ 0 - 1 } \ \ "term into the larger sum, since:" #
# 2^{ 0 - 1 } = \ 2^{ n - 1 }, \ "with" \ n = 0: #
# \qquad \qquad \qquad \qquad \qquad = \ [ sum_{ n = 0 }^9 \ 2^{ n - 1 } ] \ - \ 2^{ - 1 } #
# \qquad \qquad \qquad \qquad \qquad = \ [ sum_{ n = 0 }^9 \ 2^{ - 1 }\cdot 2^{ n } ] \ - \ 2^{ - 1 }. #
# "Continuing, pull out the" \ 2^{ - 1 } \ "factor inside the last sum:" #
# \qquad \qquad \qquad \qquad \qquad = \ ( 2^{ - 1 } \cdot [ sum_{ n = 0 }^9 \ 2^{ n } ] ) \ - \ 2^{ - 1 }. #
# "Now pull out the" \ 2^{ - 1 } \ "factor from the two terms here:" #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( [ sum_{ n = 0 }^9 \ 2^{ n } ] \ - \ 1 ). #
# "Thus we have now:" #
# \qquad \qquad \qquad sum_{ n = 1 }^9 \ 2^{ n - 1 } \ = \ 2^{ - 1 } \cdot ( [ sum_{ n = 0 }^9 \ 2^{ n } ] \ - \ 1 ). #
# "Now the sum inside the brackets fits exactly the" #
# "fundamental formula above -- using:" \ \ r = 2, n = 9,"in that formula. So, continuing:"#
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( [ { 2^{ 9 + 1 } - 1 } / { 2 - 1 } ] \ - \ 1 ) #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( [ (2^{ 10 } - 1 } / { 1 } ] \ - \ 1 ) #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( (2^{ 10 } - 1 ) \ - \ 1 ) #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( 2^{ 10 } - 1 \ - \ 1 ) #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ - 1 } \cdot ( 2^{ 10 } - 2 ) #
# \qquad \qquad \qquad \qquad \qquad = \ ( 2^{ - 1 } \cdot 2^{ 10 } ) - ( 2^{ - 1 } \cdot 2 ) #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ 10 - 1 } - 2^{ 1 - 1 } #
# \qquad \qquad \qquad \qquad \qquad = \ 2^{ 9 } - 2^{ 0 } #
# \qquad \qquad \qquad \qquad \qquad = \ 512 - 1 #
# \qquad \qquad \qquad \qquad \qquad = \ 511. #
# "This our answer." #
# \ #
# "Summarizing:" #
# \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \quad \ \ sum_{ n = 1 }^9 \ 2^{ n - 1 } \ = 511. #
# \ #
# "Note: There are other methods for doing this, using different" #
# "techniques, for example, one called changing the index of" #
# "summation. This is a good technique, and may be easier in" #
# "this case. The techniques displayed here illustrate alternatives" #
# "that can be powerful, and are quite frequently very convenient." #