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.

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