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
$$
 A: Start with the well known? expansion of $\cot z$ and differentiate,
$$\cot z = \sum_{n=-\infty}^\infty \frac{1}{z - n\pi}
\implies \frac{1}{\sin(z)^2} = \sum_{n=-\infty}^\infty \frac{1}{(z - n\pi)^2}
\implies \frac{\pi^2}{\sin(\pi z)^2} = \sum_{n=-\infty}^\infty \frac{1}{(z - n)^2}
$$
Substitute $z$ by $-\frac{1+\alpha}{2}$, we get
$$\frac{\pi^2}{4\cos(\frac{\pi\alpha}{2})^2} = \sum_{n=-\infty}^\infty\frac{1}{(2n+1+\alpha)^2}\tag{*1}$$
In the RHS of above sum, if we index those negative $n$ as $-(m+1)$, we have
$$\frac{1}{(2n+1 + \alpha)^2} = \frac{1}{(2m+1 - \alpha)^2}$$
This means one can rewrite $(*1)$ as
$$\frac{\pi^2}{4\cos(\frac{\pi\alpha}{2})^2} = \sum_{n=0}^\infty \left(\frac{1}{(2n+1 + \alpha)^2} + \frac{1}{(2n+1 - \alpha)^2}\right)\tag{*2}$$
When $\alpha = \frac{a}{3}$ where $a$ is an even integer with $\gcd(a,3) = 1$,
$\cos(\frac{\pi\alpha}{2}) = \pm \frac12$.
RHS$(*2)$ reduces to $\frac{\pi^2}{4\left(\frac12\right)^2} = \pi^2$ as desired.
A: Alternatively, let's consider
$$f(a)=\sum_{n=0}^{\infty }\left(\frac{3}{2n+1-\frac{a}{3}}-\frac{3}{2n+1+\frac{a}{3}}\right)=9\sum_{n=0}^{\infty }\left(\frac{1}{6n+3-a}-\frac{1}{6n+3+a}\right)$$
so that our original sum is $f'(a)$.
$$\begin{align}
f(a)&=9\sum_{n=0}^{\infty }\int_0^1 \left(x^{6n+2-a}-x^{6n+2+a}\right)\,dx\\
&=9\int_0^1\sum_{n=0}^{\infty }\left(x^{6n+2-a}-x^{6n+2+a}\right)\,dx\\
&=9\int_0^1\left(\frac{x^{2-a}-x^{2+a}}{1-x^6}\right)\,dx\\
&=\frac{3}{2}\int_0^1\left(\frac{t^{-\large\frac{3+a}{6}}-t^{-\large\frac{3-a}{6}}}{1-t}\right)\,dt\\
&=\frac{3}{2}\left(\psi\left(\frac{3+a}{6}\right)-\psi\left(\frac{3-a}{6}\right)\right)\\
&=\frac{3\pi}{2}\cot\left(\frac{3-a}{6}\pi\right)
\end{align}$$
See the integral representation and the reflection formula of digamma function. Therefore
$$f'(a)=\sum_{n=0}^{\infty }\left[\frac{1}{\left(2n+1-\frac{a}{3}\right)^2}+\frac{1}{\left(2n+1+\frac{a}{3}\right)^2}\right]=\frac{\pi^2}{4}\sec^2\left(\frac{\pi a}{6}\right)$$
then it follows $f'(a)=\pi^2$ for $a\ge4$ and $\text{gcd }(a,3)=1$.
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$

With $\ds{a\ \geq\ 4}$ an even integer and $\ds{{\rm gcd}\pars{a,3} = 1}$:

\begin{align}&\color{#66f}{\large\sum_{n\ =\ 0}^{\infty}%
\bracks{{1 \over \pars{2n + 1 + a/3}^{2}} + {1 \over \pars{2n + 1 - a/3}^{2}}}}
\\[5mm]&={1 \over 4}\bracks{%
\sum_{n\ =\ 0}^{\infty}{1 \over \pars{n + 1/2 + a/6}^{2}}+
\sum_{n\ =\ 0}^{\infty}{1 \over \pars{n + 1/2 - a/6}^{2}}}
\\[5mm]&={1 \over 4}\bracks{%
\Psi'\pars{\half + {a \over 6}} + \Psi'\pars{\half - {a \over 6}}}
\end{align}

where $\ds{\Psi\pars{z}}$ is the
  Digamma Function
  $\ds{\bf 6.3.1}$ and we used the identity $\ds{\bf 6.4.10}$
  $\ds{\Psi^{\rm\pars{m}}\pars{z} = \pars{-1}^{\rm m}\,{\rm m}!\sum_{k\ =\ 0}^{\infty}{1 \over \pars{k + z}^{\rm m + 1}}\,,\ z\not=0,-1,-2,\ldots}$

With Euler Reflection Formula
${\bf 6.4.7}$
$\ds{\Psi^{\rm\pars{m}}\pars{1 - z}
+ \pars{-1}^{\rm m + 1}\Psi^{\rm\pars{m}}\pars{z}
=\pars{-1}^{\rm m}\,\pi\,\totald[\rm m]{\cot\pars{\pi z}}{z}}$ we'll get
\begin{align}&\color{#66f}{\large\sum_{n\ =\ 0}^{\infty}%
\bracks{{1 \over \pars{2n + 1 + a/3}^{2}} + {1 \over \pars{2n + 1 - a/3}^{2}}}}
={1 \over 4}\bracks{-\pi\,\totald{\cot\pars{\pi z}}{z}}_{z\ =\ 1/2\ -\ a/6}
\\[5mm]&={1 \over 4}\,\pi^{2}\csc^{2}\pars{\pi\bracks{\half - {a \over 6}}}
={1 \over \bracks{2\cos\pars{\pi a/6}}^{2}}\,\pi^{2}
\end{align}

However $\ds{a = 4,8,10,14,16,20,22,26\,\ldots}$ By subtracting multiples of $\ds{6}$ to that sequence we'll get $\ds{4,2,4,2,4,2,4,2\ldots}$ It's clear that $\ds{\cos\pars{\pi a/6} = \pm 1/2}$ because $\ds{\cos\pars{\pi\, 4/6} = -1/2}$
  and $\ds{\cos\pars{\pi\, 2/6} = 1/2}$. So,

\begin{align}&\color{#66f}{\large\sum_{n\ =\ 0}^{\infty}%
\bracks{{1 \over \pars{2n + 1 + a/3}^{2}} + {1 \over \pars{2n + 1 - a/3}^{2}}}}
=
\color{#66f}{\large \pi^{2}}
\end{align}
A: 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$.
