Question: distinct partitions with maximum parts - how to code in Maple?

How do you use Maple to get the number of distinct partitions of an integer n, with parts of a maximum value of m? I would like to see how this is done in Maple.

 

Here are some examples obtained  by using SageMath:

 

Partitions(15, max_part=8, max_slope=-1).cardinality()

13

 

Partitions(15, max_part=8, max_slope=-1).list()

[[8, 7],

 [8, 6, 1],

 [8, 5, 2],

 [8, 4, 3],

 [8, 4, 2, 1],

 [7, 6, 2],

 [7, 5, 3],

 [7, 5, 2, 1],

 [7, 4, 3, 1],

 [6, 5, 4],

 [6, 5, 3, 1],

 [6, 4, 3, 2],

 [5, 4, 3, 2, 1]]

 

Partitions(75, max_part=60, max_slope=-1).cardinality()

48336

 

Partitions(100, max_part=35, max_slope=-1).cardinality()

290964

 

Partitions(125, max_part=75, max_slope=-1).cardinality()

3179161

 

—- the end -—
 

Please Wait...