The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A054352 Lengths of successive generations of the Kolakoski sequence A000002. 9
 1, 2, 4, 7, 11, 18, 28, 43, 65, 99, 150, 226, 340, 511, 768, 1153, 1728, 2590, 3885, 5826, 8742, 13116, 19674, 29514, 44280, 66431, 99667, 149531, 224306, 336450, 504648, 756961, 1135450, 1703197, 2554846, 3832292, 5748474, 8622646, 12933971, 19400955, 29101203 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS 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 LINKS Michael S. Branicky, Table of n, a(n) for n = 0..61 FORMULA a(0) = 1, and for n > 0, a(n) = A054353(a(n-1))+1. - Jean-Christophe Hervé, Oct 26 2014 MATHEMATICA 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é *) PROG (Python) def aupton(nn):   alst, A054353, idx = [1], 0, 1   K = Kolakoski()  # using Kolakoski() in A000002   for n in range(2, nn+1):     target = alst[-1]     while idx <= target:       A054353 += next(K)       idx += 1     alst.append(A054353 + 1)  # a(n) = A054353(a(n-1))+1   return alst print(aupton(36))  # Michael S. Branicky, Jan 12 2021 CROSSREFS Cf. A054348, A054349, A054350, A054351, A054353, A042942, A000002. Sequence in context: A261666 A034412 A289131 * A091838 A288219 A004696 Adjacent sequences:  A054349 A054350 A054351 * A054353 A054354 A054355 KEYWORD nonn,easy,changed AUTHOR N. J. A. Sloane, May 07 2000 EXTENSIONS a(7)-a(32) from John W. Layman, Aug 20 2002 a(33) from Jean-François Alcover, Oct 30 2014 a(34) and beyond from Michael S. Branicky, Jan 12 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 17 02:18 EST 2021. Contains 340213 sequences. (Running on oeis4.)