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.

A051160 Coefficients in expansion of (1-x)^floor(n/2)(1+x)^ceiling(n/2).

Original entry on oeis.org

1, 1, 1, 1, 0, -1, 1, 1, -1, -1, 1, 0, -2, 0, 1, 1, 1, -2, -2, 1, 1, 1, 0, -3, 0, 3, 0, -1, 1, 1, -3, -3, 3, 3, -1, -1, 1, 0, -4, 0, 6, 0, -4, 0, 1, 1, 1, -4, -4, 6, 6, -4, -4, 1, 1, 1, 0, -5, 0, 10, 0, -10, 0, 5, 0, -1, 1, 1, -5, -5, 10, 10, -10, -10, 5, 5, -1, -1, 1, 0, -6, 0, 15, 0, -20
Offset: 0

Views

Author

Michael Somos, Oct 14 1999

Keywords

Comments

Triangle T(n,k), 0<=k<=n, read by rows given by: [1,0,-1,0,0,0,0,0,...]DELTA[1,-2,1,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Sep 22 2008
The production matrix for this array has bivariate e.g.f. equal to exp(-t*x)*(1-t). - Paul Barry, Nov 22 2008
The elements of the matrix inverse are apparently T^(-1)(n,k) = (-1)^(n+k)*T(n,k). - R. J. Mathar, Apr 08 2013
Row sums give A130706. - Philippe Deléham, Oct 21 2013

Examples

			Triangle begins:
  1;
  1,  1;
  1,  0, -1;
  1,  1, -1, -1;
  1,  0, -2,  0,  1;
  1,  1, -2, -2,  1,  1;
  ...
		

Crossrefs

Cf. A007318, A051159(n, k) = (-1)^[ k/2 ]*T(n, k).

Programs

  • Maple
    A051160 := proc(n,k)
        (1-x)^floor(n/2)*(1+x)^ceil(n/2) ;
        coeftayl(%,x=0,k) ;
    end proc: # R. J. Mathar, Apr 08 2013
  • Mathematica
    t[n_, k_] := Coefficient[(1-x)^Floor[n/2]*(1+x)^Ceiling[n/2], x, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 09 2014 *)
  • PARI
    {T(n, k) = polcoeff( (1 - x)^(n\2) * (1 + x)^ceil(n/2), k)}

Formula

T(n, k) = -T(n-2, k-2) + T(n-2, k). T(0, 0) = T(1, 0) = T(1, 1) = 1.
T(n,k) = T(n-1,k) + (-1)^(n-1)*T(n-1,k-1), T(0,0)=1. - Jose Ramon Real, Nov 10 2007
G.f.: (1+x+x*y)/(1-x^2+x^2*y^2). - Philippe Deléham, Oct 21 2013