This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A022292 #29 May 11 2021 09:06:45 %S A022292 0,2,4,6,8,10,14,16,18,20,22,24,26,28,30,36,38,40,42,44,46,48,50,54, %T A022292 56,58,60,62,64,68,70,72,74,76,78,80,82,86,88,98,104,106,116,118,122, %U A022292 124,126,128,130,132,136,138,140,142,144,146,148,150,152,158 %N A022292 Exactly half of first a(n) terms of Kolakoski sequence A000002 are 1's (not known to be infinite). %C A022292 The sequences A022292, A074261, and A342799 partition the nonnegative integers. - _Clark Kimberling_, May 10 2021 %H A022292 Joerg Arndt, <a href="/A022292/b022292.txt">Table of n, a(n) for n = 0..8739</a> %F A022292 Conjecture: a(n) is asymptotic to c*n*log(n) for some constant c <= 1. - _Benoit Cloitre_, Nov 17 2003 %t A022292 k = Prepend[Nest[Flatten[Partition[#, 2] /. {{2, 2} -> {2, 2, 1, 1}, {2, 1} -> {2, 2, 1}, {1, 2} -> {2, 1, 1}, {1, 1} -> {2, 1}}] &, {2, 2}, 14], 1]; (* A000002 *) %t A022292 Select[Range[400], Count[Take[k, #], 1] < #/2 &] (* A074261 *) %t A022292 Select[Range[400], Count[Take[k, #], 1] == #/2 &] (* A022292 *) %t A022292 Select[Range[400], Count[Take[k, #], 1] > #/2 &] (* A342799 *) %t A022292 (* _Clark Kimberling_, May 10 2021 *) %o A022292 (JavaScript) %o A022292 a=new Array(); %o A022292 a[1]=1; a[2]=2; a[3]=2; cd=1; ap=3; %o A022292 for (i=4; i<1000; i++) %o A022292 { %o A022292 if (a[ap]==1) a[i]=cd; %o A022292 else {a[i]=cd; a[i+1]=cd; i++} %o A022292 ap++; %o A022292 cd=3-cd; %o A022292 } %o A022292 oc=0; tc=0; %o A022292 for (i=1; i<1000; i++) %o A022292 { %o A022292 if (oc==tc) document.write(i-1+", "); %o A022292 if (a[i]==1) oc++; %o A022292 else tc++; %o A022292 } %o A022292 // _Jon Perry_, Sep 11 2012 %Y A022292 Cf. A000002, A074261, A022293, A342799. %K A022292 nonn %O A022292 0,2 %A A022292 _Clark Kimberling_ %E A022292 0 prepended by _Jon Perry_, Sep 11 2012