OFFSET
1,1
COMMENTS
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..10000
EXAMPLE
The initial run of 12 adds up to 19, however if we start at position 3, then the sum is 18.
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 *)
PROG
(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("<br>"); */
function isElement(x, arr)
{
for (j=1; j<arr.length; j++)
{
if (arr[j]==x) return true;
if (arr[j]>x) return false;
}
return false;
}
for (i=1; i<500; i++)
if (!isElement(2*i, b))
document.write(2*i+", ");
// Jon Perry, Sep 11 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Sep 21 2002
EXTENSIONS
Edited by Nathaniel Johnston, May 02 2011
STATUS
approved