Generate Gijswijt’s Sequence

Generate Gijswijt's sequence — an extremely slowly growing sequence where each term counts the maximum number of repeated blocks at the end of the sequence so far. It takes about 10^(10^23) terms to reach the value 5.

Options
Gijswijt's Sequence Options
Starting index for Gijswijt’s self-referential sequence.
How many elements to generate?
Delimiter among sequence elements.
(Newline by default.)
Output (Gijswijt’s Sequence)

What It Does

Generate Gijswijt's sequence — an extremely slowly growing sequence where each term counts the maximum number of repeated blocks at the end of the sequence so far. It takes about 10^(10^23) terms to reach the value 5.

How It Works

Generate Gijswijt’s Sequence produces new output from rules, parameters, or patterns instead of editing an existing document. That makes input settings more important than input text, because the settings are what define the shape of the result.

Generators are only as useful as the settings behind them. When the output seems off, check the count, range, delimiter, seed values, or pattern options before judging the result itself.

All processing happens in your browser, so your input stays on your device during the transformation.

Common Use Cases

  • Study extremely slowly growing sequences
  • Explore the boundary between computability and practical computation
  • Research sequence complexity
  • Educational demonstration of deceptively simple definitions
  • Mathematical recreation and puzzle exploration

How to Use

  1. Specify term count.
  2. Click Generate.
  3. View the sequence.
  4. Copy.

Features

  • Generates terms of Gijswijt's sequence
  • Explains the block-counting rule
  • Shows how slowly 5 appears
  • Handles standard computation range
  • Growth rate information

Examples

Below is a representative input and output so you can see the transformation clearly.

Input
n: 9
Output
1 1 2 1 1 2 2 2 3

Edge Cases

  • Very large inputs can still stress the browser, especially when the tool is working across many numbers. Split huge jobs into smaller batches if the page becomes sluggish.
  • Empty or whitespace-only input is technically valid but may produce unchanged output, which can look like a failure at first glance.
  • If the output looks wrong, compare the exact input and option values first, because Generate Gijswijt’s Sequence should be repeatable with the same settings.

Troubleshooting

  • Unexpected output often means the input is being split or interpreted at the wrong unit. For Generate Gijswijt’s Sequence, that unit is usually numbers.
  • If a previous run looked different, check for hidden whitespace, changed separators, or a setting that was toggled accidentally.
  • If nothing changes, confirm that the input actually contains the pattern or structure this tool operates on.
  • If the page feels slow, reduce the input size and test a smaller sample first.

Tips

Despite its simple definition, this sequence grows so slowly that the first occurrence of 5 requires more terms than there are atoms in the observable universe.

Gijswijt's Sequence

Start with 1. Each subsequent term is the largest k such that the sequence ends with k copies of some block. The sequence begins: 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, .... It reaches 4 at position 220. Reaching 5 requires approximately 10^(10^23) terms.

Frequently Asked Questions

When does 4 first appear?

At position 220.

When does 5 first appear?

After approximately 10^(10^23) terms — a number beyond practical computation.

Does the sequence ever reach 6?

Yes, eventually, but the position is incomprehensibly larger than the position of 5.

Is the sequence unbounded?

Yes. It is proven to grow without bound, just extraordinarily slowly.

Who discovered it?

Dion Gijswijt described it and its properties.

Why is it interesting?

It demonstrates that simple definitions can produce sequences with growth rates that exceed any practical computation.