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.
%I A243572 #5 Jun 08 2014 09:18:09 %S A243572 1,2,3,4,6,9,5,7,10,12,18,27,8,11,13,15,19,21,28,30,36,54,81,14,16,20, %T A243572 22,24,29,31,33,37,39,45,55,57,63,82,84,90,108,162,243,17,23,25,32,34, %U A243572 38,40,42,46,48,56,58,60,64,66,72,83,85,87,91,93,99,109 %N A243572 Irregular triangular array generated as in Comments; contains every positive integer exactly once. %C A243572 Decree that row 1 is (1), row 2 is (2, 3), and row 3 is (4, 6, 9). Let r(n) = A001590(n+2), so that r(r) = r(n-1) + r(n-2) + r(n-3) with r(1) =1, r(2) = 2, r(3) = 3. Row n of the array, for n >= 4, consists of the numbers, in increasing order, defined as follows: all 3*x from x in row n-1, together with all 1 + 3*x from x in row n-2, together with all 2 + 3*x from x in row n-3. Thus, the number of numbers in row n is r(n), a tribonacci number. Every positive integer occurs exactly once in the array, so that the resulting sequence is a permutation of the positive integers. %H A243572 Clark Kimberling, <a href="/A243572/b243572.txt">Table of n, a(n) for n = 1..1500</a> %e A243572 First 5 rows of the array: %e A243572 1 %e A243572 2 ... 3 %e A243572 4 ... 6 ... 9 %e A243572 5 ... 7 ... 10 .. 12 .. 18 .. 27 %e A243572 8 ... 11 .. 13 .. 15 .. 19 .. 21 .. 28 .. 30 .. 36 .. 54 .. 81 %t A243572 z = 10; g[1] = {1}; f1[x_] := x + 1; f2[x_] := 3 x; h[1] = g[1]; %t A243572 b[n_] := b[n] = DeleteDuplicates[Union[f1[g[n - 1]], f2[g[n - 1]]]]; %t A243572 h[n_] := h[n] = Union[h[n - 1], g[n - 1]]; %t A243572 g[n_] := g[n] = Complement [b[n], Intersection[b[n], h[n]]] %t A243572 u = Table[g[n], {n, 1, z}]; v = Flatten[u] (* A243572 *) %Y A243572 Cf. A232561, A243571, A243573, A232561, A002590. %K A243572 nonn,easy,tabf %O A243572 1,2 %A A243572 _Clark Kimberling_, Jun 07 2014