Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have the following exponential series:

$$S = ar^0 + ar^1 + ar^2 + \cdots + ar^n$$

I know $S$, $r$ and $n$. How do I find $a$?

I actually need this done by a script so all "crazy" methods like doing an operation $n$ times are ok.

share|improve this question
3  
This is a geometric series. –  Raskolnikov Apr 14 '11 at 12:28
    
I changed the title. –  Américo Tavares Apr 15 '11 at 11:55
add comment

1 Answer

up vote 7 down vote accepted

As Raskolnikov points out this is a geometric series. Sum is given by $$S = a \cdot \frac{r^{n+1}-1}{r-1}$$

Substitute the value of $S,r,n$ to get $a$

share|improve this answer
    
actually by the link Raskolnikov gave its $S = a \cdot \frac{r^{n+1}-1}{r-1}$ because my series terminates in $n$ not $n-1$ –  Dani Apr 14 '11 at 12:36
    
@Dani: Yes, Dani because here there are $n+1$ terms. The formula which I gave was for $n$ terms. –  user9413 Apr 14 '11 at 12:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.