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.

Previous Showing 21-30 of 297 results. Next

A013948 Positions of 2's in Kolakoski sequence (A000002).

Original entry on oeis.org

2, 3, 6, 8, 9, 11, 12, 15, 18, 19, 21, 24, 26, 27, 30, 33, 35, 36, 38, 39, 42, 44, 45, 47, 50, 53, 54, 56, 57, 60, 62, 63, 65, 66, 69, 72, 74, 75, 77, 80, 81, 83, 84, 87, 89, 90, 92, 93, 96, 99, 100, 102, 105, 107, 108, 110, 111, 114, 117, 119, 120, 123, 126, 127, 129, 132, 135
Offset: 1

Views

Author

Keywords

Crossrefs

Complement: A013947.

Formula

Numbers n such that A078649(A054353(n-1)-n+2)-A054353(n-1)=1. [Benoit Cloitre, Feb 08 2009]
Least k such that A054353(k)>=A078649(n). a(n)=A078649(n)-n+1. [Benoit Cloitre, Feb 07 2009]

A187199 Parse the Kolakoski sequence A000002 into distinct phrases 1, 2, 21, 12, 122, 1221, 121, 12212, 11, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 5, 2, 3, 3, 4, 6, 3, 6, 4, 2, 5, 4, 6, 4, 3, 5, 7, 4, 5, 7, 5, 4, 6, 6, 5, 5, 6, 6, 4, 8, 5, 5, 9, 10, 7, 9, 8, 7, 5, 8, 11, 5, 6, 6, 7, 8, 7, 6, 6, 7, 7, 7, 9, 4, 4, 8, 8, 10, 5, 7, 8, 7, 9, 8, 12, 6, 10, 6, 8, 6, 10, 7, 9, 9, 8, 7, 8, 7, 9, 8, 7, 8, 8, 9, 9, 10, 8, 10, 9, 8, 11, 5, 6
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Crossrefs

Programs

  • PARI
    \\ See Links section.

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.

A332875 Sizes of maximal weakly increasing subsequences of A000002.

Original entry on oeis.org

3, 3, 3, 3, 3, 4, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 2, 4, 3, 3, 3, 3, 3, 4, 2, 3, 3, 3, 3, 3, 3, 3, 4, 2, 3, 4, 3, 3, 3, 2, 4, 3, 2, 3, 4, 3, 3, 3, 2, 3, 4, 2, 3, 3, 3, 3, 3, 2, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 2, 3, 3, 3, 4, 2, 3, 4, 3
Offset: 1

Views

Author

Gus Wiseman, Mar 08 2020

Keywords

Examples

			The weakly increasing subsequences begin: (1,2,2), (1,1,2), (1,2,2), (1,2,2), (1,1,2), (1,1,2,2), (1,2), (1,1,2), (1,2,2), (1,1,2), (1,1,2), (1,2,2), (1,2,2).
		

Crossrefs

The number of runs in the first n terms of A000002 is A156253.
The weakly decreasing version is A332273.

