> For the complete documentation index, see [llms.txt](https://scenegroup.gitbook.io/cavalry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scenegroup.gitbook.io/cavalry/nodes/utilities/sequence.md).

# Sequence

Generate random (or non random), non-repeating number sequences.

**Auto Index** - when checked the node will automatically output all values within the **Sequence** range.

**Index** - manually select an index within the **Sequence** range.

**Sequence** - set a range of values to create a sequence within.

**Randomize** - when checked the values set in **Sequence** will be randomized.

**Seed** - set the seed used for **Randomize**.

**Skip Indices** - enter values which you want to omit from the range set within **Sequence**. Indices can be entered as comma or hyphen separated values. For example, entering `1, 5, 7:9` would omit the values 1, 5, 7, 8 and 9.

{% hint style="info" %}
Example usage:

1. Create a [Text](/cavalry/nodes/shapes/text-shape.md) Shape.
2. Add a [String Generator](/cavalry/nodes/utilities/string-generator.md) to the **Text**.
   1. Set **Precision** and **Padding** to **0**.
3. Add the **Text Shape** to a [Duplicator](/cavalry/nodes/shapes/duplicator.md).
   1. Set the Duplicator's **Distribution** to **Linear.**
   2. Set the **Count** to **4**.
4. Create a [Color Array](/cavalry/nodes/utilities/color-array.md).
   1. Add **3** more colors to the Array and give each a different color.
   2. Connect ***colorArray.id > textShape.fillcolor***.
5. Create a **Sequence**.
   1. Set values for **Sequence** of **0** and **3**.
   2. Connect ***sequence.id > stringGenerator.number***.
   3. Connect ***sequence.id > colorArray.index***.

If you now scrub **Seed** on the **Sequence** Atom you will get random values but you will never get the same value (or color) appearing twice.
{% endhint %}

![A random sequence of 0-3.](https://1676825895-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LT2-S1m8aSPAI_Gg3Q1%2F-M0XiDBunPB0-cYGJAOZ%2F-M0XiN9POuC6LJdpp4cS%2Fsequence.png?alt=media\&token=4bf79f17-09da-4ea2-aa70-57eb7238d7ad)
