Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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|cite|improve this question
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
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|cite|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

Your Answer


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.