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