How many non-negative integral solutions? How many non-negative integral solutions does this equation have?
$$17x_{17}+16x_{16}+ \ldots +2x_{2}+x_1=18^2$$
I add some conditions that bring more limitations:
$$\sum_{i=1}^{17}x_{i}=20 \quad 0 \leq x_{i} \leq 18$$ 
I did some calculation with them but no succeed;
do we have any general formula?
this equation rose up in my work,actually I want that the only answer will be $x_{17}=18$ and $x_9=2$ and others are zero ;but I confused with the equation.
Thanks a lot.

The number of ways is the coefficient of $x^{324}$ in
$$
\begin{align}
&\left(x+x^2+x^3+\dots+x^{17}\right)^{20}\\
&=x^{20}\left(\frac{1-x^{17}}{1-x}\right)^{20}\\
&=x^{20}\sum_{k=0}^{20}\binom{20}{k}\left(-x^{17}\right)^k\sum_{j=0}^\infty\binom{-20}{j}(-x)^j\\
&=x^{20}\sum_{k=0}^{20}\binom{20}{k}\left(-x^{17}\right)^k\sum_{j=0}^\infty\binom{j+19}{j}x^j\\
&=\sum_{k=0}^{20}\sum_{j=0}^\infty(-1)^k\binom{20}{k}\binom{j+19}{j}x^{j+17k+20}\tag{1}
\end{align}
$$
The coefficient of $x^{324}$ in $(1)$ is the sum of the coefficients with $j=304-17k$:
$$
\sum_{k=0}^{17}(-1)^k\binom{20}{k}\binom{323-17k}{19}=4059928950\tag{2}
$$
