cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A298872 Solution (b(n)) of the system of 3 complementary equations in Comments.

This page as a plain text file.
%I A298872 #5 Apr 18 2018 19:49:31
%S A298872 2,6,11,18,26,35,45,57,70,84,99,116,135,155,176,198,221,245,270,298,
%T A298872 327,357,388,420,453,487,523,560,598,637,677,718,760,804,850,897,945,
%U A298872 994,1044,1095,1147,1200,1254,1309,1365,1423,1482,1543,1605,1668,1732
%N A298872 Solution (b(n)) of the system of 3 complementary equations in Comments.
%C A298872 Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, b(0) = 2:
%C A298872 a(n) = least new;
%C A298872 b(n) = least new k >= a(n) + b(n-1);
%C A298872 c(n) = a(n) + 2 b(n);
%C A298872 where "least new k" means the least positive integer not yet placed. The sequences a,b,c partition the positive integers.
%H A298872 Clark Kimberling, <a href="/A298872/b298872.txt">Table of n, a(n) for n = 0..1000</a>
%e A298872 n:   0    1    2    3    4    5    6    7    8   9
%e A298872 a:   1    4    5    7    8    9   10   12   13   14
%e A298872 b:   2    6   11   18   26   35   45   57   70   84
%e A298872 c:   3   16   27   43   60   30   79  100  126  153
%t A298872 z = 400;
%t A298872 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t A298872 a = {1}; b = {2}; c = {3};
%t A298872 Do[{AppendTo[a, mex[Flatten[{a, b, c}], 1]],
%t A298872    AppendTo[b, mex[Flatten[{a, b, c}], Last[a] + Last[b]]],
%t A298872    AppendTo[c, Last[a] + 2 Last[b]]}, {z}];
%t A298872 Take[a, 100]  (* A298871 *)
%t A298872 Take[b, 100]  (* A298872 *)
%t A298872 Take[c, 100]  (* A298873 *)
%Y A298872 Cf. A299634, A298871, A298873, A298875.
%K A298872 nonn,easy
%O A298872 0,1
%A A298872 _Clark Kimberling_, Apr 18 2018