Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

One possibility is to extract by hand the coefficients for partitions with a maximal entry equal to three.

m = SymmetricFunctions(QQ).m()
p = (1 + m[1])^5
q = sum([0] + [p.coefficient(s) * m[s] for s in p.support() if max([0] + list(s)) <= 3])

(The elements in p.support() are partitions, above i have inserted some ad-hoc condition to insure a maximal entry equal to three. Some more partition-like methods may be uses. The lists with one element [0] in the sum and [0] in the max were added to avoid taking sum or max from an empty list.)