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.

A140574 Signed Pascal triangle with central coefficients set to zero.

Original entry on oeis.org

0, -1, 1, -1, 0, -1, -1, 0, 0, 1, -1, 4, 0, 4, -1, -1, 5, 0, 0, -5, 1, -1, 6, -15, 0, -15, 6, -1, -1, 7, -21, 0, 0, 21, -7, 1, -1, 8, -28, 56, 0, 56, -28, 8, -1, -1, 9, -36, 84, 0, 0, -84, 36, -9, 1, -1, 10, -45, 120, -210, 0, -210, 120, -45, 10, -1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, Jul 05 2008

Keywords

Comments

Row sums are 0, 0, -2, 0, 6, 0, -20, 0, 70, 0, -252, ...

Examples

			0;
-1, 1;
-1, 0, -1;
-1, 0, 0, 1;
-1, 4, 0, 4, -1;
-1, 5, 0, 0, -5,1;
-1, 6, -15, 0, -15, 6, -1;
-1, 7, -21, 0, 0, 21, -7, 1;
-1, 8, -28, 56, 0,56, -28, 8, -1;
-1, 9, -36, 84, 0, 0, -84, 36, -9, 1;
-1, 10, -45, 120, -210, 0, -210, 120, -45, 10, -1;
		

Crossrefs

Programs

  • Maple
    A140574 := proc(n,k)
            if abs(k-n/2) < 1 and not n= 1 then
                    0;
            else
            (-1)^(k+1)*binomial(n,k) ;
            end if;
    end proc:
    seq(seq(A140574(n,m),m=0..n),n=0..14) ; # R. J. Mathar, Nov 10 2011
  • Mathematica
    Clear[p, f, x, n] f[x_, n_] := (-1)^ Floor[n/2]*If [Mod[n, 2] == 1, Binomial[n, Floor[n/2]]*x^( Floor[n/2]) - Binomial[n, Floor[n/2] + 1]*x^(Floor[n/2] + 1), Binomial[n, Floor[n/2]]*x^(Floor[n/2])]; p[x, 0] = 0; p[x, 1] = 1 - x; p[x_, n_] := p[x, n] = f[x, n] - (1 - x)^n; Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[%]

Formula

t(n,m) = (-1)^(m+1)*binomial(n,m) if n=1 or abs(m-n/2)>=1, otherwise t(n,m)=0.

Extensions

Adapted offset and terms to the example. - R. J. Mathar, Nov 10 2011