# Counting solutions to a five-variable equation [duplicate]

How many solutions (using only nonnegative integers) are there to the equation $$x_1+ x_2 + x_3 + x_4 + x_5 = 31\;?$$

• Where did you come across this problem, and how would you approach solving it? – Mike Pierce Mar 30 '16 at 23:44
• Please see Stars and Bars (combinatorics, Wikipedia) or the many answers on MSE that discuss Stars and Bars. – André Nicolas Mar 30 '16 at 23:45