# Number of solutions being equal

If $a$ is in natural number, show that the number of positive integral solutions of $$x_1+2x_2+3x_3+\dots+nx_n= a$$ is equal to the number of nonnegative integral solution of $$y_1+2y_2+3y_3+\dots+ny_n=a-\frac{n(n+1)}{2}.$$

I tried to find the number of solutions of both by using the formula $\binom{n+r-1}{r-1}$ and I equated them after this I am not able to proceed. Please tell if my approach is correct if not what is the correct solution.

Any help will be appreciated , thanks in advance.

• The key is that $1+2+3+\cdots=\frac{n(n+1)}{2}$ – kingW3 May 26 '17 at 13:28

There is a bijection between the two sets of solutions. $(x_1,x_2,\dots,x_n)$ is a positive integer solution of the first equation iff $(y_1,y_2,\dots,y_n)$ with $y_i=x_i-1$ for $i=1,\dots,n$ is a nonnegative integer solution of the second equation.
The number of solutions is the coefficient of $x^a$ in \begin{eqnarray*} \frac{x^{\frac{n(n+1)}{2}}}{(1-x)(1-x^2) \cdots (1-x^n) }. \end{eqnarray*}