| 1 | initial version |
If you need partitions of an integerk into 4 distinct parts, you can rely on Sage Partitions() generator:
for a,b,c,d in Partitions(k, length=4, max_slope=-1):
...
| 2 | No.2 Revision |
If you need partitions of an integerk into 4 distinct parts, you can rely on Sage Partitions() generator:
for a,b,c,d in Partitions(k, length=4, max_slope=-1):
...
If you want additionally to bound the parts, then add max_part=... parameter. See this documentation for all available options.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.