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.

Previous Showing 11-14 of 14 results.

A380822 Triangle read by rows: T(n,k) is the number of compositions of n with k pairs of equal adjacent parts and all parts in standard order.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 3, 1, 0, 1, 2, 1, 4, 1, 0, 1, 3, 3, 3, 5, 1, 0, 1, 2, 10, 5, 4, 6, 1, 0, 1, 5, 9, 17, 8, 5, 7, 1, 0, 1, 8, 16, 22, 26, 10, 6, 8, 1, 0, 1, 10, 35, 33, 37, 37, 12, 7, 9, 1, 0, 1, 19, 44, 80, 59, 56, 48, 14, 8, 10, 1, 0, 1
Offset: 1

Views

Author

John Tyler Rascoe, May 08 2025

Keywords

Comments

A composition with parts in standard order satisfies the condition that for any part p > 1, the part p - 1 has already appeared. All compositions of this kind have first part 1.

Examples

			Triangle begins:
     k=0   1   2   3   4  5  6  7  8  9
 n=1  [1],
 n=2  [0,  1],
 n=3  [1,  0,  1],
 n=4  [1,  1,  0,  1],
 n=5  [0,  3,  1,  0,  1],
 n=6  [2,  1,  4,  1,  0, 1],
 n=7  [3,  3,  3,  5,  1, 0, 1],
 n=8  [2, 10,  5,  4,  6, 1, 0, 1],
 n=9  [5,  9, 17,  8,  5, 7, 1, 0, 1],
 n=10 [8, 16, 22, 26, 10, 6, 8, 1, 0, 1],
...
Row n = 6 counts:
 T(6,0) = 2: (1,2,1,2), (1,2,3).
 T(6,1) = 1: (1,2,2,1).
 T(6,2) = 4: (1,1,1,2,1), (1,1,2,1,1), (1,1,2,2), (1,2,1,1,1).
 T(6,3) = 1: (1,1,1,1,2).
 T(6,4) = 0: .
 T(6,5) = 1: (1,1,1,1,1,1).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l, i) option remember; expand(`if`(n=0, 1, add(
          `if`(j=l, x, 1)*b(n-j, j, max(i, j)), j=1..min(n, i+1))))
        end:
    T:= (n, k)-> coeff(b(n, 0$2), x, k):
    seq(seq(T(n, k), k=0..n-1), n=1..12);  # Alois P. Heinz, May 08 2025
  • PARI
    G(k,N) = {my(x='x+O('x^N)); if(k<1,1, G(k-1,N) * x^k * (1 + (1/(1 - sum(j=1,k, x^j/(1-(z-1)*x^j)))) * sum(j=1,k, z^(if(j==k,1,0)) * x^j/(1-(z-1)*x^j))))}
    T_xz(max_row) = {my(N = max_row+1, x='x+O('x^N), h = sum(i=1,N/2+1, G(i,N))); vector(N-1, n, Vecrev(polcoeff(h, n)))}
    T_xz(10)

Formula

G.f.: Sum_{i>0} G(i) where G(k) = G(k-1) * x*k * (1 + 1/(1 - Sum_{j=1..k} ( x^j/(1 - (z-1)*x^j) )) * Sum_{j=1..k} ( z^[j=k] * x^j/(1 - (z-1)*x^j) )) and G(0) = 1.

A383713 Triangle read by rows: T(n,k) is the number of compositions of n with k parts all in standard order.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 3, 1, 0, 0, 0, 1, 3, 4, 1, 0, 0, 0, 0, 4, 6, 5, 1, 0, 0, 0, 0, 2, 10, 10, 6, 1, 0, 0, 0, 0, 1, 9, 20, 15, 7, 1, 0, 0, 0, 0, 1, 7, 25, 35, 21, 8, 1, 0, 0, 0, 0, 0, 7, 26, 55, 56, 28, 9, 1, 0, 0, 0, 0, 0, 4, 29, 71, 105, 84, 36, 10, 1
Offset: 0

Views

Author

John Tyler Rascoe, May 06 2025

Keywords

Comments

A composition with parts in standard order satisfies the condition that for any part p > 1, the part p - 1 has already appeared. All compositions of this kind have first part 1.

Examples

			Triangle begins:
     k=0  1  2  3  4   5   6   7   8  9 10
 n=0  [1],
 n=1  [0, 1],
 n=2  [0, 0, 1],
 n=3  [0, 0, 1, 1],
 n=4  [0, 0, 0, 2, 1],
 n=5  [0, 0, 0, 1, 3,  1],
 n=6  [0, 0, 0, 1, 3,  4,  1],
 n=7  [0, 0, 0, 0, 4,  6,  5,  1],
 n=8  [0, 0, 0, 0, 2, 10, 10,  6,  1],
 n=9  [0, 0, 0, 0, 1,  9, 20, 15,  7, 1],
 n=10 [0, 0, 0, 0, 1,  7, 25, 35, 21, 8, 1],
 ...
Row n = 6 counts:
 T(6,3) = 1: (1,2,3).
 T(6,4) = 3: (1,1,2,2), (1,2,1,2), (1,2,2,1).
 T(6,5) = 4: (1,1,1,1,2), (1,1,1,2,1), (1,1,2,1,1), (1,2,1,1,1).
 T(6,6) = 1: (1,1,1,1,1,1).
		

Crossrefs

Cf. A000110 (column sums), A047998, A107429, A126347 (triangle transposed with no zeros), A278984, A383253 (row sums).

