How do you find the coefficient of $x^i$ in $(x^0 + x^1 + \cdots + x^n)^k$?

182 Views Asked by At

Possible Duplicate:
Power Series question

For example, in the formula $(x^0 + x^1 + x^2 + \cdots + x^9)^5$, what is the coefficient of $x^{23}$?

More generally, what is the coefficient of $x^i$ where $0\leq i\leq nk$ ?

I'm really interested in how you get an answer. Do you simply count? Do you solve it with generating functions? Even dynamic programming?