Question: Change of the binomial definition

the binomial coefficient  n k  can be defined recursively as follows for all nonnegative integers n, k:

(n)  = {0,      k>0

(k)  = {1       k=0, k=n

         {(n-1)+(n-1), otherwise.

          (k-1)   (k)

I need to complete a deinition of binom so that m so that binom(n,k) returns  n k  for all n greater than 0, and k greater than or equal to 0 using the definition of the binomial above..Any help appreciated..

binom:=
proc(n::TYPE1,k::TYPE2)
description "Compute a binomial coefficient";
option remember;
---MORE STUFF HERE---
end proc; # binom

 

Please Wait...