Sorry to reply to myself, but I just realized that I haven't done support for duplicates in OrderedSetPartitions so ignore my previous post :)
--Mike On Jan 23, 2008 11:47 AM, Mike Hansen <[EMAIL PROTECTED]> wrote: > > I have a simple function that (like your example) can compute things > > for size=2. I am trying to figure out how to generalize to arbitrary > > size. > > Here's an example of how you can do it in Sage: > > sage: a = factor(2*3*3*5*7*13);a > 2 * 3^2 * 5 * 7 * 13 > sage: b = sum([ [f]*mult for f,mult in a], []); b > [2, 3, 3, 5, 7, 13] > sage: size = 3 > sage: c = [ [ prod(sp) for sp in osps ] for osps in > OrderedSetPartitions(b, size) ] > > where c is your list of "multiplicative partitions". If you don't > care about order, just replace OrderedSetPartitions with > SetPartitions. > > --Mike > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---