Three cases:
- distinct parts
- all elements are odd
- number of parts is odd.
We now focus the bijection between case 1 and case 2.
Mathematica code 🏗
distinctPartitionsOf13 = (n |-> Select[IntegerPartitions[n], DuplicateFreeQ[#] &])[13]; oddElementPartitionsOf13 = IntegerPartitions[13, Infinity, Range[1, 13, 2]]; oddPartsPartitionsOf13 = (n |-> Select[IntegerPartitions[n], OddQ@Length@# &])[13]; Length /@ {distinctPartitionsOf13, oddElementPartitionsOf13, oddPartsPartitionsOf13} (* {18,18,52} *) distinctToOddElement
(* Helper function to split even numbers until no evens remain *) splitEven[n_] := If[EvenQ[n], Flatten[{splitEven[n/2], splitEven[n/2]}], n] (* Function to convert a partition with distinct parts to odd parts *) distinctToOddElement[partition_List] := Flatten[splitEven /@ partition] generatedOddElementPartitionsOf13 = distinctToOddElement/@ distinctPartitionsOf13; Sort@Map[Sort, generatedOddElementPartitionsOf13 ] == Sort@Map[Sort, oddElementPartitionsOf13 ] oddElementToDistinct
TODO Reference
Use the method found on OEIS A000009.
Bijection: given n = L1*1 + L2*3 + L3*5 + L7*7 + ..., a partition into odd parts, write each Li in binary, Li = 2^a1 + 2^a2 + 2^a3 + ... where the aj's are all different, then expand n = (2^a1 * 1 + ...)*1 + ... by removing the brackets and we get a partition into distinct parts. For the reverse operation, just keep splitting any even number into halves until no evens remain.