Suppose we have an equation $a_1 x_1 + \ldots +a_k x_k = l$, where $a_i$ and $l$ are integers, but not necessarily non-negative. Moreover, assume not all $a_i$ are zero, and that $k$ is at least $2$.
Denote by $S$ the set of all its non-negative integer solutions $x=(x_1,\ldots,x_k)$.
Consider the following generating function: $\displaystyle G(q) = \sum_{x \in S} q^{x_1+\ldots+x_k}$.
In other words, the coefficient of $G(q)$ next to $q^n$ is the number of non-negative solutions whose coordinates add upp to $n$.
- Q1: Is $G(q)$ a rational function of $q$? (By identifying it with its power series expansion.)
- Q2: If yes, is there a chance that there is a "common" denominator of $G(q)$ independent of the non-homogeneous parameter $l$?
- Q3: Is there a general method of finding $G(q)$ in a closed form as a rational function of $q$?
Any hint or reference related to this questions is appreciated.