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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A298877 Solution (a(n)) of the complementary equation in Comments. 2
1, 6, 15, 29, 50, 79, 117, 165, 224, 295, 379, 477, 591, 722, 871, 1039, 1227, 1436, 1667, 1921, 2199, 2502, 2831, 3187, 3571, 3985, 4430, 4907, 5417, 5961, 6540, 7155, 7807, 8497, 9226, 9995, 10805, 11657, 12552, 13491, 14475, 15505, 16582, 17707, 18881 (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, b(0) = 2:

b(n) = least new;

a(n) = a(n-1) + b(n) + b(n-1) + ... + b(0),

where "least new k" means the least positive integer not yet placed.

LINKS

Table of n, a(n) for n=0..44.

EXAMPLE

b(1) = least not in {a(0),b(0)} = 3;

a(1) = a(0) + b(1) + b(0) = 1 + 3 + 2 = 6.

MATHEMATICA

z = 1000;

mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);

c = 1; a = {1}; b = {2}; x = {1};

Do[AppendTo[b, mex[Flatten[{a, b}], 1]];

AppendTo[x, 1];

AppendTo[a, c Last[a] + (Reverse[x] b // Total)], {z}]

Take[a, 30]

(* Peter J. C. Moses, May 10 2018 *)

CROSSREFS

Cf. A298173, A198741.

Sequence in context: A180953 A200184 A005286 * A229063 A025212 A024972

Adjacent sequences:  A298874 A298875 A298876 * A298878 A298879 A298880

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, May 12 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 18:02 EDT 2021. Contains 345144 sequences. (Running on oeis4.)