Series shown up in Quantum Mechanics Here is the series, by some concepts in quantum mechanics, it should be 1, however, I don't know how to prove it. Could someone show me the proof? Thanks.
$$\lim_{k\to \infty}\sum_{n=1}^{k} \frac{4}{n^2\pi^2}(1-\cos\frac{n\pi}{2})^2
$$

Let $S$ be defined as
$$
S=\frac{4}{\pi^2}\sum_{k\geq 1}\frac{1}{k^2}\left(1-\cos\left(\frac{\pi k}{2}\right)\right)^2
$$
Decompose $S$ according to the remainder of $n$ modulo $4$. 
Since $\cos(\pi n/2)=1$ for $n=0 \mod 4$ one part of the sum exactly cancels. Furthermore $\color{blue}{\cos(n\pi/2)=0}$ for $\color{blue}{n=1,3\mod 4}$ and $\cos(n\pi/2)=-1$ for $n=2\mod 4$ which means that we can equally write
$$
S=\frac{4}{\pi^2}\sum_{k\geq 0}\left(\color{blue}{\frac{1}{(4k+1)^2}+\frac{1}{(4k+3)^2}}+\frac{2^2}{(4k+2)^2}\right)=\frac{4}{\pi^2}\sum_{k\geq 0}\left(\color{blue}{\frac{1}{(2k+1)^2}}+\frac{2^2}{(4k+2)^2}\right)=\\\frac{4}{\pi^2}\sum_{k\geq 0}\left(\color{blue}{\frac{1}{(2k+1)^2}}+\frac{1}{(2k+1)^2}\right)=\frac{8}{\pi^2}{\sum_{k\geq 0}\frac{1}{(2k+1)^2}}
$$
or

$$
S=1
$$

Since 
$$
{\sum_{k\geq 0}\frac{1}{(2k+1)^2}}=\sum_{k\geq 1}\frac{1}{k^2}-\sum_{k\geq 1}\frac{1}{(2k)^2}=\frac{\pi^2}{6}-\frac{1}{4}\frac{\pi^2}{6}={\frac{\pi^2}{8}}
$$
From a number theoretical view we can identify the sum as 
$$
S=\frac{4}{\pi^2}L(\chi_1,2)=\frac{4}{\pi^2}\sum_{n\geq1}\frac{(1-\chi_1(n))^2}{n^2}
$$
where $\chi_1(n)$ is the non-trivial Dirichlet character associcated with the map $Z/4Z\rightarrow \mathbb{S_1}$
