Combination

Author

Eric W. Weisstein
March 16, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/Combination.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Combination.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

Combinations[n_,k_]:=Subsets[Range[n],{k}]

Examples

With[{n=4},c=Table[Combinations[n,k],{k,0,4}]]//ColumnForm

Length/@c

With[{n=4},Table[Binomial[n,k],{k,0,n}]]