sum log(2/(1+cos(1/n)))