login
A381587
a(1) = 1; thereafter the sequence is extended by iteratively appending the run length transform of the reverse of the sequence thus far.
5
1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 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, 1, 3, 1, 3, 1, 3, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3
OFFSET
1,3
COMMENTS
The run length transform replaces each run of consecutive equal values with a single value representing the length of that run.
Is 2 the greatest even number in the sequence?
It appears that the limit of the rows read in reverse equals A306346 (ignoring the initial terms). - Paul D. Hanna, Mar 03 2025
EXAMPLE
Irregular triangle begins:
1;
1;
2;
1,2;
1,1,1,2;
1,3,1,1,1,2;
1,3,1,1,1,3,1,1,1,2;
1,3,1,3,1,1,1,3,1,1,1,3,1,1,1,2;
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;
...
PROG
(PARI) \\ From Paul D. Hanna, Mar 03 2025: (Start)
\\ RUNS(V) Returns vector of run lengths in vector V:
{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)}
\\ REV(V) Reverses order of vector V:
{REV(V) = Vec(Polrev(Ser(V)))}
\\ Generates N rows as a vector A of row vectors
{N=15; A=vector(N); A[1]=[1]; A[2]=[1]; A[3]=[2];
for(n=3, #A-1, A[n+1] = concat(RUNS(REV(A[n])), A[n]); ); A}
for(n=1, N, print(A[n])) \\ Print N rows of this triangle (End)
CROSSREFS
Cf. A381357 (row lengths), A381358 (row sums), A381356 (limit of rows), A306346.
Cf. A306211.
Sequence in context: A003647 A353352 A084217 * A245548 A025903 A175327
KEYWORD
tabf,nonn,new
AUTHOR
Neal Gersh Tolunsky, Feb 27 2025
STATUS
approved