Solving s<=n log n for smallest n where log_2 is log base 2. Is there an efficient way to compute n?

seguitzi2

seguitzi2

Answered question

2022-10-07

Solving s n log n for smallest n
I am given an arbitrary positive integer s. I want to find the smallest integer n such that
s n log 2 n
where log 2 is log base 2
Is there an efficient way to compute n?

Answer & Explanation

Clare Acosta

Clare Acosta

Beginner2022-10-08Added 7 answers

s n log 2 ( n )
s n log n log 2
s log 2 n log n
s log 2 e log n log n
Using the Lambert W function and the fact that you want the smallest n, we have
log n = W ( s log 2 )
n = e W ( s log 2 ) = s log 2 W ( s log 2 )
As others have stated, you'll need a computer to evaluate this.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?