Skip to content

combin

Number of unordered selections (combinations) of k from n.

v = combin(number, number_chosen)

Returns n! / (k! · (n-k)!) — the binomial coefficient. Order doesn’t matter and items don’t repeat.

combin(8, 2) % 28
combin(52, 5) % 2598960 (poker hands)
  • combina — Combinations with repetition allowed.
  • permut — Number of ordered selections (permutations) of k from n.
  • fact — Factorial.