# Dividing $n$ identical things into $r$ groups

I was reading a course on Combinatorics where I came across following:

The number of ways in which $n$ identical things can be divided into $r$ groups so that no group contains less than $m$ items and more than $k$ (where $m<k$) is coefficient of $x^n$ in the expansion of $(x^m + x^{m+1} + … +x^k)^r$.

Is this correct? Book doesn't give proof. How can we make this formula intuitive?

• If you factor out $x^m$ you get the easy case where you have to divide $n-rm$ identical things into $r$ groups. – user53970 May 22 '15 at 17:38

Write $$\underbrace{(x^m + x^{m+1} + … +x^k)(x^m + x^{m+1} + … +x^k)\cdots(x^m + x^{m+1} + … +x^k)}_{r\text{ times}}$$
In order to get a $x^n$ term you must choose a term from each parethesis in a such way that the sum of the exponents is $n$. This is the same as writing $n$ as the sum of $r$ numbers between $m$ and $k$.
• I still didnt get to know from where that $x^n$ term came, and in fact I didnt get from where that whole polynomial came. Does your answer explains that? I think I can do the expansion and get the coefficient of $x^n$ in it. But I dont understand from where all that $x^n$ thingy came. Pardon me for my poor understanding. – anir123 May 22 '15 at 20:29
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}