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 A379402 #14 Mar 31 2025 07:00:35 %S A379402 1,2,9,3,11,15,4,16,18,54,5,21,23,58,91,6,32,36,102,110,205,7,37,39, %T A379402 129,160,272,194,8,40,46,161,167,419,271,139,10,47,55,174,238,499,416, %U A379402 260,86,12,56,73,245,273,597,496,359,257,357,13,67,96,274,292 %N A379402 Rectangular array, read by descending antidiagonals: the Type 2 runlength index array of A039701 (primes mod 3); see Comments. %C A379402 We begin with a definition of Type 2 runlength array, V(s), of any sequence s for which all the runs referred to have finite length: %C A379402 Suppose s is a sequence (finite or infinite), and define rows of V(s) as follows: %C A379402 (row 0) = s %C A379402 (row 1) = sequence of last terms of runs in (row 0); c(1) = complement of (row 1) in (row 0) %C A379402 For n>=2, %C A379402 (row n) = sequence of last terms of runs in c(n-1); c(n) = complement of (row n) in (row n-1), %C A379402 where the process stops if and when c(n) is empty for some n. %C A379402 *** %C A379402 The corresponding Type 2 runlength index array, The runlength index array, VI(s) is now contructed from V(s) in two steps: %C A379402 (1) Let V*(s) be the array obtaining by repeating the construction of V(s) using (n,s(n)) in place of s(n). %C A379402 (2) Then VI(s) results by retaining only n in V*. %C A379402 Thus, loosely speaking, (row n) of VI(s) shows the indices in s of the numbers in (row n) of V(s). %C A379402 The array VI(s) includes every positive integer exactly once. %C A379402 *** %C A379402 Regarding the present array, each row of U(s) splits a sequence of primes according to remainder modulo 3; e.g., in row 2, the remainders of primes in positions 9,11,16,21,32,37,40,47 are 2,1,2,1,2,1,2,1, respectively. %C A379402 Conjecture: every column is eventually increasing. %e A379402 Corner: %e A379402 1 2 3 4 5 6 7 8 10 12 13 14 %e A379402 9 11 16 21 32 37 40 47 56 67 71 74 %e A379402 15 18 23 36 39 46 55 73 96 99 107 111 %e A379402 54 58 102 129 161 174 245 274 311 326 423 515 %e A379402 91 110 160 167 238 273 292 321 420 508 598 621 %e A379402 205 272 419 499 597 618 703 733 813 835 896 932 %e A379402 194 271 416 496 576 617 702 730 776 834 989 1128 %e A379402 139 260 359 489 699 713 771 831 988 1127 1173 1190 %e A379402 86 257 358 464 698 830 987 1124 1164 1185 1251 1298 %e A379402 357 461 697 829 942 1107 1412 1498 1717 2059 2138 2179 %e A379402 356 438 889 1062 1714 2046 2137 2176 2551 2820 2927 3270 %e A379402 291 437 882 1055 1711 2033 2550 2741 2926 3269 3699 3918 %e A379402 Starting with s = A039701, we have for U*(s): %e A379402 (row 1) = ((1,1), (2,0), (3,2), (4,2), (5,2), (6,1), (7,2), (8,1), (10,2), ...) %e A379402 c(1) = ((9,2), (11,1), (15,2), (16,2), (18,1), (21,1), (23,1), (32,2), ...) %e A379402 (row 2) = ((9,2), (11,1), (16,2), (21,1), (36,1), ...) %e A379402 c(2) = ((15,2), (37,1), ...) %e A379402 (row 3) = ((15,2), (18,1), (23,2), ...) %e A379402 so that UI(s) has %e A379402 (row 1) = (1,2,3,4,5,6,7,8,10,12,13, ...) %e A379402 (row 2) = (9,11,16.21,32, ...) %e A379402 (row 3) = (15,18,23,...) %t A379402 r[seq_] := seq[[Flatten[Position[Append[Differences[seq[[All, 1]]], 1], _?(# != 0 &)]], 2]]; (* Type 2 *) %t A379402 row[0] = Mod[Prime[Range[4000]], 3];(* A039701 *) %t A379402 row[0] = Transpose[{#, Range[Length[#]]}] &[row[0]]; %t A379402 k = 0; Quiet[While[Head[row[k]] === List, row[k + 1] = row[0][[r[ %t A379402 SortBy[Apply[Complement, Map[row[#] &, Range[0, k]]], #[[2]] &]]]]; k++]]; %t A379402 m = Map[Map[#[[2]] &, row[#]] &, Range[k - 1]]; %t A379402 p[n_] := Take[m[[n]], 12] %t A379402 t = Table[p[n], {n, 1, 12}] %t A379402 Grid[t] (* array *) %t A379402 w[n_, k_] := t[[n]][[k]]; %t A379402 Table[w[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* sequence *) %t A379402 (* _Peter J. C. Moses_, Dec 04 2024 *) %Y A379402 Cf. A000040, A039701, A379046, A379401, A379403, A379404. %K A379402 nonn,tabl %O A379402 1,2 %A A379402 _Clark Kimberling_, Jan 15 2025