Free Online Utility • MATH Studio • Exact BigInt Engine

Generate Gijswijt Sequence

Generate Gijswijt's curling-number sequence (OEIS A090822: 1, 1, 2, 1, 1, 2, 2, 2, 3, 1, 1, 2, ...) where each term is the maximum contiguous suffix repeat count k, including the famous first 4 at a(220).

Formula & Quick Reference Live Engine
a(1) = 1
a(n+1) = max { k >= 1 : (a(1)...a(n)) = X · Y^k for some non-empty block Y }
1a(1) = 1
2a(3) = 2
3a(9) = 3
OEIS A090822 • Suffix Curling Number Sequence
Gijswijt's Sequence

        
Instant client-side computation • Exact sequence math OEIS Verified

Session Calculation Log

No entries recorded in this session yet.

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

  1. 1Generate 225 terms to witness the famous first '4' at a(220).
  2. 2Toggle 1-based index labels to locate exact milestone positions.
  3. 3Copy or export JSON/TXT.

Reference Examples & Worked Benchmarks

ValueFirst Occurrence Index
1a(1) = 1
2a(3) = 2
3a(9) = 3
4a(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.

Frequently Asked Questions

Where does the number 4 first appear in Gijswijt's sequence?
At index a(220) = 4 (1-based indexing).
Does the number 5 ever appear in Gijswijt's sequence?
Yes—mathematicians proved every positive integer appears, with the first 5 estimated around index 10^(10^23).