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-10 of 11 results. Next

A008315 Catalan triangle read by rows. Also triangle of expansions of powers of x in terms of Chebyshev polynomials U_n(x).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 4, 5, 1, 5, 9, 5, 1, 6, 14, 14, 1, 7, 20, 28, 14, 1, 8, 27, 48, 42, 1, 9, 35, 75, 90, 42, 1, 10, 44, 110, 165, 132, 1, 11, 54, 154, 275, 297, 132, 1, 12, 65, 208, 429, 572, 429, 1, 13, 77, 273, 637, 1001, 1001, 429, 1, 14, 90, 350, 910, 1638, 2002, 1430, 1, 15, 104
Offset: 0

Views

Author

Keywords

Comments

There are several versions of a Catalan triangle: see A009766, A008315, A028364, A053121.
Number of standard tableaux of shape (n-k,k) (0<=k<=floor(n/2)). Example: T(4,1)=3 because in th top row we can have 124, 134, or 123 (but not 234). - Emeric Deutsch, May 23 2004
T(n,k) is the number of n-digit binary words (length n sequences on {0,1}) containing k 1's such that no initial segment of the sequence has more 1's than 0's. - Geoffrey Critzer, Jul 31 2009
T(n,k) is the number of dispersed Dyck paths (i.e. Motzkin paths with no (1,0) steps at positive heights) of length n and having k (1,1)-steps. Example: T(5,1)=4 because, denoting U=(1,1), D=(1,-1), H=(1,0), we have HHHUD, HHUDH, HUDHH, and UDHHH. - Emeric Deutsch, May 30 2011
T(n,k) is the number of length n left factors of Dyck paths having k (1,-1)-steps. Example: T(5,1)=4 because, denoting U=(1,1), D=(1,-1), we have UUUUD, UUUDU, UUDUU, and UDUUU. There is a simple bijection between length n left factors of Dyck paths and dispersed Dyck paths of length n, that takes D steps into D steps. - Emeric Deutsch, Jun 19 2011
Triangle, with zeros omitted, given by (1, 0, 0, -1, 1, 0, 0, -1, 1, 0, 0, -1, 1, ...) DELTA (0, 1, -1, 0, 0, 1, -1, 0, 0, 1, -1, 0, 0, 1, ...) where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 12 2011
T(n,k) are rational multiples of A055151(n,k). - Peter Luschny, Oct 16 2015
T(2*n,n) = Sum_{k>=0} T(n,k)^2 = A000108(n), T(2*n+1,n) = A000108(n+1). - Michael Somos, Jun 08 2020

Examples

			Triangle begins:
  1;
  1;
  1, 1;
  1, 2;
  1, 3,  2;
  1, 4,  5;
  1, 5,  9,  5;
  1, 6, 14, 14;
  1, 7, 20, 28, 14;
  ...
T(5,2) = 5 because there are 5 such sequences: {0, 0, 0, 1, 1}, {0, 0, 1, 0, 1}, {0, 0, 1, 1, 0}, {0, 1, 0, 0, 1}, {0, 1, 0, 1, 0}. - _Geoffrey Critzer_, Jul 31 2009
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
  • P. J. Larcombe, A question of proof..., Bull. Inst. Math. Applic. (IMA), 30, Nos. 3/4, 1994, 52-54.

Crossrefs

T(2n, n) = A000108 (Catalan numbers), row sums = A001405 (central binomial coefficients).
This is also the positive half of the triangle in A008482. - Michael Somos
This is another reading (by shallow diagonals) of the triangle A009766, i.e. A008315[n] = A009766[A056536[n]].

Programs

  • Haskell
    a008315 n k = a008315_tabf !! n !! k
    a008315_row n = a008315_tabf !! n
    a008315_tabf = map reverse a008313_tabf
    -- Reinhard Zumkeller, Nov 14 2013
  • Maple
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, add(b(x-1, y+j), j=[-1, 1])))
        end:
    T:= (n, k)-> b(n, n-2*k):
    seq(seq(T(n, k), k=0..n/2), n=0..16);  # Alois P. Heinz, Oct 14 2022
  • Mathematica
    Table[Binomial[k, i]*(k - 2 i + 1)/(k - i + 1), {k, 0, 20}, {i, 0, Floor[k/2]}] // Grid (* Geoffrey Critzer, Jul 31 2009 *)
  • PARI
    {T(n, k) = if( k<0 || k>n\2, 0, if( n==0, 1, T(n-1, k-1) + T(n-1, k)))}; /* Michael Somos, Aug 17 1999 */
    

