<s>[INST] Help find closed form for:$\sum_{n=0}^{\infty}{(-1)^n\left({{\pi\over 2}}\right)^{2n}\over (2n+k)!}=F(k)$ What is the closed form for
$$\sum_{n=0}^{\infty}{(-1)^n\left({{\pi\over 2}}\right)^{2n}\over (2n+k)!}=F(k)?$$
My try:
I have found a few values of $F(k)$, but was unable to find a closed form for it.
$F(0)=0$
$F(1)={2\over \pi}$
$F(2)=\left({2\over \pi}\right)^2$
$F(3)=\left({2\over \pi}\right)^2-\left({2\over \pi}\right)^3$
$F(4)={1\over 2}\left({2\over \pi}\right)^2-\left({2\over \pi}\right)^4$
$F(5)={1\over 6}\left({2\over \pi}\right)^2-\left({2\over \pi}\right)^4+\left({2\over \pi}\right)^5$
 [/INST] Note that
$$\sum_{n=0}^\infty \frac{(-1)^nx^{2n}}{(2n)! } = \cos(x)$$
You can reach the result by integrating $k$-times. 
$$\sum_{n=0}^\infty \frac{(-1)^nx^{2n}}{(2n+k)! } = \frac{1}{x^{k}}\int^{x}_0 \mathrm{d}t_{k-1}\int^{t_{k-1}}_0 \mathrm{d}t_{k-2} \cdots\int^{t_1}_0\mathrm{d}t_0\cos(t_0) $$
For example when $k=1$
$$\sum_{n=0}^\infty \frac{(-1)^n(\pi/2)^{2n}}{(2n+1)! } = \frac{2}{\pi}\int^{\pi/2}_0 \mathrm{d}t_0 \cos(t_0)\,= \frac{2}{\pi}$$
For $k=2$
\begin{align}
\sum_{n=0}^\infty \frac{(-1)^n(\pi/2)^{2n}}{(2n+2)! } &= \left( \frac{2}{\pi}\right)^2\int^{\pi/2}_0 \mathrm{d}t_{1}\int^{t_1}_0\mathrm{d}t_0\cos(t_0) \\  &=  \left( \frac{2}{\pi}\right)^2\int^{\pi/2}_0  \mathrm{d}t_{1}\sin(t_1)\\
& = \left( \frac{2}{\pi}\right)^2
\end{align}
For 
$$f_k(x) = \sum_{n=0}^\infty \frac{(-1)^n x^{2n+k}}{(2n+k)!}$$
We can define recursively 
$$f_0(x) = \cos(x)$$
$$f_k(x) =\int^x_0 f_{k-1}(t)\,dt$$
By solving the recursive formula 
$$\sum_{n=0}^\infty \frac{(-1)^n x^{2n+k}}{(2n+k)!} = \begin{cases} \sum_{n=0}^{\lceil k/2 \rceil-2}\frac{x^{2n+1}(-1)^{\lceil k/2 \rceil+n}}{(2n+1)!}-(-1)^{\lceil k/2 \rceil}\sin(x) & \text{If $k$ is odd} \\ \sum_{n=0}^{k/2-1}\frac{x^{2n}(-1)^{n+k/2}}{(2n)!}-(-1)^{k/2}\cos(x) & \text{If $k$ is even}\end{cases}$$
Finally we have the closed form 

$$F(k) = \begin{cases}\left( \frac{2}{\pi}\right)^k \sum_{n=0}^{\lceil
 k/2 \rceil-2}\frac{(\pi/2)^{2n+1}(-1)^{\lceil k/2
 \rceil+n}}{(2n+1)!}-\left( \frac{2}{\pi}\right)^k(-1)^{\lceil k/2
 \rceil} & \text{If $k$ is odd} \\ \left(
 \frac{2}{\pi}\right)^k\sum_{n=0}^{k/2-1}\frac{(\pi/2)^{2n}(-1)^{n+k/2}}{(2n)!}&
 \text{If $k$ is even}\end{cases}$$

To check the correctness of the formula 
For $k=5$ we have 
$$F(5)=\left(\frac{2}{\pi}\right)^5 \sum_{n=0}^{1}\frac{(\pi/2)^{2n+1}(-1)^{3+n}}{(2n+1)!}-\left( \frac{2}{\pi}\right)^5(-1)^{3} = {1\over 6}\left({2\over \pi}\right)^2-\left({2\over \pi}\right)^4+\left({2\over \pi}\right)^5$$
</s>