OFFSET
1
EXAMPLE
MATHEMATICA
r = 2^(1/2); u[n_] := Floor[r*n]; (*A001951*)
v[n_] := Floor[(2 + r) n]; (*A001952*)
a[1] = 0; a[2] = 1; h = 200;
c = Table[u[n], {n, 1, h}];
d = Table[v[n], {n, 1, h}];
Table[a[d[[n]]] = 1 - a[n], {n, 1, h - 1}]; (*A189081*)
Table[a[c[[n]]] = a[n], {n, 1, h}] (*A189081*)
Flatten[Position[%, 0]] (*A189082*)
Flatten[Position[%%, 1]] (*A189083*)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Apr 16 2011
STATUS
approved