The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A305329 Solution (a(n)) of the complementary equation a(n) = 2*a(n-1) - a(n-2) + b(n-2); see Comments. 3
1, 2, 6, 14, 27, 47, 75, 112, 159, 217, 287, 370, 468, 582, 713, 862, 1030, 1218, 1427, 1658, 1912, 2190, 2493, 2822, 3179, 3565, 3981, 4428, 4907, 5419, 5965, 6546, 7163, 7817, 8509, 9240, 10011, 10823, 11677, 12574, 13515, 14501, 15533, 16613, 17742, 18921 (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-2),
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(0) must exceed = 2*2 -1 + 3 = 6, so that b(0) = 3, b(1) = 4, b(2) = 5, and a(2) = 6.
MATHEMATICA
a = {1, 2}; b = {3, 4, 5};
mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
Do[AppendTo[a, 2 Last[a] - a[[-2]] + b[[-3]]];
AppendTo[b, mex[Flatten[{a, b}], Last[b]]], {120}]; a
(* Peter J. C. Moses, May 30 2018 *)
CROSSREFS
Sequence in context: A101586 A178080 A121968 * A161212 A256058 A294867
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 02 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 May 15 12:24 EDT 2024. Contains 372540 sequences. (Running on oeis4.)