Enumerate certain special configurations - combinatorics. Consider the vertices of a regular n-gon, numbered 1 through n. (Only the vertices, not the sides).
A "configuration" means some of these vertices are joined by edges.
A "good" configuration is one with the following properties:
1) There is at least one edge.
2) There can be multiple edges from a single vertex.
3) If A and B are joined by an edge, then the degree of A equals the degree of B.
4) No two edges must intersect each other, except possibly at the endpoints.
5) The degree of each vertex is at most k. (where $0\leq k \leq n$ )
Find f(n, k), the number of good configurations. For example, f(3, 2) = 4 and f(n, 0) = 0.

From the various comments we have 


*

*$f(n,0) = 0$ since we can have no edges, but need at least one 

*$f(n,1)=M_n-1$ where $M_n$ are the Motzkin numbers, the number of  different ways of drawing non-intersecting chords on a circle between $n$ points, and $-1$ because we need at least one edge

*$f(n,2)=C_n-1$ where $C_n$ are the Catalan numbers, the number of  noncrossing partitions on a circle between $n$ points, and $-1$ because we need at least one edge

*$f(n,k)=f(n,2)$ for $k\gt 2$ as we cannot have degrees greater than $2$ on a convex polygon without intersections


There are many recurrence relations.  Two pretty ones are $$M_{n+1}=M_n+\sum_{i=0}^{n-1}M_i M_{n-i-1}$$ and $$C_{n+1}=\sum_{i=0}^{n}C_i\,C_{n-i}$$ starting from $M_0=1$ and $C_0=1$.
The Catalan numbers can be written in closed form as $C_n = \frac{1}{n+1}{2n\choose n}$ but there is no similarly simple form for the Motzkin numbers.
