A338624 a(n) is the length of the longest block of consecutive terms appearing twice (possibly with overlap) among the first n terms of the Kolakoski sequence (A000002).
0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 17, 18, 18
Offset: 1
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program for A338624
Programs
-
PARI
See Links section.
Formula
a(n) <= a(n+1) <= a(n) + 1.
Comments