The quick way of seeing that this formula is right is to take the equivalent form that we obtain when we multiply both sides of this equation by(r-1)and multiply out the brackets. On the left-hand side we obtain:
(ar+ar2+ar3+…+arn)-(a+ar+ar2+…+arn-1)
and the whole expression telescopes, meaning that nearly every term is cancelled by one in the other bracket:the only exceptions are arn-a=a(rn-1), showing that our formula for the sum is correct. For example, putting a=1 and r=2 gives us the sum of powers of 2: