Solving for a variable in a summation problem? $$x=\sum_{N=1}^TA^N$$Say I have a problem like this , how would go about rewriting this equation so that I can solve for t using x and a? I don't know what the individual variables are called so I couldn't look it up using google. I am guessing that doing this isn't easy. So if it is as hard as I think it probably is maybe you could just give me a link explaining how to do this if it is even possible.
 A: The answer is... $$T =\frac{ \log (-X+XA+A) }{\log (A)}-1$$. I think $X$ and $A$ can't be less than one.
A: The notation used in the Question is slightly inconsistent, so let's fix attention on the variables used first, in the top equation:
$$ x = \sum_{N=1}^T A^N $$
Note that $N$ is a "bound variable" internal to the indicated summation, so $N$ is not a variable that will appear in an expression for $T$.
Since this is a geometric series with $T$ terms (a natural number, presumably $T \ge 1$), if $A\neq 1$, we can also say:
$$ x = A \frac{A^T - 1}{A - 1} $$
Thus $A^T = x \frac{A-1}{A} + 1 = x - \frac{x}{A} + 1$, provided $A\neq 0$.
Before proceeding to offer a solution involving logarithms, let's deal with the two special cases:
A = $0$ :  If $A=0$, the only possible value for $x$ is also zero.  In this case the value of $T$ can be any natural number, since the sum will always be zero however many summands are used.
A = $1$:  In this case $x = T$, the number of summands used ($x = 1+1+\ldots + 1$, added $T$ times).
Otherwise ($A\neq 0,1$) we can use logarithms to find $T$, although numerically we may not get an exact integer due to rounding of floating point operations.  If $A \gt 0$ we could say:
$$ T = \log_A (x \frac{A-1}{A} + 1) $$
For the ease of programming, and to deal with the case that $A$ (and possibly $x$) may be negative, we can introduce absolute values:
$$ |A|^T = \left|x \frac{A-1}{A} + 1 \right| $$
Now we can validly take logarithms (of any convenient base):
$$ T = \frac{ \log \left|x \frac{A-1}{A} + 1 \right| }{\log |A|} 
 = \frac{ \log \left|x - \frac{x}{A} + 1 \right| }{\log |A|} $$
