Consider \(x_1+x_2+\cdots+x_n=r\), where \(a\le x_i\le b\) for \(1\le i\le n\). What is the generating function for the number of integer solutions to the above equation (where the desired count appears as the coefficient of \(x^r\), where \(r=0,1,\ldots\))?
每個 \(x_i\):\(x^a+x^{a+1}+\cdots+x^b=\dfrac{x^a-x^{b+1}}{1-x}\)
共 \(n\) 個變數 → \(n\) 次方
\(\left(\dfrac{x^a-x^{b+1}}{1-x}\right)^{n}\)