<s>[INST] In how many ways to partition(ordered partition) an natural number $n$ so none of the parts is greater then $k$? In how many ways to ordered partition an natural number $n$ so none of the parts is greater then $k$?
Ordered Partitions $3=2+1$ is NOT equal to $3=1+2$, 
Some examples:
Ex1:
$n=3,k=2$, this leaves only $3=2+1, 3=1+2$ and $3=1+1+1$
Total Partitions are $1,1,1\color{red}{;}2,1\color{red}{;}1,2\color{red}{;}3$ so we have $4$ total and only $3$ are wanted. 
Ex2:
$n=4,k=2$ this leaves only $1,1,1,1\color{red}{;}2,1,1\color{red}{;}1,2,1\color{red}{;}1,1,2\color{red}{;}2,2$
total: $1,1,1,1\color{red}{;}2,1,1\color{red}{;}1,2,1\color{red}{;}1,1,2\color{red}{;}2,2\color{red}{;}1,3\color{red}{;}3,1\color{red}{;}4$ 
Its connected to this Problem:
In how many ways can 40 identical carrots be distributed among 8 different rabbits?
There is a "solution". although not useable, at least for me. 
 [/INST] First, we can work with ordered partitions in $k$ parts with size limit $w$. This is explained in Stars and bars with restriction of size between bars via generating functions.: you have $k$ parts, each which may have $1, \dots, w$ which is represented by the generating function $x+x^2+\dots+x^w = \frac{x(1-x^w)}{1-x}$. With $k$ piles, you find that the number of way to generate $n$ is the $n$th coefficient of $f(x) = \frac{x^k(1-x^w)^k}{(1-x)^k}$. This is
\begin{align*}
[x^n]f(x) &= [x^{n-k}]\frac{(1-x^w)^k}{(1-x)^k} = [x^{n-k}]\sum_r(-1)^rx^{wr}\binom{k}{r}\sum_s\binom{s+k-1}{s}x^s \\
&= \sum_{wr+s=n-k} (-1)^r\binom{k}{r}\binom{s+k-1}{k-1} = \sum_r (-1)^r\binom{k}{r}\binom{n-wr-1}{k-1}. 
\end{align*}
Now, just sum over $k$ to allow for any number of parts, so your desired answer is
$$
\sum_k\sum_r (-1)^r\binom{k}{r}\binom{n-wr-1}{k-1}. 
$$
Hope that hideous sum helps! I'm not sure if there's a simpler form, I'd love for someone else to verify/correct me. 
</s>