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

A080234 Triangle whose rows are the differences of consecutive pairs of row elements of A080232.

Original entry on oeis.org

1, 1, -2, 1, -1, -1, 1, 0, -2, 0, 1, 1, -2, -2, 1, 1, 2, -1, -4, -1, 2, 1, 3, 1, -5, -5, 1, 3, 1, 4, 4, -4, -10, -4, 4, 4, 1, 5, 8, 0, -14, -14, 0, 8, 5, 1, 6, 13, 8, -14, -28, -14, 8, 13, 6, 1, 7, 19, 21, -6, -42, -42
Offset: 0

Views

Author

Paul Barry, Feb 09 2003

Keywords

Comments

Row sums are -1. Second row pairwise difference of A071919.

Examples

			Rows are {1}, {1,-2}, {1,-1,-1}, {1,0,-2,0}, {1,1,-2,-2,1}, ...
		

Crossrefs

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

A080233 Triangle T(n,k) obtained by taking differences of consecutive pairs of row elements of Pascal's triangle A007318.

Original entry on oeis.org

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

Views

Author

Paul Barry, Feb 10 2003

Keywords

Comments

Row sums are 1,1,1,1,1,1 with g.f. 1/(1-x). Can also be obtained from triangle A080232 by taking sums of pairs of consecutive row elements.
Mirror image of triangle in A156644. - Philippe Deléham, Feb 14 2009

Examples

			Triangle begins as:
  1;
  1, 0;
  1, 1, -1;
  1, 2,  0, -2;
  1, 3,  2, -2, -3;
  1, 4,  5,  0, -5,  -4;
  1, 5,  9,  5, -5,  -9,  -5;
  1, 6, 14, 14,  0, -14, -14,  -6;
  1, 7, 20, 28, 14, -14, -28, -20,  -7;
  1, 8, 27, 48, 42,   0, -42, -48, -27,  -8;
  1, 9, 35, 75, 90,  42, -42, -90, -75, -35, -9;
  ...
		

Crossrefs

Row sums give A000012.

Programs

  • Mathematica
    Table[Binomial[n, k] - Binomial[n, k - 1], {n, 0, 9}, {k, 0, n}] // Flatten (* Michael De Vlieger, Nov 24 2016 *)
  • PARI
    {T(n, k) = if( n<0 || k>n, 0, binomial(n, k) - binomial(n, k-1))}; /* Michael Somos, Nov 25 2016 */

Formula

T(n, k) = if(k>n, 0, binomial(n, k)-binomial(n, k-1)).
Showing 1-4 of 4 results.