# 1+r+r^2+r^3+ ... +r^n=[1-r^(n+1)]/(1-r)?

Prove geometric series formula:

For any real number r not equal to 0 and all integers n greater than or equal to 0,

1+r+r^2+r^3+ ... +r^n=[1-r^(n+1)]/(1-r)

(Here r^n denotes the n'th power of n.)

For any real number r not equal to 0 and all integers n greater than or equal to 0,

1+r+r^2+r^3+ ... +r^n=[1-r^(n+1)]/(1-r)

(Here r^n denotes the n'th power of n.)

Relevance
• Puggy
Lv 7

1 + r + r^2 + r^3 + ... + r^n = [1 - r^(n + 1)] / (1 - r), for n >= 0.

What we want to do is solve this using mathematical induction, start at n = 0.

Base case:

Let n = 0. Then, the left hand side will be

LHS = 1... 1 = 1, and

RHS = [1 - r^(0 + 1)] / (1 - r) = [1 - r] / [1 - r] = 1

So the formula holds true for n = 0

Inductive step:

Assume the formula holds true for n = k. That is,

1 + r + r^2 + r^3 + ... + r^k = [1 - r^(k + 1)] / (1 - r)

Then the sum of the first (k + 1) terms would be the same as the sum of the first k terms, plus the (k + 1)th term. That is

1 + r + r^2 + r^3 + ... + r^(k + 1) = {1 + r + r^2 + ... r^k} + r^(k + 1)

But, look at the terms I placed in the { } brackets; by our induction hypothesis, this is equal to [1 - r^(k + 1)] / (1 - r). Therefore

1 + r + r^2 + r^3 + ... + r^(k + 1) = [1 - r^(k + 1)] / (1 - r) + r^(k + 1)

Putting them under a common denominator,

1 + r + r^2 + r^3 + ... + r^(k + 1) =

[1 - r^(k + 1)] / (1 - r) + (1 - r) r^(k + 1) / (1 - r)

Putting them under a single denominator,

1 + r + r^2 + r^3 + ... + r^(k + 1) =

[1 - r^(k + 1) + (1 - r) r^(k + 1)] / (1 - r)

Distributing the r^(k + 1) over the (1 - r), we have

1 + r + r^2 + r^3 + ... + r^(k + 1) =

[1 - r^(k + 1) + (r^(k + 1) - r*r^(k + 1)] / (1 - r)

Simplifying some more, note that r*r(k + 1) would be r^(k + 2).

1 + r + r^2 + r^3 + ... + r^(k + 1) =

[1 - r^(k + 1) + r^(k + 1) - r^(k + 2) ] / (1 - r)

But, we have two terms that cancel each other out.

1 + r + r^2 + r^3 + ... + r^(k + 1) = [1 - r^(k + 2)] / (1 - r)

OR,

1 + r + r^2 + r^3 + ... + r^(k + 1) = [1 - r^( (k + 1) + 1 ) / (1 - r)

Which proves that the formula holds true for n = k + 1.

Therefore, by the principal of mathematical induction, the formula holds true for all n > = 0.

• ?
Lv 4
4 years ago

words=0:a million:1000 %change the 1000 as had to work out what the sum procedures r= %Set inspite of r is an same as right here sum=0; for i = a million to length(words) sum=sum+a million / r^words(i); end sum %this may output your answer to the command window. Edit: After filing this the day previous to this, i realized it may likely be extra effective to have the loop run till the quantity added in a unmarried generation became less than a particular quantity.

• Philo
Lv 7

You don't have to ask twice.

Let S = 1 + r + r² + ... + r^n

multiply by r, get Sr = r + r² + r^3 + ... + r^n + r^(n+1)

subtract the 2 equations, lining up like terms.

S - Sr = 1 + r - r + r² - r² + ... + r^n - r^n - r^(n+1)

S - Sr = 1 - r^(n+1)

S(1 - r) = 1 - r^(n+1)

S = [1 - r^(n+1)] / (1 - r)

• Anonymous