cp's OEIS Frontend

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.

A379404 Rectangular array, by descending antidiagonals: the Type 2 runlength index array of A039702 (primes mod 4); see Comments.

This page as a plain text file.
%I A379404 #10 Mar 31 2025 07:00:43
%S A379404 1,2,4,3,6,19,5,8,24,46,7,12,47,78,31,9,22,65,128,77,14,10,25,72,135,
%T A379404 93,50,91,11,27,87,154,134,92,168,239,13,29,94,197,153,183,240,337,
%U A379404 232,15,38,97,247,196,241,400,540,254,229,16,44,114,264,246,435
%N A379404 Rectangular array, by descending antidiagonals: the Type 2 runlength index array of A039702 (primes mod 4); see Comments.
%C A379404 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 A379404 Suppose s is a sequence (finite or infinite), and define rows of V(s) as follows:
%C A379404 (row 0) = s
%C A379404 (row 1) = sequence of last terms of runs in (row 0); c(1) = complement of (row 1) in (row 0)
%C A379404 For n>=2,
%C A379404 (row n) = sequence of last terms of runs in c(n-1); c(n) = complement of (row n) in (row n-1),
%C A379404 where the process stops if and when c(n) is empty for some n.
%C A379404 ***
%C A379404 The corresponding Type 2 runlength index array,  The runlength index array, VI(s) is now contructed from V(s) in two steps:
%C A379404 (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 A379404 (2) Then VI(s) results by retaining only n in V*.
%C A379404 Thus, loosely speaking, (row n) of VI(s) shows the indices in s of the numbers in (row n) of V(s).
%C A379404 The array VI(s) includes every positive integer exactly once.
%C A379404 ***
%C A379404 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 4,6,8,12,22,25,27,29 are 3,1,3,1,3,1,3,1, respectively.
%C A379404 Conjecture: every column is eventually increasing.
%e A379404 Corner:
%e A379404     1     2      3      5      7      9    10      11     13     15     16     17
%e A379404     4     6      8     12     22     25    27      29     38     44     48     59
%e A379404    19    24     47     65     72     87    94      97    114    121    131    136
%e A379404    46    78    128    135    154    197   247     264    281    287    303    319
%e A379404    31    77     93    134    153    196   246     263    280    338    363    378
%e A379404    14    50     92    183    241    435   546     574    675    691    724    744
%e A379404    91   168    240    400    543    571   758     834    887   1041   1240   1261
%e A379404   239   337    540    568    707    833   886    1002   1381   1397   1407   1501
%e A379404   232   254    674    824    885    987   1380   1500   1811   1883   1976   2280
%e A379404   229   251    669    986   1377   1481   1802   1882   1971   2271   2444   2911
%e A379404   626   983   1376   1480   1944   2240   2439   2910   3179   3295   3710   3939
%e A379404   619   982   1333   1469   1943   2239   2366   2909   3178   3294   3701   3892
%e A379404 Starting with s = A039702, we have for U*(s):
%e A379404 (row 1) = ((1,2), (2,3), (3,1), (4,3), (5,3), (7,1), (9,3), (10,1), ...)
%e A379404 c(1) = ((4,3), (6,1), (8,3), (12,1), (14,3), (19,3), (22,3), (24,1), (25,1), ...)
%e A379404 (row 2) = ((4,3), (6,1), (8,3), (12,1), (22,3), (25,1), (27,3), (29,1) ...)
%e A379404 c(2) = ((14,3), (19,3), (24,1), ...)
%e A379404 (row 3) = ((19,3), (24,1), ...)
%e A379404 so that UI(s) has
%e A379404 (row 1) = (1,2,3,5,7,9,10,11,13, ...)
%e A379404 (row 2) = (4,6,8,12,22,25, ...)
%e A379404 (row 3) = (19,24,47, ...)
%t A379404 r[seq_] := seq[[Flatten[Position[Append[Differences[seq[[All, 1]]], 1], _?(# != 0 &)]], 2]];  (* Type 2 *)
%t A379404 row[0] = Mod[Prime[Range[4000]], 4];(* A039701 *)
%t A379404 row[0] = Transpose[{#, Range[Length[#]]}] &[row[0]];
%t A379404 k = 0; Quiet[While[Head[row[k]] === List, row[k + 1] = row[0][[r[
%t A379404      SortBy[Apply[Complement, Map[row[#] &, Range[0, k]]], #[[2]] &]]]]; k++]];
%t A379404 m = Map[Map[#[[2]] &, row[#]] &, Range[k - 1]];
%t A379404 p[n_] := Take[m[[n]], 12]
%t A379404 t = Table[p[n], {n, 1, 12}]
%t A379404 Grid[t]  (* array *)
%t A379404 w[n_, k_] := t[[n]][[k]];
%t A379404 Table[w[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten  (* sequence *)
%t A379404 (* _Peter J. C. Moses_, Dec 04 2024 *)
%Y A379404 Cf. A039702, A379046, A379401, A379402, A379403.
%K A379404 nonn,tabl
%O A379404 1,2
%A A379404 _Clark Kimberling_, Jan 15 2025