integer valued equation I have to enumerate the solutions of the following system of equations
$$
\alpha_{1}+\alpha_{2}+\cdots+\alpha_{k}=j\\
\alpha_{1}+2\alpha_{2}+\cdots+k\alpha_{k}=n,
$$
where $k$ is a fixed integer and $n\geq k$ and $0\leq j\leq n$. The unknowns, $\alpha_{i}$, are non negative integers.
Moreover, what is the connection between such solutions and the solutions of the system
$$
\alpha_{1}+\alpha_{2}+\cdots+\alpha_{k}=j\\
\alpha_{1}+2\alpha_{2}+\cdots+k\alpha_{k}=n-1\qquad ?
$$
Can you shed light on this?
 A: The second equation (changing $a_i$ to $x_i$ for personal preference)
$$ x_1 + 2x_2 + 3x_3 + ... + kx_k = n$$
specifies partitions of $n$ using numbers not more than $k$. This is easy to see if you think of $x_i$ as representing the number of $i$'s in your partition. That is, your partition has $x_1$ ones, $x_2$ twos, and so on. The first equation
$$ x_1 + x_2 + ... + x_k = m$$
specifies weak compositions of $m$ into $k$ parts (by definition). But forget about that. Considering equation 2, the sum of $x_1 + x_2 + ...$ is the number of parts in your partition of $n$. So the two equations together give you partitions of $n$ into $m$ parts using integers less than or equal to $k$, which we will denote $P(n,m,k)$.
There is a lot of literature on enumerating partitions which I won't discuss, but you can simply do a recursive construction, incrementing $x_i$ or moving on to $x_{i+1}$. If you just want to instead count such partitions, we get a natural recurrence formula by breaking them into two cases: whether or not the last (biggest) part equals $k$.
$$ P(n,\,m,\,k) = P(n-k,\,m-1,\,k) + P(n,\,m,\,k-1) $$
