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

A297467
Solution (a(n)) of the system of 2 complementary equations in Comments.
2
1, 2, 10, 31, 35, 95, 99, 108, 112, 289, 293, 302, 306, 330, 335, 343, 348, 875, 880, 888, 893, 916, 921, 929, 934, 1002, 1007, 1018, 1023, 1043, 1048, 1059, 1064, 2641, 2646, 2657, 2662, 2682, 2687, 2698, 2703, 2768, 2773, 2784, 2789, 2809, 2814, 2825, 2830
OFFSET
0,2
COMMENTS
Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, a(1) = 1, b(0) = 3; for n >= 1,
a(2n) = 3*a(n) + b(n);
a(2n+1) = 3*a(n-1) + n;
b(n) = least new;
where "least new k" means the least positive integer not yet placed. The sequences (a(n)) and (b(n)) are complementary.
LINKS
EXAMPLE
n: 0 1 2 3 4 5 6 7 8
a: 1 2 10 31 35 95 99 108 112
b: 3 4 5 6 7 8 9 11 12
MATHEMATICA
z = 300;
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
a = {1, 2}; b = {3};
Do[AppendTo[b, mex[Flatten[{a, b}], Last[b]]];
AppendTo[a, 3 a[[#/2 + 1]] + b[[#/2 + 1]]] &[Length[a]];
AppendTo[a, 3 a[[(# + 3)/2]] + (# - 1)/2] &[Length[a]], {z}]
Take[a, 100] (* A297467 *)
Take[b, 100] (* A297468 *)
(* Peter J. C. Moses, Apr 22 2018 *)
CROSSREFS
Sequence in context: A268688 A281069 A156492 * A305011 A090809 A051747
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 24 2018
STATUS
approved