OFFSET
0,2
COMMENTS
Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, b(0) = 2, c(0) = 4:
a(n) = least new;
b(n) = a(n-1)+c(n-1);
c(n) = 2 a(n) + b(n);
where "least new k" means the least positive integer not yet placed. The sequences a,b,c partition the positive integers.
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 3 6 7 8 9 10 12 13 15
b: 2 5 14 32 53 77 104 134 170 209
c: 4 11 26 46 69 95 124 158 196 239
MATHEMATICA
z = 300;
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
a = {1}; b = {2}; c = {4}; n = 1;
Do[{n++, AppendTo[a, mex[Flatten[{a, b, c}], 1]],
AppendTo[b, a[[n - 1]] + c[[n - 1]]],
AppendTo[c, 2 Last[a] + Last[b]]}, {z}];
Take[a, 100] (* A296484 *)
Take[b, 100] (* A296502 *)
Take[c, 100] (* A297149 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 24 2018
STATUS
approved