login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo

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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054351 Successive generations of the Kolakoski sequence A000002. 11
1, 12, 1221, 1221121, 12211212212, 122112122122112112, 1221121221221121122121121221, 1221121221221121122121121221121121221221121, 12211212212211211221211212211211212212211212212112112212211212212 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..8.

PROG

(Python)

from itertools import accumulate, groupby, repeat

def K(n, _):

c, s = "12", ""

for i, k in enumerate(str(n)): s += c[i%2]*int(k)

return int(s + c[(i+1)%2])

def aupton(nn): return list(accumulate(repeat(1, nn+1), K))

print(aupton(8)) # Michael S. Branicky, Jan 12 2021

CROSSREFS

Cf. A054348, A054349, A054350, A054352, A042942, A000002.

Word lengths give A054352.

Sequence in context: A317955 A033564 A301474 * A080814 A340834 A078294

Adjacent sequences: A054348 A054349 A054350 * A054352 A054353 A054354

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, May 07 2000

EXTENSIONS

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 05 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 29 08:40 EST 2022. Contains 358422 sequences. (Running on oeis4.)