How to change order of sum? I need change  the summation order in the double sum
$$
S_{m,n}=\sum_{j=0}^m \sum_{k=0}^n a_{j,k} x^{j-k} B_{m+n-j-k},
$$
to  separate $B$ and get  somethink like to
$$
S_{m,n}=\sum_{s=0}^{m+n} \left(  \sum_{k=0}^* **** \right) B_{s}.
$$
I tried to introduce new variable $m+n-j-k=s$  but the formal  expression
$$
\sum_{s=0}^{m+n} \left(  \sum_{k=0}^n  a_{m+n-s-k,k} x^{m+n-s-2k} \right) B_{s}.
$$
is differ from  $S_{m,n}.$
Any help?
 A: Actually your sum is fine if you adopt a convention that $a_{j,k} = 0$ whenever $(j,k) \not \in (0\cdots m, 0 \cdots n)$.
To see this more formally, allow suffices $(j,k) \in \mathbb Z \times \mathbb Z$ with the convention just stated.  Then map $(j,k)$ to $(r,s)$ by
$$(j,k) \mapsto (k,m+n-(j+k)).$$
The mapping is easily seen to be one to one and surjective because $(r,s) \mapsto (m+n-(r+s), r) $ provides an inverse.  Then
\begin{align}
S_{m,n} &= \sum_{j=0}^m\sum_{k=0}^n a_{j,k}~ x^{j-k} ~B_{m+n-(j+k)} \\
&= \sum_{j=-\infty}^\infty \sum_{k=-\infty}^\infty a_{j,k} ~ x^{j-k} ~ B_{m+n-(j+k)} \\
&= \sum_{s=-\infty}^{\infty} \sum_{r=\infty}^{\infty} a_{m+n-(s+r),r}~x^{m+n-s-2r} ~ B_s
\end{align}
where the extension of suffices to formally infinite sums is legitimate because all terms except a finite number are zero.  We can now reduce back to a finite sum.  When $r < 0$ or $r > n$ the coefficients $a_{m+n-(s+r),r}$ are zero;  and it then also follows, when $ s < 0$ or $s > m+n $ the coefficients are again zero.  Therefore we obtain
$$ S_{m,n} = \sum_{s=0}^{m+n} \sum_{r=0}^n a_{m+n-(s+r),r}~ x^{m+n-s-2r}~B_s$$
which is exactly the sum you obtained.  Moreover, when $r > n$ the terms are zero so the upper limit could also be taken as $m+n$ if you prefer.

Appendix:  This picture illustrates the different sums:  first by rows then columns (or vice versa) then by diagonals, with three sections depending on the sizes of $j$ and $k$ and finally the method used above where additional dummy $a_{j,k} = 0$ are added.

A: If you look at the $(j,k)$ plane, the domain of the summation is an axis-aligned rectangle. Then the locus of constant $s=m+n-j-k$ is a pencil of parallel line segments slanted by $-45°$, which meet the rectangle boundaries in three different ways: from $k=n$ to $j=m$, from $j=0$ to $j=m$ and from $j=0$ to $k=0$. Hence you can't escape decomposing the sum in three different expressions (two triangles and a parallelogram).
A: Here is an answer in the same line as the answer of @YvesDaoust. In order to change the summation to the wanted form $S_{m,n}=\sum_{s=0}^{m+n} \left(  \sum_{k=0}^* **** \right) B_{s}$ we sum up the terms corresponding to the example graphic below:
                                                            


Assuming WLOG $m\leq n$ we  obtain
\begin{align*}
\color{blue}{S_{m,n}}&=\sum_{j=0}^m\sum_{k=0}^na_{j,k}x^{j-k}B_{m+n-j-k}\\
&=\sum_{j=0}^m\sum_{k=0}^na_{m-j,n-k}x^{m-n-j+k}B_{j+k}\tag{1}\\
&\,\,\color{blue}{=\left(\sum_{s=0}^{m-1}\sum_{k=0}^s+\sum_{s=m}^{n}\sum_{k=0}^m+\sum_{s=n+1}^{m+n}\sum_{k=s-n}^m\right)
a_{m-s-k,n-k}x^{m-n-s+2k}B_s}\tag{2}
\end{align*}

Comment:

*

*In (1) we change the order of summation in both, the inner sum ($j\to m-j$) and the outer sum ($k\to n-k$), which gives a somewhat more convenient representation of $B_{q}$.


*In (2) we set $s=j+k$ and since $0\leq j\leq m$ and $0\leq k\leq n$ we have $0\leq s=j+k\leq m+n$. We get three inner sums according to the three regions in the graphic.
Note: The three inner sums in (2) might look somewhat complicated, but this is rather an advantage.

*

*Here we have a plain rearrangement of the $(m+1)(n+1)$ terms of $S_{m,n}$ resulting in the wanted form.


*The three inner sums reflect the structure of summation.


*We do not need bookkeeping of additional zero-valued variables and their regions when doing further calculations.
