| 1 | initial version |
I don't think there is a method that allows you to do this. This is one step away:
sage: list(WeightedIntegerVectors(3, [1,1]))
[[0, 3], [1, 2], [2, 1], [3, 0]]
(This gives all lists of integers [a,b] so that 1*a + 1*b = 3.) So:
sage: R.<x,y> = PolynomialRing(QQ, 2)
sage: degs = WeightedIntegerVectors(3, [1,1])
sage: [x^d[0] * y^d[1] for d in degs]
[y^3, x*y^2, x^2*y, x^3]
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.