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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A249507 Length of full iterated word (direct branch and reverse branch) of the Kolakoski sequence A000002 initiated at A000002(n). If the reverse branch is longer than the direct branch, the total length is counted negatively: if A000002(n) = 2, a(n) = 0; if A000002(n) = 1, a(n) = (ld+lr-1)*sign(ld-lr) with ld = max { k | A000002(n-i+1) = A000002(i), 0<i<=k } and lr = max { k | A000002(n-i+1) = A000002(i), 0<i<=k }. 8
0, 0, -4, 2, 0, 5, 0, 0, 10, 0, 0, -4, 2, 0, -2, 4, 0, 0, -8, 0, -2, 2, 0, 8, 0, 0, -4, 2, 0, -2, 2, 0, 5, 0, 0, 14, 0, 0, -4, 2, 0, 5, 0, 0, -5, 0, -2, 2, 0, -2, 4, 0, 0, 24, 0, 0, -4, 2, 0, 5, 0, 0, 10, 0, 0, -4, 2, 0, -2, 2, 0, 5, 0, 0, -5, 0, -2, 4, 0, 0, 38, 0, 0, -4, 2, 0, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
COMMENTS
The Kolakoski sequence A000002 has a fractal structure that appears in the infinite number of iterations and reverse iterations of itself that it contains. Each iteration develops itself in two branches, a right branch in the direct sense, and a left branch in the reverse sense, e.g., 122-1-221121. This sequence gives the length of the full iterated word with its right and left branches starting at position n (with a length = 0 if A000002(n) = 2 <> A000002(1) = 1).
Each iterated word is generated by a preceding and shorter one, starting with 12 or 21 with the 1 in odd position. 12 for example gives, as long as the image of the initial 1 remains in odd position: 12 > 2-1-221 > 122-1-221121 > ... (21 generates the same succession with words in reverse order). The right branch is thus always formed by a term of A054351 (successive generations of the OK sequence), and the left branch by a term of the same sequence in reverse order.
The lengths of the 2 branches are never equal, because a fully symmetric iterated word would necessitate at the beginning the word 12121, which never appears in the OK sequence (it would need 111 before in the OK sequence to appear), but the 2 branches cannot differ by more than two successive generations, again because a greater difference would imply an impossible word at the beginning, namely 1-1221-1.
The iterated words are initiated by the 1's in the OK sequence, but the 1's in pairs 11 can only lead to very short iterated words: (1)-1-2(1) or (1)-1-221(2), or the same in reverse order, with values in this sequence of +/-2 or +/-4. On the contrary, each of the single 1's (212) in the OK sequence (except the first) is associated with an iterated word of length at least five, and (conjecture) it is likely that there is no bound to the length of iterated words associated with a single 1.
The number of iterated words with the right branch longer than the left seems to be well balanced, so that (conjecture) the limit of partial sums of this sequence could be o(n).
LINKS
Jean-Christophe Hervé, Table of n, a(n) for n = 2..99990
FORMULA
a(n) = (A249093(n) + A249094(n) - min(1, A249093(n))) * sign(A249093(n) - A249094(n)).
EXAMPLE
The OK sequence begins as (highlighting the 10th term): 122112122-1-2211211221211... where the iterated word 122-1-221121 of length 10 can be seen around the 10th term; thus a(10) = 10.
CROSSREFS
Sequence in context: A016690 A136715 A077116 * A348596 A135730 A188595
KEYWORD
sign
AUTHOR
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 May 12 06:47 EDT 2024. Contains 372432 sequences. (Running on oeis4.)