> > > I'm not sure exactly what you mean here. factorial(n) counts the number
> > > of permutations of 'n' elements very efficiently.  Perhaps you mean
>
> > > sage: permutations([1,2,2])
> > > [[1, 2, 2], [2, 1, 2], [2, 2, 1]]
>
> > > Type permutations? for more information on this command.  You may also
> > > be interested in the command 'combinations'.

Also for completeness, for permutations I was referring to
permutations without repetitions. Generally calculated as nPr = n!/(n-
r)!

But I suppose this can easily be calculated with binomial(n,r)
*factorial(r)

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to