Oops, sorry I didn't see your length requirement:

sage: Partitions(16,max_slope=-1, length=4)[:]
[[10, 3, 2, 1], [9, 4, 2, 1], [8, 5, 2, 1], [8, 4, 3, 1], [7, 6, 2, 1], [7, 
5, 3, 1], [7, 4, 3, 2], [6, 5, 4, 1], [6, 5, 3, 2]]
sage: Partitions(10,max_slope=-1, length=3)[:]
[[7, 2, 1], [6, 3, 1], [5, 4, 1], [5, 3, 2]]

Andrew

On Friday, 14 December 2012 20:15:49 UTC+11, Andrew Mathas wrote:
>
> Hi Alex,
>
> The best/easiest way is probably to use the max_slope option for 
> Partitions:
>
> sage: Partitions(16,max_slope=-1)[:]
> [[16], [15, 1], [14, 2], [13, 3], [13, 2, 1], [12, 4], [12, 3, 1], [11, 
> 5], [11, 4, 1], [11, 3, 2], [10, 6], [10, 5, 1], [10, 4, 2], [10, 3, 2, 1], 
> [9, 7], [9, 6, 1], [9, 5, 2], [9, 4, 3], [9, 4, 2, 1], [8, 7, 1], [8, 6, 
> 2], [8, 5, 3], [8, 5, 2, 1], [8, 4, 3, 1], [7, 6, 3], [7, 6, 2, 1], [7, 5, 
> 4], [7, 5, 3, 1], [7, 4, 3, 2], [6, 5, 4, 1], [6, 5, 3, 2], [6, 4, 3, 2, 1]]
>
> Cheers,
> Andrew
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sage-combinat-devel/-/p637RNmLhOcJ.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to