<s>[INST] A curious summation. Months ago I was interested in calculating new infinite summations and was able to make a nice summation and also find its closed form as follows :
$$\sum \limits_{n=0}^{\infty } \frac{(-1)^{0+1+2+..+..+n}}{(2n+1)^2} = \frac{\sqrt{2}\pi ^2}{16}$$
And also that
$$\sum \limits_{n=0}^{\infty } \frac{(-1)^{0+1+2+..+..+n}}{(2n+1)^4}=\frac{11\sqrt{2}\pi ^4}{1536}$$
Now observe that the the summand contains two negatives and two positive entities alternatively after the first term which is $1$.

What now I want to work out for is the sum so that the summand follows the pattern of three negatives followed by three positives alternatively and so on.

Also what will be the closed form for this pattern. I mean that we can deduce that $(-1)^{1+2+..+..n}$ follows the pattern of 2 negatives and 2 positives similarly what single formula can give the pattern for three negatives and three positives ?
Also can we generalize the result that for let's say pattern of 4 negatives and 4 positives.
So far my works didn't yield anything productive except for the two summations already mentioned above. Hence any help will be really appreciated. Thank you !)
 [/INST] 1. Let us first analyze the behavior of OP's sums. We find that
\begin{align*}
F(s)
&:= \sum_{n=0}^{\infty}\frac{(-1)^{1+2+\cdots+n}}{(2n+1)^s} \\
&= \sum_{n=0}^{\infty}\frac{1}{(8n+1)^s}
-\sum_{n=0}^{\infty}\frac{1}{(8n+3)^s}
-\sum_{n=0}^{\infty}\frac{1}{(8n+5)^s}
+\sum_{n=0}^{\infty}\frac{1}{(8n+7)^s}
\end{align*}
Now using the discrete Fourier transform, we can confirm that
$$ (-1)^{1+2+\cdots+n} = \frac{\cos(\pi n/4) - \cos(3\pi n/4)}{\sqrt{2}}, $$
and so, $F(s)$ further simplifies to
\begin{align*}
F(s)
&= \frac{1}{\sqrt{2}} \left( \sum_{k=1}^{\infty} \frac{\cos(\pi k/4)}{k^s} - \sum_{k=1}^{\infty} \frac{\cos(3\pi k/4)}{k^s} \right).
\end{align*}
If $s$ is a positive even integer, these sums can be computed using the Fourier series for Bernoulli polynomials. For example, if $s = 4$, then
$$ \sum_{k=1}^{\infty} \frac{\cos(\pi k/4)}{k^4} = -\frac{(2\pi)^4}{2 \cdot 4!} B_4(1/8) \qquad\text{and}\qquad \sum_{k=1}^{\infty} \frac{\cos(3\pi k/4)}{k^4} = -\frac{(2\pi)^4}{2 \cdot 4!} B_4(3/8). $$
So, using $B_4(1/8) - B_4(3/8) = -11/256$, we get
$$ F(4) = \frac{11 \pi^4 \sqrt{2}}{1536} $$
2. Note that the above solution works if the sign patterns can be written either as a Fourier cosine series (if $s$ is even) or as a Fourier sine series (if $s$ is odd). For example, if $(a_n)_{n=0}^{\infty}$ is a sequence with a period of $12$ such that
$$ (a_0, a_1, \dots, a_{11}) = (0, 1, 0, 1, 0, 1, 0, -1, 0, -1, 0, -1), $$
then
$$ a_n = \frac{2}{3} \sin \Bigl(\frac{\pi n}{6}\Bigr) + \frac{1}{3} \sin \Bigl(\frac{\pi n}{2}\Bigr) + \frac{2}{3} \sin \Bigl(\frac{5 \pi n}{6}\Bigr), $$
and so, the above technic allows to compute the series
$$ \sum_{k=1}^{\infty} \frac{a_k}{k^s} = \frac{1}{1^s} + \frac{1}{3^s} + \frac{1}{5^s} - \frac{1}{7^s} - \frac{1}{9^s} - \frac{1}{11^s} + \dots $$
for positive odd integer $s$. In the case of $s = 3$, for instance, this gives
$$ \sum_{k=1}^{\infty} \frac{a_k}{k^3}
= \frac{(2\pi)^3}{2\cdot 3!} \left( \frac{2}{3}B_3(1/12) + \frac{1}{3}B_3(3/12) + \frac{2}{3}B_3(5/12) \right) = \frac{29 \pi^3}{864}. $$
</s>