# Revision history [back]

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)


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)


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)