1

Apologies, complete math novice here

I have a number, x. I want to divide this by another number, y (to be determined), such that when you repeatedly divide this and add the value to x, eventually you'll reach <1 after z times.

E.g. if we consider x = 400, and we want to take 20 iterations, our solution is approx 3.73, because:

#1: 400 / 3.73 = 107, x = 400-107 = 293

#2: 293 / 3.73 = 78.5, x = 293 - 78.5 = 214.5

#3: 214.4 / 3.73 = 57.5, x = 214.5 - 57.5 = 157

And so on... after 20 iterations we'll get an answer of <1

How can I determine the divisor in advance when I know what the initial values is (400), and the number of steps (20)?

Thank you

Background: I'm trying to build a number counter/rotator that cycles from a->b within a given time period (defined by the number of iterations, each iteration will take place in uniform time), where the rate of change progressively slows down the closer it reaches the target, i.e. in the above example it'll add 107, then 78.5, then 57.5, and so on, progressively slowing down as it gets closer to the target, finally reaching it (or close to) on the nth iteration.

JamShady
  • 119
  • 1
    If you start with 400, and repeatedly divide by 3.73, you gill get below 1 after only 5 divisions. With a denominator of 1.35, on the other hand, you would need 20 repeated divisions. – Arthur Mar 01 '22 at 15:24
  • you need to solve $x/y^n = 1$ for y, where x is your initial value and n the number of iterations. Then $y^n = x$ and y is the $n^{th}$ root of x, which you can do on the calculator. Any y bigger than this will then do. – Paul Mar 01 '22 at 15:24
  • Arthur, you're absolutely correct. I've mis-phrased the question. Each iteration is supposed to take off the sum of the previous. So 400 / 3.73 = 107. So the next iteration is (400 - 107) / 3.73 = 78.5. And then after that (400-107-78.5) / 3.73 = ...

    The idea is each division provides a smaller and smaller movement to edge the cumulative value towards the target. I'm sorry for the bad phrasing.

    – JamShady Mar 01 '22 at 15:30
  • In one iteration, the $x$ becomes

    $$x \mapsto x -\frac xy = x\left(1-\frac1y\right)$$

    So effectively, each iteration the starting value is multiplied by $1-\frac1y$. After $z$ iterations, the result will be $x\left(1-\frac1y\right)^z$.

    – peterwhy Mar 01 '22 at 15:48

0 Answers0