I had this question in my h.w, and i don't have a clue how to solve it. The question is:
For $k \leq n$:
How many non increasing monotonic functions $f:[1, \dots, k]\to[1, \dots, n]$ that satisfy ($i<j\implies f(i)\geq f(j)$) are there and $f(1)=n$ and $f(k)=1$?
How many decreasing monotonic functions $f:[1, \dots, k]\to[1, \dots, n]$ that satisfy ($i<j\implies f(i)>f(j)$) are there ?
You just have to select the difference between consecutive elements. There are $k-1$ such differences. They must add up to $n-1$.
For the first example $0$ is a valid difference, so we just have to count the number of solutions to $a_1+a_2+\dots +a_{k-1}=n-1$. This is a standard stars and bars problem. There are $n-1$ stars and $k-2$ bars, so the answer is $\binom{n+k-3}{n-1}$.
For the second example is is $\binom{n}{k}$ as it suffices to select the terms that appear in the sequence. ( as was noted by WICK3D POISON in the comments)