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
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
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
return alst
print(aupton(36)) # Michael S. Branicky, Jan 12 2021
CROSSREFS
KEYWORD
nonn,easy
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