%I #6 May 31 2018 21:36:43
%S 1,2,8,20,39,67,105,154,215,289,377,480,599,735,889,1062,1256,1472,
%T 1711,1974,2262,2576,2917,3286,3684,4112,4571,5062,5586,6144,6737,
%U 7366,8032,8736,9480,10265,11092,11962,12876,13835,14840,15892,16992,18141,19340
%N Solution (a(n)) of the complementary equation a(n) = 2*a(n-1) - a(n-2) + b(n); see Comments.
%C Define sequences a(n) and b(n) recursively, starting with a(0) = 1, a(1) = 2:
%C b(n) = least new;
%C a(n) = 2*a(n-1) - a(n-2) + b(n),
%C 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.
%H Clark Kimberling, <a href="/A305129/b305129.txt">Table of n, a(n) for n = 0..10000</a>
%e b(0) = least not in {a(0), a(1)} = 3;
%e 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.
%t a = {1, 2}; b = {3, 4, 5};
%t mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t Do[AppendTo[a, 2 Last[a] - a[[-2]] + Last[b]];
%t AppendTo[b, mex[Flatten[{a, b}], Last[b]]], {200}]; a
%t (* _Peter J. C. Moses_, May 30 2018 *)
%Y Cf. A305329, A305330.
%K nonn,easy
%O 0,2
%A _Clark Kimberling_, May 30 2018
|