<s>[INST] Solve $\sum_{k=0}^{\infty}\frac{1}{1-16k^2}$ I could use some help on calculating this infinite sum: $\sum_{k=0}^{\infty}\frac{1}{1-16k^2}$. Included was that I had to start with a Fourier series for the function $f:\Re \to \Re: x \mapsto \sin(x)$ for $x\in[0, \frac{\pi}{2}[$, so let's start with that.
Let 
\begin{eqnarray*}
g(x) = \frac{a_0}{2} + \sum_{k=1}^{\infty}a_k\cos(4kx) + \sum_{k=1}^{\infty}b_k\sin(4kx).
\end{eqnarray*} 
This is the Fourier series for $f$.
With $a_k = \frac{4}{\pi}\int_{0}^{\frac{\pi}{2}}\sin(x)\cos(4kx)dx$ and $b_k = \frac{4}{\pi}\int_{0}^{\frac{\pi}{2}}\sin(x)\sin(4kx)dx$. Solving this leads to (or at least I found that): $a_k = \frac{4}{(1-16k^2)\pi}$, $b_k = \frac{16k}{(1-16k^2)\pi}$ for $k\geq1$ and $a_0 = \frac{4}{\pi}$. Bringing this to $g(x)$ gives:
\begin{eqnarray*}
g(x) = \frac{2}{\pi} + \sum_{k=1}^{\infty}\frac{4}{(1-16k^2)\pi}\cos(4kx) + \sum_{k=1}^{\infty}\frac{16k}{(1-16k^2)\pi}\sin(4kx). 
\end{eqnarray*}
Since $f(x) \approx g(x)$, we can say that $f(0) = g(0)$. We get 
\begin{eqnarray*}
\sin(0) = \frac{2}{\pi} + \sum_{k=1}^{\infty}\frac{4}{(1-16k^2)\pi}\cos(0) + \sum_{k=1}^{\infty}\frac{16k}{(1-16k^2)\pi}\sin(0),
\end{eqnarray*}
this becomes 
\begin{eqnarray*}
0 = \frac{2}{\pi} + \sum_{k=1}^{\infty}\frac{4}{(1-16k^2)\pi}.
\end{eqnarray*}
We get 
\begin{eqnarray*}
\frac{-2}{\pi} = \frac{4}{\pi}\sum_{k=1}^{\infty}\frac{1}{1-16k^2}
\end{eqnarray*} so 
\begin{eqnarray*}
\sum_{k=1}^{\infty}\frac{1}{1-16k^2} = \frac{-1}{2}.
\end{eqnarray*} We need the sum from k = 0. The term $\frac{1}{1-16k^2}$ for k = 0 gives 1, so we add 1 to both sides. This leads to my solution 
\begin{eqnarray*}
\sum_{k=0}^{\infty}\frac{1}{1-16k^2} = \frac{1}{2}.
\end{eqnarray*}
However, when approaching this sum numerically and using Wolfram, I find that the sum should be $\frac{4+\pi}{8}$. Could some help and point out where I went wrong with my approach? Thanks in advance
 [/INST] Maybe it is interesting to see that this series can be easily calculated with the residue theorem. Observing that $$S=\sum_{n\geq0}\frac{1}{1-16n^{2}}=\frac{1}{2}\sum_{n\in\mathbb{Z}}\frac{1}{1-16n^{2}}+\frac{1}{2}$$ and using $$\sum_{n\in\mathbb{Z}}f\left(n\right)=-\sum\left\{ \textrm{Res}\left(\pi\cot\left(\pi z\right)f\left(z\right)\right)\textrm{ at }f\left(z\right)\textrm{'s poles}\right\} $$ and observing that we have poles at $z=\pm\frac{1}{4}$ we get $$S=\color{red}{\frac{\pi}{8}+\frac{1}{2}}$$ as wanted.
</s>