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.

Showing 1-4 of 4 results.

A381356 Limit of rows in irregular triangle A381587.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Paul D. Hanna, Mar 03 2025

Keywords

Comments

This sequence appears to equal the RUNS transform of A306346.

Examples

			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
n = 1: [1];
n = 2: [1];
n = 3: [2];
n = 4: [1, 2];
n = 5: [1, 1, 1, 2];
n = 6: [1, 3, 1, 1, 1, 2];
n = 7: [1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
n = 8: [1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2];
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];
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];
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];
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, ...];
...
This sequence gives the limit of the rows.
		

Crossrefs

Programs

  • PARI
    \\ Print the limit of the rows in triangle A381587
    \\ 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=25; 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]); );}
    \\ Print the initial terms of the limit of the rows
    \\ (row 25 has 10797 terms of the limit of rows sequence)
    for(n=1,120, print1(A[25][n],", "))

A381357 Row lengths of irregular triangle A381587.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 10, 16, 26, 42, 66, 102, 156, 238, 364, 560, 868, 1354, 2120, 3322, 5198, 8112, 12624, 19602, 30400, 47138, 73138, 113598, 176630, 274858
Offset: 1

Views

Author

Paul D. Hanna, Mar 03 2025

Keywords

Comments

If it exists, what is the limit of a(n)^(1/n) as n increases?

Examples

			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
  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; ...
This sequence gives the row lengths [1, 1, 1, 2, 4, 6, 10, 16, ...].
		

Crossrefs

Programs

  • PARI
    \\ Print the row lengths of irregular triangle A381587
    \\ 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=25; 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]); );}
    \\ Print the row lengths of the first N rows
    for(n=1, N, print1(#A[n],", "))

A381358 Row sums of irregular triangle A381587.

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 15, 25, 41, 67, 109, 175, 277, 433, 671, 1035, 1595, 2463, 3817, 5937, 9259, 14457, 22569, 35193, 54795, 85195, 132333, 205471, 319069, 495699
Offset: 1

Views

Author

Paul D. Hanna, Mar 03 2025

Keywords

Comments

If it exists, what is the limit of a(n)^(1/n) as n increases?

Examples

			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
  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; ...
This sequence gives the row sums [1, 1, 2, 3, 5, 9, 15, 25, ...].
		

Crossrefs

Programs

  • PARI
    \\ Print the row sums of irregular triangle A381587
    \\ 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=25; 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]); );}
    \\ Print the row sums of the first N rows
    for(n=1, N, print1(vecsum(A[n]),", "))

A306346 Start with the sequence S(1) = [0], and for n >= 1 define S(n+1) to equal the concatenation of S(n) with the RUNS transform of S(n) when read in reverse order. This sequence is the limit of that process as n goes to infinity.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 7, 1, 1, 1, 1, 1, 5, 1, 1, 1, 3, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 7, 1, 1, 1, 1, 1, 3, 1, 7, 1
Offset: 1

Views

Author

Michel Lagneau, Feb 09 2019

Keywords

Comments

Conjecture 1: a(n) <= 7.
Conjecture 2: a(n) is odd for n > 1 and when a(n) = 3, 5 or 7, n is odd.
Property of the sequence:
a(n) = 3 for the odd values n = 5, 9, 13, 15, 21, 23, 25, 37, 39, ...
a(n) = 5 for the odd values n = 33, 57, 75, 93, 111, 115, 129, 147, ...
a(n) = 7 for the odd values n = 51, 79, 87, 121, 133, 141, 185, 203, ...
Remark:
If row 1 = [1], the sequence a(n) becomes b(n) = 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, ... and it is conjectured that b(n) <= 7.
Statistics for n <= 10^5:
+--------------+-------------------------+------------+
| a(n) | number of occurrences | percentage |
| | for n <= 10^5 | |
+--------------+-------------------------+------------+
| 1 | 72244 | 72.244% |
| 3 | 18030 | 18.030% |
| 5 | 6806 | 6.806% |
| 7 | 2919 | 2.919% |
+--------------+-------------------------+------------+

Examples

			We may consider this sequence to be the limit of the rows of the irregular triangle in which row n+1 equals the concatenation of row n with the RUNS transform of row n when read in reverse order, as illustrated below.
Start with row 1 = [0];
the RUNS of row 1 in reverse = [1], so row 2 = row 1 + [1] = [0, 1];
the RUNS of row 2 in reverse = [1, 1], so row 3 = row 2 + [1, 1] = [0, 1, 1, 1];
the RUNS of row 3 in reverse = [3, 1], so row 4 = row 3 + [3, 1] = [0, 1, 1, 1, 3, 1];
the RUNS of row 4 in reverse = [1, 1, 3, 1], so row 5 = row 4 + [1, 1, 3, 1] = [0, 1, 1, 1, 3, 1, 1, 1, 3, 1];
etc.
The irregular triangle starts:
  [0];
  [0, 1];
  [0, 1, 1, 1];
  [0, 1, 1, 1, 3, 1];
  [0, 1, 1, 1, 3, 1, 1, 1, 3, 1];
  [0, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1];
  [0, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 1];
  ...
in which the limit of the rows yields this sequence.
The row lengths of the above triangle equal A381357 (offset 3).
		

Crossrefs

Programs

  • Maple
    n0:=1:T:=array(1..1000,[0$1000]):
    for n from 1 to 50 do :
      it:=1:i:=n0:
      for k from n0 by -1 to 2 do:
        if T[k]=T[k-1]
         then
         it:=it+1:
         else
         i:=i+1:T[i]:=it:it:=1:
        fi:
       od:
      i:=i+1:T[i]:=1:n0:=i:
      od:
    print(T):
  • PARI
    \\ From Paul D. Hanna, Mar 04 2025: (Start)
    \\ Print the first N rows of the irregular triangle.
    \\ This sequence equals the limit of the rows.
    \\ 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=12; A=vector(N); A[1]=[0];
    for(n=1, #A-1, A[n+1] = concat(A[n], RUNS(REV(A[n]))); );}
    for(n=1,N,print(A[n])) \\ (End)

Extensions

Name corrected and edited by Paul D. Hanna, Mar 05 2025
Showing 1-4 of 4 results.