Complete Technical Guide to Generate Golomb Number Sequence
Golomb's sequence (OEIS A001462) is the unique non-decreasing sequence of positive integers beginning with a(1) = 1 such that every integer k appears in the sequence exactly a(k) times: 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, ...
Remarkably, Colin Mallows proved its asymptotic growth rate is governed by the Golden Ratio φ = (1 + √5)/2 via a(n) ~ φ^(2−φ) · n^(φ−1) ≈ 1.2030 · n^0.6180.
Golomb's Self-Describing Recurrence
a(1) = 1, a(n) = 1 + a(n - a(a(n - 1))) for n ≥ 2 Asymptotic growth: a(n) ~ φ^(2 - φ) · n^(φ - 1) where φ = (1 + √5)/2
Each positive integer k appears in the non-decreasing sequence exactly a(k) times—1 appears once, 2 appears twice, 3 appears twice, 4 appears three times, and so on.
How to Use Generate Golomb Number Sequence
- 1Pick a quick preset or enter any term count up to 20,000.
- 2Choose comma, space, or newline separation and optionally toggle 1-based term indexing.
- 3Copy plain text, export structured JSON, or download a .txt file with one click.
Reference Examples & Worked Benchmarks
| Index / Milestone | Exact Term | Notes |
|---|---|---|
| a(1)..a(5) | 1, 2, 2, 3, 3 | 1×'1', 2×'2', 2×'3' |
| a(6)..a(8) | 4, 4, 4 | 3×'4' because a(4)=3 |
| a(100) | 21 | Matches φ^(2−φ)·100^(φ−1) |
Practical Applications & Engineering Workflows
Combinatorics & Number Theory
Generate verified terms of OEIS A001462 instantaneously for proofs, OEIS lookups, and test fixtures.
Algorithm & Curriculum Verification
Cross-check exact BigInt outputs without floating-point overflow past 2^53.
Accuracy, Edge Cases & Best Practices
- All calculations run locally in your browser using exact BigInt / sieve arithmetic matching OEIS A001462.
All calculations execute locally inside your browser using JavaScript with zero server round-trips, guaranteeing instant responsiveness and complete data privacy.