The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A297468 Solution (b(n)) of the system of 2 complementary equations in Comments. 2
 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 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 Clark Kimberling, Table of n, a(n) for n = 0..1000 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 Cf. A299634, A297467. Sequence in context: A137913 A137937 A260580 * A047565 A026466 A304806 Adjacent sequences:  A297465 A297466 A297467 * A297469 A297470 A297471 KEYWORD nonn,easy AUTHOR Clark Kimberling, Apr 24 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 20 17:26 EDT 2021. Contains 345189 sequences. (Running on oeis4.)