Let $M$ be a matrix and I want to consider the sum $$S:=\sum_{x_1=0}^{a}\cdots\sum_{x_q=0}^{a} M_{(x_1+\cdots+x_q),y},$$ where $q\geq 1$ is an arbitrary integer. I wish to simplify the sum above. I was trying to find some way to write it as $$ S = \sum_{n=0}^{qa} c_n M_{n,y} $$ for some coefficient $c_n$. At first I thought I can use multilinear theorem but I am not sure.
Here is an example: $\sum_{i_1=0}^1\sum_{i_2=0}^1\sum_{i_3=0}^1M_{i_1+i_2+i_3,1}=1M_{0,1}+3M_{1,1}+3M_{2,1}+M_{3,1}$. It seems the coefficient $c_n$ depends on $a$ and $q$ as follows: $$ c_n(a,q) = \#\{0\leq i_1,\ldots,i_q\leq a\mid i_1+\cdots+i_q=n\}. $$ I have previously seen $$ c_n(q):=\#\{0\leq i_1,\ldots,i_q\mid i_1+\cdots+i_q=n\} = {n+q-1\choose q-1}. $$ Is there any such identities for the coefficient $c_n(a,q)$?