Programs

  • Mathematica
    kolagrow[q_]:=If[Length[q]<2,Take[{1,2},Length[q]+1],Append[q,Switch[{q[[Length[Split[q]]]],q[[-2]],Last[q]},{1,1,1},0,{1,1,2},1,{1,2,1},2,{1,2,2},0,{2,1,1},2,{2,1,2},2,{2,2,1},1,{2,2,2},1]]]
    kol[n_Integer]:=Nest[kolagrow,{1},n-1];
    Length/@Split[kol[40],#1<=#2&]

Formula

a(n) = A000002(2*n - 1) + A000002(2*n).

A007782 Number of factors in the infinite word formed by the Kolakoski sequence A000002.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 18, 26, 34, 42, 50, 62, 78, 94, 110, 126, 142, 162, 186, 218, 250, 282, 314, 346, 378, 410, 446, 486, 534, 590, 654, 718, 782, 846, 910, 974, 1038, 1102, 1166, 1234, 1302, 1378, 1458, 1554, 1658, 1774, 1898, 2026, 2154, 2282, 2410, 2538, 2666
Offset: 0

Views

Author

Patricia Lamas (lamas(AT)math.uqam.ca)

Keywords

Comments

a(n) = number of different substrings of length n found in Kolakoski sequence A000002. It is conjectured that a(n) grows like n^(log(3)/log(3/2)).

Examples

			For length 3 only the strings 112, 121, 211, 221, 212, 122 occur, so a(3) = 6. For length 4 only the 10 strings 1121, 1122, 1211, 1212, 1221, 2112, 2121, 2122, 2211, 2212 occur.
		

References

  • M. Dekking: "What is the long range order in the Kolakoski sequence?" in: The Mathematics of Long-Range Aperiodic Order, ed. R. V. Moody, Kluwer, Dordrecht (1997), pp. 115-125.

Crossrefs

Cf. A000002.

Programs

  • Mathematica
    nMax = 52; A007782[m_] := A007782[m] = (kolak = {1, 2, 2}; For[n = 3, n <= m, n++, For[k = 1, k <= kolak[[n]], k++, AppendTo[ kolak, 1 + Mod[n - 1, 2]]]]; factors[n_] := Table[ kolak[[k ;; k + n - 1]], {k, 1, Length[kolak] - n + 1}]; Table[ factors[n] // Union // Length, {n, 0, nMax}]); A007782[nMax]; A007782[m = 2*nMax]; While[ A007782[m] != A007782[m/2], m = 2*m]; A007782[m] (* Jean-François Alcover, Jul 24 2013 *)

Extensions

Additional comments from Michael Baake (mbaake(AT)pion09.tphys.physik.uni-tuebingen.de), Feb 19 2001.

A074292 Dominant digit in successive groups of 3 from the Kolakoski sequence (A000002).

Original entry on oeis.org

2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

This appears to be the same as a sequence studied by Claude Lenormand in a letter dated Nov 17 2003: break up the Kolakoski sequence (A000002) into runs of identical symbols and omit one symbol from each run.
The sequence studied by Claude Lenormand is A156257 and is not equal to this one: see A248805 = A156257 - A074292. Differences between the two sequences are at n = 47, 48, 56, 57, 128, 129, 137, 139, 147, 148, 176, 177,... - Jean-Christophe Hervé, Oct 11 2014
As in the Kolakoski sequence, runs in this sequence are of length 1 or 2, because a run XX implies the repetition of exactly the same 3-group in the Kolakoski sequence: -YXX-YXX- or -XXY-XXY- or -XYX-XYX-, and this is not possible 3 times. However, words of the form YXYXY appear in this sequence, but don't appear in the Kolakoski sequence. - Jean-Christophe Hervé, Oct 12 2014

Examples

			Kolakoski begins (1,2,2), (1,1,2), (1,2,2), (1,2,2), so this begins 2,1,2,2.
		

Crossrefs

Programs

Formula

a(n)=A000002(3n-2)+A000002(3n-1)+A000002(3n)-3. - Benoit Cloitre, Nov 15 2003

Extensions

More terms from Ray Chandler, Nov 16 2003
Offset corrected by Jean-Christophe Hervé, Oct 11 2014

A100428 Bisection of Kolakoski sequence A000002.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 20 2004

Keywords

Comments

Lengths of runs of ones in A000002. - Reinhard Zumkeller, Aug 03 2013
As in the Kolakoski sequence itself, the length of runs in this sequence is 1 or 2 : a run X,X,X is not possible, since it would imply X,Y,X,Y,X in the Kolakoski sequence, which in turn would imply 1, 1, 1 somewhere before (one Y, one X, one Y) which is not possible. - Jean-Christophe Hervé, Oct 04 2014

Crossrefs

Programs

  • Haskell
    a100428 n = a100428_list !! n
    a100428_list = f a000002_list where f (u:_:us) = u : f us
    -- Reinhard Zumkeller, Aug 03 2013

Extensions

More terms from Joshua Zucker, May 12 2006
Offset changed by Reinhard Zumkeller, Aug 03 2013

A100429 Bisection of Kolakoski sequence A000002.

Original entry on oeis.org

2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 20 2004

Keywords

Comments

Lengths of runs of twos in A000002. - Reinhard Zumkeller, Aug 03 2013
As in the Kolakoski sequence itself, the length of runs in this sequence is 1 or 2 (see A100428). - Jean-Christophe Hervé, Oct 04 2014

Crossrefs

Programs

  • Haskell
    a100429 n = a100429_list !! n
    a100429_list = g a000002_list where g (_:v:vs) = v : g vs
    -- Reinhard Zumkeller, Aug 03 2013

Extensions

More terms from Joshua Zucker, May 12 2006
Offset changed by Reinhard Zumkeller, Aug 03 2013

A074262 Positions of '11' in Kolakoski sequence A000002.

Original entry on oeis.org

4, 13, 16, 22, 28, 31, 40, 48, 51, 58, 67, 70, 78, 85, 94, 97, 103, 112, 115, 121, 124, 130, 133, 140, 148, 157, 160, 167, 175, 178, 184, 190, 193, 201, 208, 217, 220, 226, 229, 238, 244, 247, 253, 256, 265, 271, 274, 283, 291, 294, 303, 310, 319, 322, 328
Offset: 1

Views

Author

Jon Perry, Sep 20 2002

Keywords

Examples

			Kolakoski sequence begins 1,2,2,1,1,2,1,2,2,1,2,2,1,1,... so 4 and 13 are in this sequence.
		

Crossrefs

Cf. A074263.

Programs

  • Mathematica
    a2 = {1, 2, 2}; Do[ a2 = Join[a2, {1 + Mod[n - 1, 2]}], {n, 3, 300}, {i, 1, a2[[n]]}]; Split[a2] /. {1, 1} -> {0, 1} // Flatten // Position[#, 0]& // Flatten (* Jean-François Alcover, Jun 18 2013 *)

Extensions

Extended and offset changed by Nathaniel Johnston, May 02 2011
Previous Showing 21-30 of 297 results. Next