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.

A288108 Number T(n,k) of Dyck paths of semilength n such that each level has exactly k peaks or no peaks; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 3, 1, 1, 0, 5, 2, 1, 1, 0, 13, 5, 3, 1, 1, 0, 31, 15, 4, 4, 1, 1, 0, 71, 27, 10, 7, 5, 1, 1, 0, 181, 76, 36, 11, 11, 6, 1, 1, 0, 447, 196, 83, 22, 19, 16, 7, 1, 1, 0, 1111, 548, 225, 81, 32, 31, 22, 8, 1, 1, 0, 2799, 1388, 573, 235, 60, 56, 48, 29, 9, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 05 2017

Keywords

Comments

T(n,k) is defined for all n,k >= 0. The triangle contains only the terms for k<=n. T(0,k) = 1 and T(n,k) = 0 if k > n > 0.

Examples

			. T(5,2) = 5:                                        /\/\
.                                       /\  /\      /    \
.      /\/\      /\/\      /\/\        /  \/  \    /      \
. /\/\/    \  /\/    \/\  /    \/\/\  /        \  /        \ .
.
. T(5,3) = 3:
.                                       /\/\/\
.              /\  /\/\    /\/\  /\    /      \
.             /  \/    \  /    \/  \  /        \ .
.
Triangle T(n,k) begins:
  1;
  0,   1;
  0,   1,  1;
  0,   3,  1,  1;
  0,   5,  2,  1,  1;
  0,  13,  5,  3,  1,  1;
  0,  31, 15,  4,  4,  1, 1;
  0,  71, 27, 10,  7,  5, 1, 1;
  0, 181, 76, 36, 11, 11, 6, 1, 1;
		

Crossrefs

Row sums give A288109.
T(2n,n) gives A156043.

Programs

  • Maple
    b:= proc(n, k, j) option remember; `if`(n=j, 1, add(
          b(n-j, k, i)*(binomial(j-1, i-1)+binomial(i, k)
           *binomial(j-1, i-1-k)), i=1..min(j+k, n-j)))
        end:
    T:= (n, k)-> b(n, k$2):
    seq(seq(T(n, k), k=0..n), n=0..14);
  • Mathematica
    b[n_, k_, j_] := b[n, k, j] = If[n == j, 1, Sum[b[n - j, k, i]*(Binomial[j - 1, i - 1] + Binomial[i, k]*Binomial[j - 1, i - 1 - k]), {i, 1, Min[j + k, n - j]}]];
    T[n_, k_] := b[n, k, k];
    Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 25 2018, translated from Maple *)

A156042 A(n,k) for n >= k in triangular ordering, where A(n,k) is the number of compositions (ordered partitions) of n into k parts, with the first part greater than or equal to all other parts.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 3, 6, 11, 1, 3, 8, 17, 32, 1, 4, 11, 26, 54, 102, 1, 4, 13, 35, 82, 172, 331, 1, 5, 17, 48, 120, 272, 567, 1101, 1, 5, 20, 63, 170, 412, 918, 1906, 3724, 1, 6, 24, 81, 235, 607, 1434, 3152, 6518, 12782, 1, 6, 28, 102, 317, 872, 2180, 5049, 10978, 22616, 44444
Offset: 1

Views

Author

Jack W Grahl, Feb 02 2009

Keywords

Comments

The value is smaller than the number of compositions (ordered partitions) of n into k parts and at least the number of (unordered) partitions.

Examples

			A(5,3) = 8 and the 8 compositions of 5 into 3 parts with first part maximal are:
[5,0,0], [4,1,0], [4,0,1], [3,2,0], [3,0,2], [3,1,1], [2,2,1], [2,1,2].
1
1  2
1  2  4
1  3  6  11
1  3  8  17  32
1  4  11 26  54  102
		

Crossrefs

A156041 is the whole of the square. A156043 is the diagonal. See also A156039 and A156040.

Programs

  • Maple
    b:= proc(n,i,m) option remember;
          if n<0 then 0
        elif n=0 then 1
        elif i=1 then `if`(n<=m, 1, 0)
        else add(b(n-k, i-1, m), k=0..m)
          fi
        end:
    A:= (n,k)-> add(b(n-m, k-1, m), m=ceil(n/k)..n):
    seq(seq(A(n,k), k=1..n), n=1..12); # Alois P. Heinz, Jun 14 2009
  • Mathematica
    nn=10; Table[Table[Coefficient[Series[Sum[x^i((1-x^(i+1))/(1-x))^(k-1), {i, 0, n}], {x, 0, nn}], x^n], {k, 1, n}], {n, 1, nn}]//Grid (* Geoffrey Critzer, Jul 15 2013 *)

Extensions

More terms from Alois P. Heinz, Jun 14 2009

A188624 a(n) = greatest entry in row n of A184957.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 7, 11, 19, 32, 56, 102, 180, 331, 596, 1101, 2015, 3724, 6904, 12782, 23923, 44444, 83755, 156334, 296084, 555531, 1056095, 1991784, 3797790, 7197369, 13757665, 26186491, 50164787, 95847772, 183980036, 352670170, 678215028, 1303661995, 2511483176, 4838822931, 9337575130, 18025920971, 34840575458, 67371021603, 130412367572
Offset: 1

Views

Author

N. J. A. Sloane, Apr 06 2011

Keywords

Comments

The greatest entry occurs at the midpoint of the row.
This also gives the greatest entries in the rows of A186807 and A156041.

Crossrefs

Bisections give A156043, A188625.

Formula

I would like to know the asymptotics for this sequence.

A188625 A bisection of A188624.

Original entry on oeis.org

1, 1, 3, 7, 19, 56, 180, 596, 2015, 6904, 23923, 83755, 296084, 1056095, 3797790, 13757665, 50164787, 183980036, 678215028, 2511483176, 9337575130, 34840575458, 130412367572, 489546890178, 1842438724560, 6950471604901, 26276784902865, 99539079724648, 377759500611913, 1436093975018569, 5468247624237042, 20853026397347178
Offset: 1

Views

Author

N. J. A. Sloane, Apr 06 2011

Keywords

Crossrefs

Showing 1-4 of 4 results.