login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Zero-one sequence based on the sequence (4n): a(A008586(k))=a(k); a(A042968(k))=1-a(k), a(1)=0, a(2)=1, a(3)=1.
7

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

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

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

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

%N Zero-one sequence based on the sequence (4n): a(A008586(k))=a(k); a(A042968(k))=1-a(k), a(1)=0, a(2)=1, a(3)=1.

%t u[n_] := 4n; (*A008586*)

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

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

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

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

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

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

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

%Y Cf. A188967, A189299, A189300, A189289, A189292, A189295.

%K nonn

%O 1

%A _Clark Kimberling_, Apr 19 2011