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”).

A298741
Solution (a(n)) of the complementary equation in Comments.
1
1, 6, 19, 45, 102, 215, 445, 904, 1826, 3669, 7359, 14738, 29500, 59023, 118073, 236172, 472376, 944782, 1889599, 3779231, 7558500, 15117036, 30234113, 60468265, 120936574, 241873190, 483746427, 967492899, 1934985848, 3869971744, 7739943541, 15479887133
OFFSET
0,2
COMMENTS
Define sequences a(n) and b(n) recursively, starting with a(0) = 1, b(0) = 2:
b(n) = least new;
a(n) = 2*a(n-1) + x(0)*b(n) + x(1)*b(n-1) + ... + x(n)b(0),
where "least new k" means the least positive integer not yet placed, x(0) = 2, and x(k) = (-1)^k for k >= 1.
***
It appears that a(n)/a(n-1) -> 2 and that {a(n) - 2*a(n-1), n >=1 } is unbounded.
EXAMPLE
b(1) = least not in {a(0),b(0)} = 3;
a(1) = 2*a(0) + 2 b(1) - b(0) = 2*1 +2*3 - 2 = 6.
MATHEMATICA
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
c = 2; a = {1}; b = {2}; x = {2};
Do[AppendTo[b, mex[Flatten[{a, b}], 1]];
AppendTo[x, -Sign[Last[x]]];
AppendTo[a, c Last[a] + (Reverse[x] b // Total)], {25}]
Grid[{Join[{"n"}, Range[0, # - 1]], Join[{"a(n)"}, Take[a, #]],
Join[{"b(n)"}, Take[b, #]], Join[{"x(n)"}, Take[x, #]]},
Alignment -> ".",
Dividers -> {{2 -> Red, -1 -> Blue}, {2 -> Red, -1 -> Blue}}] &[18]
(* Peter J. C. Moses, May 10 2018 *)
CROSSREFS
Sequence in context: A299265 A005712 A299278 * A070893 A272047 A267829
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 12 2018
STATUS
approved