1/6 (2 sqrt(3) tan^(-1)((-1 + 2 n)/sqrt(3)) + 2 log(1 + n) - log(1 - n + n^2))