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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216637 Kolakoski sequence by 3-words. 0
3, 1, 3, 3, 1, 1, 5, 1, 3, 1, 1, 3, 3, 1, 3, 2, 2, 3, 3, 1, 3, 3, 1, 1, 3, 2, 3, 3, 1, 3, 3, 1, 1, 5, 1, 3, 3, 1, 1, 3, 1, 1, 5, 1, 1, 5, 4, 5, 5, 1, 5, 5, 1, 1, 5, 4, 5, 5, 1, 1, 5, 1, 3, 1, 1, 3, 2, 3, 3, 1, 3, 3, 1, 1, 3, 1, 1, 5, 5, 1, 3, 1, 1, 5, 1, 1, 5, 5, 1, 3, 1, 1, 3, 3, 1, 3, 2, 2, 3, 3, 2, 3, 3, 1, 3, 3, 1, 1, 5, 1, 3, 3, 1, 3, 2, 3, 3, 1, 1, 3, 3, 1, 3, 2, 3, 3, 2, 2, 6, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The Kolakoski sequences (A000002) can be seen as being formed from the 6-set of 3-words -> {1,1,2}, {1,2,1}, {1,2,2}, {2,1,1}, {2,1,2} and {2,2,1}. Labeling these as 1-6 gives the sequence.

The first 6 appears at a(129).

LINKS

Table of n, a(n) for n=1..130.

EXAMPLE

1,2,2,1,1,2 becomes 3,1

PROG

(JavaScript)

a=new Array();

a[1]=1; a[2]=2; a[3]=2; cd=1; ap=3;

for (i=4; i<1000; i++) {

if (a[ap]==1) a[i]=cd; else {a[i]=cd; a[i+1]=cd; i++}

ap++; cd=3-cd; }

for(i=1; i<300; i++) {

b=a.splice(1, 3).join();

switch (b) {

case "1, 1, 2": {document.write("1, "); break; }

case "1, 2, 1": {document.write("2, "); break; }

case "1, 2, 2": {document.write("3, "); break; }

case "2, 1, 1": {document.write("4, "); break; }

case "2, 1, 2": {document.write("5, "); break; }

case "2, 2, 1": {document.write("6, "); break; }

}

}

CROSSREFS

Cf. A000002.

Sequence in context: A122431 A279340 A089607 * A234308 A050141 A274773

Adjacent sequences:  A216634 A216635 A216636 * A216638 A216639 A216640

KEYWORD

nonn

AUTHOR

Jon Perry, Sep 11 2012

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 8 07:34 EDT 2020. Contains 335513 sequences. (Running on oeis4.)