OFFSET
0,2
COMMENTS
Define complementary sequences a(n) and b(n) recursively:
b(n) = least new,
a(n) = b(n) + b(2n),
where "least new" means the least positive integer not yet placed. See A304799 for a guide to related sequences. Empirically, {a(n) - 3*n: n >= 0} = {2,3} and {2*b(n) - 3*n : n >= 0} = {2,3,4,5}.
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..10000
EXAMPLE
b(0) = 1, so that a(0) = 2. Since a(1) = b(1) + b(2), we must have a(1) >= 7, so that b(1) = 3, b(2) = 4, b(3) = 5, b(4) = 6, and a(1) = 7.
MATHEMATICA
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
h = 1; k = 2; a = {}; b = {1};
AppendTo[a, mex[Flatten[{a, b}], 1]];
Do[Do[AppendTo[b, mex[Flatten[{a, b}], Last[b]]], {k}];
AppendTo[a, Last[b] + b[[1 + (Length[b] - 1)/k h]]], {500}];
Take[a, 200] (* A304799 *)
Take[b, 200] (* A304800 *)
(* Peter J. C. Moses, May 14 2008 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 19 2018
STATUS
approved