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.

Previous Showing 61-70 of 108 results. Next

A055249 Triangle of partial row sums (prs) of triangle A055248 (prs of Pascal's triangle A007318).

Original entry on oeis.org

1, 3, 1, 8, 4, 1, 20, 12, 5, 1, 48, 32, 17, 6, 1, 112, 80, 49, 23, 7, 1, 256, 192, 129, 72, 30, 8, 1, 576, 448, 321, 201, 102, 38, 9, 1, 1280, 1024, 769, 522, 303, 140, 47, 10, 1, 2816, 2304, 1793, 1291, 825, 443, 187, 57, 11, 1, 6144, 5120, 4097, 3084, 2116, 1268, 630
Offset: 0

Views

Author

Wolfdieter Lang, May 26 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as matrix, belongs to the Riordan-group. The G.f. for the row polynomials p(n,x) (increasing powers of x) is ((1-z)/(1-2*z)^2)/(1-x*z/(1-z)).
This is the second member of the family of Riordan-type matrices obtained from A007318(n,m) (Pascal's triangle read as lower triangular matrix) by repeated application of the prs-procedure.
The column sequences appear in A001792, A001787, A000337, A045618, A045889, A034009, A055250, A055251 for m=0..7.

Examples

			1;
3,1;
8,4,1;
20,12,5,1;
...
Fourth row polynomial (n=3): p(3,x)= 20+12*x+5*x^2+x^3
		

Crossrefs

Cf. A007318, A055248, A008949. Row sums: A049611(n+1) = A055252(n, 0).

Programs

  • Mathematica
    a[n_, m_] := Binomial[n, m]*Hypergeometric2F1[2, m-n, m+1, -1]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Mar 11 2014 *)

Formula

a(n, m) = Sum_{k=m,..,n} ( A055248(n, k) ), n >= m >= 0, a(n, m) := 0 if n
Column m recursion: a(n, m) = Sum_{j=m,..,(n-1)} ( a(j, m) ) + A055248(n, m), n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: ((1-x)/(1-2*x)^2)*(x/(1-x))^m, m >= 0.
a(n, m) = binomial(n, m) * 2F1(2, m-n; m+1; -1) where 2F1 is the hypergeometric function. Jean-François Alcover, Mar 11 2014

A093564 (7,1) Pascal triangle.

Original entry on oeis.org

1, 7, 1, 7, 8, 1, 7, 15, 9, 1, 7, 22, 24, 10, 1, 7, 29, 46, 34, 11, 1, 7, 36, 75, 80, 45, 12, 1, 7, 43, 111, 155, 125, 57, 13, 1, 7, 50, 154, 266, 280, 182, 70, 14, 1, 7, 57, 204, 420, 546, 462, 252, 84, 15, 1, 7, 64, 261, 624, 966, 1008, 714, 336, 99, 16, 1, 7, 71, 325, 885
Offset: 0

Author

Wolfdieter Lang, Apr 22 2004

Keywords

Comments

The array F(7;n,m) gives in the columns m>=1 the figurate numbers based on A016993, including the 9-gonal numbers A001106, (see the W. Lang link).
This is the seventh member, d=7, in the family of triangles of figurate numbers, called (d,1) Pascal triangles: A007318 (Pascal), A029653, A093560-3, for d=1..6.
This is an example of a Riordan triangle (see A093560 for a comment and A053121 for a comment and the 1991 Shapiro et al. reference on the Riordan group). Therefore the o.g.f. for the row polynomials p(n,x):=Sum_{m=0..n} a(n,m)*x^m is G(z,x)=(1+6*z)/(1-(1+x)*z).
The SW-NE diagonals give A022097(n-1) = Sum_{k=0..ceiling((n-1)/2)} a(n-1-k,k), n >= 1, with n=0 value 6. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs.

Examples

			Triangle begins
  [1];
  [7,  1];
  [7,  8,  1];
  [7, 15,  9,  1];
  ...
		

References

  • Kurt Hawlitschek, Johann Faulhaber 1580-1635, Veroeffentlichung der Stadtbibliothek Ulm, Band 18, Ulm, Germany, 1995, Ch. 2.1.4. Figurierte Zahlen.
  • Ivo Schneider: Johannes Faulhaber 1580-1635, Birkhäuser, Basel, Boston, Berlin, 1993, ch. 5, pp. 109-122.

Crossrefs

Row sums: A000079(n+2), n>=1, 1 for n=0, alternating row sums are 1 for n=0, 6 for n=2 and 0 otherwise.
The column sequences give for m=1..9: A016993, A001106 (9-gonal), A007584, A051740, A051877, A050403, A027818, A034266, A055994.
Cf. A093565 (d=8).

Programs

  • Haskell
    a093564 n k = a093564_tabl !! n !! k
    a093564_row n = a093564_tabl !! n
    a093564_tabl = [1] : iterate
                   (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [7, 1]
    -- Reinhard Zumkeller, Sep 01 2014
  • Maple
    N:= 20: # to get the first N rows
    T:=Matrix(N,N):
    T[1,1]:= 1:
    for m from 2 to N do
    T[m,1]:= 7:
    T[m,2..m]:= T[m-1,1..m-1] + T[m-1,2..m];
    od:
    for m from 1 to N do
    convert(T[m,1..m],list)
    od; # Robert Israel, Dec 28 2014

Formula

a(n, m)=F(7;n-m, m) for 0<= m <= n, otherwise 0, with F(7;0, 0)=1, F(7;n, 0)=7 if n>=1 and F(7;n, m):=(7*n+m)*binomial(n+m-1, m-1)/m if m>=1.
Recursion: a(n, m)=0 if m>n, a(0, 0)= 1; a(n, 0)=7 if n>=1; a(n, m)= a(n-1, m) + a(n-1, m-1).
G.f. column m (without leading zeros): (1+6*x)/(1-x)^(m+1), m>=0.
T(n, k) = C(n, k) + 6*C(n-1, k). - Philippe Deléham, Aug 28 2005
exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(7 + 15*x + 9*x^2/2! + x^3/3!) = 7 + 22*x + 46*x^2/2! + 80*x^3/3! + 125*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ). - Peter Bala, Dec 22 2014

A189391 The minimum possible value for the apex of a triangle of numbers whose base consists of a permutation of the numbers 0 to n, and each number in a higher row is the sum of the two numbers directly below it.

Original entry on oeis.org

0, 1, 3, 8, 19, 44, 98, 216, 467, 1004, 2134, 4520, 9502, 19928, 41572, 86576, 179587, 372044, 768398, 1585416, 3263210, 6711176, 13775068, 28255568, 57863214, 118430584, 242061468, 494523536, 1009105372, 2058327344, 4194213448
Offset: 0

Author

Nathaniel Johnston, Apr 20 2011

Keywords

Comments

This is the Riordan transform of A000217 (triangular numbers) with the Riordan matrix (of the Bell type) A053121 (inverse of the Chebyshev S Bell matrix). See the resulting formulae below. - Wolfdieter Lang, Feb 18 2017.
Conjecture: a(n) is also half the sum of the "cuts-resistance" (see A319416, A319420, A319421) of all binary vectors of length n (see Lenormand, page 4). - N. J. A. Sloane, Sep 20 2018

Examples

			For n = 4 consider the triangle:
....19
...8  11
..5  3  8
.4  1 2  6
3  1 0 2  4
This triangle has 19 at its apex and no other such triangle with the numbers 0 - 4 on its base has a smaller apex value, so a(4) = 19.
		

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); [0] cat Coefficients(R!((2*x+Sqrt(1-4*x^2)-1)/(2*(2*x-1)^2))); // G. C. Greubel, Aug 24 2018
  • Maple
    a:=proc(n)return add((2*n-4*k-1)*binomial(n,k),k=0..floor((n-1)/2)): end:
    seq(a(n),n=0..50);
  • Mathematica
    CoefficientList[Series[(2*x+Sqrt[1-4*x^2]-1) / (2*(2*x-1)^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 16 2014 *)
  • PARI
    A189391(n)=sum(i=0,(n-1)\2,(2*n-4*i-1)*binomial(n,i))  \\ M. F. Hasler, Jan 24 2012
    

Formula

If n even, a(n) = (n+1/2)*binomial(n,n/2) - 2^(n-1); if n odd, a(n) = ((n+1)/2)*binomial(n+1,(n+1)/2) - 2^(n-1). - N. J. A. Sloane, Nov 01 2018
a(n) = Sum_{k=0..floor((n-1)/2)} (2*n-4*k-1)*binomial(n,k).
G.f.: (2*x+sqrt(1-4*x^2)-1) / (2*(2*x-1)^2). - Alois P. Heinz, Feb 09 2012
a(n) ~ 2^n * (sqrt(2n/Pi)- 1/2). - Vaclav Kotesovec, Mar 16 2014 (formula simplified by Lewis Chen, May 25 2017)
D-finite with recurrence n*a(n) + (n-5)*a(n-1) + 2*(-5*n+6)*a(n-2) + 4*(-n+8)*a(n-3) + 24*(n-3)*a(n-4) = 0. - R. J. Mathar, Jan 04 2017
From Wolfdieter Lang, Feb 18 2017:(Start)
a(n) = Sum_{m=0..n} A053121(n, m)*A000217(m), n >= 0.
G.f.: c(x^2)*Tri(x*c(x^2)), with c and Tri the g.f. of A000108 and A000217, respectively. See the explicit form of the g.f. given above by Alois P. Heinz.
(End)
2*a(n) = A152548(n)-2^n. - R. J. Mathar, Jun 17 2021

A054336 A convolution triangle of numbers based on A001405 (central binomial coefficients).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 5, 3, 1, 6, 10, 9, 4, 1, 10, 22, 22, 14, 5, 1, 20, 44, 54, 40, 20, 6, 1, 35, 93, 123, 109, 65, 27, 7, 1, 70, 186, 281, 276, 195, 98, 35, 8, 1, 126, 386, 618, 682, 541, 321, 140, 44, 9, 1, 252, 772, 1362, 1624, 1440, 966, 497, 192, 54, 10, 1
Offset: 0

Author

Wolfdieter Lang, Mar 13 2000

Keywords

Comments

T(n,k) is the number of 2-Motzkin paths (i.e., Motzkin paths with blue and red level steps) with no level steps at positive height and having k blue level steps. Example: T(4,2)=9 because, denoting U=(1,1), D=(1,-1), B=blue (1,0), R=red (1,0), we have BBRR, BRBR, BRRB, RBBR, RBRB, RRBB, BBUD, BUDB, and UDBB. - Emeric Deutsch, Jun 07 2011
In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Bell-subgroup of the Riordan-group.
The g.f. for the row polynomials p(n,x) (increasing powers of x) is 1/(1-(1+x)*z-z^2*c(z^2)), with c(x) the g.f. for Catalan numbers A000108.
Column sequences: A001405, A045621.
Riordan array (f(x), x*f(x)), f(x) the g.f. of A001405. - Philippe Deléham, Dec 08 2009
From Paul Barry, Oct 21 2010: (Start)
Riordan array ((sqrt(1+2x) - sqrt(1-2x))/(2x*sqrt(1-2x)), (sqrt(1+2x)-sqrt(1-2x))/(2*sqrt(1-2x))),
inverse of Riordan array ((1+x)/(1+2x+2x^2), x(1+x)/(1+2x+2x^2)) (A181472). (End)

Examples

			Fourth row polynomial (n=3): p(3,x)= 3 + 5*x + 3*x^2 + x^3.
From _Paul Barry_, Oct 21 2010: (Start)
Triangle begins
   1;
   1,  1;
   2,  2,   1;
   3,  5,   3,   1;
   6, 10,   9,   4,  1;
  10, 22,  22,  14,  5,  1;
  20, 44,  54,  40, 20,  6, 1;
  35, 93, 123, 109, 65, 27, 7, 1;
Production matrix is
   1,  1;
   1,  1,  1;
  -1,  1,  1,  1;
   1, -1,  1,  1,  1;
  -1,  1, -1,  1,  1,  1;
   1, -1,  1, -1,  1,  1,  1;
  -1,  1, -1,  1, -1,  1,  1, 1;
   1, -1,  1, -1,  1, -1,  1, 1, 1;
  -1,  1, -1,  1, -1,  1, -1, 1, 1, 1; (End)
		

Crossrefs

Row sums: A054341.

Programs

  • GAP
    A053121:= function(n,k)
        if ((n-k+1) mod 2)=0 then return 0;
        else return (k+1)*Binomial(n+1, Int((n-k)/2))/(n+1);
        fi;
      end;
    T:= function(n,k)
        return Sum([k..n], j-> Binomial(j,k)*A053121(n,j));
      end;
    Flat(List([0..10], n-> List([0..n], k-> T(n,k) ))); # G. C. Greubel, Jul 21 2019
  • Magma
    A053121:= func< n,k | ((n-k+1) mod 2) eq 0 select 0 else (k+1)*Binomial(n+1, Floor((n-k)/2))/(n+1) >;
    T:= func< n,k | (&+[Binomial(j,k)*A053121(n,j): j in [k..n]]) >;
    [T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Jul 21 2019
    
  • Mathematica
    c[n_, j_] /; n < j || OddQ[n - j] = 0; c[n_, j_] = (j + 1) Binomial[n + 1, (n - j)/2]/(n + 1); t[n_, k_] := Sum[c[n, j]*Binomial[j, k], {j, 0, n}]; Flatten[Table[t[n, k], {n, 0, 10}, {k, 0, n}]][[;; 66]] (* Jean-François Alcover, Jul 13 2011, after Philippe Deléham *)
  • PARI
    A053121(n,k) = if((n-k+1)%2==0, 0, (k+1)*binomial(n+1, (n-k)\2)/(n+1) );
    T(n,k) = sum(j=k,n, A053121(n,j)*binomial(j,k));
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 21 2019
    
  • Sage
    def A053121(n, k):
        if (n-k+1) % 2==0: return 0
        else: return (k+1)*binomial(n+1, ((n-k)//2))/(n+1)
    def T(n,k): return sum(binomial(j,k)*A053121(n,j) for j in (k..n))
    [[T(n,k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jul 21 2019
    

Formula

G.f. for column m: cbi(x)*(x*cbi(x))^m, with cbi(x) := (1+x*c(x^2))/sqrt(1-4*x^2) = 1/(1-x-x^2*c(x^2)), where c(x) is the g.f. for Catalan numbers A000108.
T(n,k) = Sum_{j>=0} A053121(n,j)*binomial(j,k). - Philippe Deléham, Mar 30 2007
T(n,k) = T(n-1,k-1) + T(n-1,l) + Sum_{j>=0} T(n-1,k+1+j)*(-1)^j. - Philippe Deléham, Feb 23 2012

A054341 Row sums of triangle A054336 (central binomial convolutions).

Original entry on oeis.org

1, 2, 5, 12, 30, 74, 185, 460, 1150, 2868, 7170, 17904, 44760, 111834, 279585, 698748, 1746870, 4366460, 10916150, 27287944, 68219860, 170541252, 426353130, 1065853432, 2664633580, 6661479944, 16653699860, 41633878200, 104084695500, 260210401530, 650526003825
Offset: 0

Author

Wolfdieter Lang, Mar 13 2000

Keywords

Comments

a(n) = # Dyck (n+1)-paths all of whose components are symmetric. A strict Dyck path is one with exactly one return to ground level (necessarily at the end). Every nonempty Dyck path is expressible uniquely as a concatenation of one or more strict Dyck paths, called its components. - David Callan, Mar 02 2005
a(n) = # 2-Motzkin paths (i.e., Motzkin paths with blue and red level steps) with no level steps at positive height. Example: a(2)=5 because, denoting U=(1,1), D=(1,-1), B=blue (1,0), R=red (1,0), we have BB, BR, RB, RR, and UD. - Emeric Deutsch, Jun 07 2011
Inverse Chebyshev transform of the second kind applied to 2^n. This maps g(x) -> c(x^2)g(xc(x^2)). - Paul Barry, Sep 14 2005
Hankel transform of this sequence gives A000012 = [1,1,1,1,1,1,1,...]. - Philippe Deléham, Oct 24 2007
Inverse binomial transform of A059738. - Philippe Deléham, Nov 24 2009

Examples

			a(4) = 30, the upper left term of M^4.
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, 1,
          b(x-1, 0)+`if`(y>0, b(x-1, y-1), 0)+b(x-1, y+1))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..31);  # Alois P. Heinz, Jan 23 2024
  • Mathematica
    CoefficientList[Series[2/(1-4*x+Sqrt[1-4*x^2]), {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 13 2014 *)

Formula

a(n) = Sum_{m=0..n} A054336(n, m).
G.f.: 1/(1-2*x-x^2*c(x^2)), where c(x) = g.f. for Catalan numbers A000108.
From_Paul Barry_, Sep 14 2005: (Start)
G.f.: c(x^2)/(1-2*x*c(x^2));
a(n) = Sum_{k=0..n} binomial(n,(n-k)/2)*(1 + (-1)^(n+k))*2^k*(k+1)/(n+k+2). (End)
G.f.: 2/(1-4*x+sqrt(1-4*x^2)). - Ira M. Gessel, Oct 27 2013
a(n) = A127358(n+1) - 2*A127358(n). - Philippe Deléham, Mar 02 2007
a(n) = A126075(n,0). - Philippe Deléham, Nov 24 2009
a(n) = Sum_{k=0..n} A053121(n,k)*2^k. - Philippe Deléham, Nov 28 2009
From Gary W. Adamson, Sep 07 2011: (Start)
a(n) is the upper left term of M^n, M is an infinite square production matrix as follows:
2, 1, 0, 0, 0, ...
1, 0, 2, 0, 0, ...
0, 1, 0, 1, 0, ...
0, 0, 1, 0, 1, ...
0, 0, 0, 1, 0, ...
... (End)
Conjecture: 2*(n+1)*a(n) +5*(-n-1)*a(n-1) +8*(-n+2)*a(n-2) +20*(n-2)*a(n-3)=0. - R. J. Mathar, Nov 30 2012
a(n) ~ 3 * 5^n / 2^(n+2). - Vaclav Kotesovec, Feb 13 2014

A096956 Pascal (1,6) triangle.

Original entry on oeis.org

6, 1, 6, 1, 7, 6, 1, 8, 13, 6, 1, 9, 21, 19, 6, 1, 10, 30, 40, 25, 6, 1, 11, 40, 70, 65, 31, 6, 1, 12, 51, 110, 135, 96, 37, 6, 1, 13, 63, 161, 245, 231, 133, 43, 6, 1, 14, 76, 224, 406, 476, 364, 176, 49, 6, 1, 15, 90, 300, 630, 882, 840, 540, 225, 55, 6, 1, 16, 105, 390, 930
Offset: 0

Author

Wolfdieter Lang, Aug 13 2004

Keywords

Comments

Except for the first row this is the row reversed (6,1)-Pascal triangle A093563.
This is the sixth member, q=6, in the family of (1,q) Pascal triangles: A007318 (Pascal (q=1)), A029635 (q=2) (but with a(0,0)=2, not 1), A095660 (q=3), A095666 (q=4), A096940 (q=5).
This is an example of a Riordan triangle (see A053121 for a comment and the 1991 Shapiro et al. reference on the Riordan group) with o.g.f. of column no. m of the type g(x)*(x*f(x))^m with f(0)=1. Therefore the o.g.f. for the row polynomials p(n,x):=Sum_{m=0..n} a(n,m)*x^m is G(z,x)=g(z)/(1-x*z*f(z)). Here: g(x)=(6-5*x)/(1-x), f(x)=1/(1-x), hence G(z,x)=(6-5*z)/(1-(1+x)*z).
The SW-NE diagonals give Sum_{k=0..ceiling((n-1)/2)} a(n-1-k,k) = A022097(n-2), n >= 2, with n=1 value 6. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs.

Examples

			Triangle begins:
  [0]  6;
  [1]  1,  6;
  [2]  1,  7,  6;
  [3]  1,  8, 13,  6;
  [4]  1,  9, 21, 19,  6;
  [5]  1, 10, 30, 40, 25,  6;
  ...
		

Crossrefs

Row sums: A005009(n-1), n>=1, 6 if n=0; g.f.: (6-5*x)/(1-2*x). Alternating row sums are [6, -5, followed by 0's].
Column sequences (without leading zeros) give for m=1..9, with n >= 0: A000027(n+6), A056115, A096957-9, A097297-A097300.

Programs

  • Maple
    a(n,k):=piecewise(n=0,6,0Mircea Merca, Apr 08 2012
  • Mathematica
    A096956[n_, k_] := If[n == k, 6, (5*k/n + 1)*Binomial[n, k]];
    Table[A096956[n, k], {n, 0, 12}, {k, 0, n}] (* Paolo Xausa, Apr 14 2025 *)

Formula

Recursion: a(n,m)=0 if m > n, a(0,0) = 6; a(n,0) = 1 if n >= 1; a(n,m) = a(n-1, m) + a(n-1, m-1).
G.f. column m (without leading zeros): (6-5*x)/(1-x)^(m+1), m >= 0.
a(n,k) = (1+5*k/n)*binomial(n,k), for n > 0. - Mircea Merca, Apr 08 2012

A008313 Triangle of expansions of powers of x in terms of Chebyshev polynomials U_n(x).

Original entry on oeis.org

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

Keywords

Comments

This is another reading (by shallow diagonals) of the triangle A009766; rows of Catalan triangle A008315 read backwards. - Philippe Deléham, Feb 15 2004
"The Catalan triangle is formed in the same manner as Pascal's triangle, except that no number may appear on the left of the vertical bar." [Conway and Smith]

Examples

			.|...1
.|.......1
.|...1.......1
.|.......2.......1
.|...2.......3.......1
.|.......5.......4.......1
.|...5.......9.......5.......1
.|......14......14.......6.......1
.|..14......28......20.......7.......1
.|......42......48......27.......8.......1
		

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.
  • J. H. Conway and D. A. Smith, On Quaternions and Octonions, A K Peters, Ltd., Natick, MA, 2003. See p. 60. MR1957212 (2004a:17002)
  • P. J. Larcombe, A question of proof..., Bull. Inst. Math. Applic. (IMA), 30, Nos. 3/4, 1994, 52-54.

Crossrefs

Cf. A039598, A039599. A053121 is essentially the same triangle.
Row sums = A001405 (central binomial coefficients).

Programs

  • Haskell
    a008313 n k = a008313_tabf !! n !! k
    a008313_row n = a008313_tabf !! n
    a008313_tabf = map (filter (> 0)) a053121_tabl
    -- Reinhard Zumkeller, Feb 24 2012
    
  • Maple
    T := proc(n, k): if n=0 then 1 else binomial(n-1, floor(n/2 )-k) -binomial(n-1, floor(n/2) -k-2) fi: end: seq(seq(T(n, k), k = 0..floor(n/2)), n = 0..14); # Johannes W. Meijer, Jul 10 2011, revised Nov 22 2012
  • Mathematica
    t[n_, k_] /; n < k || OddQ[n - k] = 0; t[n_, k_] := (k+1)*Binomial[n+1, (n-k)/2]/(n+1); Flatten[ Table[ t[n, k], {n, 0, 15}, {k, Mod[n, 2], n + Mod[n, 2], 2}]] (* Jean-François Alcover, Jan 12 2012 *)
  • PARI
    {T(n, k) = if( k<0 || 2*k>n, 0, polcoeff((1 - x) * (1 + x)^n, n\2 - k))}; /* Michael Somos, May 28 2005 */
    
  • PARI
    T(n, k) = binomial(n-1, n\2-k)-binomial(n-1, n\2-k-2);
    for(n=0, 14, for(k=0, n\2, print1(T(n,k),", "))); \\ Seiichi Manyama, Mar 24 2025
    
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of the triangle.
    def A008313_triangle(n) :
        D = [0]*((n+5)//2); D[1] = 1
        b = True; h = 1
        for i in range(n) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1
            else :
                for k in range(1,h, 1) : D[k] += D[k+1]
            b = not b
            print([D[z] for z in (1..h-1)])
    A008313_triangle(13) # Peter Luschny, May 01 2012

Formula

Row n: C(n-1, [n/2]-k) - C(n-1, [n/2]-k-2) for k=0, 1, ..., n.
Sum_{k>=0} T(n, k)^2 = A000108(n); A000108: Catalan numbers. - Philippe Deléham, Feb 14 2004

A054335 A convolution triangle of numbers based on A000984 (central binomial coefficients of even order).

Original entry on oeis.org

1, 2, 1, 6, 4, 1, 20, 16, 6, 1, 70, 64, 30, 8, 1, 252, 256, 140, 48, 10, 1, 924, 1024, 630, 256, 70, 12, 1, 3432, 4096, 2772, 1280, 420, 96, 14, 1, 12870, 16384, 12012, 6144, 2310, 640, 126, 16, 1, 48620, 65536, 51480, 28672, 12012, 3840, 924, 160, 18, 1
Offset: 0

Author

Wolfdieter Lang, Mar 13 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as a matrix, belongs to the Bell-subgroup of the Riordan-group. The g.f. for the row polynomials p(n,x) (increasing powers of x) is 1/(sqrt(1-4*z)-x*z).
Riordan array (1/sqrt(1-4*x),x/sqrt(1-4*x)). - Paul Barry, May 06 2009
The matrix inverse is apparently given by deleting the leftmost column from A206022. - R. J. Mathar, Mar 12 2013

Examples

			Triangle begins:
    1;
    2,    1;
    6,    4,   1;
   20,   16,   6,   1;
   70,   64,  30,   8,  1;
  252,  256, 140,  48, 10,  1;
  924, 1024, 630, 256, 70, 12, 1; ...
Fourth row polynomial (n=3): p(3,x) = 20 + 16*x + 6*x^2 + x^3.
From _Paul Barry_, May 06 2009: (Start)
Production matrix begins
    2,   1;
    2,   2,  1;
    0,   2,  2,  1;
   -2,   0,  2,  2,  1;
    0,  -2,  0,  2,  2,  1;
    4,   0, -2,  0,  2,  2, 1;
    0,   4,  0, -2,  0,  2, 2, 1;
  -10,   0,  4,  0, -2,  0, 2, 2, 1;
    0, -10,  0,  4,  0, -2, 0, 2, 2, 1; (End)
		

Crossrefs

Row sums: A026671.

Programs

  • GAP
    T:= function(n, k)
        if k mod 2=0 then return Binomial(2*n-k, n-Int(k/2))*Binomial(n-Int(k/2),Int(k/2))/Binomial(k,Int(k/2));
        else return 4^(n-k)*Binomial(n-Int((k-1)/2)-1, Int((k-1)/2));
        fi;
      end;
    Flat(List([0..10], n-> List([0..n], k-> T(n, k) ))); # G. C. Greubel, Jul 20 2019
  • Magma
    T:= func< n, k | (k mod 2) eq 0 select Binomial(2*n-k, n-Floor(k/2))* Binomial(n-Floor(k/2),Floor(k/2))/Binomial(k,Floor(k/2)) else 4^(n-k)*Binomial(n-Floor((k-1)/2)-1, Floor((k-1)/2)) >;
    [[T(n,k): k in [0..n]]: n in [0..10]]; // G. C. Greubel, Jul 20 2019
    
  • Maple
    A054335 := proc(n,k)
        if k <0 or k > n then
            0 ;
        elif type(k,odd) then
            kprime := floor(k/2) ;
            binomial(n-kprime-1,kprime)*4^(n-k) ;
        else
            kprime := k/2 ;
            binomial(2*n-k,n-kprime)*binomial(n-kprime,kprime)/binomial(k,kprime) ;
        end if;
    end proc: # R. J. Mathar, Mar 12 2013
    # Uses function PMatrix from A357368. Adds column 1,0,0,0,... to the left.
    PMatrix(10, n -> binomial(2*(n-1), n-1)); # Peter Luschny, Oct 19 2022
  • Mathematica
    Flatten[ CoefficientList[#1, x] & /@ CoefficientList[ Series[1/(Sqrt[1 - 4*z] - x*z), {z, 0, 9}], z]] (* or *)
    a[n_, k_?OddQ] := 4^(n-k)*Binomial[(2*n-k-1)/2, (k-1)/2]; a[n_, k_?EvenQ] := (Binomial[n-k/2, k/2]*Binomial[2*n-k, n-k/2])/Binomial[k, k/2]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 08 2011, updated Jan 16 2014 *)
  • PARI
    T(n, k) = if(k%2==0, binomial(2*n-k, n-k/2)*binomial(n-k/2,k/2)/binomial(k,k/2), 4^(n-k)*binomial(n-(k-1)/2-1, (k-1)/2));
    for(n=0,10, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 20 2019
    
  • Sage
    def T(n, k):
        if (mod(k,2)==0): return binomial(2*n-k, n-k/2)*binomial(n-k/2,k/2)/binomial(k,k/2)
        else: return 4^(n-k)*binomial(n-(k-1)/2-1, (k-1)/2)
    [[T(n,k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Jul 20 2019
    

Formula

a(n, 2*k+1) = binomial(n-k-1, k)*4^(n-2*k-1), a(n, 2*k) = binomial(2*(n-k), n-k)*binomial(n-k, k)/binomial(2*k, k), k >= 0, n >= m >= 0; a(n, m) := 0 if n
Column recursion: a(n, m)=2*(2*n-m-1)*a(n-1, m)/(n-m), n>m >= 0, a(m, m) := 1.
G.f. for column m: cbie(x)*(x*cbie(x))^m, with cbie(x) := 1/sqrt(1-4*x).
G.f.: 1/(1-x*y-2*x/(1-x/(1-x/(1-x/(1-x/(1-... (continued fraction). - Paul Barry, May 06 2009
Sum_{k>=0} T(n,2*k)*(-1)^k*A000108(k) = A000108(n+1). - Philippe Deléham, Jan 30 2012
Sum_{k=0..floor(n/2)} T(n-k,n-2*k) = A098615(n). - Philippe Deléham, Feb 01 2012
T(n,k) = 4*T(n-1,k) + T(n-2,k-2) for k>=1. - Philippe Deléham, Feb 02 2012
Vertical recurrence: T(n,k) = 1*T(n-1,k-1) + 2*T(n-2,k-1) + 6*T(n-3,k-1) + 20*T(n-4,k-1) + ... for k >= 1 (the coefficients 1, 2, 6, 20, ... are the central binomial coefficients A000984). - Peter Bala, Oct 17 2015

A097609 Triangle read by rows: T(n,k) is number of Motzkin paths of length n having k horizontal steps at level 0.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 3, 2, 3, 0, 1, 6, 7, 3, 4, 0, 1, 15, 14, 12, 4, 5, 0, 1, 36, 37, 24, 18, 5, 6, 0, 1, 91, 90, 67, 36, 25, 6, 7, 0, 1, 232, 233, 165, 106, 50, 33, 7, 8, 0, 1, 603, 602, 438, 264, 155, 66, 42, 8, 9, 0, 1, 1585, 1586, 1147, 719, 390, 215, 84, 52, 9, 10, 0, 1
Offset: 0

Author

Emeric Deutsch, Aug 30 2004

Keywords

Comments

Row sums give the Motzkin numbers (A001006).
Column 0 is A005043.
Riordan array ((1+x-sqrt(1-2*x-3*x^2))/(2*x*(1-x)), (1+x-sqrt(1-2*x-3*x^2))/(2*(1-x))). - Paul Barry, Jun 21 2008
Inverse of Riordan array ((1-x)/(1-x+x^2), x*(1-x)/(1-x+x^2)), which is A104597. - Paul Barry, Jun 21 2008
Triangle read by rows, product of A064189 and A130595 considered as infinite lower triangular arrays; A097609 = A064189*A130195 = B*A053121*B^(-1) where B = A007318. - Philippe Deléham, Dec 07 2009
T(n+1,1) = A187306(n). - Philippe Deléham, Jan 28 2014
The number of lattice paths from (0,0) to (n,k) that do not cross below the x-axis and use up-step=(1,1) and down-steps=(1,-z) where z is a positive integer. For example, T(4,0) = 3: [(1,1)(1,1)(1,-1)(1,-1)], [(1,1)(1,-1)(1,1)(1,-1)] and [(1,1)(1,1)(1,1)(1,-3)]. - Nicholas Ham, Aug 20 2015
The convolution triangle of the Riordan numbers A005043. - Peter Luschny, Oct 09 2022

Examples

			Triangle begins:
  1;
  0, 1;
  1, 0, 1;
  1, 2, 0, 1;
  3, 2, 3, 0, 1;
  6, 7, 3, 4, 0, 1;
Row n has n+1 terms.
T(5,2) = 3 because (HH)UHD,(H)UHD(H) and UHD(HH) are the only Motzkin paths of length 5 with 2 horizontal steps at level 0 (shown between parentheses); here U=(1,1), H=(1,0) and D=(1,-1).
Production matrix begins
  0, 1;
  1, 0, 1;
  1, 1, 0, 1;
  1, 1, 1, 0, 1;
  1, 1, 1, 1, 0, 1;
  1, 1, 1, 1, 1, 0, 1;
  1, 1, 1, 1, 1, 1, 0, 1;
  1, 1, 1, 1, 1, 1, 1, 0, 1;
  1, 1, 1, 1, 1, 1, 1, 1, 0, 1;
... - _Philippe Deléham_, Mar 02 2013
		

Crossrefs

Programs

  • Magma
    [((k+1)/(n+1))*(&+[(-1)^(n-j+1)*Binomial(n+1,j)*Binomial(2*j-k-2,j-1): j in [k+1..n+1]]): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
    
  • Maple
    G:=2/(1-2*t*z+z+sqrt(1-2*z-3*z^2)): Gser:=simplify(series(G,z=0,13)): P[0]:=1: for n from 1 to 12 do P[n]:=sort(coeff(Gser,z^n)) od: seq(seq(coeff(t*P[n], t^k),k=1..n+1),n=0..12);
    # Uses function PMatrix from A357368. Adds column 1, 0, 0, ... to the left.
    PMatrix(10, n -> A005043(n-1)); # Peter Luschny, Oct 09 2022
  • Mathematica
    nmax = 12; t[n_, k_] := ((-1)^(n+k)*k*n!*HypergeometricPFQ[{(k+1)/2, k/2, k-n}, {k, k+1}, 4])/(n*k!*(n-k)!); Flatten[ Table[t[n, k], {n, 0, nmax}, {k, 1, n}]] (* Jean-François Alcover, Nov 14 2011, after Vladimir Kruchinin *)
  • PARI
    T(n,k) = ((k+1)/(n+1))*sum(j=k+1, n+1, (-1)^(n-j+1)*binomial(n+1,j)* binomial(2*j-k-2,j-1) ); \\ G. C. Greubel, Feb 18 2020
    
  • Sage
    [[((k+1)/(n+1))*sum( (-1)^(n-j+1)*binomial(n+1,j)* binomial(2*j-k-2,j-1) for j in (k+1..n+1)) for k in (0..n)] for n in (0..10)] # G. C. Greubel, Feb 18 2020

Formula

G.f.: 2/(1 -2*t*z +z +sqrt(1-2*z-3*z^2)).
T(n,k) = T(n-1,k-1)+ Sum_{j>=1} T(n-1,k+j) with T(0,0)=1. - Philippe Deléham, Jan 23 2010
T(n,k) = (k/n)*Sum_{j=k..n} (-1)^(n-j)*C(n,j)*C(2*j-k-1,j-1), n>0. - Vladimir Kruchinin, Feb 05 2011
From Emanuele Munarini, Jul 14 2024: (Start)
T(n,k) = Sum_{i=0..floor((n-k)/2)} binomial(n,i)*binomial(n-k-i-1,i-1)*(k+1)/(n-i+1).
T(n,k) = Sum_{i=0..n-k} (-1)^i*binomial(n,i)*binomial(2*n-k-2*i,n-i)*(k+1)/(n-i+1).
T(n,k) = (k+1)/(n+1)*Sum_{i=0..n-k} binomial(2*n-k-i,n)*trinomial(n+1,i)*(-1)^i, where trinomial(n,k) are the trinomial coefficients (A027907).
T(n,k) = Sum_{i=0..n-k} (-1)^i*binomial(2*n-k-i,n)*trinomial(n,i)*(i+k+1)/(n+1).
Recurrence: T(n+1,k+2) = T(n+1,k+1) - T(n,k+2) + T(n,k+1) - T(n,k). (End)

A107430 Triangle read by rows: row n is row n of Pascal's triangle (A007318) sorted into increasing order.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 4, 6, 1, 1, 5, 5, 10, 10, 1, 1, 6, 6, 15, 15, 20, 1, 1, 7, 7, 21, 21, 35, 35, 1, 1, 8, 8, 28, 28, 56, 56, 70, 1, 1, 9, 9, 36, 36, 84, 84, 126, 126, 1, 1, 10, 10, 45, 45, 120, 120, 210, 210, 252, 1, 1, 11, 11, 55, 55, 165, 165, 330, 330, 462, 462, 1
Offset: 0

Author

Philippe Deléham, May 21 2005

Keywords

Comments

By rows, equals partial sums of A053121 reversed rows. Example: Row 4 of A053121 = (2, 0, 3, 0, 1) -> (1, 0, 3, 0, 2) -> (1, 1, 4, 4, 6). - Gary W. Adamson, Dec 28 2008, edited by Michel Marcus, Sep 22 2015

Examples

			Triangle begins:
1;
1,1;
1,1,2;
1,1,3,3;
1,1,4,4,6;
		

Crossrefs

A061554 is similar but with rows sorted into decreasing order.
Cf. A034868.
Cf. A053121. - Gary W. Adamson, Dec 28 2008
Cf. A103284.

Programs

  • Haskell
    import Data.List (sort)
    a107430 n k = a107430_tabl !! n !! k
    a107430_row n = a107430_tabl !! n
    a107430_tabl = map sort a007318_tabl
    -- Reinhard Zumkeller, May 26 2013
    
  • Magma
    /* As triangle */ [[Binomial(n,Floor(k/2)) : k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Sep 22 2015
    
  • Maple
    for n from 0 to 10 do sort([seq(binomial(n,k),k=0..n)]) od; # yields sequence in triangular form. - Emeric Deutsch, May 28 2005
  • Mathematica
    Flatten[ Table[ Sort[ Table[ Binomial[n, k], {k, 0, n}]], {n, 0, 12}]] (* Robert G. Wilson v, May 28 2005 *)
  • PARI
    for(n=0,20, for(k=0,n, print1(binomial(n,floor(k/2)), ", "))) \\ G. C. Greubel, May 22 2017

Formula

T(n,k) = C(n,floor(k/2)). - Paul Barry, Dec 15 2006; corrected by Philippe Deléham, Mar 15 2007
Sum_{k=0..n} T(n,k)*x^(n-k) = A127363(n), A127362(n), A127361(n), A126869(n), A001405(n), A000079(n), A127358(n), A127359(n), A127360(n) for x=-4,-3,-2,-1,0,1,2,3,4 respectively. - Philippe Deléham, Mar 29 2007

Extensions

More terms from Emeric Deutsch and Robert G. Wilson v, May 28 2005
Previous Showing 61-70 of 108 results. Next