The problem is:
In how many ways can numbers from [1-K] be placed in a row of N elements that there is not a triple a, b, c where a > b > c and pos(a) < pos(b) < pos(c) in a above mentioned row.
I wrote a small program that calculates this using dynamic programming, but I wonder if there is a simple formula.
edit: No luck with the OnLine Encyclopedia, but thanks, it looks like a great tool.
Here are the first 10 numbers in the sequence for K=N=1..10:
2, 5, 27, 191, 1373, 9605, 65509, 438835, 905761, 19106231
yep, number repetition is allowed.