Implement, through dynamic programming, the number of combinations according to the following recursive formula: