Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #12 Jul 19 2021 01:22:59
%S 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,
%T 10,10,10,10,10,10,11,12,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
%U 14,14,14,14,14,14,14,14,14,14,14,14,15,16,17,18,18
%N 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).
%C This sequence is weakly increasing and unbounded (as A000002 is bounded).
%H Rémy Sigrist, <a href="/A338624/b338624.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A338624/a338624.gp.txt">PARI program for A338624</a>
%F a(n) <= a(n+1) <= a(n) + 1.
%o (PARI) See Links section.
%Y Cf. A000002, A338623 (Thue-Morse variant).
%K nonn
%O 1,6
%A _Rémy Sigrist_, Nov 04 2020