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 A054352 #45 Apr 25 2024 14:04:27 %S A054352 1,2,4,7,11,18,28,43,65,99,150,226,340,511,768,1153,1728,2590,3885, %T A054352 5826,8742,13116,19674,29514,44280,66431,99667,149531,224306,336450, %U A054352 504648,756961,1135450,1703197,2554846,3832292,5748474,8622646,12933971,19400955,29101203 %N A054352 Lengths of successive generations of the Kolakoski sequence A000002. %C A054352 Starting with a(0) = 1, the first term of A000002, the n-th generation is the run of figures directly generated from the preceding generation completed with a single last figure which begins the next run. Thus a(0) = 1 -> 1-2 -> 1-22-1 -> 1-2211-2-1 etc. - _Jean-Christophe Hervé_, Oct 26 2014 %C A054352 It seems that the limit (c =) lim_{n -> oo} a(n)/(3/2)^n exists, with c = 2.63176..., so a(n) ~ (3/2)*a(n-1) ~ c * (3/2)^n, for large n. - _A.H.M. Smeets_, Apr 12 2024 %H A054352 Michael S. Branicky, <a href="/A054352/b054352.txt">Table of n, a(n) for n = 0..61</a> %F A054352 a(0) = 1, and for n > 0, a(n) = A054353(a(n-1))+1. - _Jean-Christophe Hervé_, Oct 26 2014 %t A054352 A2 = {1, 2, 2}; Do[If[Mod[n, 10^5] == 0, Print["n = ", n]]; m = 1 + Mod[n - 1, 2]; an = A2[[n]]; A2 = Join[A2, Table[m, {an}]], {n, 3, 10^6}]; A054353 = Accumulate[A2]; Clear[a]; a[0] = 1; a[n_] := a[n] = A054353[[a[n - 1]]] + 1; Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Oct 30 2014, after _Jean-Christophe Hervé_ *) %o A054352 (Python) %o A054352 def aupton(nn): %o A054352 alst, A054353, idx = [1], 0, 1 %o A054352 K = Kolakoski() # using Kolakoski() in A000002 %o A054352 for n in range(2, nn+1): %o A054352 target = alst[-1] %o A054352 while idx <= target: %o A054352 A054353 += next(K) %o A054352 idx += 1 %o A054352 alst.append(A054353 + 1) # a(n) = A054353(a(n-1))+1 %o A054352 return alst %o A054352 print(aupton(36)) # _Michael S. Branicky_, Jan 12 2021 %Y A054352 Cf. A054348, A054349, A054350, A054351, A054353, A042942, A000002. %Y A054352 Partial sums of A329758. %K A054352 nonn,easy %O A054352 0,2 %A A054352 _N. J. A. Sloane_, May 07 2000 %E A054352 a(7)-a(32) from _John W. Layman_, Aug 20 2002 %E A054352 a(33) from _Jean-François Alcover_, Oct 30 2014 %E A054352 a(34) and beyond from _Michael S. Branicky_, Jan 12 2021