login
Zero-one sequence based on floor(sqrt(6)): a(A022840(k))=a(k); a(A138235(k))=1-a(k); a(1)=0.
3

%I #4 Mar 30 2012 18:57:23

%S 1,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,

%T 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0

%N Zero-one sequence based on floor(sqrt(6)): a(A022840(k))=a(k); a(A138235(k))=1-a(k); a(1)=0.

%e Let u=A022840=(Beatty sequence for sqrt(6)) and v=A138235=(complement of u). Then A189094 is the sequence a given by a(1)=0 and a(u(k))=a(k); a(v(k))=1-a(k).

%t r=6^(1/2); u[n_] := Floor[n*r]; (*A022840*)

%t a[1] = 0; h = 128;

%t c = (u[#1] &) /@ Range[2h];

%t d = (Complement[Range[Max[#1]], #1] &)[c]; (*A138235*)

%t Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}]; (*A189094*)

%t Table[a[c[[n]]] = a[n], {n, 1, h}] (*A189094*)

%t Flatten[Position[%, 0]] (*A189095*)

%t Flatten[Position[%%, 1]] (*A189096*)

%Y A188967, A189095, A189096.

%K nonn

%O 1

%A _Clark Kimberling_, Apr 16 2011