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.

A168557 Triangle T(n,k) read by rows: coefficient [x^k] of the polynomial (-1)^n*((x + 1)^n - x^n + 1), 0 <= k <= max(0, n - 1).

Original entry on oeis.org

1, -2, 2, 2, -2, -3, -3, 2, 4, 6, 4, -2, -5, -10, -10, -5, 2, 6, 15, 20, 15, 6, -2, -7, -21, -35, -35, -21, -7, 2, 8, 28, 56, 70, 56, 28, 8, -2, -9, -36, -84, -126, -126, -84, -36, -9, 2, 10, 45, 120, 210, 252, 210, 120, 45, 10, -2, -11, -55, -165, -330, -462, -462, -330
Offset: 0

Views

Author

Roger L. Bagula, Nov 29 2009

Keywords

Comments

A variant of Pascal's triangle, the first column replaced by 2 (if n > 0), the last column dropped, and then odd rows multiplied by (-1)^n.
Absolute value row sums are A000079.

Examples

			Triangle begins:
   1;
  -2;
   2,   2;
  -2,  -3,  -3;
   2,   4,   6,    4;
  -2,  -5, -10,  -10,   -5;
   2,   6,  15,   20,   15,    6;
  -2,  -7, -21,  -35,  -35,  -21,   -7;
   2,   8,  28,   56,   70,   56,   28,    8;
  -2,  -9, -36,  -84, -126, -126,  -84,  -36,   -9;
   2,  10,  45,  120,  210,  252,  210,  120,   45,  10;
  -2, -11, -55, -165, -330, -462, -462, -330, -165, -55, -11;
   2,  12,  66,  220,  495,  792,  924,  792,  495,  220, 66, 12;
   ...
		

Crossrefs

Programs

  • Mathematica
    Table[CoefficientList[(-1)^n*(x + 1)^n - (-1)^n*(x^n - 1), x], {n, 0, 12}]
  • Maxima
    create_list((-1)^n*binomial(n, k) + (-1)^n*kron_delta(0, k) - kron_delta(0, n), n, 0, 12, k, 0, max(0, n - 1)); /* Franck Maminirina Ramaharo, Nov 21 2018 */

Formula

From Franck Maminirina Ramaharo, Nov 22 2018: (Start)
T(n,k) = (-1)^n*binomial(n, k) + (-1)^n*delta(0, k) - delta(0, n), where delta is Kronecker's delta-symbol.
G.f.: (1 + 2*x*y - (1 - x - x^2)*y^2)/((1 + y)*(1 + x*y)*(1 + y + x*y)).
E.g.f.: (1 - exp(y) + exp(x*y))*exp(-(1 + x)*y). (End)