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?