All Tools
Categories
Number Tools 69 XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 JSON Tools 45 Text Tools 13 Shipping Freight Tools 5 Calculator 4
About Contact Privacy

Gijswijt Numbers Generator

Generate Gijswijt numbers: 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2... Everyone term is the curling number of the prefix that came before it, and only 1, 2, 3, 4 ever appear - the first 4 lands at position 220. Runs in your browser. Free.

Parameters
1 - 10,000
Each term is the curling number of the whole prefix before it: the largest k such that the prefix ends in k copies of one block.
Sequence

          

About Gijswijt Numbers Generator

Take every prefix of a sequence, ask it how many times it ends with a repeated block, and glue that answer on as the next term. Repeat forever, starting from 1, 1. The result — found by Dion Gijswijt in 1991 — is one of the slowest-growing sequences in mathematics: 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, 1, 1, 2, 2, 2, 3, ... Terms are always 1, 2, 3 or 4, yet the first 4 takes 220 steps to arrive.

Gijswijt Numbers Generator runs the curling-number process exactly: each step scans the current prefix for the largest repeated tail block and appends the answer. Start anywhere, generate thousands of terms, watch the block-decoration structure and the records (1, 2, 3, 4) accumulate in real time.

Features

  • True definition-process: Every term is the curling number of its prefix, computed exactly.
  • Record markers: First occurrences of 2, 3 and 4 are flagged so the slow growth is obvious.
  • Start anywhere: Any origin up to position 1,000,000, with up to 10,000 consecutive terms.
  • Fast prefix scan: A prefix-function scan over the reversed prefix detects maximal repeated tails in near-linear time.
  • Reference tab: Curling-number definition, the no-5 proof sketch, first-occurrence table, and the conjecture.
  • Free and private: All computation is local; nothing is uploaded, stored or logged.

How to Use

  1. Set the start index — which term to begin with (1 to 1,000,000).
  2. Set the count — consecutive terms to generate (1 to 10,000).
  3. Generate — the prefix is built from the beginning, and each curling number is appended exactly.
  4. Watch the records — first occurrences of 2, of 3, and of 4 at 9 and 220.
  5. Copy or download — the run as index = value lines.

Examples

Example 1 — The beginning. Generating 12 terms gives 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2. The prefix "112" ends with two copies of "2", so the third curling answer is 2.

Example 2 — A three-copy tail. Terms 6 to 8: "112112" ends "112112" = two copies of "112"; the next prefix ends in 2, 2, 2, three copies of "2" — so term 8 is 3.

Example 3 — The first 4. Generate from index 215 with count 12: the 4 sits right at position 220, after a carefully stacked tail of nested blocks.

Example 4 — Slow growth. Run 2,000 terms: values stay inside {1, 2, 3, 4}. The count of runs is far larger than the values — the hallmark of this sequence.

Example 5 — Self-similarity. Generate 500 terms and watch the block pattern "112112223" repeat at larger and larger scales — the same shape the proof of no-5 exploits.

Benefits

  • Definition-faithful: The true curling-number process runs; no approximation anywhere.
  • Exact records: First occurrences of each value are computed, not cited.
  • Fast at length: Near-linear steps reach tens of thousands of terms smoothly.
  • Uncluttered output: One index = value per row, copyable and downloadable.
  • Educational reference: Definitions, history and the open conjecture in one tab.
  • Private by design: No uploads, no storage, no logging.

Frequently Asked Questions

What is the Gijswijt sequence?
Start with 1, 1. From then on, each term is the curling number of the entire prefix that already exists. That one rule produces 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, ... — the sequence found by Dion Gijswijt in 1991 while studying a question of Neil Sloane.
What is a curling number?
Write the sequence as X followed by Y repeated k times, where Y is a nonempty block and k is as large as possible. The largest such k is the curling number. For "1222" the tail is 2, 2, 2 = three copies of Y = 2, so the curling number is 3.
Why does the number 5 never appear?
Gijswijt proved the sequence built this way contains only 1, 2, 3 and 4. Values grow enormously slowly: the first 3 needs 9 terms, and the first 4 waits until position 220. The proof uses the self-similar block structure of the sequence itself.
Where does the first 4 appear?
At position 220, after a tail built from a stack of repeating blocks. Generating a few hundred terms here shows exactly where it lands and what the prefix looks like.
What is the curling number conjecture?
Start with any finite sequence whose terms are positive integers, append its curling number, and repeat. The conjecture claims the process gets stuck at 1s and the suffix becomes periodic in the end — verified for enormous families but still open in general. The Gijswijt sequence is the special case starting from 1, 1.
How does this generator compute terms?
For each step it needs the largest k such that the current prefix ends in k equal blocks. The tool detects such tails with a prefix-function scan over the reversed prefix, which is exact and fast for many thousands of terms.
Is anything stored or uploaded?
No. Every term is computed locally in your browser from the definition. Nothing is sent to a server, saved or logged. Copy or download your run before closing the tab.