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-2 of 2 results.

A094953 Triangle T(n,m) read by rows: number of rises (drops) in the compositions of n with m parts, m>=2.

Original entry on oeis.org

1, 1, 2, 2, 4, 3, 2, 8, 9, 4, 3, 12, 21, 16, 5, 3, 18, 39, 44, 25, 6, 4, 24, 66, 96, 80, 36, 7, 4, 32, 102, 184, 200, 132, 49, 8, 5, 40, 150, 320, 430, 372, 203, 64, 9, 5, 50, 210, 520, 830, 888, 637, 296, 81, 10, 6, 60, 285, 800, 1480, 1884, 1673, 1024, 414, 100, 11, 6
Offset: 2

Views

Author

Ralf Stephan, May 26 2004

Keywords

Examples

			1
1 2
2 4 3
2 8 9 4
3 12 21 16 5
3 18 39 44 25 6
4 24 66 96 80 36 7
		

Crossrefs

Columns 2-4 (+-offset) are A004526, A007590, A007518.
Row sums are A045883, diagonals include n, n^2, (n-1)(n^2-n+2)/2, (n-1)^2(n^+n+6), etc.
Cf. A045927.

Programs

  • Mathematica
    T[n_, m_] := SeriesCoefficient[(m-1)x^(m+1)/(1+x)/(1-x)^m, {x, 0, n+1}];
    Table[T[n, m], {n, 2, 13}, {m, 2, n}] // Flatten (* Jean-François Alcover, Dec 03 2018 *)
  • PARI
    T(n,m)=polcoeff((m-1)*x^(m+1)/(1+x)/(1-x)^m,n)

Formula

G.f. of m-th column: [(m-1)x^(m+1)]/[(1+x)(1-x)^m].

A248345 Signed version of A094953.

Original entry on oeis.org

1, -1, 2, 2, -4, 3, -2, 8, -9, 4, 3, -12, 21, -16, 5, -3, 18, -39, 44, -25, 6, 4, -24, 66, -96, 80, -36, 7, -4, 32, -102, 184, -200, 132, -49, 8, 5, -40, 150, -320, 430, -372, 203, -64, 9, -5, 50, -210, 520, -830, 888, -637, 296, -81, 10, 6, -60, 285, -800, 1480, -1884, 1673, -1024, 414, -100, 11
Offset: 0

Views

Author

Derek Orr, Oct 30 2014

Keywords

Comments

This is the transformation of the polynomial 1 + 2x + 3x^2 + 4x^3 + ... + n*x^(n-1)+(n+1)*x^n to the polynomial A_0*(x+1)^0 + A_1*(x+1)^1 + A_2*(x+1)^2 + ... + A_n*(x+1)^n. This sequence gives A_0, ... A_n as the entries in the n-th row of this triangle, starting at n = 0.

Examples

			1;
-1,  2;
2,  -4,    3;
-2,  8,   -9,    4;
3, -12,   21,  -16,    5;
-3, 18,  -39,   44,  -25,    6;
4, -24,   66,  -96,   80,  -36,    7;
-4, 32, -102,  184, -200,  132,  -49,   8;
5, -40,  150, -320,  430, -372,  203, -64,   9;
-5, 50, -210,  520, -830,  888, -637, 296, -81, 10
		

Crossrefs

Programs

  • PARI
    T(n,k)=(k+1)*sum(i=0,n-k,(-1)^i*binomial(i+k+1,k+1))
    for(n=0,15,for(k=0,n,print1(T(n,k),", ")))

Formula

Rows sum to 1.
T(n,n) = n for n >= 0.
T(n,n-1) = -n^2 for n >= 1.
T(n,2) = A007518(n)*(-1)^n for n >= 2.
T(n,1) = A007590(n+1)*(-1)^(n+1) for n >= 1.
T(n,0) = A001057(n+1) for n >= 0.
Showing 1-2 of 2 results.