P = [ list(row) for row in P ]
m = min(min(row) for row in P)
return sum(row.count(m) for row in P)
def parent_initializer(n):
class MyPlanePartitions():
for P in PlanePartitions(n):
yield PlanePartition(P[:-1])
card = [1, 1, 3, 6, 13, 24, 48, 86, 160, 282, 500, 859, 1479, 2485, 4167, 6879]
return MyPlanePartitions()
def PlanePartitions(n, outer=None):
for L in Partitions(k, outer=outer):
for Pp in PlanePartitions(n-k, outer=L):
element_repr = lambda X: str([Partition(la) for la in X]).replace(" ","")
levels = [1, 2, 3, 4, 5, 6, 7]
for elt in parent_initializer(level):
print('%s => %s' % (element_repr(elt), statistic(elt)))