I have the following step function I am working with:
Upon plotting these, I realize I have a step function, specifically a floor function. Basically, for every power of 2, I use the function $$n^3 - n^2$$
For instance, values between 2 and 4 (exclusive) should equal 4, as $ 2^3 - 2^2 = 4$.
Similarly, values from 4 to 8 (exclusive) should equal 18, as $ 3^3 - 3^2 = 18$.
And finally, values from 8 to 16 (exclusive) should equal 48, as $ 4^3 - 4^2 = 18$.
For a range of values, namely up to but excluding what $ 2^n $ actually is, should equal $n^3 - n^2$ as the output. I've included a Desmos graph as well: Desmos graph. I'm envisioning this to be a floor function but am just unsure of how to write it. Thanks in advance.
I figured out the solution after playing around with logarithms in floor functions this morning! I believe it's
$$ f(x) = (\lfloor{lg (2x)}\rfloor)^3 - (\lfloor{lg (2x)}\rfloor)^2$$ in which $ lg$ is the binary logarithm.