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

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

A008482 Coefficients in expansion of (x-1)*(1+x)^(n-1), n > 0.

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
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term, same as A112467. - Philippe Deléham, Nov 07 2006
From Christopher Simoni, Feb 11 2019: (Start)
Along the diagonal containing all the natural numbers, where every number is at point T(n,n-1), T(n,k)^2 can be found by adding T(n+1,k), T(n,k-1), T(n-1,k), and T(n,k+1) together. Empirical observation.
Along the diagonal containing all the natural numbers, where every number is at point T(n,n-1), T(n,k)^3 can by found. The following products are added together: T(n-1,k-1)*T(n,k+1)*T(n+1,k); T(n-1,k)*T(n+1,k+1)*(n,k-1); and 3*T(n,k). Empirical observation. (End)

Examples

			Triangle begins:
   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  75  35   9   1
  -1 -10 -44 -110 -165 -132   0 132 165 110  44  10   1
... - _Philippe Deléham_, Nov 29 2013
		

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, central column gives Catalan numbers A000108, essentially same as A037012, except rows are read from left to right (A037012 = - this sequence).
The positive half of this triangle is A008315. - Michael Somos

Programs

  • Mathematica
    Table[Binomial[n-1, k-1] -Binomial[n-1, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 11 2019 *)
  • PARI
    {T(n, k) = if( n<1, 0, polcoeff( (x-1) * (1+x)^(n-1), k))}; /* Michael Somos, Oct 04 1999 */
    
  • PARI
    A008482(n,k)={if(k>=n-k, if(k>n-k,-A008482(n,n-k),0), k>2, A008482(n-1,k-1)+A008482(n-1,k), k>1, 1-(n-2)*(n-3)\2, k, 2-n, -1)} \\ M. F. Hasler, Feb 11 2019
    
  • Sage
    [0] + flatten([[binomial(n-1, k-1) -binomial(n-1, k) for k in (0..n)] for n in (1..12)]) # G. C. Greubel, 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. - Michael Somos, Oct 04 1999
T(n, k) = binomial(n, k-1) - binomial(n, k). - Michael Somos, Oct 04 1999
T(2n+1,n+1) = A000108(n), Catalan numbers. - Philippe Deléham, Nov 29 2013
a(n) = -A037012(n). - Michael Somos, May 24 2015
T(n, k) = -T(n, n - k); T(n, n) = 1 except for n = 0; T(n+1, n) = n-1; T(n+2, n) = A000217(n-1) - 1. This proves the observations by C. Simoni, e.g., T(n+1,n)^2 - 1 = T(n+1,n-1) + T(n+2,n) + 1. - M. F. Hasler, Feb 11 2019

A080232 Triangle T(n,k) of differences of pairs of consecutive terms of triangle A071919.

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
Offset: 0

Views

Author

Paul Barry, Feb 09 2003

Keywords

Comments

Row sums are 1,0,0,0,0,0, ... with g.f. 1 = (1-x)^0(1-2x)^0
(1,-1)-Pascal triangle; mirror image of triangle A112467. - Philippe Deléham, Nov 07 2006
Triangle T(n,k), read by rows, given by (1,0,0,0,0,0,0,0,0,...) DELTA (-1,2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 01 2011

Examples

			Rows begin
  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;
		

Crossrefs

Apart from initial term, same as A037012.

Programs

  • Maple
    T(n,k):=piecewise(n=0,1,n>0,binomial(n-1,k)-binomial(n-1,k-1)) # Mircea Merca, Apr 28 2012

Formula

T(n, k) = binomial(n, k) + 2*Sum{j=1...k} (-1)^j binomial(n, k-j).
Sum_{k=0..n} T(n, k)*x^k = (1-x)*(1+x)^(n-1), for n >= 1. - Philippe Deléham, Sep 05 2005
T(n,k) = T(n-1,k-1) + T(n-1,k) with T(n,0)=1, T(n,n)=-1 for n > 0. - Philippe Deléham, Nov 01 2011
T(n,k) =binomial(n-1,k) - binomial(n-1,k-1), for n > 0. T(n,k) = Sum_{i=-k..k} (-1)^i*binomial(n-1,k+i)*binomial(n+1,k-i), for n >= k. T(n,k)=0, for n < k. - Mircea Merca, Apr 28 2012
G.f.: (-1+2*x*y)/(-1+x*y+x). - R. J. Mathar, Aug 11 2015

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)

A215406 A ranking algorithm for the lexicographic ordering of the Catalan families.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Aug 09 2012

Keywords

Comments

See Antti Karttunen's code in A057117. Karttunen writes: "Maple procedure CatalanRank is adapted from the algorithm 3.23 of the CAGES (Kreher and Stinson) book."
For all n>0, a(A014486(n)) = n = A080300(A014486(n)). The sequence A080300 differs from this one in that it gives 0 for those n which are not found in A014486. - Antti Karttunen, Aug 10 2012

Crossrefs

Programs

  • Maple
    A215406 := proc(n) local m,a,y,t,x,u,v;
    m := iquo(A070939(n), 2);
    a := A030101(n);
    y := 0; t := 1;
    for x from 0 to 2*m-2 do
        if irem(a, 2) = 1 then y := y + 1
        else u := 2*m - x;
             v := m-1 - iquo(x+y,2);
             t := t + A037012(u,v);
             y := y - 1 fi;
        a := iquo(a, 2) od;
    A014137(m) - t end:
    seq(A215406(i),i=0..199); # Peter Luschny, Aug 10 2012
  • Mathematica
    A215406[n_] := Module[{m, d, a, y, t, x, u, v}, m = Quotient[Length[d = IntegerDigits[n, 2]], 2]; a = FromDigits[Reverse[d], 2]; y = 0; t = 1; For[x = 0, x <= 2*m - 2, x++, If[Mod[a, 2] == 1, y++, u = 2*m - x; v = m - Quotient[x + y, 2] - 1; t = t - Binomial[u - 1, v - 1] + Binomial[u - 1, v]; y--]; a = Quotient[a, 2]]; (1 - I*Sqrt[3])/2 - 4^(m + 1)*Gamma[m + 3/2]*Hypergeometric2F1[1, m + 3/2, m + 3, 4]/(Sqrt[Pi]*Gamma[m + 3]) - t]; Table[A215406[n] // Simplify, {n, 0, 86}] (* Jean-François Alcover, Jul 25 2013, translated and adapted from Peter Luschny's Maple program *)
  • Sage
    def A215406(n) : # CatalanRankGlobal(n)
        m = A070939(n)//2
        a = A030101(n)
        y = 0; t = 1
        for x in (1..2*m-1) :
            u = 2*m - x; v = m - (x+y+1)/2
            mn = binomial(u, v) - binomial(u, v-1)
            t += mn*(1 - a%2)
            y -= (-1)^a
            a = a//2
        return A014137(m) - t

A067337 Triangle where T(n,k)=2*T(n,k-1)+C(n-1,k)-C(n-1,k-1) and n>=k>=0.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 5, 9, 1, 4, 8, 14, 27, 1, 5, 12, 22, 41, 81, 1, 6, 17, 34, 63, 122, 243, 1, 7, 23, 51, 97, 185, 365, 729, 1, 8, 30, 74, 148, 282, 550, 1094, 2187, 1, 9, 38, 104, 222, 430, 832, 1644, 3281, 6561, 1, 10, 47, 142, 326, 652, 1262, 2476, 4925, 9842
Offset: 0

Views

Author

Henry Bottomley, Jan 15 2002

Keywords

Examples

			Rows start 1; 1,1; 1,2,3; 1,3,5,9; 1,4,8,14,27; etc. T(4,0)=2*0+1-0=1; T(4,1)=2*1+3-1=4; T(4,2)=2*4+3-3=8; T(4,3)=2*8+1-3=14; T(4,4)=2*14+0-1=27.
		

Crossrefs

Row sums are A025192. Columns include A000012, A000027 and A022856 (essentially). Right hand columns include A000244 (essentially), A007051 and A047926. Central diagonal is A067336.

Formula

T(n, k)=2*T(n, k-1)+A037012(n, k). T(n, k)=T(n-1, k-1)+T(n-1, k) if k0.

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

Original entry on oeis.org

1, 2, -1, 2, 1, -1, 2, 3, 0, -1, 2, 5, 3, -1, -1, 2, 7, 8, 2, -2, -1, 2, 9, 15, 10, 0, -3, -1, 2, 11, 24, 25, 10, -3, -4, -1, 2, 13, 35, 49, 35, 7, -7, -5, -1, 2, 15, 48, 84, 84, 42, 0, -12, -6, -1, 2, 17, 63, 132, 168, 126, 42, -12, -18, -7, -1, 2, 19, 80, 195, 300, 294, 168, 30, -30, -25, -8, -1
Offset: 0

Views

Author

Seiichi Manyama, Jan 20 2018

Keywords

Examples

			Triangle begins:
1;
2, -1;
2,  1, -1;
2,  3,  0, -1;
2,  5,  3, -1, -1;
2,  7,  8,  2, -2, -1;
2,  9, 15, 10,  0, -3, -1;
2, 11, 24, 25, 10, -3, -4, -1;
2, 13, 35, 49, 35,  7, -7, -5, -1;
...
		

Crossrefs

Central column gives A088218.
Cf. A037012.

Programs

Formula

T(n,k) = T(n-1,k-1)+T(n-1,k); T(0,0)=1, T(1,0)=2, T(1,1)=-1.
Showing 1-7 of 7 results.