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.

A326662 Rectangular array in 3 columns that solve the complementary equation c(n) = a(2n) + b(2n), where a(1) = 1; see Comments.

This page as a plain text file.
%I A326662 #9 Jun 19 2021 08:34:49
%S A326662 1,2,7,3,4,17,5,6,25,8,9,34,10,11,43,12,13,53,14,15,61,16,18,71,19,20,
%T A326662 79,21,22,89,23,24,97,26,27,106,28,29,115,30,31,125,32,33,133,35,36,
%U A326662 142,37,38,151,39,40,161,41,42,169,44,45,178,46,47,187,48
%N A326662 Rectangular array in 3 columns that solve the complementary equation c(n) = a(2n) + b(2n), where a(1) = 1; see Comments.
%C A326662 Let A = (a(n)), B = (b(n)), and C = (c(n)).  A unique solution (A,B,C) exists for the following conditions: (1) A,B,C must partition the positive integers, and (2) A and B are defined by mex (minimal excludant, as in A067017); that is, a(n) is the least "new" positive integer, and likewise for b(n).
%e A326662 c(1) = a(2) + b(2) >= 3 + 4, so that b(1) = mex{1} = 2; a(2) = mex{1,2} = 3; b(2) = mex{1,2,3} = 4; a(3)= mex{1,2,3,4} = 5, a(4) = mex{1,2,3,4,5} = 6, c(1) = 7.
%e A326662 n           a(n)      b(n)     c(n)
%e A326662 -----------------------------------
%e A326662 1             1        2        7
%e A326662 2             3        4       17
%e A326662 3             5        6       25
%e A326662 4             8        9       34
%e A326662 5            10       11       43
%e A326662 6            12       13       53
%e A326662 7            14       15       61
%e A326662 8            16       18       71
%e A326662 9            19       20       79
%e A326662 10           21       22       89
%t A326662 mex[list_, start_] := (NestWhile[# + 1 &, start, MemberQ[list, #] &]);
%t A326662 a = b = c = {}; h = 2; k = 2;
%t A326662 Do[Do[AppendTo[a,
%t A326662    mex[Flatten[{a, b, c}], Max[Last[a /. {} -> {0}], 1]]];
%t A326662   AppendTo[b, mex[Flatten[{a, b, c}], Max[Last[b /. {} -> {0}], 1]]], {k}];
%t A326662   AppendTo[c, a[[h Length[a]/k]] + Last[b]], {150}];
%t A326662 {a, b, c} // ColumnForm
%t A326662 a = Take[a, Length[c]]; b = Take[b, Length[c]];
%t A326662 Flatten[Transpose[{a, b, c}]](* _Peter J. C. Moses_, Jul 04 2019 *)
%Y A326662 Cf. A309157, A326661.
%K A326662 nonn,tabl,easy
%O A326662 1,2
%A A326662 _Clark Kimberling_, Jul 16 2019
%E A326662 Replaced a(0)->a(1) in NAME. - _R. J. Mathar_, Jun 19 2021