Programs

  • PARI
    T_xy(max_row) = {my(N = max_row+1, x='x+O('x^N), h = 1 + sum(i=1,1+(N/2), y^i * x^(i*(i+1)/2)/prod(j=1,i, 1 - y*(x-x^(j+1))/(1-x)))); vector(N, n, Vecrev(polcoeff(h, n-1)))}
    T_xy(10)

Formula

G.f.: 1 + Sum_{i>0} y^i * x^(i*(i+1)/2) / Product_{j=1..i} 1 - y*(x - x^(j+1))/(1 - x).

A187081 Triangle T(n,k) read by rows: sandpiles of n grains and height k.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 0, 0, 1, 20, 1, 0, 0, 0, 0, 0, 0, 0, 1, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 54, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 88, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 143, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 232, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 376, 84, 0, 0
Offset: 0

Views

Author

Joerg Arndt, Mar 08 2011

Keywords

Comments

See A186085 for the definition of sandpiles.

Examples

			Triangle begins:
1;
0,1;
0,1,0;
0,1,0,0;
0,1,1,0,0;
0,1,2,0,0,0;
0,1,4,0,0,0,0;
0,1,7,0,0,0,0,0;
0,1,12,0,0,0,0,0,0;
0,1,20,1,0,0,0,0,0,0;
0,1,33,2,0,0,0,0,0,0,0;
0,1,54,5,0,0,0,0,0,0,0,0;
0,1,88,11,0,0,0,0,0,0,0,0,0;
0,1,143,22,0,0,0,0,0,0,0,0,0,0;
0,1,232,44,0,0,0,0,0,0,0,0,0,0,0;
0,1,376,84,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,609,158,1,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,986,293,2,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,1596,535,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,2583,969,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,4180,1739,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,6764,3099,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,10945,5491,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
The 22 compositions corresponding to sandpiles of 9 grains are the following:
    #:    composition              height
    1:    [ 1 2 3 2 1 ]              3
    2:    [ 1 2 2 2 1 1 ]            2
    3:    [ 1 2 2 1 2 1 ]            2
    4:    [ 1 2 1 2 2 1 ]            2
    5:    [ 1 1 2 2 2 1 ]            2
    6:    [ 1 2 2 1 1 1 1 ]          2
    7:    [ 1 2 1 2 1 1 1 ]          2
    8:    [ 1 1 2 2 1 1 1 ]          2
    9:    [ 1 2 1 1 2 1 1 ]          2
   10:    [ 1 1 2 1 2 1 1 ]          2
   11:    [ 1 1 1 2 2 1 1 ]          2
   12:    [ 1 2 1 1 1 2 1 ]          2
   13:    [ 1 1 2 1 1 2 1 ]          2
   14:    [ 1 1 1 2 1 2 1 ]          2
   15:    [ 1 1 1 1 2 2 1 ]          2
   16:    [ 1 2 1 1 1 1 1 1 ]        2
   17:    [ 1 1 2 1 1 1 1 1 ]        2
   18:    [ 1 1 1 2 1 1 1 1 ]        2
   19:    [ 1 1 1 1 2 1 1 1 ]        2
   20:    [ 1 1 1 1 1 2 1 1 ]        2
   21:    [ 1 1 1 1 1 1 2 1 ]        2
   22:    [ 1 1 1 1 1 1 1 1 1 ]      1
  stats:  0 1 20 1 0 0 0 0 0 0
		

Crossrefs

Row sums are A186085 (sandpiles of n grains), cf. A186084 (sandpiles by base length), A047998 (fountains of coins by base length).

Formula

For n>=2 we have T(n,1)+T(n,2) = Fibonacci(n-1).
T(n,2) = A000071(n). [Joerg Arndt, Sep 17 2013]

A383751 Number of Carlitz compositions of n with parts in standard order.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 3, 2, 5, 8, 10, 19, 31, 44, 73, 123, 193, 315, 524, 847, 1392, 2317, 3810, 6303, 10506, 17451, 29066, 48603, 81223, 135965, 228153, 383014, 643756, 1083693, 1825640, 3078574, 5197246, 8780823, 14847669, 25128385, 42558687, 72131730, 122343844
Offset: 0

Views

Author

John Tyler Rascoe, May 08 2025

Keywords

Comments

A composition with parts in standard order satisfies the condition that for any part p > 1, the part p - 1 has already appeared. All compositions of this kind have first part 1.

Examples

			a(9) = 5 counts: (1,2,1,2,1,2), (1,2,1,2,3), (1,2,1,3,2), (1,2,3,1,2), (1,2,3,2,1).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l, i) option remember; `if`(n=0, 1, add(
          `if`(j=l, 0, b(n-j, j, max(i, j))), j=1..min(n, i+1)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..43);  # Alois P. Heinz, May 09 2025
  • PARI
    G(k,N) = {my(x='x+O('x^N)); if(k<1,1, G(k-1,N) * x^k * (1 + (1/(1 - sum(j=1,k, x^j/(1+x^j)))) * sum(j=1,k-1, x^j/(1+x^j))))}
    A_x(N) = {my(x='x+O('x^N)); Vec(sum(i=0,N/2+1, G(i,N+1)))}
    A_x(50)

Formula

G.f.: Sum_{i>=0} G(i) where G(k) = G(k-1) * x*k * (1 + 1/(1 - Sum_{j=1..k} ( x^j/(1+x^j) )) * Sum_{j=1..k-1} ( x^j/(1+x^j) )) and G(0) = 1.
Previous Showing 11-14 of 14 results.