| 1 | initial version |
Not sure if what you meant was to convert a partition with all parts distinct to a partition where each part is odd. If it was, then, following the bijection from page 10 at [[1]] and assuming you are representing a partition p as a list of natural numbers results in something of the form:
sorted([x.odd_part() for x in p for i in range(x/x.odd_part())],reverse=True)
| 2 | No.2 Revision |
Not sure if what you meant was to convert a partition with all parts distinct to a partition where each part is odd. If it was, then, following the bijection from page 10 at [[1]] [1] and assuming you are representing a partition p as a list of natural numbers results in something of the form:
sorted([x.odd_part() for x in p for i in range(x/x.odd_part())],reverse=True)
| 3 | No.3 Revision |
Not sure if what you meant was to convert a partition with all parts distinct to a partition where each part is odd. If it was, then, following the bijection from page 10 at [1] here and assuming you are representing a partition p as a list of natural numbers results in something of the form:
sorted([x.odd_part() for x in p for i in range(x/x.odd_part())],reverse=True)
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.