Summing up double series under constraints on the indexes I have the following double sum:
$$
\sum_{t=0}^\infty \sum_{\ell=0}^r \psi(t,\ell,r),
$$
only for even values of $t+\ell$ or $t+\ell=0$. 
First, I thought, since $\ell$ depends on $r$, and $r$ can assume either even or odd values, then we should split the series in two, one for $r=2m$ and another for $r=2m+1$ ($m=0,1,2,...$). Also, $t+\ell$ is even if $t=2t_1$ and $\ell=2\ell_1$, or,  if $t=2t_1+1$ and $\ell=2\ell_1+1$. I am a bit confused how to adjust the new indexes. Also, another way to sum it up would be welcomed. Thanks.
 A: There are several approaches.  
One is to zero out the extraneous terms:
$$\sum_{t=0}^\infty\ \sum_{\ell=0;\ t+l\text{ odd}}^r \psi(t,\ell,r) = \sum_{t=0}^\infty \sum_{\ell=0}^r \mathcal{I}(t+l\text{ even})\psi(t,\ell,r)$$
where the value of $\mathcal I$ is zero when its argument is false and one when its argument is true.
If you don't like the idea of summing lots of zeros, rewrite $\ell$ as  $2\lambda$ or $2\lambda+1$ depending on the parity of $t:$
$$\sum_{t=0}^\infty\ \sum_{\ell=0;\ t+l\text{ even}}^r \psi(t,\ell,r) =\sum_{t=0}^\infty \left\{\eqalign{&\sum_{\lambda=0}^{r/2}\psi(t, 2\lambda, r),& t\text{ even}\\ &\sum_{\lambda=0}^{(r-1)/2}\psi(t, 2\lambda+1, r),& t\text{ odd}.}\right.$$
(It doesn't matter that the upper limits $r/2$ and $(r-1)/2$ may be non-integral: by definition, the inner sum extends through all integral values of $\lambda$ that are less than or equal to the upper limit.  Most looping constructs in computing languages follow this convention.)
You can also change variables to, say, $t$ and $s=(t+l)/2,$ in which case $l=2s-t$ runs from $0$ to $r,$ whence $s$ ranges among all the integers within the interval from $t/2$ to $(t+r)/2.$ The smallest of those integers is the ceiling of $t/2,$ written $\lceil t/2 \rceil,$ and the largest is the floor of $(r+t)/2,$ written $\lfloor (r+t)/2 \rfloor,$ whence
$$\sum_{t=0}^\infty\ \sum_{\ell=0;\ t+l\text{ even}}^r \psi(t,\ell,r) = \sum_{t=0}^\infty \sum_{s=\lceil t/2 \rceil}^{\lfloor (r+t)/2 \rfloor} \psi(t, 2s-t, r).$$
Just make sure your program knows that when the upper limit of a sum is less than its lower limit, the sum is zero: this happens when $r=0$ and $t$ is odd.

There are other ways to re-express these sums, but most of them exploit the same tools: indicators, parity, conditionals, or the ceiling and floor functions.  Further analysis requires consideration of $\psi,$ the possibility of finding closed-form formulas for some of its partial sums, and numerical issues of floating point error accumulation.
