<s>[INST] How can I prove $\pi ^2=\sum_{n=0}^{\infty }\frac{1}{(2n+1+\frac{a}{3})^2}+\frac{1}{(2n+1-\frac{a}{3})^2}$ Proving this formula 
$$
\pi^{2}
=\sum_{n\ =\ 0}^{\infty}\left[\,{1 \over \left(\,2n + 1 + a/3\,\right)^{2}}
+{1 \over \left(\, 2n + 1 - a/3\,\right)^{2}}\,\right]
$$
if $a$ an even integer number so that
$$
a \geq 4\quad\mbox{and}\quad{\rm gcd}\left(\,a,3\,\right) = 1
$$
 [/INST] Here is another solution. Noting
$$\sum_{n=-\infty}^\infty f(n)= -\sum_{j=1}^k \operatorname*{Res}_{z=j}\pi \cot (\pi z)f(z) $$
we have
\begin{eqnarray}
&&\sum_{n=0}^{\infty}\left[{1 \over \left(2n + 1 + a/3\right)^{2}}
+{1 \over \left(2n + 1 - a/3\right)^{2}}\right]\\
&=&\sum_{n=-\infty}^{\infty}{1 \over \left(2n + 1 + a/3\right)^{2}}=\frac{1}{4}\sum_{n=-\infty}^{\infty}{1 \over \left(n + \frac{a+3}{6}\right)^{2}}\\
&=&-\frac14\text{Res}\left(\frac{\pi\cot(\pi z)}{\left(z + \frac{a+3}{6}\right)^{2}},z=-\frac{a+3}{6}\right)\\
&=&\frac{\pi^2}{4}(1+\tan^2(\frac{a\pi}{6}))\\
&=&\pi^2.
\end{eqnarray}
This becase $a$ is even and $\gcd(a,3)=1$ and $\tan(\frac{a\pi}{3})=\pm\sqrt 3$.
</s>