Question: partition with fixed size and maximum value

Hello

I would like to calculate the number of partitions of a number s with length n, where the maximum value in the partitions is also n.

For example: s=10, n=4

The result should be 5, because there are 5 partions with length 4 and maximum value 4:

4411, 4321, 4222, 3331, 3322

If I use "PartitionFixedSize(10,'parts'=4)", it makes also partitions with values > 4, for example 5311. How to limit this?

Thank you for an answer!

Kind regards

 

 

Please Wait...