login
Zero-one sequence based on the sequence of odd primes: a(A065091(k))=a(k); a(v(k))=1-a(k), where v=A065090 and a(1)=0, a(2)=1.
4

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

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

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

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

%N Zero-one sequence based on the sequence of odd primes: a(A065091(k))=a(k); a(v(k))=1-a(k), where v=A065090 and a(1)=0, a(2)=1.

%t u[n_] := Prime[n+1]; (*A065091*)

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

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

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

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

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

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

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

%Y Cf. A188967, A189206, A189210, A189211.

%K nonn

%O 1

%A _Clark Kimberling_, Apr 18 2011