Explicitly finding the sum of $\arctan(1/(n^2+n+1))$

This is from a GRE prep book, so I know the solution and process but I thought it was an interesting question: Explicitly evaluate $$\sum_{n=1}^{m}\arctan\left({\frac{1}{{n^2+n+1}}}\right)$$.

-

This telescopes, using the fact that $\text{arctan}(u)-\text{arctan}(v) = \text{arctan}(\frac{u-v}{1+uv})$

Specifically take $u=n+1$ and $v=n$. Then $$\text{arctan}\left(\frac1{n^2+n+1}\right) = \text{arctan}(n+1)-\text{arctan}(n)$$

This gives $$\sum_{n=1}^{m}\arctan\left({\frac{1}{{n^2+n+1}}}\right) = \text{arctan}(m+1) - \pi/4$$

-

By observation, $\tan^{-1}\frac{1}{n^2+n+1}=\cot^{-1}(n^2+n+1)=\cot^{-1}\frac{n(n+1)+1}{n+1-n}$ $=\cot^{-1}(n)-\cot^{-1}(n+1)$

$\sum_{n=1}^{m}\tan^{-1}\left({\frac{1}{{n^2+n+1}}}\right)$ $=\frac{\pi}{4}-\cot^{-1}(m+1)$ using this.

-