The binary logarithm[0]

of a Mersenne number

, having enough precision to

reconstruct

exactly after rounding

to an integer, ie.

<

is

.

----

The integral part of

is

. The fractional part of

consists of

binary ones.

For example:

Code:

n L L (base 2)
-------------------------------
1 0 0
2 1.5 1.1
3 2.75 10.11
4 3.875 11.111
5 4.9375 100.1111
...

[0]:

http://en.wikipedia.org/wiki/Binary_logarithm