# 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}$ Commented May 26, 2017 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*}
$\newcommand{\bbx}[1]{\,\bbox[8px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$