login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Irregular triangular array generated as in Comments; contains every positive integer exactly once.
4

%I #5 Jun 08 2014 09:18:09

%S 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 22,24,29,31,33,37,39,45,55,57,63,82,84,90,108,162,243,17,23,25,32,34,

%U 38,40,42,46,48,56,58,60,64,66,72,83,85,87,91,93,99,109

%N Irregular triangular array generated as in Comments; contains every positive integer exactly once.

%C 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 Clark Kimberling, <a href="/A243572/b243572.txt">Table of n, a(n) for n = 1..1500</a>

%e First 5 rows of the array:

%e 1

%e 2 ... 3

%e 4 ... 6 ... 9

%e 5 ... 7 ... 10 .. 12 .. 18 .. 27

%e 8 ... 11 .. 13 .. 15 .. 19 .. 21 .. 28 .. 30 .. 36 .. 54 .. 81

%t z = 10; g[1] = {1}; f1[x_] := x + 1; f2[x_] := 3 x; h[1] = g[1];

%t b[n_] := b[n] = DeleteDuplicates[Union[f1[g[n - 1]], f2[g[n - 1]]]];

%t h[n_] := h[n] = Union[h[n - 1], g[n - 1]];

%t g[n_] := g[n] = Complement [b[n], Intersection[b[n], h[n]]]

%t u = Table[g[n], {n, 1, z}]; v = Flatten[u] (* A243572 *)

%Y Cf. A232561, A243571, A243573, A232561, A002590.

%K nonn,easy,tabf

%O 1,2

%A _Clark Kimberling_, Jun 07 2014