How to find $$\sum_{k=1}^{\infty} \frac{k^2-1}{k^4+k^2+1}$$
I try something like this:
$$\begin{align*}\sum_{k=1}^{\infty} \frac{k^2-1}{k^4+k^2+1}=\sum_{k=1}^{\infty}\frac{k^2}{k^4+k^2+1}-\sum_{k=1}^{\infty}\frac{1}{k^4+k^2+1}.\end{align*}$$
Using fact that $$\sum_{k = 1}^{n}{\frac{1}{k^4+k^2+1}}=\frac{1}{2}\cdot\frac{n+1}{n^2+n+1}+\frac{1}{2}\cdot\sum_{k = 1}^{n-1}{\frac{1}{k^2+k+1}}$$ we find that $$\begin{align*}\sum_{k=1}^{\infty}\frac{1}{k^4+k^2+1} &=\frac{1}{2}\cdot\sum_{k=1}^{\infty}{\frac{1}{k^2+k+1}}\\ &=\frac{1}{6}\left(\sqrt{3}\pi \tanh{\left(\frac{\sqrt{3}\pi}{2}\right)}-1\right).\end{align*}$$
But I don't know how to find $\displaystyle\sum_{k=1}^{\infty}\frac{k^2}{k^4+k^2+1}.$
If someone want to know how to evaluate $\displaystyle\sum_{k=0}^{\infty}\frac{1}{k^2+k+1}$:
First, $$\displaystyle\sum_{k=0}^{\infty} \frac{1}{k^2+k+1}=\sum_{k=0}^{\infty}{\frac{1}{\left(k+\frac{1}{2}\right)^2+\left(\frac{\sqrt{3}}{2}\right)^2}}.$$ Now, using "well-know" formula $$\displaystyle\cos(\phi)=\prod_{k=0}^{\infty}{\left( 1-\frac{4\phi^2}{(2k+1)^2\pi^2}\right)}$$ we find that $$\displaystyle\log (\cos(\phi))=\sum_{k=0}^{\infty}{\log\left( 1-\frac{4\phi^2}{(2k+1)^2\pi^2}\right)}$$ and then we attack with $\dfrac{d}{d\phi}$ and find $$\displaystyle\tan(\phi)=\sum_{k=0}^{\infty}{\frac{8\phi}{(2k+1)^2\pi^2-4\phi^2}}.$$ Let $\phi=\pi\alpha\cdot i$, then we get $$\displaystyle\tan(\pi\alpha\cdot i)=i\cdot\tanh(\pi\alpha)=i\cdot\sum_{k=0}^{\infty}{\frac{8\pi\alpha}{(2k+1)^2\pi^2+4\pi^2\alpha^2}}=\frac{2\alpha i}{\pi}\cdot\sum_{k=0}^{\infty}{\frac{1}{\left(k+\frac{1}{2}\right)^2+\alpha^2}}.$$ So, we find that $$\displaystyle\sum_{k=0}^{\infty}{\frac{1}{\left(k+\frac{1}{2}\right)^2+\alpha^2}}=\frac{\pi}{2\alpha}\cdot\tanh(\pi\alpha).$$ Let $ \alpha=\dfrac{\sqrt{3}}{2}.$ We get $$\displaystyle\sum_{k=0}^{\infty}{\frac{1}{\left(k+\frac{1}{2}\right)^2+\left(\frac{\sqrt{3}}{2}\right)^2}}=\frac{\sqrt{3}\pi}{3}\cdot\tanh\left(\frac{\sqrt{3}\pi}{2}\right)$$ or $$\displaystyle\sum_{k=0}^{\infty} \frac{1}{k^2+k+1}=\frac{\sqrt{3}\pi}{3}\cdot\tanh\left(\frac{\sqrt{3}\pi}{2}\right).$$