Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #5 Mar 30 2012 18:57:23
%S 0,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,1,0,1,0,0,0,1,0,1,1,1,1,0,1,1,0,0,0,
%T 0,0,1,0,0,1,0,1,1,1,1,1,0,1,1,0,0,1,0,0,0,1,0,0,1,0,0,0,1,1,0,1,1,1,
%U 1,0,0,1,1,0,1,1,1,1,0,0,1,1,0,0,0,0,0,1,1,0,1,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,1,1,1,0,1,0,1,0,1,0,0,1,1,1,1,1,1,0,0,1,1,1
%N Zero-one sequence based on the sequence (5n-4): a(A016861(k))=a(k); a(A047203(k))=1-a(k); a(1)=0.
%e Let u=A016861 and v=A047203, so that u(n)=5n-4 and v=complement(u) for n>=1. Then a is a self-generating zero-one sequence with initial value a(1)=0 and a(u(k))=a(k); a(v(k))=1-a(k).
%t u[n_] := 5n-4; (*A016861*)
%t a[1] = 0; h = 128;
%t c = (u[#1] &) /@ Range[h];
%t d = (Complement[Range[Max[#1]], #1] &)[c]; (*A047203*)
%t Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}];
%t Table[a[c[[n]]] = a[n], {n, 1, h}] (*A189028*)
%t Flatten[Position[%, 0]] (*A189029*)
%t Flatten[Position[%%, 1]] (*A189030*)
%Y Cf. A188967, A189029, A189030.
%K nonn
%O 1
%A _Clark Kimberling_, Apr 15 2011