Enumerating integer partitions

303 Views Asked by At

There is a natural way to order all $k=1..p(N)$ partitions of a given integer $N$ ($p(N)$ being a total number of partitions) in a "decreasing" order. Say, for $4$: $$ \{4\},\,\{3,1\},\,\{2,2\},\,\{2,1,1\},\,\{1,1,1,1\}\,. $$ (I think, it's pretty clear how the ordering is defined here.)

I'm wondering if there's a known way to reconstruct the partition from its number $k$ in this sequence, and, vice versa, to determine $k$ by looking at the partition?