OFFSET
0,2
COMMENTS
Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, b(0) = 2:
a(n) = least new;
b(n) = a(n) + b(n-1);
c(n) = a(n) + 2 b(n);
where "least new k" means the least positive integer not yet placed.
***
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
EXAMPLE
n: 0 1 2 3 4 5 6 7 8 9
a: 1 4 5 7 8 9 10 12 13 14
b: 2 6 11 18 26 35 45 57 70 84
c: 3 16 27 43 60 30 79 100 126 153
MATHEMATICA
z = 200;
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
a = {1}; b = {2}; c = {3};
Do[{AppendTo[a, mex[Flatten[{a, b, c}], 1]],
AppendTo[b, Last[a] + Last[b]],
AppendTo[c, Last[a] + 2 Last[b]]}, {z}];
Take[a, 100] (* A298874 *)
Take[b, 100] (* A298875 *)
Take[c, 100] (* A298876 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 19 2018
STATUS
approved