Algorithm for root function $[2^{n-1}]$

54 Views Asked by At

I am attempting to convert this function $[2^{n-1}]$ into a root function to return original value. Thus far all my attempts have ended in abject failure.

Base : 1 2 3 4 5 6 7 8 9

Result : 1 2 4 8 16 32 64 128 256

Trying to get a algorithm to take the Returns number and revert it into base.

Thanks in advance.

Finally figured it out, in excel format it is "=Log(Result,2)+1"

1

There are 1 best solutions below

0
On

(To cut down on unanswered questions.) As you seem to have determined, the following are equivalent: $$y=2^{n-1}\\n-1=\log_2y\\n=1+\log_2y$$ $f(x)=1+\log_2x$ is the desired inverse function, then.