Using Mathematica I notice that
$\cot^2(\pi/2)=0$
$\cot^2(\pi/3)+\cot^2(2\pi/3) = 2/3 $
$\cot^2(\pi/4)+\cot^2(2\pi/4)+\cot^2(3\pi/4) = 2$
$\cot^2(\pi/5)+\cot^2(2\pi/5)+\cot^2(3\pi/5)+\cot^2(4\pi/5) = 4$
$\cot^2(\pi/6)+\cot^2(2\pi/6)+\cot^2(3\pi/6)+\cot^2(4\pi/6)+\cot^2(5\pi/6) = 20/3$
It seems that the summation of below series
$\cot^2(\pi/k)+\cot^2(2\pi/k)+\cdots+\cot^2((k-1)\pi/k)$
is an integer when $k$ and $3$ are comprime and $N/3$ when $k$ is multiple of $3$. Why is that?