Question: How would I create aprocedure that, given n > 2 returns the number of all subsets of {2, . . . , n} of size 3 containing at least one odd integer?

I'm new to using Maple and am trying to create the procedure above. My code so far:

with(combinat):
g:=proc(n)
 local x; local setG; local setG2;
    for x from 1 to n do
        setG:={seq(x+1,x=1..n-1)}; setG2:=choose(setG,3); nops(setG2);
    end do;
end proc; 

Although this doesn't seem to work even though

setG:={seq(x+1,x=1..5)}; setG2:=choose(setG,3); nops(setG2);

Any help would be greatly appreciated!! 

 

Please Wait...