Consider the inverse factorial function, f(n) = k where k! is the greatest factorial <= n. I’ve been told that the inverse factorial function is O(log n / log log n). Is it true? Or is it just a really really good approximation to the asymptotic growth? The methods I tried all give things very close to log(n)/log log(n) (either a small factor or a small term in the denominator) but not quite.
Consider the inverse factorial function, f(n) = k where k! is the greatest factorial
Share
Remember that, when we’re using O(…), constant factors don’t matter, and any term that grows more slowly than another term can be dropped.
~means “is proportional to.”If
kis large, thenn = k! ~ k^k. Solog n ~ k log k, ork ~ log n / log kork ~ log n / log(log n / log k) = log n / (log log n - log log k). Becausen >> kwe can drop the term in the denominator, and we getk ~ log n / log log nsok = O(log n / log log n).