((n+1)*ceil(log2(n+1)) - 2^ceil(log2(n+1)) + 1)/n