login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079729 Kolakoski variation using (1,2,3) starting with 1,2. 2
1, 2, 2, 3, 3, 1, 1, 1, 2, 2, 2, 3, 1, 2, 3, 3, 1, 1, 2, 2, 3, 3, 3, 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, 3, 1, 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, 2, 2, 3, 1, 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, 2, 2, 3, 1, 2, 3, 3, 1, 1, 1, 2, 3, 1, 1, 2, 2, 3, 3, 3, 1, 1, 1, 2, 2, 2, 3, 1, 2, 3, 3, 1, 1, 2, 2, 3, 3, 3, 1, 2, 3, 3, 1, 1, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(1)=1 then a(n) is the length of n-th run.

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..10000

FORMULA

Partial sum sequence is expected to be asymptotic to 2*n.

EXAMPLE

Sequence begins: 1,2,2,3,3,1,1,1,2,2,2,3,1,2,3,3,1,1,... read it as: (1),(2,2),(3,3),(1,1,1),(2,2,2),(3),(1),(2),(3,3),(1,1),... then count the terms in parentheses to get: 1,2,2,3,3,1,1,1,2,2,... which is the same sequence.

MATHEMATICA

seed = {1, 2, 3}; w = {}; i = 1; Do[w = Join[w, Array[seed[[Mod[i - 1, Length[seed]] + 1]] &, If[i > Length[w], seed, w][[i]]]]; i++, {n, 53}]; w (* Ivan Neretin, Apr 02 2015 *)

PROG

(PARI) a=[1, 2, 2]; for(n=3, 100, for(i=1, a[n], a=concat(a, 1+((n-1)%3)))); a; \\ Benoit Cloitre, Feb 13 2009

CROSSREFS

Cf. A000002.

Sequence in context: A164089 A068460 A143797 * A071859 A135695 A105899

Adjacent sequences:  A079726 A079727 A079728 * A079730 A079731 A079732

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Feb 17 2003

EXTENSIONS

More terms from Philippe Deléham, Sep 24 2006

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified April 27 09:21 EDT 2017. Contains 285508 sequences.