You can map whole numbers to combinations when taking them in order. For example, 13 choose 3 would look like:
0 --> (0, 1, 2)
1 --> (0, 1, 3)
2 --> (0, 1, 4)
etc...
Given a particular combination, such as (0, 3, 9), is there a way to determine which whole number maps to it (26, in this case), short of writing out all the combinations in order until I hit upon the proper one? Furthermore, is there a way of doing this when counting combinations with repetitions?
If anyone is wondering, this isn't homework, but for a personal programming project.

