cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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), 0A000002(n-i+1) = A000002(i), 0

Original entry on oeis.org

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
Offset: 2

Views

Author

Jean-Christophe Hervé, Oct 30 2014

Keywords

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).

Examples

			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

Formula

a(n) = (A249093(n) + A249094(n) - min(1, A249093(n))) * sign(A249093(n) - A249094(n)).

A249508 Lengths of complete iterations (direct and reverse branches) of the Kolakoski sequence A000002.

Original entry on oeis.org

2, 4, 5, 8, 10, 14, 17, 24, 28, 38, 45, 60, 70, 92, 107, 141, 163, 214, 248, 324, 375, 489, 565, 736, 850, 1107, 1278, 1663, 1920, 2495, 2880, 3742, 4317, 5612, 6474, 8415, 9710, 12626, 14567, 18941, 21857, 28415, 32789, 42629, 49187, 63953, 73793, 95944, 110710, 143946, 166097
Offset: 1

Views

Author

Jean-Christophe Hervé, Oct 30 2014

Keywords

Comments

See comments in A249507 for a description of iterated words in the Kolakoski sequence.

Examples

			The OK sequence begins as (highlighting an iteration of length 10): 122112-1221221121-1221211.., where iterations of length 2, 4, 5 and 8 can also be seen.
		

Crossrefs

Formula

a(2n+1) = A054352(n+1) + A054352(n) - 1;
a(2n+2) = A054352(n+2) + A054352(n) - 1.

A249094 Length of reverse self-iteration of the Kolakoski sequence A000002 starting at A000002(n): a(n) = max { k | A000002(n-i+1) = A000002(i), 0 < i <= k }.

Original entry on oeis.org

0, 0, 4, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 1, 0, 0, 7, 0, 2, 1, 0, 2, 0, 0, 4, 1, 0, 2, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 0, 0, 4, 0, 2, 1, 0, 2, 1, 0, 0, 7, 0, 0, 4, 1, 0, 2, 0, 0, 4, 0, 0, 4, 1, 0, 2, 1, 0, 2, 0, 0, 4, 0, 2, 1, 0, 0, 11, 0, 0, 4, 1, 0, 2
Offset: 2

Views

Author

Jean-Christophe Hervé, Oct 30 2014

Keywords

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 reverse iteration (or left branch) starting at position n, with a length = 0 if A000002(n) = 2 <> A000002(1) = 1.
The lengths of the right branches are in A249093 and the lengths of the full iterations with the two branches are in A249507.
Recalling that A000002 begins as 1221121221..., the apparition of these iterations is easily understood from the evolution of an initial 2 in even position in A000002, which generates: 2 > (1)22(1) > (2)122112(1) > (1)221221121221(2)... (as long as the equivalent of the initial 2 in the successive iterates remains in even position).
Because each iteration must be generated by a preceding (and shorter) iteration, each branch is constituted of a term of A054351 (successive generations of the Kolakoski sequence) in reverse order for the left branches, and the nonzero values of this sequence are all in A054352. Any given value > 1 cannot appear in this sequence before the other smaller values.

Examples

			A000002(n) = 2 => a(n) = 0 since the Kolakoski sequence begins with 1. a(10) = 4 since A000002(7:10) = A000002(1:4) and A000002(6) <> A000002(5).
		

Crossrefs

A249942 Ranks of single 1's in the Kolakoski sequence A000002.

Original entry on oeis.org

7, 10, 20, 25, 34, 37, 43, 46, 55, 61, 64, 73, 76, 82, 88, 91, 101, 106, 109, 118, 128, 137, 143, 146, 152, 155, 164, 170, 173, 182, 187, 196, 199, 205, 211, 214, 223, 233, 236, 241, 251, 260, 263, 268, 277, 280, 286, 289, 298, 301, 307, 313, 316, 326, 331, 334
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 08 2014

Keywords

Comments

The single 1's whose ranks are given by this sequence are the 1's between two 2's in the OK sequence A000002. They are associated with iterated words of the OK sequence that develop themselves around each single 1 in two branches (for a description of the iterated words, see comments in A249507, which gives their lengths). The first term of A000002, which is indeed a single 1 but not between two 2's, is thus not considered here.
Each such single 1 is generated by a preceding 1 in the OK sequence that could be single or double, but each single 1 has a double 1 in its ancestors since the first 1 of the OK sequence has no descendants except itself. The length of the iterated word around a single 1 is linked to the number of generations between itself and its nearest double 1 ancestor (A249949 gives the number of generations of the n-th single 1).
A249948 gives the gaps between single 1's.

Crossrefs

Formula

a = {A054353(2k+1), k>1 and A000002(2k+1) = 1}.
Odd values of A216345: A216345(2k+1), k>0, such that A216345(2k+2) =
A216345(2k+1)+1.

A249949 Number of generations between each single 1 in the Kolakoski sequence A000002 and its nearest double 1 ancestor.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 4, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 5, 1, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 6, 1, 2, 1, 1, 1, 2, 1, 2, 1, 4
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 09 2014

Keywords

Comments

The single 1's that are considered in this sequence are the 1's between two 2's in the OK sequence A000002 (the first term of A000002 which is indeed a single 1 but not between two 2's is thus not considered here). Each such single 1 is generated by a preceding 1 in the OK sequence that could be single or double, but each single 1 has at least a double 1 in its ancestors since the first 1 of the OK sequence has no descendance except itself. This sequence gives the number of generations between the n-th single 1 in A000002 and its nearest double 1 ancestor. A249942 gives the position of the single 1's in A000002.
The single 1's of the OK sequence are associated with iterated words which develop themselve around each single 1 in two branches; for a description of the iterated words, see comments in A249507 which gives their lengths.
The length of the iterated word around a single 1 is equal to A249507(2*a(n)+1) or to A249507(2*a(n)+2).
Conjecture: this sequence takes all integers k >= 1 as values, so there is no bound to the length of the iterated words that appear in the Kolakoski sequence; the limiting frequency of k is 2/3^k.

Crossrefs

Showing 1-5 of 5 results.