login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 29 04:19 EDT 2024. Contains 372097 sequences. (Running on oeis4.)