I am trying to define a function that maps polynomials in the form of $x^{3^n}$ to the value of $n$ in the polynomial, where $n\in{Z}$.* Is is valid to define this function as $log_{x^3}(u)$, where $u \in [{x^{3^n}} : n\in{Z}]$?
On the one hand I'm uncomfortable because I'm putting a variable in the base of a logarithm, but on the other hand, I don't think it matters because that variable doesn't depend on the input or output of the logarithm, so we can think of it like a constant base. Does it make sense to define the function this way?
*If anyone could show me how to write a blackboard Z in latex, that would be great.
It's perfectly acceptable to have variable bases for logarithms. Keep in mind that $\log_ba=\frac{\log a}{\log b}$. Therefore, $\log_{x^3}u=\frac{\log u}{\log x^3}$, so you don't even have to think of it as being a variable base.