How would I count the number of integer solutions to: $x_1+x_2+\cdots+x_r=k$, given fixed $r$ and $k$ and $0\leq x_1\leq x_2\leq \cdots \leq x_r\leq k$?
Attempt at solution (incorrect, see per comments): I was thinking maybe I could exchange this for the number of integer solutions to: $y_1+y_2+\cdots+y_r=x_r$ where $y_1=x_1, y_{i>1}=x_i-x_{i-1}$, but then it gets a little messy because there are multiple possible values for $x_r$ for a given $k$... I think $x_r$ can be at minimum $k/r$ rounded down (edit: nope... rounded up?), in which case the answer would be $\sum_{[k/r]\leq j\leq k}\binom{j+r-1}{r-1}$ but this isn't the nicest expression...
Thanks for your help!