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.

A297467 Solution (a(n)) of the system of 2 complementary equations in Comments.

This page as a plain text file.
%I A297467 #8 May 05 2018 04:18:04
%S A297467 1,2,10,31,35,95,99,108,112,289,293,302,306,330,335,343,348,875,880,
%T A297467 888,893,916,921,929,934,1002,1007,1018,1023,1043,1048,1059,1064,2641,
%U A297467 2646,2657,2662,2682,2687,2698,2703,2768,2773,2784,2789,2809,2814,2825,2830
%N A297467 Solution (a(n)) of the system of 2 complementary equations in Comments.
%C A297467 Define sequences a(n), b(n), c(n) recursively, starting with a(0) = 1, a(1) = 1, b(0) = 3; for n >= 1,
%C A297467 a(2n) = 3*a(n) + b(n);
%C A297467 a(2n+1) = 3*a(n-1) + n;
%C A297467 b(n) = least new;
%C A297467 where "least new k" means the least positive integer not yet placed. The sequences (a(n)) and (b(n)) are complementary.
%H A297467 Clark Kimberling, <a href="/A297467/b297467.txt">Table of n, a(n) for n = 0..2000</a>
%e A297467 n:   0  1   2   3   4   5   6   7   8
%e A297467 a:   1  2  10  31  35  95  99 108 112
%e A297467 b:   3  4   5   6   7   8   9  11  12
%t A297467 z = 300;
%t A297467 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t A297467 a = {1, 2}; b = {3};
%t A297467 Do[AppendTo[b, mex[Flatten[{a, b}], Last[b]]];
%t A297467 AppendTo[a, 3 a[[#/2 + 1]] + b[[#/2 + 1]]] &[Length[a]];
%t A297467 AppendTo[a, 3 a[[(# + 3)/2]] + (# - 1)/2] &[Length[a]], {z}]
%t A297467 Take[a, 100]  (* A297467 *)
%t A297467 Take[b, 100]  (* A297468 *)
%t A297467 (* _Peter J. C. Moses_, Apr 22 2018 *)
%Y A297467 Cf. A299634, A297468.
%K A297467 nonn,easy
%O A297467 0,2
%A A297467 _Clark Kimberling_, Apr 24 2018