OFFSET
1,2
COMMENTS
In general, let u(1) = 1, and let k be a positive integer. Define u(n) = least positive integer not in {u(1),..., u(n-1), v(1),...,v(n-1)} and v(n) = n - 1 + k + least positive integer not in {u(1),..., u(n-1), u(n), v(1),...,v(n-1)}. As sets, (u(n)) and (v(n)) are disjoint. If k >= -1, let a(n) = u(n) and b(n) = v(n) for all n >= 1, but if k <= -2, let a(n) = u(n) - k + 1 and b(n) = v(n) - k - 1 for all n >= 1. Then every positive integer is in exactly one of the sequences (a(n)) and (b(n)). The difference sequence of (a(n)) consists of 1's and 2's; the difference sequence of (b(n)) consists of 2's and 3's.
****
Guide to related sequences:
k sequences (a(n)) and (b(n))
EXAMPLE
a(1) = 1; b(1) = 1+2+2 = 5
a(2) = 2; b(2) = 2+2+3 = 7
a(3) = 3; b(3) = 3+2+4 = 9
a(4) = 4; b(4) = 4+2+6 = 12
MATHEMATICA
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
{a, b} = {{1}, {}}; k = 3;
Do[AppendTo[b, Length[b] + k + mex[Flatten[{a, b}], Last[a]]];
AppendTo[a, mex[Flatten[{a, b}], Last[a]]], {150}]
a (* A335999 *)
b (* A336008 *)
(* Peter J. C. Moses, Jul 13 2020 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 16 2020
STATUS
approved