Gijswijts Sequence Generator
Generate terms of Gijswijt's slow-growing sequence (curling numbers) with configurable range and format.
What is Gijswijts Sequence?
Gijswijt's sequence (OEIS A090822) is an integer sequence that is famous in number theory and recreational mathematics for its incredibly slow growth. It is a self-describing sequence that uses the mathematical concept of **curling numbers** to determine each successive term.
How is the Sequence Generated?
The sequence starts with $a_1 = 1$. To generate any subsequent term $a_n$, you look at the prefix sequence generated so far: $a_1, a_2, \dots, a_{n-1}$.
Find the **curling number** of this prefix sequence. The curling number is the largest integer $k$ such that the sequence can be written in the form $X Y^k$, where $Y$ is a non-empty block of numbers, $X$ is any prefix, and $Y^k$ represents $k$ consecutive copies of the block $Y$. The maximum value $k$ becomes the next term $a_n$.
Let's trace the first few terms:
- Start: $1$. Suffix is $1^1$ $\implies$ next term is **$1$**. (Sequence: $1, 1$)
- Prefix: $1, 1$. Suffix is $1^2$ $\implies$ next term is **$2$**. (Sequence: $1, 1, 2$)
- Prefix: $1, 1, 2$. No blocks repeat $\implies$ next term is **$1$**. (Sequence: $1, 1, 2, 1$)
- Prefix: $1, 1, 2, 1$. No blocks repeat $\implies$ next term is **$1$**. (Sequence: $1, 1, 2, 1, 1$)
- Prefix: $1, 1, 2, 1, 1$. Suffix is $1^2$ $\implies$ next term is **$2$**. (Sequence: $1, 1, 2, 1, 1, 2$)
- Prefix: $1, 1, 2, 1, 1, 2$. Suffix is $(1, 1, 2)^2$ $\implies$ next term is **$2$**. (Sequence: $1, 1, 2, 1, 1, 2, 2$)
Mind-Bogglingly Slow Growth
Although Gijswijt's sequence contains every single natural number (1, 2, 3, 4, 5, 6, 7, ...), the indices at which new numbers first appear are shockingly large:
- The first **$1$** appears at term $1$.
- The first **$2$** appears at term $3$.
- The first **$3$** appears at term $9$.
- The first **$4$** appears at term **$220$**.
- The first **$5$** is estimated to appear around term $10^{10^{23}}$, a number so large it dwarfs the number of atoms in the observable universe!
How to Use the Gijswijts Sequence Generator
Our highly optimized, real-time generator lets you explore this fascinating sequence:
- Enter the Number of Terms you want to generate (up to 1,000 terms).
- Choose a Separator (comma, space, new line, semicolon, pipe) or select "None".
- Toggle Show 1-Based Index Labels to display the term count next to each number.
- View the **Sequence Statistics** box on the right to see if your sequence successfully reached the number 4 (requires $\ge 220$ terms).
- Click Generate to process the sequence, then copy it or download the output as a text file.
Frequently Asked Questions
Who discovered this sequence?
It is named after Dion Gijswijt, a Dutch mathematician who proposed the sequence in 2004 while studying curling numbers and sequence repetitions.
What is the "Curling Number Conjecture"?
The Curling Number Conjecture states that for any starting finite sequence, if you continuously append the curling number of the sequence, the sequence will eventually enter a pattern where the curling number is periodically 1, 2, or 3, unless the sequence enters the regular Gijswijt's sequence.
Why is the maximum term limit set to 1,000?
Finding repeating suffixes (curling numbers) for each term is an $O(N^2)$ operation. To ensure instant rendering and prevent your browser from freezing on mobile devices, the generator is capped at 1,000 terms, which takes only a fraction of a millisecond in modern JavaScript.
Is all of my generated data private?
Yes! The entire sequence computation runs locally on your computer inside your web browser. No data is sent to our servers, keeping your calculations private, secure, and lightning-fast.
Related tools
Your recent visits