Let $\phi(x)=\begin{cases}0, & 0\lt x\lt 1\\ 1, & 1\lt x\lt3 \end{cases}$
We have that the Fourier cosine series is given by $$\phi(x)=\begin{cases}0, & 0\lt x\lt1\\ \frac{4}{3}+\displaystyle\sum_{m=1}^{\infty}\frac{-2\sin\frac{m\pi}{3}}{m\pi}\cos\frac{m\pi x}{3}, & 1\lt x\lt3 \end{cases}$$
Put $x=0$ to find the sum
$\displaystyle 1+\frac{1}{2}-\frac{1}{4}-\frac{1}{5}+\frac{1}{7}+\frac{1}{8}-\frac{1}{10}-\frac{1}{11}+\cdots$
I tried the following
$$\phi(0)=\frac{4}{3}+\sum_{m=1}^{\infty}\frac{-2\sin\frac{m\pi}{3}}{m\pi}\\=\frac43-2\frac{\sin\frac{\pi}{3}}{\pi}-\frac{\sin\frac{2\pi}{3}}{\pi}-2\frac{\sin\pi}{3\pi}-\frac{\sin\frac{4\pi}{3}}{2\pi}-\cdots\\=\frac{4}{3}-\frac{\sqrt3}{\pi}-\frac{\sqrt3}{2\pi}-0+\frac{\sqrt3}{4\pi}\dots=\frac{4}{3}-\frac{\sqrt3}{\pi}(1+\frac{1}{2}-\frac{1}{4}\dots)=\ ? $$
And I'm stuck here,
What can I do here?
I greatly appreciate any assistance you may provide.
The key observation, which will be exploited below in computing the series $$ S=\sum_{n=1}^\infty\frac{\sigma_n}{n}, $$ where $\sigma_n$ is repeating sequence of $(1,1,0,-1,-1,0)$, is that $$ \sigma_n=\frac{2}{\sqrt3}\sin\frac{\pi n}{3}. $$ It follows: $$ S=\frac{2}{\sqrt3}S',\text{ with } S'=\sum_{n=1}^\infty\frac{\sin\frac{\pi n}{3}}{n}.\tag{1} $$ It appears to be simpler to compute directly $S'$. Two approaches to perform this are given below.
The first way, suggested in question, exploits the Fourier series of the even periodic function: $$ \phi(x)=\begin{cases} 0& -1<x<1\\ 1& -3<x<-1\text{ or } 1<x<3 \end{cases};\quad\phi(x+6)=\phi(x), $$ which is: $$ \phi(x)=\frac{2}{3}-\sum_{n=1}^\infty\frac{2\sin\frac{\pi n}{3}}{\pi n}\cos\frac{\pi n x}{3}.\tag{2} $$ Substituting in (2) $x=0$ one obtains: $$ 0=\phi(0)=\frac{2}{3}-\sum_{n=1}^\infty\frac{2\sin\frac{\pi n}{3}}{\pi n}= \frac{2}{3}-\frac{2}{\pi}S'\Rightarrow S'=\frac{\pi}{3}. $$
The second way is more direct as it does not rely on a foreknowledge of an appropriate function for Fourier series. Observe that for $|x|<1$: $$ \sum_{n=0}^\infty{x^n\sin\frac{\pi n}{3}}=\frac{1}{2i}\left(\frac{1}{1-xe^{\frac{\pi i}{3}}}-\frac{1}{1-xe^{-\frac{\pi i}{3}}}\right) =\frac{x\sin\frac{\pi}{3}}{1-2x\cos\frac{\pi}{3}+x^2}=\frac{\sqrt{3}}{2}\frac{x}{1-x+x^2}. $$
Thus, $$ S'=\sum_{n=1}^\infty\frac{\sin\frac{\pi n}{3}}{n}=\sum_{n=1}^\infty\sin\frac{\pi n}{3}\int_0^1 x^{n-1}dx=\frac{\sqrt3}{2}\int_0^1\frac{dx}{1-x+x^2}=\frac{\pi}{3}. $$
Finally the sum in question is computed using (1) as: $$ S=\frac{2}{\sqrt3}S'=\frac{2\pi}{3\sqrt3}. $$