Frankly, I am confused by what you are asking.

This is a well know problem: the partitions of an integer into summands.

In order to program MathLab to produce that table, you must know that the function is recursively defined. So there is no simple closed form solution for this.