Complete Technical Guide to Generate Gijswijt Sequence
Discovered by Dion Gijswijt (OEIS A090822), Gijswijt's sequence starts with 1 and defines each next term as the maximum integer k such that the existing prefix ends in k consecutive identical blocks (X Y^k)—called the curling number.
Although the sequence is proven to be unbounded (every positive integer eventually appears), its growth is mind-bogglingly slow: 2 first appears at a(3), 3 at a(9), 4 at a(220), and the first 5 does not appear until approximately term 10^(10^23)!
Suffix Curling Number Definition
a(1) = 1
a(n+1) = max { k >= 1 : (a(1)...a(n)) = X · Y^k for some non-empty block Y }
For example, after [1,1,2,1,1,2,2,2], the suffix ends in three consecutive 2s (Y = [2], k = 3), so a(9) = 3.
How to Use Generate Gijswijt Sequence
- 1Generate 225 terms to witness the famous first '4' at a(220).
- 2Toggle 1-based index labels to locate exact milestone positions.
- 3Copy or export JSON/TXT.
Reference Examples & Worked Benchmarks
| Value | First Occurrence Index |
|---|---|
| 1 | a(1) = 1 |
| 2 | a(3) = 2 |
| 3 | a(9) = 3 |
| 4 | a(220) = 4 |
| 5 | ≈ 10^(10^23) (proven finite!) |
Practical Applications & Engineering Workflows
Slow-Growing Sequence Research
Demonstrate how a simple deterministic rule produces astronomically delayed growth.
Accuracy, Edge Cases & Best Practices
- Exact suffix block-matching guarantees 100% agreement with OEIS A090822.
All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.