Power function in log(n)