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.

A381356 Limit of rows in irregular triangle A381587.

This page as a plain text file.
%I A381356 #11 Mar 04 2025 13:47:57
%S A381356 1,3,1,3,1,3,1,1,1,5,1,1,1,1,1,7,1,3,1,1,1,1,1,7,1,1,1,5,1,3,1,1,1,1,
%T A381356 1,7,1,1,1,3,1,5,1,1,1,5,1,3,1,1,1,1,1,7,1,1,1,3,1,1,1,3,1,5,1,1,1,3,
%U A381356 1,5,1,1,1,5,1,3,1,1,1,1,1,7,1,1,1,3,1,1,1,3,1,1,1,3,1,3,1,5
%N A381356 Limit of rows in irregular triangle A381587.
%C A381356 This sequence appears to equal the RUNS transform of A306346.
%H A381356 Paul D. Hanna, <a href="/A381356/b381356.txt">Table of n, a(n) for n = 1..5000</a>
%e A381356 Row n+1 of irregular triangle A381587 equals the run lengths of the first n rows of the triangle (flattened) when read in reverse order, starting with
%e A381356 n = 1: [1];
%e A381356 n = 2: [1];
%e A381356 n = 3: [2];
%e A381356 n = 4: [1, 2];
%e A381356 n = 5: [1, 1, 1, 2];
%e A381356 n = 6: [1, 3, 1, 1, 1, 2];
%e A381356 n = 7: [1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
%e A381356 n = 8: [1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
%e A381356 n = 9: [1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
%e A381356 n = 10: [1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
%e A381356 n = 11: [1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 7, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
%e A381356 n = 12: [1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 7, 1, 3, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 1, 1, 1, 1, 1, 1, ...];
%e A381356 ...
%e A381356 This sequence gives the limit of the rows.
%o A381356 (PARI) \\ Print the limit of the rows in triangle A381587
%o A381356 \\ RUNS(V) Returns vector of run lengths in vector V:
%o A381356 {RUNS(V) = my(R=[], c=1); if(#V>1, for(n=2, #V, if(V[n]==V[n-1], c=c+1, R=concat(R, c); c=1))); R=concat(R, c)}
%o A381356 \\ REV(V) Reverses order of vector V:
%o A381356 {REV(V) = Vec(Polrev(Ser(V)))}
%o A381356 \\ Generates N rows as a vector A of row vectors.
%o A381356 {N=25; A=vector(N); A[1]=[1]; A[2]=[1]; A[3]=[2];
%o A381356 for(n=3, #A-1, A[n+1] = concat(RUNS(REV(A[n])), A[n]); );}
%o A381356 \\ Print the initial terms of the limit of the rows
%o A381356 \\ (row 25 has 10797 terms of the limit of rows sequence)
%o A381356 for(n=1,120, print1(A[25][n],", "))
%Y A381356 Cf. A381587, A306346.
%K A381356 nonn
%O A381356 1,2
%A A381356 _Paul D. Hanna_, Mar 03 2025