I asked a question on cs.stackexchange.com and I eventually (some days after) answered myself(After some research). I want to know the time complexity of my answer. But my math is too weak for it. I used Wolfram Alpha to arrive at a function for the time complexity of my answer. I need to convert that function to Big-Oh notation.
Here's the relevant part of my answer:
The usual worst case is when
a = 1. The first instance will run $\lfloor{\lg b}\rfloor$ times. Then it's $\lfloor{\lg(\frac{b}{2})}\rfloor$, then $\lfloor{\lg(\frac{b}{4})}\rfloor$ until it gets to $\lfloor{\lg(\frac{b}{b})}\rfloor$ which will give 0.
This will give $$\sum_{i=0}^n \log_2\left(\frac{b}{2^i}\right)$$
This is equal to $$\sum_{i=0}^{n} \log_2\left(\frac{2^n}{2^i}\right)\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, (1.0)$$ Because $b = 2^n$ (explained below).
However if we denote $n$ by the number of bits needed to represent $b$, then $n = \lceil{\log_2(b)}\rceil$. Thus, $b = 2^n - k$ where $k: 0 \le k \le 2^{n-1}$. To Big-Oh notation, $k$ is irrelevant, so we can just treat $b$ as $2^n$.
Plugging this into Wolfram Alpha yielded an unhelpful result.
Now to convert this to Big-Oh and Big-Theta Notation,.
I want to express $(1.0)$ as a Big-Theta function of $n$. Help please.
EDIT There was a major error in my formula, I corrected it and it drastically changed the question, invalidating the original answer.
Now to convert this to Big-Theta Notation,.
Note, that $(1.0)$ is $\log_2(\frac{2^n}{2^0}) + \log_2(\frac{2^n}{2^1}) + \log_2(\frac{2^n}{2^2}) + \dots + \log_2(\frac{2^n}{2^n})$
Also note that $\frac{2^n}{2^i} = 2^{n-i}$
Also, $\log_2(2^{n-i}) = (n-i)(\log_2{2^2})$ this gives $n-i$
Thus, $(1.0)$ can be restated as: $$\sum_{i=0}^n {n-i}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, (2.0)$$ This ks the sum of the natural numbers to $n$ this gives $$\frac{n\cdot(n + 1)}{2} \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, (3.0)$$
We can see that $(3.0)$ is trivially $\Theta(n^2)$