Function Repository Resource:

# IndexedOrderedTuple

Give the index of an ordered tuple or return the ordered tuple with that index

Contributed by: Ed Pegg Jr
 ResourceFunction["IndexedOrderedTuple"][choose,index] returns an ordered tuple of length choose with given index. ResourceFunction["IndexedOrderedTuple"][list] gives the index of ordered tuple list.

## Details and Options

For any positive integers n and k, n can be uniquely represented as k binomials, , where the aj terms are strictly increasing.

## Examples

### Basic Examples (3)

Generate a list of the first ten 3-tuples:

 In[1]:=
 Out[1]=

The function can return ordered tuples of a large index:

 In[2]:=
 Out[2]=

Applying the function to an ordered tuple returns the index:

 In[3]:=
 Out[3]=

Any increasing list of integers can be considered as a ordered tuple with a unique index:

 In[4]:=
 Out[4]=

The index above generates a unique ordered 10-tuple:

 In[5]:=
 Out[5]=

### Scope (3)

Here are some ordered 2-tuples with their indices to show their structure:

 In[6]:=
 Out[6]=

The ordered 2-tuple {4,4} has an index of :

 In[7]:=
 Out[7]=

Recover the same information with IndexedOrderedTuple:

 In[8]:=
 Out[8]=

The structure of ordered 3-tuples in 3D:

 In[9]:=
 Out[9]=

### Properties and Relations (3)

Use Tuples to produce ordered 3-tuples:

 In[10]:=
 Out[10]=

The same sequence of ordered 3-tuples can be obtained from ordered Subsets:

 In[11]:=
 Out[11]=

IndexedOrderedTuple returns the same ordered tuples in the same sequence:

 In[12]:=
 Out[12]=

## Version History

• 1.0.0 – 07 November 2019