Can anybody help me solve this combinatorial identity? While trying to derive some physical equation, I noticed that the following identity was needed:
$\sum^{4a \leq 2k}_{a=0}{2k \choose 4a} + \sum^{4a+1 \leq 2k}_{a=0} {2k \choose 4a+1} = \left\{ \begin{array}{ll} \frac{2^k(2^k +1)}{2} & (k=4l+1, 4l+4)\\
                          \frac{2^k(2^k -1)}{2} & (k=4l+2, 4l+3) \end{array} \right.$
(where $l,a$ are positive integers) 
My strategy was to change  the $2^k$'s of RHS into $\sum_{a=0}^{a=k}{k \choose a}$ and use ${n \choose k}={n-1 \choose k} +{n-1 \choose k-1}$, but obtained only incomplete and partial relations. Can anybody solve this identity explicitly, or at least suggest another strategy that might work better? 

This is just a rephrasing of André Nicolas' answer, I put it here just because I was typing it when his answer suddenly appeared.
The Discrete Fourier Transform gives:
$$ 1^k+i^k+(-1)^k+(-i)^k = 4\cdot\mathbb{1}_{k\equiv 0\pmod{4}} \tag{1}$$
hence:
$$ \mathbb{1}_{k\equiv 0,1\pmod{4}} = \frac{1}{4}\left(2+(1-i)\,i^k+(1+i)\,(-i)^k\right)\tag{2}$$
and:
$$\begin{eqnarray*}\sum_{\substack{0\leq a\leq 2k\\ a\equiv{0,1}\pmod{4}}}\!\!\!\!\!\binom{2k}{a}&=&\sum_{a=0}^{2k}\binom{2k}{a}\mathbb{1}_{a\equiv 0,1\pmod{4}}\\&=&\frac{1}{2}\left(2^{2k}+(1+i)^{2k-1}+(1-i)^{2k-1}\right)\end{eqnarray*}\tag{3}$$
hence the claim follows by considering that $(1+i)$ is $\sqrt{2}$ times an eigth root of unity, $e^{\frac{\pi i}{4}}$.
