I'm working on a problem that want me to solve for solutions given four equations that is equal to an integer,
For instance, consider the variables $a_1,a_2,\dots,a_m\in \mathbb{Z}_{\geq 0}$ $a_n\neq a_m$, $\max a_m \leq C$ and $M\in \mathbb{Z}_{\geq0}$ take $m=9,C=9$
and we have \begin{align} a_1+a_2+a_3 +a_{4} &=M\\ a_{2}+a_3+\dots +a_{6} &=M\\ a_4+a_5+\dots +a_{8} &=M\\ a_6+a_7+a_8+a_{9} &=M \\ \end{align} And I want to solve for each $a_m$, well for small $M$ I guess I can just compute by basic algebra and brute force. But I was thinking if there are some nice methods, I can use to solve for larger $M$, I tried looking into the partition function of integers with constrains but nothing I found that can relates to solve for values of these variables. If anyone can give me some ideas on how to approach or what topics I should read more to get an idea that does not involve brute force?
Thanks!