I am wondering about this game for a while. Feel free to tell me whether this question is well-defined or not.
Say we have a binomial coefficient $\binom{5}{2}$. It is the number of ways to select two boxes (denoted with $X$) out of five (denoted with $O$). I want to define/construct a sequence $a_n$ of these possible combinations:
$$a_1=(X,X,O,O,O) \\a_2=(O,X,X,O,O) \\... \\a_\binom{5}{2}=(X,O,O,O,X).$$
The above example is easy to do manually because the coefficient is small so I can list the possibilities.
What if I have $\binom{n}{k}$? Is there a way we can define such sequence? I imagine it should be something like $a_i=(a_{i,1},a_{i,2},...,a_{i,n+k})$, and then we can recover each $a_{i,j}$. Of course, it should be without listing all the possibilities first.
I am thinking that we need conditional function at least, don't we? I mean, explicit formulation is great, but inductively or recursively it should be OK too if it exists.
Thanks for the guidance and suggestion.
EDIT: Some have suggested the lexicographic ordering. However, what I intend to find out is how to exactly know which letter is in some index. For example using the above notation, how do I find $a_{9,4}$ without listing them all?
One natural way to order that sequence would be lexicographical, as hinted by the comment of drhab. In your example, ordering the elements lexicographically would give us;
$a_1 = (X,X,O,O,O)$, $a_2 = (X,O,X,O,O)$, $a_3 = (X,O,O,X,O)$, $a_4 = (X,O,O,O,X)$, $a_5 = (O,X,X,O,O)$, $a_6 = (O,X,O,X,O)$, $a_7 = (O,X,O,O,X)$, $a_8 = (O,O,X,X,O)$, $a_9 = (O,O,X,O,X)$, $a_{10} = (O,O,O,X,X)$
It is easy to generalize this to any binomial coefficient.