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-3 of 3 results.

A074297 Position of the first occurrence of n consecutive terms with the largest possible sum in the Kolakoski sequence (A000002).

Original entry on oeis.org

2, 2, 1, 6, 8, 6, 6, 2, 1, 2, 2, 1, 33, 53, 33, 6, 50, 2, 72, 74, 72, 72, 296, 295, 33, 293, 74, 324, 35, 296, 33, 35, 33, 33, 32, 2261, 30, 53, 52, 53, 53, 52, 276, 50, 33, 273, 296, 53, 296, 2883, 330, 33, 296, 295, 296, 296, 295, 33, 35, 33, 33, 32, 324, 30, 278, 35, 276
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

The sequence of maximal sums begins 2, 4, 5, 7, 9, 10, 12, 13, 14, 16, 18, 19, 21, 23, 24, 25, 27, 28, 30, ...

Examples

			a(4)=6 because the Kolakoski sequence starting at position 6 is 2, 1, 2, 2 which sums to 7, which is the largest possible sum of 4 consecutive terms.
		

Crossrefs

Extensions

a(8)-a(15) from and edited by Nathaniel Johnston, May 02 2011
More terms from Hakan Icoz, Jan 01 2022

A074296 First occurrence of the smallest value subsequence of length n in the Kolakoski sequence (A000002).

Original entry on oeis.org

1, 4, 3, 4, 13, 12, 28, 10, 9, 13, 13, 12, 13, 112, 20, 10, 13, 12, 13, 13, 12, 13, 112, 111, 10, 109, 108, 167, 4, 112, 4, 94, 20, 101, 91, 167, 13, 94, 13, 13, 94, 93, 1511, 91, 90, 157, 743, 94, 750, 776, 775, 217, 743, 742, 743, 743, 742, 173, 217, 216
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

The sequence of minimal sums begins 1, 2, 4, 5, 6, 8, 9, 11, 13, 14, 15, 17, 18, 19, 21, ...

Examples

			a(3) = 3 because the Kolakoski sequence starting at position 3 is 2, 1, 1, which sums to 4, which is the smallest possible sum of 3 consecutive terms.
a(8) = 10 because the Kolakoski sequence starting at position 10 is 1, 2, 2, 1, 1, 2, 1, 1, which sums to 11, which is the smallest possible sum of 8 consecutive values in the Kolakoski sequence. Note that we cannot find a sequence of length eight with a sum of 10 because it would have to be of the form 1, 1, 2, 1, 1, 2, 1, 1, which would mean that 2, 1, 2, 1, 2 would have to appear earlier in the sequence, which would mean that 1, 1, 1 would have to appear even earlier in the sequence, which is impossible.
		

Crossrefs

Extensions

a(8)-a(15) from and edited by Nathaniel Johnston, May 02 2011
More terms from Sean A. Irvine, Jan 18 2025

A074299 Lengths of subsequences such that the first 'average' value (a[n]*1.5) is not achieved from the starting position in the Kolakoski sequence (A000002).

Original entry on oeis.org

12, 32, 34, 52, 66, 84, 90, 92, 94, 96, 100, 102, 108, 110, 112, 114, 120, 134, 154, 156, 166, 172, 174, 194, 196, 202, 216, 230, 248, 254, 256, 258, 260, 266, 268, 272, 274, 276, 278, 280, 284, 286, 292, 294, 296, 298, 304, 318, 336, 342, 344, 348, 350, 352
Offset: 1

Views

Author

Jon Perry, Sep 21 2002

Keywords

Comments

All members of this sequence are even. 2n is in this sequence if and only if A074298(n)>1.
The even numbers missing from A022292.

Examples

			The initial run of 12 adds up to 19, however if we start at position 3, then the sum is 18.
		

Crossrefs

Programs

  • 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;
    }
    b=new Array();
    oc=0; tc=0; c=1;
    for (i=1; i<1000; i++)
    {
        if (oc==tc) b[c++]=i-1;
        if (a[i]==1) oc++;
        else tc++;
    }
    /* document.write(b); */
    /* document.write("
    "); */ function isElement(x, arr) { for (j=1; jx) return false; } return false; } for (i=1; i<500; i++) if (!isElement(2*i, b)) document.write(2*i+", "); // Jon Perry, Sep 11 2012
  • Mathematica
    max = 200; kol = {1, 2, 2}; For[n=3, n <= 2*max, n++, For[i=1, i <= kol[[n]], i++, AppendTo[kol, 1 + Mod[n-1, 2]]]]; A074298[n_] := For[k=1, True, k++, If[Plus @@ kol[[k ;; k + 2*n - 1]] == 3*n, Return[k]]]; Select[2*Range[max], A074298[#/2] > 1 &] (* Jean-François Alcover, Sep 25 2012 *)

Extensions

Edited by Nathaniel Johnston, May 02 2011
Showing 1-3 of 3 results.