Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Some combinatorial lists related to partitions.

I want to generate the lists on the right hand side of the arrow.

P (partitions)        --> D (no name?)
[1, 1, 1, 1, 1, 1, 1] --> [0, 0, 0, 0, 0, 0, 1]
[2, 2, 2, 1]          --> [0, 0, 1, 1]
[2, 2, 1, 1, 1]       --> [0, 1, 0, 0, 1]
[2, 1, 1, 1, 1, 1]    --> [1, 0, 0, 0, 0, 1]
[3, 3, 1]             --> [0, 2, 1]
[3, 2, 2]             --> [1, 0, 2]
[3, 2, 1, 1]          --> [1, 1, 0, 1]
[3, 1, 1, 1, 1]       --> [2, 0, 0, 0, 1]
[4, 3]                --> [1, 3]
[4, 2, 1]             --> [2, 1, 1]
[4, 1, 1, 1]          --> [3, 0, 0, 1]
[5, 2]                --> [3, 2]
[5, 1, 1]             --> [4, 0, 1]
[6, 1]                --> [5, 1]
[7]                   --> [7]

Assume 1-based lists. They have the properties:

   P[1]   = sum(D)
   sum(P) = sum(i*t for (i,t) in enumerate(D))

My questions: is there a method in Sage which returns these lists? If not, what is the best method to generate them given the other methods of Sage? What is the name of these lists if they have one?