One line solution in Kotlin | Math | Logarithm
Code


# Code
```kotlin []
class Solution {
    fun smallestNumber(n: Int): Int {
    return (2.00.pow(log2(n.toDouble()).toInt().toDouble() + 1.00) - 1.00).toInt()    
    }
}
```
['Kotlin']