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.

A298873 Solution (c(n)) of the system of 3 complementary equations in Comments.

This page as a plain text file.
%I A298873 #4 Apr 18 2018 19:49:38
%S A298873 3,16,27,43,60,79,100,126,153,182,213,249,289,330,373,418,465,514,565,
%T A298873 624,683,744,807,872,939,1008,1082,1157,1234,1313,1394,1477,1562,1652,
%U A298873 1746,1841,1938,2037,2138,2241,2346,2453,2562,2673,2786,2904,3023,3147
%N A298873 Solution (c(n)) of the system of 3 complementary equations in Comments.
%C A298873 Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, b(0) = 2:
%C A298873 a(n) = least new;
%C A298873 b(n) = least new k >= a(n) + b(n-1);
%C A298873 c(n) = a(n) + 2 b(n);
%C A298873 where "least new k" means the least positive integer not yet placed. The sequences a,b,c partition the positive integers.
%H A298873 Clark Kimberling, <a href="/A298873/b298873.txt">Table of n, a(n) for n = 0..1000</a>
%e A298873 n:   0    1    2    3    4    5    6    7    8   9
%e A298873 a:   1    4    5    7    8    9   10   12   13   14
%e A298873 b:   2    6   11   18   26   35   45   57   70   84
%e A298873 c:   3   16   27   43   60   30   79  100  126  153
%t A298873 z = 400;
%t A298873 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t A298873 a = {1}; b = {2}; c = {3};
%t A298873 Do[{AppendTo[a, mex[Flatten[{a, b, c}], 1]],
%t A298873    AppendTo[b, mex[Flatten[{a, b, c}], Last[a] + Last[b]]],
%t A298873    AppendTo[c, Last[a] + 2 Last[b]]}, {z}];
%t A298873 Take[a, 100]  (* A298871 *)
%t A298873 Take[b, 100]  (* A298872 *)
%t A298873 Take[c, 100]  (* A298873 *)
%Y A298873 Cf. A299634, A298871, A298872, A298874.
%K A298873 nonn,easy
%O A298873 0,1
%A A298873 _Clark Kimberling_, Apr 18 2018