Npr and Ncr functions



On Wed, 2011-07-20 at 21:12 +1000, Daniel Dalton wrote:

> I was just wondering if anyone knew how to use the Npr and Ncr functions
> in maxima? (Presuming maxima has this functionality)... 

I haven't seen them in Maxima, but you can define them easily:

(%i3) nPr(n,r):=n!/(n-r)!$

(%i4) nCr(n,r):=nPr(n,r)/r!$

(%i5) nPr(4,2);
(%o5)                        12
(%i6) nCr(4,2);
(%o6)                        6

Regards,
Jaime