This paper describes a recursive approach to the enumeration of some classes of combinatorial tasks. Most tasks are used in the specific scope of teaching and learning informatics through olympiads and other competitions. Combinatorial problems can often lead to interesting and beautiful dynamic programming tasks, because they both depend on recurrence relations: formulae that solve a larger problem in terms of one or more smaller problems. Combinatorics of course is not the only branch of mathematics that can yield interesting tasks for programming contests. We focus on it here because many combinatorial problems have entertaining legends and they are easily accessible to students. Many of the examples in this paper are taken from the Open...