How many functions g can be defined from set $A=\{0,1,...,2^n-1,2^n\}$ to set $B=\{0,...,n\}$ such that $g(2^x)=x$ for all $x \in B$?
CURRENT ATTEMPT
$A=\{0,1,...,2^n-1,2^n\}$
$B=\{0,...,n\}$
$g(2^x)=x$ for all $x$ in $B$
$g:A \rightarrow B$
let $g^n(x)=\frac{1}{\log_n(2)}\log_n(x)$
$\therefore g^n(2^x)= \frac{1}{\log_n(2)}log_n(2^x)=x$
which is true for all $x \in B$ and real $n$
Hence there are an infinite number of functions of the form $g^n(x)$ as $n$ varies continuously in the interval $(0, \infty)$.
I am not sure I have done the right thing so I wanted to see what the community thinks.
What you have defined as $g^n(x)$ is in fact just $\log_2 x$, independent of $n$. That does not give infinitely many different functions. That also isn't a function from $A$ to $B$ because $g(0)$ is not defined (and some values in $A$ get mapped to a non-integer for $n\ge2$).
The given condition fixed $g(x)$ for $x\in\{2^k:k\in B\}=\{1,2,4,\dots,2^n\}$. For all the remaining numbers in $A$, $g(x)$ can be any of the $n+1$ numbers in $B$. Since there are $2^n-n$ elements in $A$ remaining, there are $(n+1)^{2^n-n}$ function satisfying the condition.