3. Let $n \geqslant 3$ be a positive integer. Then
$$
\sum_{k=1}^{n} \arctan \frac{1}{k^{2}+k+1}=
$$
$\qquad$
$\begin{array}{l}\text { 3. } \arctan (n+1)-\frac{\pi}{4} \text {. } \\ \text { From } \arctan \frac{1}{n^{2}+n+1} \\ =\arctan (n+1)-\arctan n \\ \Rightarrow \sum_{k=1}^{n} \arctan \frac{1}{k^{2}+k+1} \\ =\arctan (n+1)-\frac{\pi}{4} \text {. }\end{array}$