Formula

T(n, 0) = 1 if n >= 0; T(2*k, k) = T(2*k-1, k-1) if k>0; T(n, k) = T(n-1, k-1) + T(n-1, k) if k=1, 2, ..., floor(n/2). - Michael Somos, Aug 17 1999
T(n, k) = binomial(n, k) - binomial(n, k-1). - Michael Somos, Aug 17 1999
Rows of Catalan triangle A008313 read backwards. Sum_{k>=0} T(n, k)^2 = A000108(n); A000108 : Catalan numbers. - Philippe Deléham, Feb 15 2004
T(n,k) = C(n,k)*(n-2*k+1)/(n-k+1). - Geoffrey Critzer, Jul 31 2009
Sum_{k=0..n} T(n,k)*x^k = A000012(n), A001405(n), A126087(n), A128386(n), A121724(n), A128387(n), A132373(n), A132374(n), A132375(n), A121725(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively. - Philippe Deléham, Dec 12 2011

Extensions

Expanded description from Clark Kimberling, Jun 15 1997

A112467 Riordan array ((1-2x)/(1-x), x/(1-x)).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, -1, -1, 1, 1, -1, -2, 0, 2, 1, -1, -3, -2, 2, 3, 1, -1, -4, -5, 0, 5, 4, 1, -1, -5, -9, -5, 5, 9, 5, 1, -1, -6, -14, -14, 0, 14, 14, 6, 1, -1, -7, -20, -28, -14, 14, 28, 20, 7, 1, -1, -8, -27, -48, -42, 0, 42, 48, 27, 8, 1, -1, -9, -35, -75, -90, -42, 42, 90, 75, 35, 9, 1, -1, -10, -44, -110, -165, -132, 0, 132, 165, 110
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Row sums are A000007. Diagonal sums are -F(n-2). Inverse is A112468. T(2n,n)=0.
(-1,1)-Pascal triangle. - Philippe Deléham, Aug 07 2006
Apart from initial term, same as A008482. - Philippe Deléham, Nov 07 2006
Each column equals the cumulative sum of the previous column. - Mats Granvik, Mar 15 2010
Reading along antidiagonals generates in essence rows of A192174. - Paul Curtz, Oct 02 2011
Triangle T(n,k), read by rows, given by (-1,2,0,0,0,0,0,0,0,...) DELTA (1,0,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 01 2011

Examples

			Triangle starts:
    1;
   -1,  1;
   -1,  0,   1;
   -1, -1,   1,   1;
   -1, -2,   0,   2,   1;
   -1, -3,  -2,   2,   3,   1;
   -1, -4,  -5,   0,   5,   4,  1;
   -1, -5,  -9,  -5,   5,   9,  5,  1;
   -1, -6, -14, -14,   0,  14, 14,  6,  1;
   -1, -7, -20, -28, -14,  14, 28, 20,  7,  1;
   -1, -8, -27, -48, -42,   0, 42, 48, 27,  8, 1;
   -1, -9, -35, -75, -90, -42, 42, 90, 75, 35, 9, 1;
  ...
From _Paul Barry_, Apr 08 2011: (Start)
Production matrix begins:
   1,  1,
  -2, -1,  1,
   2,  0, -1,  1,
  -2,  0,  0, -1,  1,
   2,  0,  0,  0, -1,  1,
  -2,  0,  0,  0,  0, -1,  1,
   2,  0,  0,  0,  0,  0, -1,  1
  ... (End)
		

Crossrefs

Programs

  • Magma
    [n eq 0 select 1 else (2*k-n)*Binomial(n,k)/n: k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 04 2019
    
  • Maple
    seq(seq( `if`(n=0, 1, (2*k-n)*binomial(n,k)/n), k=0..n), n=0..10); # G. C. Greubel, Dec 04 2019
  • Mathematica
    T[n_, k_]= If[n==0, 1, ((2*k-n)/n)*Binomial[n, k]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Roger L. Bagula, Feb 16 2009; modified by G. C. Greubel, Dec 04 2019 *)
  • PARI
    T(n, k) = if(n==0, 1, (2*k-n)*binomial(n,k)/n ); \\ G. C. Greubel, Dec 04 2019
    
  • Sage
    def T(n, k):
        if (n==0): return 1
        else: return (2*k-n)*binomial(n,k)/n
    [[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Dec 04 2019

Formula

Number triangle T(n, k) = binomial(n, n-k) - 2*binomial(n-1, n-k-1).
Sum_{k=0..n} T(n, k)*x^k = (x-1)*(x+1)^(n-1). - Philippe Deléham, Oct 03 2005
T(n,k) = ((2*k-n)/n)*binomial(n, k), with T(0,0)=1. - Roger L. Bagula, Feb 16 2009; modified by G. C. Greubel, Dec 04 2019
T(n,k) = T(n-1,k-1) + T(n-1,k) with T(0,0)=1, T(1,0)=-1, T(n,k)=0 for k>n or for n<0. - Philippe Deléham, Nov 01 2011
G.f.: (1-2x)/(1-(1+y)*x). - Philippe Deléham, Dec 15 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A133494(n), A081294(n), A005053(n), A067411(n), A199661(n), A083233(n) for x = 1, 2, 3, 4, 5, 6, 7, respectively. - Philippe Deléham, Dec 15 2011
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(-1 - x + x^2/2! + x^3/3!) = -1 - 2*x - 2*x^2/2! + 5*x^4/4! + 14*x^5/5! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 21 2014
Sum_{k=0..n} T(n,k) = 0^n = A000007(n). - G. C. Greubel, Dec 04 2019

A037012 Triangle read by rows; row 0 is 0; the n-th row for n>0 contains the coefficients in the expansion of (1-x)*(1+x)^(n-1).

Original entry on oeis.org

0, 1, -1, 1, 0, -1, 1, 1, -1, -1, 1, 2, 0, -2, -1, 1, 3, 2, -2, -3, -1, 1, 4, 5, 0, -5, -4, -1, 1, 5, 9, 5, -5, -9, -5, -1, 1, 6, 14, 14, 0, -14, -14, -6, -1, 1, 7, 20, 28, 14, -14, -28, -20, -7, -1, 1, 8, 27, 48, 42, 0, -42, -48, -27, -8, -1, 1, 9, 35, 75, 90, 42, -42, -90
Offset: 0

Views

Author

Keywords

Comments

The greatest term in the row n is reached when k is the nearest integer to (n - sqrt(n+1))/2. When n is one less than a square, and consequently this formula gives a half-integer, the maximum is reached twice. - Ivan Neretin, Apr 26 2016

Examples

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

References

  • A. A. Kirillov, Variations on the triangular theme, Amer. Math. Soc. Transl., (2), Vol. 169, 1995, pp. 43-73, see p. 71.

Crossrefs

Skew analog of Pascal's triangle A007318. Equals -A008482.
Elements near the center give Catalan numbers A000108 repeated, cf. formula.
Apart from initial term, same as A080232.
Cf. A001405.

Programs

  • Maple
    T(n,k):=piecewise(nMircea Merca, Apr 28 2012
  • Mathematica
    T[ n_, k_] := If[ n < 1, 0, Coefficient[ (1 - x) (1 + x)^(n - 1), x, k]]; (* Michael Somos, May 24 2015 *)
    Flatten@NestList[Join[{1}, Most@# + Rest@#, {-1}] &, {0}, 11] (* Ivan Neretin, Apr 26 2016 *)
  • PARI
    {T(n, k) = if( n<1, 0, polcoeff( (1-x) * (1+x)^(n-1), k))}
    
  • PARI
    A037012(n, k)={if(k>=n-k, if(k>n-k, -A037012(n, n-k)), k>2, A037012(n-1, k-1)+A037012(n-1, k), k>1, (n-2)*(n-3)\2-1, k, n-2, 1)} \\ M. F. Hasler, Feb 11 2019

Formula

T(n, k) = T(n-1, k-1)+T(n-1, k); T(0, 0)=0, T(1, 0)=1, T(1, 1)=-1.
T(n, k) = C(n, k)-C(n, k-1) where C = binomial coefficient A007318.
G.f.: (1-y) / (1-x-x*y). - Ralf Stephan, Jan 23 2005
T(n,k) = binomial(n-1,k) - binomial(n-1,k-1), for n >= k. T(n,k)=0, for n < k. T(n,k) = Sum_{i=-k..k} (-1)^i*binomial(n-1,k+i)*binomial(n+1,k-i), for n > 0. Row sums are 0. - Mircea Merca, Apr 28 2012
a(n) = -A008482(n). - Michael Somos, May 24 2015
Sum of positive terms of the row n is the central binomial coefficient A001405(n-1).- Ivan Neretin, Apr 26 2016
T(n, n-k) = - T(n, k); T(n, 0) = 1; T(n, 1) = n-2; T(n, 2) = (n-3)(n-4)/2; T(2k,n) = 0; T(2k, k-1) = T(2k+1, k) = A000108(k). - M. F. Hasler, Feb 11 2019

A230206 Trapezoid of dot products of row 3 (signs alternating) with sequential 4-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 4-tuples (C(3,0), -C(3,1), C(3,2), -C(3,3)) and (C(n-1,k-3), C(n-1,k-2), C(n-1,k-1), C(n-1,k)), n >= 1, 0 <= k <= n+2.

Original entry on oeis.org

-1, 3, -3, 1, -1, 2, 0, -2, 1, -1, 1, 2, -2, -1, 1, -1, 0, 3, 0, -3, 0, 1, -1, -1, 3, 3, -3, -3, 1, 1, -1, -2, 2, 6, 0, -6, -2, 2, 1, -1, -3, 0, 8, 6, -6, -8, 0, 3, 1, -1, -4, -3, 8, 14, 0, -14, -8, 3, 4, 1, -1, -5, -7, 5, 22, 14, -14, -22, -5, 7
Offset: 1

Views

Author

Dixon J. Jones, Oct 11 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^3 (x+1)^(n-1) for n > 0.

Examples

			Trapezoid begins
  -1,  3, -3,  1;
  -1,  2,  0, -2,  1;
  -1,  1,  2, -2, -1,  1;
  -1,  0,  3,  0, -3,  0,  1;
  -1, -1,  3,  3, -3, -3,  1, 1;
  -1, -2,  2,  6,  0, -6, -2, 2, 1;
  -1, -3,  0,  8,  6, -6, -8, 0, 3, 1;
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230207-A230212 (j=4 to j=9).

Programs

  • Magma
    m:=3; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 29 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^3 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=3; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 29 2018 *)
  • PARI
    m=3; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 29 2018
    
  • Sage
    m=3; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 29 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=3.

A230212 Trapezoid of dot products of row 9 (signs alternating) with sequential 10-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 10-tuples (C(9,0), -C(9,1), ..., C(9,8), -C(9,9)) and (C(n-1,k-9), C(n-1,k-8), ..., C(n-1,k)), n >= 1, 0 <= k <= n+8.

Original entry on oeis.org

-1, 9, -36, 84, -126, 126, -84, 36, -9, 1, -1, 8, -27, 48, -42, 0, 42, -48, 27, -8, 1, -1, 7, -19, 21, 6, -42, 42, -6, -21, 19, -7, 1, -1, 6, -12, 2, 27, -36, 0, 36, -27, -2, 12, -6, 1, -1, 5, -6, -10, 29, -9, -36, 36, 9, -29, 10, 6, -5, 1, -1, 4, -1, -16
Offset: 1

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^9 (x+1)^(n-1), n > 0.

Examples

			Trapezoid begins:
  -1, 9, -36,  84, -126, 126, -84,  36,  -9,   1;
  -1, 8, -27,  48,  -42,   0,  42, -48,  27,  -8,   1;
  -1, 7, -19,  21,    6, -42,  42,  -6, -21,  19,  -7,  1;
  -1, 6, -12,   2,   27, -36,   0,  36, -27,  -2,  12, -6,  1;
  -1, 5,  -6, -10,   29,  -9, -36,  36,   9, -29,  10,  6, -5,  1;
  -1, 4,  -1, -16,   19,  20, -45,   0,  45, -20, -19, 16,  1, -4,  1;
  -1, 3,   3, -17,    3,  39, -25, -45,  45,  25, -39, -3, 17, -3, -3, 1;
  etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206-A230211 (j=3 to j=8).

Programs

  • Magma
    m:=9; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 28 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^9 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=9; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 28 2018 *)
  • PARI
    m=9; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 28 2018
    
  • Sage
    m=9; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 28 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n>=1, with T(n,0) = (-1)^m and m=9.

A112466 Riordan array ((1+2*x)/(1+x), x/(1+x)).

Original entry on oeis.org

1, 1, 1, -1, 0, 1, 1, -1, -1, 1, -1, 2, 0, -2, 1, 1, -3, 2, 2, -3, 1, -1, 4, -5, 0, 5, -4, 1, 1, -5, 9, -5, -5, 9, -5, 1, -1, 6, -14, 14, 0, -14, 14, -6, 1, 1, -7, 20, -28, 14, 14, -28, 20, -7, 1, -1, 8, -27, 48, -42, 0, 42, -48, 27, -8, 1, 1, -9, 35, -75, 90, -42, -42, 90, -75, 35, -9, 1, -1, 10, -44, 110, -165, 132, 0, -132, 165, -110, 44, -10, 1
Offset: 0

Views

Author

Paul Barry, Sep 06 2005

Keywords

Comments

Inverse is A112465.
Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Aug 07 2006; corrected by Philippe Deléham, Dec 11 2008
Equals A097808 when the first column is removed. - Georg Fischer, Jul 26 2023

Examples

			Triangle starts
   1;
   1,  1;
  -1,  0,  1;
   1, -1, -1,  1;
  -1,  2,  0, -2,  1;
   1, -3,  2,  2, -3,  1;
  -1,  4, -5,  0,  5, -4,  1;
From _Paul Barry_, Apr 08 2011: (Start)
Production matrix begins
   1,  1;
  -2, -1,  1;
   2,  0, -1,  1;
  -2,  0,  0, -1,  1;
   2,  0,  0,  0, -1,  1;
  -2,  0,  0,  0,  0, -1,  1;
   2,  0,  0,  0,  0,  0, -1,  1; (End)
		

Crossrefs

Columns: A248157(n+2) (k=1), (-1)^n*A080956(n-2) (k=2), (-1)^(n-1)*A254749(n-2) (k=3).

Programs

  • Magma
    A112466:= func< n,k | n eq 0 select 1 else (-1)^(n+k)*(Binomial(n,k) - 2*Binomial(n-1,k)) >;
    [A112466(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 30 2025
    
  • Maple
    seq(seq( (-1)^(n-k)*(2*binomial(n-1, k-1)-binomial(n, k)), k=0..n), n=0..10); # G. C. Greubel, Feb 19 2020
  • Mathematica
    {1}~Join~Table[(Binomial[n, n - k] - 2 Binomial[n - 1, n - k - 1])*(-1)^(n - k), {n, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Feb 18 2020 *)
  • PARI
    T(n,k) = (-1)^(n-k)*(binomial(n, n-k) - 2*binomial(n-1, n-k-1)); \\ Michel Marcus, Feb 19 2020
    
  • SageMath
    def A112466(n,k): return 1 if (n==0) else (-1)^(n+k)*(binomial(n,k) - 2*binomial(n-1,k))
    print(flatten([[A112466(n,k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Apr 30 2025

Formula

Number triangle: T(n,k) = (-1)^(n-k)*(C(n, n-k) - 2*C(n-1, n-k-1)), with T(0,0) = 1.
T(2*n, n) = 0 (main diagonal).
Sum_{k=0..n} T(n, k) = 0 + [n=0] + 2*[n=1] (row sums).
Sum_{k=0..floor(n/2)} T(n-k, k) = (-1)^(n+1)*Fibonacci(n-2) (diagonal sums).
Sum_{k=0..n} T(n,k)*x^k = (x+1)*(x-1)^(n-1), for n >= 1. - Philippe Deléham, Oct 03 2005
T(0,0) = T(1,0) = T(1,1) = 1, T(n,k) = 0 if n < 0 or if n < k, T(n,k) = T(n-1,k-1) - T(n-1,k) for n > 1. - Philippe Deléham, Nov 26 2006
G.f.: (1+2*x)/(1+x-x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Apr 30 2025: (Start)
T(2*n+1, 2*n+1-k) = T(2*n+1, k) (symmetric odd n rows).
T(2*n, 2*n-k) = (-1)*T(2*n, k) (antisymmetric even n rows).
Sum_{k=0..n} (-1)^k*T(n, k) = A000007(n) (signed row sums).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (-1)^n*A057079(n+2) (signed diagonal sums). (End)

A230207 Trapezoid of dot products of row 4 (signs alternating) with sequential 5-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 5-tuples (C(4,0), -C(4,1), C(4,2), -C(4,3), C(4,4)) and (C(n-1,k-4), C(n-1,k-3), C(n-1,k-2), C(n-1,k-1), C(n-1,k)), n >= 1, 0 <= k <= n+3.

Original entry on oeis.org

1, -4, 6, -4, 1, 1, -3, 2, 2, -3, 1, 1, -2, -1, 4, -1, -2, 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, 2, -3, -8, 2, 12, 2, -8, -3, 2, 1, 1, 3, -1, -11, -6, 14, 14, -6, -11, -1, 3, 1, 1, 4, 2, -12, -17, 8
Offset: 1

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^4 (x+1)^(n-1) for n > 0.

Examples

			Trapezoid begins:
  1, -4,  6, -4,  1;
  1, -3,  2,  2, -3,  1;
  1, -2, -1,  4, -1, -2,  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,  2, -3, -8,  2, 12,  2, -8, -3, 2, 1;
etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206 (j=3), A230208-A230212 (j=5 to j=9).

Programs

  • Magma
    m:=4; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 29 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^4 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=4; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 29 2018 *)
  • PARI
    m=4; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 29 2018
    
  • Sage
    m=4; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 29 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=4.

A230208 Trapezoid of dot products of row 5 (signs alternating) with sequential 6-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 6-tuples (C(5,0), -C(5,1), ..., -C(5,5)) and (C(n-1,k-5), C(n-1,k-4), ..., C(n-1,k)), n >= 1, 0 <= k <= n+4.

Original entry on oeis.org

-1, 5, -10, 10, -5, 1, -1, 4, -5, 0, 5, -4, 1, -1, 3, -1, -5, 5, 1, -3, 1, -1, 2, 2, -6, 0, 6, -2, -2, 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, -2, 4, 10, -5, -20, 0, 20, 5
Offset: 1

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^5 (x-1)^(n-1), n > 0.

Examples

			Trapezoid begins:
  -1,  5, -10, 10,  -5,   1;
  -1,  4,  -5,  0,   5,  -4,  1;
  -1,  3,  -1, -5,   5,   1, -3,  1;
  -1,  2,   2, -6,   0,   6, -2, -2,  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;
etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206-A230207 (j=3 and j=4), A230209-A230212 (j=6 to j=9).

Programs

  • Magma
    m:=5; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 29 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^5 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=5; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 29 2018 *)
  • PARI
    m=5; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 29 2018
    
  • Sage
    m=5; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 29 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=5.

A230209 Trapezoid of dot products of row 6 (signs alternating) with sequential 7-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 7-tuples (C(6,0), -C(6,1), ..., -C(6,5), C(6,6)) and (C(n-1,k-6), C(n-1,k-5), ..., C(n-1,k)), n >= 1, 0 <= k <= n+5.

Original entry on oeis.org

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

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^6 (x+1)^(n-1).

Examples

			Trapezoid begins:
  1, -6, 15, -20,  15,  -6,   1;
  1, -5,  9,  -5,  -5,   9,  -5,  1;
  1, -4,  4,   4, -10,   4,   4, -4,  1;
  1, -3,  0,   8,  -6,  -6,   8,  0, -3,  1;
  1, -2, -3,   8,   2, -12,   2,  8, -3, -2,  1;
  1, -1, -5,   5,  10, -10, -10, 10,  5, -5, -1, 1;
  1,  0, -6,   0,  15,   0, -20,  0, 15,  0, -6, 0, 1;
etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206-A230208 (j=3 to j=5), A230210-A230212 (j=7 to j=9).

Programs

  • Magma
    m:=6; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 28 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^6 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=6; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 28 2018 *)
  • PARI
    m=6; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 28 2018
    
  • Sage
    m=6; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 28 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=6.

A230210 Trapezoid of dot products of row 7 (signs alternating) with sequential 8-tuples read by rows in Pascal's triangle A007318: T(n,k) is the linear combination of the 8-tuples (C(7,0), -C(7,1), ..., C(7,6), -C(7,7)) and (C(n-1,k-7), C(n-1,k-6), ..., C(n-1,k)), n >= 1, 0 <= k <= n+6.

Original entry on oeis.org

-1, 7, -21, 35, -35, 21, -7, 1, -1, 6, -14, 14, 0, -14, 14, -6, 1, -1, 5, -8, 0, 14, -14, 0, 8, -5, 1, -1, 4, -3, -8, 14, 0, -14, 8, 3, -4, 1, -1, 3, 1, -11, 6, 14, -14, -6, 11, -1, -3, 1, -1, 2, 4, -10, -5, 20, 0, -20, 5, 10, -4, -2, 1, -1, 1, 6, -6, -15
Offset: 1

Views

Author

Dixon J. Jones, Oct 12 2013

Keywords

Comments

The array is trapezoidal rather than triangular because C(n,k) is not uniquely defined for all negative n and negative k.
Row sums are 0.
Coefficients of (x-1)^7 (x+1)^(n-1), n > 0.

Examples

			Trapezoid begins:
  -1, 7, -21,  35, -35,  21,  -7,   1;
  -1, 6, -14,  14,   0, -14,  14,  -6,   1;
  -1, 5,  -8,   0,  14, -14,   0,   8,  -5,  1;
  -1, 4,  -3,  -8,  14,   0, -14,   8,   3, -4,  1;
  -1, 3,   1, -11,   6,  14, -14,  -6,  11, -1, -3,  1;
  -1, 2,   4, -10,  -5,  20,   0, -20,   5, 10, -4, -2,  1;
  -1, 1,   6,  -6, -15,  15,  20, -20, -15, 15,  6, -6, -1, 1;
etc.
		

Crossrefs

Using row j of the alternating Pascal triangle as generator: A007318 (j=0), A008482 and A112467 (j=1 after the first term in each), A182533 (j=2 after the first two rows), A230206-A230209 (j=3 to j=6), A230211-A230212 (j=8 and j=9).

Programs

  • Magma
    m:=7; [[k le 0 select (-1 )^m else (&+[(-1)^(j+m)* Binomial(m,j) *Binomial(n-1,k-j): j in [0..(n+m-1)]]): k in [0..(n+m-1)]]: n in [1..10]]; // G. C. Greubel, Nov 28 2018
    
  • Mathematica
    Flatten[Table[CoefficientList[(x - 1)^7 (x + 1)^n, x], {n, 0, 7}]] (* T. D. Noe, Oct 25 2013 *)
    m=7; Table[If[k == 0, (-1)^m, Sum[(-1)^(j+m)*Binomial[m, j]*Binomial[n-1, k-j], {j, 0, n+m-1}]], {n, 1, 10}, {k, 0, n+m-1}]//Flatten (* G. C. Greubel, Nov 28 2018 *)
  • PARI
    m=7; for(n=1, 10, for(k=0, n+m-1, print1(if(k==0, (-1)^m, sum(j=0, n+m-1, (-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j))), ", "))) \\ G. C. Greubel, Nov 28 2018
    
  • Sage
    m=7; [[sum((-1)^(j+m)*binomial(m,j)*binomial(n-1,k-j) for j in range(n+m)) for k in range(n+m)] for n in (1..10)] # G. C. Greubel, Nov 28 2018

Formula

T(n,k) = Sum_{i=0..n+m-1} (-1)^(i+m)*C(m,i)*C(n-1,k-i), n >= 1, with T(n,0) = (-1)^m and m=7.
Showing 1-10 of 11 results. Next