login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A305129
Solution (a(n)) of the complementary equation a(n) = 2*a(n-1) - a(n-2) + b(n); see Comments.
3
1, 2, 8, 20, 39, 67, 105, 154, 215, 289, 377, 480, 599, 735, 889, 1062, 1256, 1472, 1711, 1974, 2262, 2576, 2917, 3286, 3684, 4112, 4571, 5062, 5586, 6144, 6737, 7366, 8032, 8736, 9480, 10265, 11092, 11962, 12876, 13835, 14840, 15892, 16992, 18141, 19340
OFFSET
0,2
COMMENTS
Define sequences a(n) and b(n) recursively, starting with a(0) = 1, a(1) = 2:
b(n) = least new;
a(n) = 2*a(n-1) - a(n-2) + b(n),
where "least new" means the least positive integer not yet placed. It appears that a(n)/a(n-1) -> 1, that {a(n) - a(n-1), n>=1} is unbounded, and that the 3rd difference sequence of (a(n)) consists entirely of 1's and 2's.
LINKS
EXAMPLE
b(0) = least not in {a(0), a(1)} = 3;
a(2) = 2*a(1) - a(0) + b(2) must exceed = 2*2 -1 + 5 = 8, so that b(0) = 3, b(1) = 4, b(2) = 5, b(3) = 6, b(4) =7, and a(2) = 8.
MATHEMATICA
a = {1, 2}; b = {3, 4, 5};
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
Do[AppendTo[a, 2 Last[a] - a[[-2]] + Last[b]];
AppendTo[b, mex[Flatten[{a, b}], Last[b]]], {200}]; a
(* Peter J. C. Moses, May 30 2018 *)
CROSSREFS
Sequence in context: A278212 A032767 A294869 * A032633 A294437 A128445
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 30 2018
STATUS
approved