Decreasing power?

82 Views Asked by At

Say you have numbers X and Y

When Y is 1 you want to times X by .5,

When Y is 2 you want to times X by .5 then by .25,

When Y is 3 you want to times X by .5, then by .25 then by .125, and so on.

How can I do that in a spreadsheet? It's like a ^ but it halves itself every step?

2

There are 2 best solutions below

5
On

What you need to get this effect is to do the following:

Let $Z = \prod_{i=1}^Y 2^i$ so what you want to do is multiply $X$ by $Z^{-1}$.

Now, we get that $$Z = 2^{\sum_{i=1}^Y i} = 2^{\frac{Y(Y+1)}{2}}$$

So this is the number you need to multiply by the inverse of.

3
On

Seems you'd like a function $x = f(y)$.

As you are saying, when the variable $y$ increases by one, the function $x$ has the same values for $y-1$, plus the last term multiplied by $\frac{1}{2}$. To better understand, you are dealing with the geometric series

$$\frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \cdots$$

that is

$$\sum_{n=0}^{\infty} \frac{1}{2}\frac{1}{2^n} $$

Now, since a closed form for a geometric series is $a\frac{1-r^n}{1-r}$, and since in this case we have $a = r = \frac{1}{2}$, the function $x$ can be defined as

$$x = \frac{1}{2} \frac{1-\frac{1}{2^y}}{\frac{1}{2}} = 1-\frac{1}{2^y}$$