I would like to construct a system of linear equations as follows and find a basis of the solutions : Fix $p$, $q$ $$a_{i, j} - 3a_{i-1,j} - 4a_{i,j-1} +10a_{i-1,j-1} = 0$$ for all $$0 \le i \le \frac{p-1}{2} - 1 ; 0 \le j \le q-2$$ with further conditions : $ a_{-1,j} = -a_{\frac{p-1}{2}-1, j}, a_{i,-1} = a_{i,q-2} $ for all $i,j$ satisfying the above conditions
Further more, is there a way that the same can be implemented for $a_{i,j,k}$ and so on.