For a given (n,m,k)..
Using values in the range (0..k), how many different m-combos can be made which sum to n?
For example, if (n,m,k) = (3,3,2) there are 7 possible combinations. For (5,4,2) there seem to be 16.
I've been trying to approach this like the binomial formula, stars and bars sort of deal but the k-constraint is puzzling me and I'm not entirely sure of what to do.