solving inequality contains logarithm I have the following inequality:
$$0.39n\log(n) \leq S \leq 0.5n\log(n)$$
How can I find a proper range for $n$?
I can have something like: $$10^{S/0.5} \leq n^n \leq 10^{S/0.39}$$
But it's not merely based on $n$, also it'll produces a large number for most of the numbers and will cause overflow in computer's memory.
 A: As MrYouMath commented, using Lambert function could be a good way to avoid loops.
The solution of $a n \log(n)=S$ is given by
$$n=\frac{\left(\frac Sa\right)}{ W\left(\frac{S}{a}\right)}$$
Assuming that $S$ is a large number, the Wikipedia page gives approximations for large values of the argument
$$W(x)=L_1-L_2+\frac{L_2}{L_1}+\frac{L_2(L_2-2)}{2L_1^2}+\frac{L_2(6-9L_2+2L_2^2)}{6L_1^3}+\cdots$$ where $L_1=\log(x)$ and $L_2=\log(L_1)$.
A: Fix the $S$ that you are looking for. The inequality that you want to solve is
$$n\log n \leq \frac{S}{0.39} $$
and
$$\frac {S}{0.50} \leq n\log n .$$ 
It is easy to evaluate $n\log n$
Determine $1\log 1,2\log 2, \ldots, k\log k$, if $k\log k$ is the first number to surpass $S/0.39$ then $n<k$. For the right-hand side. Use the same method for the second inequality. Note that you can use the previous results and continue until $K\log K$ which is the first number which is larger than $S/0.50$ then $n\geq K$.
If you want to find the limit's depending on $S$ then you will have to use the method described by Claude Leibovici.
