TITLE: Restricted Compositions
QUESTION [6 upvotes]: Number Composition studies the number ways of compositing a number.
I wanna know the number of compositions of $m$ with $n$ parts with the size of the max part equal to or less than $k$.
Is there a closed form for this problem?

REPLY [4 votes]: For big $N$, $K$, an coarse approximation can be obtained by a probabilistic argument. I get
$$C(N,M,K) \approx \left( 1 - \left( 1- \frac{K}{N}\right)^M \right)^K {N-1 \choose K-1}$$
The approximation is good if the first factor (which represents the restriction) is not very small (say, $>0.1$)
Some examples: (exact and approximate values
 N   K   M      exact        approx      factor
 40  20  5    3.556E+010   3.653E+010    0.523
 40  20  8    6.610E+010   6.373E+010    0.924
 40  20  3    3.774E+008   4.770E+009    0.069