For context, I created code of the form:
A = 0.125
n = 20
x = 1.1
for (int i = 0; i < 20; i++) {
A = A * x
}
B = A
But I don't necessarily always want to get to this particular $B$ value (0.8409378, unless I miscalculated) via 20 iterations. I may want to get to B via 30 iterations, with $x$ naturally needing modified. But I don't know how to modify $x$ given different values of $n$ such that I get from $A$ to $B$ every time.
How do I algorithmically find this relationship of $x:n$? What is the term for this kind of algorithm in mathematics?
Solving the equation @the_candyman derived, yields:
$$B=Ax^n$$ $$\sqrt[n]{B}=\sqrt[n]{A}x$$ $$x=\sqrt[n]{\frac BA}$$
So as long as $A$, $B$ and $n$ are known, you can figure out what x is :)