login

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

A379536
Rectangular array, read by descending antidiagonals: the Type 1 runlength index array of A378142; see Comments.
0
1, 6, 2, 7, 12, 3, 11, 14, 18, 4, 13, 17, 21, 25, 5, 16, 20, 24, 39, 28, 8, 19, 23, 36, 55, 40, 29, 9, 22, 35, 50, 72, 56, 41, 30, 10, 26, 49, 71, 92, 73, 61, 42, 31, 15, 27, 52, 87, 103, 93, 78, 62, 45, 32, 33, 34, 54, 102, 124, 104, 94, 79, 65, 46, 47, 166, 37, 58, 113, 135, 125, 105, 97, 84, 66, 99, 179, 618
OFFSET
1,2
COMMENTS
We begin with a definition of Type 1 runlength array, U(s), of a sequence s:
Suppose s is a sequence (finite or infinite), and define rows of U(s) as follows:
(row 0) = s
(row 1) = sequence of 1st terms of runs in (row 0); c(1) = complement of (row 1) in (row 0)
For n>=2,
(row n) = sequence of 1st terms of runs in c(n-1); c(n) = complement of (row n) in (row n-1),
where the process stops if and when c(n) is empty for some n.
***
The corresponding Type 1 runlength index array, UI(s) is now contructed from U(s) in two steps:
(1) Let U*(s) be the array obtaining by repeating the construction of U(s) using (n,s(n)) in place of s(n).
(2) Then UI(s) results by retaining only n in U*.
Thus, loosely speaking, (row n) of UI(s) shows the indices in s of the numbers in (row n) of U(s).
The array UI(s) includes every positive integer exactly once.
EXAMPLE
Corner:
1 6 7 11 13 16 19 22 26 27 34 37
2 12 14 17 20 23 35 49 52 54 58 60
3 18 21 24 36 50 71 87 102 113 116 119
4 25 39 55 72 92 103 124 135 157 170 187
5 28 40 56 73 93 104 125 136 160 171 188
8 29 41 61 78 94 105 128 137 161 172 193
9 30 42 62 79 97 108 129 140 162 173 194
10 31 45 65 84 98 109 130 141 163 174 197
15 32 46 66 110 131 142 164 177 198 216 231
33 47 99 147 165 178 199 248 297 310 333 417
166 179 232 285 298 311 498 549 564 581 631 750
618 830 882 1262 1342 1561 1976 3056 3767 4616 5459 6112
Starting with s = A000002, we have for U*(s):
(row 1) = ((1,1), (2,1), (3,1), (4,1), (5,1), (6,0), (7,1), (8,1), (9,1), (10,1), (11,0) ...)
c(1) = ((2,1), (3,1), (4,1), (5,1), (8,1), (9,1), (10,1), (12,0), (14,1), (15,1), ...)
(row 2) = ((2,1), (12,2), (14,1), (17,0), (20,1), (22,0), (34,1), ...)
c(2) = ((3,1), (4,1), (5,1), (8,1), (9,1), (10,1), (15,1), (18,0), ...)
(row 3) = ((3,1), (18,0), (21,1), (24,0), ...)
so that UI(s) has
(row 1) = (1,6,7,11,13,16,19....)
(row 2) = (2,12,14,17,20,23,...)
(row 3) = (3,18,21,24,36,...)
MATHEMATICA
r[seq_] := seq[[Flatten[Position[Prepend[Differences[seq[[All, 1]]], 1], _?(# != 0 &)]], 2]];
z = 8000; r1 = 2^(1/4); s1 = 2^(1/2); t1 = 2^(3/4);
row[0] = Table[Floor[n (r1 + t1)/s1] - Floor[n r1/s1] - Floor[n t1/s1], {n, 1, z}];
row[0] = Transpose[{#, Range[Length[#]]}] &[row[0]];
k = 0; Quiet[While[Head[row[k]] === List, row[k + 1] = row[0][[r[SortBy[Apply[Complement,
Map[row[#] &, Range[0, k]]], #[[2]] &]]]]; k++]];
m = Map[Map[#[[2]] &, row[#]] &, Range[k - 1]];
zz = 12
p[n_] := Take[m[[n]], zz]
t = Table[p[n], {n, 1, zz}]
Grid[t] (*array*)
w[n_, k_] := t[[n]][[k]];
Table[w[n - k + 1, k], {n, zz {k, n, 1, -1}] // Flatten (*sequence*)
(*_Peter J.C.Moses_, Dec 04 2024*)
CROSSREFS
KEYWORD
nonn,tabl,new
AUTHOR
Clark Kimberling, Jan 11 2025
STATUS
approved