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 65 results. Next

A380114 Triangle read by rows: The convolution triangle of 2^n, where the convolution triangle of a sequence is defined in A357368.

Original entry on oeis.org

1, 0, 2, 0, 4, 4, 0, 8, 16, 8, 0, 16, 48, 48, 16, 0, 32, 128, 192, 128, 32, 0, 64, 320, 640, 640, 320, 64, 0, 128, 768, 1920, 2560, 1920, 768, 128, 0, 256, 1792, 5376, 8960, 8960, 5376, 1792, 256, 0, 512, 4096, 14336, 28672, 35840, 28672, 14336, 4096, 512
Offset: 0

Views

Author

Peter Luschny, Feb 03 2025

Keywords

Examples

			Triangle begins:
  [0] [1]
  [1] [0,   2]
  [2] [0,   4,    4]
  [3] [0,   8,   16,     8]
  [4] [0,  16,   48,    48,    16]
  [5] [0,  32,  128,   192,   128,    32]
  [6] [0,  64,  320,   640,   640,   320,    64]
  [7] [0, 128,  768,  1920,  2560,  1920,   768,   128]
  [8] [0, 256, 1792,  5376,  8960,  8960,  5376,  1792,  256]
  [9] [0, 512, 4096, 14336, 28672, 35840, 28672, 14336, 4096, 512]
		

Crossrefs

Cf. A357368, A081294 (row sums), A380115 (row max), A038207 (2^(n-1)), A097805.

Programs

  • Mathematica
    A380114[n_, k_] := 2^n*Binomial[n - 1, k - 1];
    Table[A380114[n, k], {n, 0, 10}, {k, 0, n}] (* Paolo Xausa, Feb 05 2025  *)
  • Python
    # The function ConvTriangle is defined in A357368.
    print(ConvTriangle(10, lambda n: 2**n))

Formula

T(n, k) = 2^n * A097805(n, k). - Werner Schulte, Feb 04 2025

A084938 Triangle read by rows: T(n,k) = Sum_{j>=0} j!*T(n-j-1, k-1) for n >= 0, k >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 6, 5, 3, 1, 0, 24, 16, 9, 4, 1, 0, 120, 64, 31, 14, 5, 1, 0, 720, 312, 126, 52, 20, 6, 1, 0, 5040, 1812, 606, 217, 80, 27, 7, 1, 0, 40320, 12288, 3428, 1040, 345, 116, 35, 8, 1, 0, 362880, 95616, 22572, 5768, 1661, 519, 161, 44, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Jul 16 2003; corrections Dec 17 2008, Dec 20 2008, Feb 05 2009

Keywords

Comments

Triangle T(n,k) is [0,1,1,2,2,3,3,4,4,...] DELTA [1,0,0,0,0,0,...] = A110654 DELTA A000007.
In general, the triangle [r_0,r_1,r_2,r_3,...] DELTA [s_0,s_1,s_2,s_3,...] has generating function 1/(1-(r_0*x+s_0*x*y)/(1-(r_1*x+s_1*x*y)/(1-(r_2*x+s_2*x*y)/(1-(r_3*x+s_3*x*y)/(1-...(continued fraction). See also the Formula section below.
T(n,k) = number of permutations on [n] that (i) contain a 132 pattern only as part of a 4132 pattern and (ii) start with n+1-k. For example, for n >= 1, T(n,1) = (n-1)! counts all (n-1)! permutations on [n] that start with n: either they avoid 132 altogether or the initial entry serves as the "4" in a 4132 pattern and T(4,3) = 3 counts 2134, 2314, 2341. - David Callan, Jul 20 2005
T(n,k) is the number of permutations on [n] that (i) contain a (scattered) 342 pattern only as part of a 1342 pattern and (ii) contain 1 in position k. For example, T(4,3) counts 3214, 4213, 4312. (It does not count, say, 2314 because 231 forms an offending 342 pattern.) - David Callan, Jul 20 2005
Riordan array (1,x*g(x)) where g(x) is the g.f. of the factorials (n!). - Paul Barry, Sep 25 2008
Modulo 2, this sequence becomes A106344.
T(n,k) is the number of permutations of {1,2,...,n} having k cycles such that the elements of each cycle of the permutation form an interval. - Ran Pan, Nov 11 2016
The convolution triangle of the factorial numbers. - Peter Luschny, Oct 09 2022

Examples

			From _Paul Barry_, Sep 25 2008: (Start)
Triangle [0,1,1,2,2,3,3,4,4,5,5,...] DELTA [1,0,0,0,0,...] begins
  1;
  0,      1;
  0,      1,     1;
  0,      2,     2,     1;
  0,      6,     5,     3,    1;
  0,     24,    16,     9,    4,    1;
  0,    120,    64,    31,   14,    5,   1;
  0,    720,   312,   126,   52,   20,   6,   1;
  0,   5040,  1812,   606,  217,   80,  27,   7,  1;
  0,  40320, 12288,  3428, 1040,  345, 116,  35,  8, 1;
  0, 362880, 95616, 22572, 5768, 1661, 519, 161, 44, 9, 1. (End)
From _Paul Barry_, May 14 2009: (Start)
The production matrix is
  0,   1;
  0,   1,  1;
  0,   1,  1, 1;
  0,   2,  1, 1, 1;
  0,   7,  2, 1, 1, 1;
  0,  34,  7, 2, 1, 1, 1;
  0, 206, 34, 7, 2, 1, 1, 1;
which is based on A075834. (End)
		

Crossrefs

Programs

  • Magma
    function T(n,k) // T = A084938
      if k lt 0 or k gt n then return 0;
      elif n eq 0 or k eq n then return 1;
      elif k eq 0 then return 0;
      else return (&+[Factorial(j)*T(n-j-1,k-1): j in [0..n-1]]);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Nov 10 2022
  • Maple
    DELTA := proc(r,s,n) local T,x,y,q,P,i,j,k,t1; T := array(0..n,0..n);
    for i from 0 to n do q[i] := x*r[i+1]+y*s[i+1]; od: for k from 0 to n do P[0,k] := 1; od: for i from 0 to n do P[i,-1] := 0; od:
    for i from 1 to n do for k from 0 to n do P[i,k] := sort(expand(P[i,k-1] + q[k]*P[i-1,k+1])); od: od:
    for i from 0 to n do t1 := P[i,0]; for j from 0 to i do T[i,j] := coeff(coeff(t1,x,i-j),y,j); od: lprint( seq(T[i,j],j=0..i) ); od: end;
    # To produce the current triangle: s3 := n->floor((n+1)/2); s4 := n->if n = 0 then 1 else 0; fi; r := [seq(s3(i),i= 0..40)]; s := [seq(s4(i),i=0..40)]; DELTA(r,s,20);
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> factorial(n - 1)); # Peter Luschny, Oct 09 2022
  • Mathematica
    a[0, 0] = 1; a[n_, k_] := a[n, k] = Sum[j! a[n - j - 1, k - 1], {j, 0, n - 1}]; Flatten[Table[a[i, j], {i, 0, 10}, {j, 0, i}]] (* T. D. Noe, Feb 22 2012 *)
    DELTA[r_, s_, m_] := Module[{p, q, t, x, y}, q[k_] := x*r[[k+1]] + y*s[[k+1]]; p[0, ] = 1; p[, -1] = 0; p[n_ /; n >= 1, k_ /; k >= 0] := p[n, k] = p[n, k-1] + q[k]*p[n-1, k+1] // Expand; t[n_, k_] := Coefficient[p[n, 0], x^(n-k)*y^k]; t[0, 0] = p[0, 0]; Table[t[n, k], {n, 0, m}, {k, 0, n}]]; DELTA[Floor[Range[10]/2], Prepend[Table[0, {10}], 1], 10] (* Jean-François Alcover, Sep 12 2013, after Philippe Deléham *)
  • Sage
    def delehamdelta(R, S) :
        L = min(len(R), len(S)) + 1
        ring = PolynomialRing(ZZ, 'x')
        x = ring.gen()
        A = [Rk + x*Sk for Rk, Sk in zip(R, S)]
        C = [ring(0)] + [ring(1) for i in range(L)]
        for k in (1..L) :
            for n in range(k-1,0,-1) :
                C[n] = C[n-1] + C[n+1]*A[n-1]
            yield list(C[1])
    def A084938_triangle(n) :
        for row in delehamdelta([(i+1)//2 for i in (0..n)], [0^i for i in (0..n)]):
            print(row)
    A084938_triangle(10) # Peter Luschny, Jan 28 2012
    

Formula

The operator DELTA takes two sequences r = (r_0, r_1, ...), s = (s_0, s_1, ...) and produces a triangle T(n, k), 0 <= k <= n, as follows:
Let q(k) = x*r_k + y*s_k for k >= 0; let P(n, k) (n >= 0, k >= -1) be defined recursively by P(0, k) = 1 for k >= 0; P(n, -1) = 0 for n >= 1; P(n, k) = P(n, k-1) + q(k)*P(n-1, k+1) for n >= 1, k >= 0. Then P(n, k) is a homogeneous polynomial in x and y of degree n and T(n, k) = coefficient of x^(n-k)*y^k in P(n, 0).
T(n, n) = 1.
T(k+1, k) = A001477(k).
T(k+2, k) = A000096(k).
T(n+1, 1) = A000142(n).
T(n+2, 2) = A003149(n).
T(n+3, 3) = A090595(n).
T(n+4, 4) = A090319(n).
T(m+n, m) = Sum_{k=0..n} A090238(n, k)*binomial(m, k).
G.f. for column k: Sum_{n>=0} T(k+n, k)*x^n = (Sum_{n>=0} n!*x^n )^k.
For k>0, T(n+k, k) = Sum_{a_1 + a_2 + .. + a_k = n} (a_1)!*(a_2)!*..*(a_k)!; a_i>=0, n>=0.
T(n,k) = Sum_{j>=0} A075834(j)*T(n-1,k+j-1).
T(2n,n) = A287899(n). - Alois P. Heinz, Jun 02 2017
From G. C. Greubel, Nov 10 2022: (Start)
Sum_{k=0..n} T(n, k) = A051295(n).
Sum_{k=0..n} (-1)^k*T(n, k) = [n=0] - A052186(n-1)*[n>0]. (End)

Extensions

Name edited by Derek Orr, May 01 2015

A049310 Triangle of coefficients of Chebyshev's S(n,x) := U(n,x/2) polynomials (exponents in increasing order).

Original entry on oeis.org

1, 0, 1, -1, 0, 1, 0, -2, 0, 1, 1, 0, -3, 0, 1, 0, 3, 0, -4, 0, 1, -1, 0, 6, 0, -5, 0, 1, 0, -4, 0, 10, 0, -6, 0, 1, 1, 0, -10, 0, 15, 0, -7, 0, 1, 0, 5, 0, -20, 0, 21, 0, -8, 0, 1, -1, 0, 15, 0, -35, 0, 28, 0, -9, 0, 1, 0, -6, 0, 35, 0, -56, 0, 36, 0, -10, 0, 1, 1, 0, -21, 0, 70, 0, -84, 0
Offset: 0

Views

Author

Keywords

Comments

G.f. for row polynomials S(n,x) (signed triangle): 1/(1-x*z+z^2). Unsigned triangle |a(n,m)| has Fibonacci polynomials F(n+1,x) as row polynomials with g.f. 1/(1-x*z-z^2). |a(n,m)| triangle has rows of Pascal's triangle A007318 in the even-numbered diagonals (odd-numbered ones have only 0's).
Row sums (unsigned triangle) A000045(n+1) (Fibonacci). Row sums (signed triangle) S(n,1) sequence = periodic(1,1,0,-1,-1,0) = A010892.
Alternating row sums A049347(n) = S(n,-1) = periodic(1,-1,0). - Wolfdieter Lang, Nov 04 2011
S(n,x) is the characteristic polynomial of the adjacency matrix of the n-path. - Michael Somos, Jun 24 2002
S(n,x) is also the matching polynomial of the n-path. - Eric W. Weisstein, Apr 10 2017
|T(n,k)| = number of compositions of n+1 into k+1 odd parts. Example: |T(7,3)| = 10 because we have (1,1,3,3), (1,3,1,3), (1,3,3,1), (3,1,1,3), (3,1,3,1), (3,3,1,1), (1,1,1,5), (1,1,5,1), (1,5,1,1) and (5,1,1,1). - Emeric Deutsch, Apr 09 2005
S(n,x)= R(n,x) + S(n-2,x), n >= 2, S(-1,x)=0, S(0,x)=1, R(n,x):=2*T(n,x/2) = Sum_{m=0..n} A127672(n,m)*x^m (monic integer Chebyshev T-Polynomials). This is the rewritten so-called trace of the transfer matrix formula for the T-polynomials. - Wolfdieter Lang, Dec 02 2010
In a regular N-gon inscribed in a unit circle, the side length is d(N,1) = 2*sin(Pi/N). The length ratio R(N,k):=d(N,k)/d(N,1) for the (k-1)-th diagonal, with k from {2,3,...,floor(N/2)}, N >= 4, equals S(k-1,x) = sin(k*Pi/N)/sin(Pi/N) with x=rho(N):=R(N,2) = 2*cos(Pi/N). Example: N=7 (heptagon), rho=R(7,2), sigma:=R(N,3) = S(2,rho) = rho^2 - 1. Motivated by the quoted paper by P. Steinbach. - Wolfdieter Lang, Dec 02 2010
From Wolfdieter Lang, Jul 12 2011: (Start)
In q- or basic analysis, q-numbers are [n]_q := S(n-1,q+1/q) = (q^n-(1/q)^n)/(q-1/q), with the row polynomials S(n,x), n >= 0.
The zeros of the row polynomials S(n-1,x) are (from those of Chebyshev U-polynomials):
x(n-1;k) = +- t(k,rho(n)), k = 1..ceiling((n-1)/2), n >= 2, with t(n,x) the row polynomials of A127672 and rho(n):= 2*cos(Pi/n). The simple vanishing zero for even n appears here as +0 and -0.
Factorization of the row polynomials S(n-1,x), x >= 1, in terms of the minimal polynomials of cos(2 Pi/2), called Psi(n,x), with coefficients given by A181875/A181876:
S(n-1,x) = (2^(n-1))*Product_{n>=1}(Psi(d,x/2), 2 < d | 2n).
(From the rewritten eq. (3) of the Watkins and Zeitlin reference, given under A181872.) [See the W. Lang ArXiv link, Proposition 9, eq. (62). - Wolfdieter Lang, Apr 14 2018]
(End)
The discriminants of the S(n,x) polynomials are found in A127670. - Wolfdieter Lang, Aug 03 2011
This is an example for a subclass of Riordan convolution arrays (lower triangular matrices) called Bell arrays. See the L. W. Shapiro et al. reference under A007318. If a Riordan array is named (G(z),F(z)) with F(z)=z*Fhat(z), the o.g.f. for the row polynomials is G(z)/(1-x*z*Fhat(z)), and it becomes a Bell array if G(z)=Fhat(z). For the present Bell type triangle G(z)=1/(1+z^2) (see the o.g.f. comment above). This leads to the o.g.f. for the column no. k, k >= 0, x^k/(1+x^2)^(k+1) (see the formula section), the one for the row sums and for the alternating row sums (see comments above). The Riordan (Bell) A- and Z-sequences (defined in a W. Lang link under A006232, with references) have o.g.f.s 1-x*c(x^2) and -x*c(x^2), with the o.g.f. of the Catalan numbers A000108. Together they lead to a recurrence given in the formula section. - Wolfdieter Lang, Nov 04 2011
The determinant of the N x N matrix S(N,[x[1], ..., x[N]]) with elements S(m-1,x[n]), for n, m = 1, 2, ..., N, and for any x[n], is identical with the determinant of V(N,[x[1], ..., x[N]]) with elements x[n]^(m-1) (a Vandermondian, which equals Product_{1 <= i < j<= N} (x[j] - x[i])). This is a special instance of a theorem valid for any N >= 1 and any monic polynomial system p(m,x), m>=0, with p(0,x) = 1. For this theorem see the Vein-Dale reference, p. 59. Thanks to L. Edson Jeffery for an email asking for a proof of the non-singularity of the matrix S(N,[x[1], ...., x[N]]) if and only if the x[j], j = 1..N, are pairwise distinct. - Wolfdieter Lang, Aug 26 2013
These S polynomials also appear in the context of modular forms. The rescaled Hecke operator T*n = n^((1-k)/2)*T_n acting on modular forms of weight k satisfies T*(p^n) = S(n, T*p), for each prime p and positive integer n. See the Koecher-Krieg reference, p. 223. - _Wolfdieter Lang, Jan 22 2016
For a shifted o.g.f. (mod signs), its compositional inverse, and connections to Motzkin and Fibonacci polynomials, non-crossing partitions and other combinatorial structures, see A097610. - Tom Copeland, Jan 23 2016
From M. Sinan Kul, Jan 30 2016; edited by Wolfdieter Lang, Jan 31 2016 and Feb 01 2016: (Start)
Solutions of the Diophantine equation u^2 + v^2 - k*u*v = 1 for integer k given by (u(k,n), v(k,n)) = (S(n,k), S(n-1,k)) because of the Cassini-Simson identity: S(n,x)^2 - S(n+1,x)*S(n-1, x) = 1, after use of the S-recurrence. Note that S(-n, x) = -S(-n-2, x), n >= 1, and the periodicity of some S(n, k) sequences.
Hence another way to obtain the row polynomials would be to take powers of the matrix [x, -1; 1,0]: S(n, x) = (([x, -1; 1, 0])^n)[1,1], n >= 0.
See also a Feb 01 2016 comment on A115139 for a well-known S(n, x) sum formula.
Then we have with the present T triangle
A039834(n) = -i^(n+1)*T(n-1, k) where i is the imaginary unit and n >= 0.
A051286(n) = Sum_{i=0..n} T(n,i)^2 (see the Philippe Deléham, Nov 21 2005 formula),
A181545(n) = Sum_{i=0..n+1} abs(T(n,i)^3),
A181546(n) = Sum_{i=0..n+1} T(n,i)^4,
A181547(n) = Sum_{i=0..n+1} abs(T(n,i)^5).
S(n, 0) = A056594(n), and for k = 1..10 the sequences S(n-1, k) with offset n = 0 are A128834, A001477, A001906, A001353, A004254, A001109, A004187, A001090, A018913, A004189.
(End)
For more on the Diophantine equation presented by Kul, see the Ismail paper. - Tom Copeland, Jan 31 2016
The o.g.f. for the Legendre polynomials L(n,x) is 1 / sqrt(1- 2x*z + z^2), and squaring it gives the o.g.f. of U(n,x), A053117, so Sum_{k=0..n} L(k,x/2) L(n-k,x/2) = S(n,x). This gives S(n,x) = L(n/2,x/2)^2 + 2*Sum_{k=0..n/2-1} L(k,x/2) L(n-k,x/2) for n even and S(n,x) = 2*Sum_{k=0..(n-1)/2} L(k,x/2) L(n-k,x/2) for odd n. For a connection to elliptic curves and modular forms, see A053117. For the normalized Legendre polynomials, see A100258. For other properties and relations to other polynomials, see Allouche et al. - Tom Copeland, Feb 04 2016
LG(x,h1,h2) = -log(1 - h1*x + h2*x^2) = Sum_{n>0} F(n,-h1,h2,0,..,0) x^n/n is a log series generator of the bivariate row polynomials of A127672 with A127672(0,0) = 0 and where F(n,b1,b2,..,bn) are the Faber polynomials of A263916. Exp(LG(x,h1,h2)) = 1 / (1 - h1*x + h2*x^2 ) is the o.g.f. of the bivariate row polynomials of this entry. - Tom Copeland, Feb 15 2016 (Instances of the bivariate o.g.f. for this entry are on pp. 5 and 18 of Sunada. - Tom Copeland, Jan 18 2021)
For distinct odd primes p and q the Legendre symbol can be written as Legendre(q,p) = Product_{k=1..P} S(q-1, 2*cos(2*Pi*k/p)), with P = (p-1)/2. See the Lemmermeyer reference, eq. (8.1) on p. 236. Using the zeros of S(q-1, x) (see above) one has S(q-1, x) = Product_{l=1..Q} (x^2 - (2*cos(Pi*l/q))^2), with Q = (q-1)/2. Thus S(q-1, 2*cos(2*Pi*k/p)) = ((-4)^Q)*Product_{l=1..Q} (sin^2(2*Pi*k/p) - sin^2(Pi*l/q)) = ((-4)^Q)*Product_{m=1..Q} (sin^2(2*Pi*k/p) - sin^2(2*Pi*m/q)). For the proof of the last equality see a W. Lang comment on the triangle A057059 for n = Q and an obvious function f. This leads to Eisenstein's proof of the quadratic reciprocity law Legendre(q,p) = ((-1)^(P*Q)) * Legendre(p,q), See the Lemmermeyer reference, pp. 236-237. - Wolfdieter Lang, Aug 28 2016
For connections to generalized Fibonacci polynomials, compare their generating function on p. 5 of the Amdeberhan et al. link with the o.g.f. given above for the bivariate row polynomials of this entry. - Tom Copeland, Jan 08 2017
The formula for Ramanujan's tau function (see A000594) for prime powers is tau(p^k) = p^(11*k/2)*S(k, p^(-11/2)*tau(p)) for k >= 1, and p = A000040(n), n >= 1. See the Hardy reference, p. 164, eqs. (10.3.4) and (10.3.6) rewritten in terms of S. - Wolfdieter Lang, Jan 27 2017
From Wolfdieter Lang, May 08 2017: (Start)
The number of zeros Z(n) of the S(n, x) polynomials in the open interval (-1,+1) is 2*b(n) for even n >= 0 and 1 + 2*b(n) for odd n >= 1, where b(n) = floor(n/2) - floor((n+1)/3). This b(n) is the number of integers k in the interval (n+1)/3 < k <= floor(n/2). See a comment on the zeros of S(n, x) above, and b(n) = A008615(n-2), n >= 0. The numbers Z(n) have been proposed (with a conjecture related to A008611) by Michel Lagneau, as the number of zeros of Fibonacci polynomials on the imaginary axis (-I,+I), with I=sqrt(-1). They are Z(n) = A008611(n-1), n >= 0, with A008611(-1) = 0. Also Z(n) = A194960(n-4), n >= 0. Proof using the A008611 version. A194960 follows from this.
In general the number of zeros Z(a;n) of S(n, x) for n >= 0 in the open interval (-a,+a) for a from the interval (0,2) (x >= 2 never has zeros, and a=0 is trivial: Z(0;n) = 0) is with b(a;n) = floor(n//2) - floor((n+1)*arccos(a/2)/Pi), as above Z(a;n) = 2*b(a;n) for even n >= 0 and 1 + 2*b(a;n) for odd n >= 1. For the closed interval [-a,+a] Z(0;n) = 1 and for a from (0,1) one uses for Z(a;n) the values b(a;n) = floor(n/2) - ceiling((n+1)*arccos(a/2)/Pi) + 1. (End)
The Riordan row polynomials S(n, x) (Chebyshev S) belong to the Boas-Buck class (see a comment and references in A046521), hence they satisfy the Boas-Buck identity: (E_x - n*1)*S(n, x) = (E_x + 1)*Sum_{p=0..n-1} (1 - (-1)^p)*(-1)^((p+1)/2)*S(n-1-p, x), for n >= 0, where E_x = x*d/dx (Euler operator). For the triangle T(n, k) this entails a recurrence for the sequence of column k, given in the formula section. - Wolfdieter Lang, Aug 11 2017
The e.g.f. E(x,t) := Sum_{n>=0} (t^n/n!)*S(n,x) for the row polynomials is obtained via inverse Laplace transformation from the above given o.g.f. as E(x,t) = ((1/xm)*exp(t/xm) - (1/xp)*exp(t/xp) )/(xp - xm) with xp = (x + sqrt(x^2-4))/2 and xm = (x - sqrt(x^2-4))/2. - Wolfdieter Lang, Nov 08 2017
From Wolfdieter Lang, Apr 12 2018: (Start)
Factorization of row polynomials S(n, x), for n >= 1, in terms of C polynomials (not Chebyshev C) with coefficients given in A187360. This is obtained from the factorization into Psi polynomials (see the Jul 12 2011 comment above) but written in terms of minimal polynomials of 2*cos(2*Pi/n) with coefficients in A232624:
S(2*k, x) = Product_{2 <= d | (2*k+1)} C(d, x)*(-1)^deg(d)*C(d, -x), with deg(d) = A055034(d) the degree of C(d, x).
S(2*k+1, x) = Product_{2 <= d | 2*(k+1)} C(d, x) * Product_{3 <= 2*d + 1 | (k+1)} (-1)^(deg(2*d+1))*C(2*d+1, -x).
Note that (-1)^(deg(2*d+1))*C(2*d+1, -x)*C(2*d+1, x) pairs always appear.
The number of C factors of S(2*k, x), for k >= 0, is 2*(tau(2*k+1) - 1) = 2*(A099774(k+1) - 1) = 2*A095374(k), and for S(2*k+1, x), for k >= 0, it is tau(2*(k+1)) + tau_{odd}(k+1) - 2 = A302707(k), with tau(2*k+1) = A099774(k+1), tau(n) = A000005 and tau(2*(k+1)) = A099777(k+1).
For the reverse problem, the factorization of C polynomials into S polynomials, see A255237. (End)
The S polynomials with general initial conditions S(a,b;n,x) = x*S(a,b;n-1,x) - S(a,b;n-2,x), for n >= 1, with S(a,b;-1,x) = a and S(a,b;0,x) = b are S(a,b;n,x) = b*S(n, x) - a*S(n-1, x), for n >= -1. Recall that S(-2, x) = -1 and S(-1, x) = 0. The o.g.f. is G(a,b;z,x) = (b - a*z)/(1 - x*z + z^2). - Wolfdieter Lang, Oct 18 2019
Also the convolution triangle of A101455. - Peter Luschny, Oct 06 2022
From Wolfdieter Lang, Apr 26 2023: (Start)
Multi-section of S-polynomials: S(m*n+k, x) = S(m+k, x)*S(n-1, R(m, x)) - S(k, x)*S(n-2, R(m, x)), with R(n, x) = S(n, x) - S(n-2, x) (see A127672), S(-2, x) = -1, and S(-1, x) = 0, for n >= 0, m >= 1, and k = 0, 1, ..., m-1.
O.g.f. of {S(m*n+k, y)}_{n>=0}: G(m,k,y,x) = (S(k, y) - (S(k, y)*R(m, y) - S(m+k, y))*x)/(1 - R(m,y)*x + x^2).
See eqs. (40) and (49), with r = x or y and s =-1, of the G. Detlefs and W. Lang link at A034807. (End)
S(n, x) for complex n and complex x: S(n, x) = ((-i/2)/sqrt(1 - (x/2)^2))*(q(x/2)*exp(+n*log(q(x/2))) - (1/q(x/2))*exp(-n*log(q(x/2)))), with q(x) = x + sqrt(1 - x^2)*i. Here log(z) = |z| + Arg(z)*i, with Arg(z) from [-Pi,+Pi) (principal branch). This satisfies the recurrence relation for S because it is derived from the Binet - de Moivre formula for S. Examples: S(n/m, 0) = cos((n/m)*Pi/4), for n >= 0 and m >= 1. S(n*i, 0) = (1/2)*(1 + exp(n*Pi))*exp(-(n/2)*Pi), for n >= 0. S(1+i, 2+i) = 0.6397424847... + 1.0355669490...*i. Thanks to Roberto Alfano for asking a question leading to this formula. - Wolfdieter Lang, Jun 05 2023
Lim_{n->oo} S(n, x)/S(n-1, x) = r(x) = (x - sqrt(x^2 -4))/2, for |x| >= 2. For x = +-2, this limit is +-1. - Wolfdieter Lang, Nov 15 2023

Examples

			The triangle T(n, k) begins:
  n\k  0  1   2   3   4   5   6    7   8   9  10  11
  0:   1
  1:   0  1
  2:  -1  0   1
  3:   0 -2   0   1
  4:   1  0  -3   0   1
  5:   0  3   0  -4   0   1
  6:  -1  0   6   0  -5   0   1
  7:   0 -4   0  10   0  -6   0    1
  8:   1  0 -10   0  15   0  -7    0   1
  9:   0  5   0 -20   0  21   0   -8   0   1
  10: -1  0  15   0 -35   0  28    0  -9   0   1
  11:  0 -6   0  35   0 -56   0   36   0 -10   0   1
  ... Reformatted and extended by _Wolfdieter Lang_, Oct 24 2012
For more rows see the link.
E.g., fourth row {0,-2,0,1} corresponds to polynomial S(3,x)= -2*x + x^3.
From _Wolfdieter Lang_, Jul 12 2011: (Start)
Zeros of S(3,x) with rho(4)= 2*cos(Pi/4) = sqrt(2):
  +- t(1,sqrt(2)) = +- sqrt(2) and
  +- t(2,sqrt(2)) = +- 0.
Factorization of S(3,x) in terms of Psi polynomials:
S(3,x) = (2^3)*Psi(4,x/2)*Psi(8,x/2) = x*(x^2-2).
(End)
From _Wolfdieter Lang_, Nov 04 2011: (Start)
A- and Z- sequence recurrence:
T(4,0) = - (C(0)*T(3,1) + C(1)*T(3,3)) = -(-2 + 1) = +1,
T(5,3) = -3 - 1*1 = -4.
(End)
Boas-Buck recurrence for column k = 2, n = 6: S(6, 2) = (3/4)*(0 - 2* S(4 ,2) + 0 + 2*S(2, 2)) = (3/4)*(-2*(-3) + 2) = 6. - _Wolfdieter Lang_, Aug 11 2017
From _Wolfdieter Lang_, Apr 12 2018: (Start)
Factorization into C polynomials (see the Apr 12 2018 comment):
S(4, x) = 1 - 3*x^2 + x^4 = (-1 + x + x^2)*(-1 - x + x^2) = (-C(5, -x)) * C(5, x); the number of factors is 2 = 2*A095374(2).
S(5, x) = 3*x - 4*x^3 + x^5 = x*(-1 + x)*(1 + x)*(-3 + x^2) = C(2, x)*C(3, x)*(-C(3, -x))*C(6, x); the number of factors is 4 = A302707(2). (End)
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, AMS Chelsea Publishing, Providence, Rhode Island, 2002, p. 164.
  • Max Koecher and Aloys Krieg, Elliptische Funktionen und Modulformen, 2. Auflage, Springer, 2007, p. 223.
  • Franz Lemmermeyer, Reciprocity Laws. From Euler to Eisenstein, Springer, 2000.
  • D. S. Mitrinovic, Analytic Inequalities, Springer-Verlag, 1970; p. 232, Sect. 3.3.38.
  • Theodore J. Rivlin, Chebyshev polynomials: from approximation theory to algebra and number theory, 2. ed., Wiley, New York, 1990, pp. 60 - 61.
  • R. Vein and P. Dale, Determinants and Their Applications in Mathematical Physics, Springer, 1999.

Crossrefs

Cf. A000005, A000217, A000292, A000332, A000389, A001227, A007318, A008611, A008615, A101455, A010892, A011973, A053112 (without zeros), A053117, A053119 (reflection), A053121 (inverse triangle), A055034, A097610, A099774, A099777, A100258, A112552 (first column clipped), A127672, A168561 (absolute values), A187360. A194960, A232624, A255237.
Triangles of coefficients of Chebyshev's S(n,x+k) for k = 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5: A207824, A207823, A125662, A078812, A101950, A049310, A104562, A053122, A207815, A159764, A123967.

Programs

  • Magma
    A049310:= func< n,k | ((n+k) mod 2) eq 0 select (-1)^(Floor((n+k)/2)+k)*Binomial(Floor((n+k)/2), k) else 0 >;
    [A049310(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Jul 25 2022
  • Maple
    A049310 := proc(n,k): binomial((n+k)/2,(n-k)/2)*cos(Pi*(n-k)/2)*(1+(-1)^(n-k))/2 end: seq(seq(A049310(n,k), k=0..n),n=0..11); # Johannes W. Meijer, Aug 08 2011
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> ifelse(irem(n, 2) = 0, 0, (-1)^iquo(n-1, 2))); # Peter Luschny, Oct 06 2022
  • Mathematica
    t[n_, k_] /; EvenQ[n+k] = ((-1)^((n+k)/2+k))*Binomial[(n+k)/2, k]; t[n_, k_] /; OddQ[n+k] = 0; Flatten[Table[t[n, k], {n, 0, 12}, {k, 0, n}]][[;; 86]] (* Jean-François Alcover, Jul 05 2011 *)
    Table[Coefficient[(-I)^n Fibonacci[n + 1, - I x], x, k], {n, 0, 10}, {k, 0, n}] //Flatten (* Clark Kimberling, Aug 02 2011; corrected by Eric W. Weisstein, Apr 06 2017 *)
    CoefficientList[ChebyshevU[Range[0, 10], -x/2], x] // Flatten (* Eric W. Weisstein, Apr 06 2017 *)
    CoefficientList[Table[(-I)^n Fibonacci[n + 1, -I x], {n, 0, 10}], x] // Flatten (* Eric W. Weisstein, Apr 06 2017 *)
  • PARI
    {T(n, k) = if( k<0 || k>n || (n + k)%2, 0, (-1)^((n + k)/2 + k) * binomial((n + k)/2, k))} /* Michael Somos, Jun 24 2002 */
    
  • SageMath
    @CachedFunction
    def A049310(n,k):
        if n< 0: return 0
        if n==0: return 1 if k == 0 else 0
        return A049310(n-1,k-1) - A049310(n-2,k)
    for n in (0..9): [A049310(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012
    

Formula

T(n,k) := 0 if n < k or n+k odd, otherwise ((-1)^((n+k)/2+k))*binomial((n+k)/2, k); T(n, k) = -T(n-2, k)+T(n-1, k-1), T(n, -1) := 0 =: T(-1, k), T(0, 0)=1, T(n, k)= 0 if n < k or n+k odd; g.f. k-th column: (1 / (1 + x^2)^(k + 1)) * x^k. - Michael Somos, Jun 24 2002
T(n,k) = binomial((n+k)/2, (n-k)/2)*cos(Pi*(n-k)/2)*(1+(-1)^(n-k))/2. - Paul Barry, Aug 28 2005
Sum_{k=0..n} T(n,k)^2 = A051286(n). - Philippe Deléham, Nov 21 2005
Recurrence for the (unsigned) Fibonacci polynomials: F(1)=1, F(2)=x; for n > 2, F(n) = x*F(n-1) + F(n-2).
From Wolfdieter Lang, Nov 04 2011: (Start)
The Riordan A- and Z-sequences, given in a comment above, lead together to the recurrence:
T(n,k) = 0 if n < k, if k=0 then T(0,0)=1 and
T(n,0)= -Sum_{i=0..floor((n-1)/2)} C(i)*T(n-1,2*i+1), otherwise T(n,k) = T(n-1,k-1) - Sum_{i=1..floor((n-k)/2)} C(i)*T(n-1,k-1+2*i), with the Catalan numbers C(n)=A000108(n).
(End)
The row polynomials satisfy also S(n,x) = 2*(T(n+2, x/2) - T(n, x/2))/(x^2-4) with the Chebyshev T-polynomials. Proof: Use the trace formula 2*T(n, x/2) = S(n, x) - S(n-2, x) (see the Dec 02 2010 comment above) and the S-recurrence several times. This is a formula which expresses the S- in terms of the T-polynomials. - Wolfdieter Lang, Aug 07 2014
From Tom Copeland, Dec 06 2015: (Start)
The non-vanishing, unsigned subdiagonals Diag_(2n) contain the elements D(n,k) = Sum_{j=0..k} D(n-1,j) = (k+1) (k+2) ... (k+n) / n! = binomial(n+k,n), so the o.g.f. for the subdiagonal is (1-x)^(-(n+1)). E.g., Diag_4 contains D(2,3) = D(1,0) + D(1,1) + D(1,2) + D(1,3) = 1 + 2 + 3 + 4 = 10 = binomial(5,2). Diag_4 is shifted A000217; Diag_6, shifted A000292: Diag_8, shifted A000332; and Diag_10, A000389.
The non-vanishing antidiagonals are signed rows of the Pascal triangle A007318.
For a reversed, unsigned version with the zeros removed, see A011973. (End)
The Boas-Buck recurrence (see a comment above) for the sequence of column k is: S(n, k) = ((k+1)/(n-k))*Sum_{p=0..n-1-k} (1 - (-1)^p)*(-1)^((p+1)/2) * S(n-1-p, k), for n > k >= 0 and input S(k, k) = 1. - Wolfdieter Lang, Aug 11 2017
The m-th row consecutive nonzero entries in order are (-1)^c*(c+b)!/c!b! with c = m/2, m/2-1, ..., 0 and b = m-2c if m is even and with c = (m-1)/2, (m-1)/2-1, ..., 0 with b = m-2c if m is odd. For the 8th row starting at a(36) the 5 consecutive nonzero entries in order are 1,-10,15,-7,1 given by c = 4,3,2,1,0 and b = 0,2,4,6,8. - Richard Turk, Aug 20 2017
O.g.f.: exp( Sum_{n >= 0} 2*T(n,x/2)*t^n/n ) = 1 + x*t + (-1 + x^2)*t^2 + (-2*x + x^3)*t^3 + (1 - 3*x^2 + x^4)*t^4 + ..., where T(n,x) denotes the n-th Chebyshev polynomial of the first kind. - Peter Bala, Aug 15 2022

A097805 Number of compositions of n with k parts, T(n, k) = binomial(n-1, k-1) for n, k >= 1 and T(n, 0) = 0^n, triangle read by rows for n >= 0 and 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Paul Barry, Aug 25 2004

Keywords

Comments

Previous name was: Riordan array (1, 1/(1-x)) read by rows.
Note this Riordan array would be denoted (1, x/(1-x)) by some authors.
Columns have g.f. (x/(1-x))^k. Reverse of A071919. Row sums are A011782. Antidiagonal sums are Fibonacci(n-1). Inverse as Riordan array is (1, 1/(1+x)). A097805=B*A059260*B^(-1), where B is the binomial matrix.
(0,1)-Pascal triangle. - Philippe Deléham, Nov 21 2006
(n+1) * each term of row n generates triangle A127952: (1; 0, 2; 0, 3, 3; 0, 4, 8, 4; ...). - Gary W. Adamson, Feb 09 2007
Triangle T(n,k), 0<=k<=n, read by rows, given by [0,1,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 12 2008
From Paul Weisenhorn, Feb 09 2011: (Start)
Triangle read by rows: T(r,c) is the number of unordered partitions of n=r*(r+1)/2+c into (r+1) parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2.
Triangle read by rows: T(r,c) is the number of unordered partitions of the number n=r*(r+1)/2+(c-1) into r parts < (r+1) and at most pairs of equal parts and parts in neighboring pairs have difference 2. (End)
Triangle read by rows: T(r,c) is the number of ordered partitions (compositions) of r into c parts. - Juergen Will, Jan 04 2016
From Tom Copeland, Oct 25 2012: (Start)
Given a basis composed of a sequence of polynomials p_n(x) characterized by ladder (creation / annihilation, or raising / lowering) operators defined by R p_n(x) = p_(n+1)(x) and L p_n(x) = n p_(n-1)(x) with p_0(x)=1, giving the number operator # p_n(x) = RL p_n(x) = n p_n(x), the lower triangular padded Pascal matrix Pd (A097805) serves as a matrix representation of the operator exp(R^2*L) = exp(R#) =
1) exp(x^2D) for the set x^n and
2) D^(-1) exp(t*x)D for the set x^n/n! (see A218234).
(End)
From James East, Apr 11 2014: (Start)
Square array a(m,n) with m,n=0,1,2,... read by off-diagonals.
a(m,n) gives the number of order-preserving functions f:{1,...,m}->{1,...,n}. Order-preserving means that x
a(n,n)=A088218(n) is the size of the semigroup O_n of all order-preserving transformations of {1,...,n}.
Read as a triangle, this sequence may be obtained by augmenting Pascal's triangle by appending the column 1,0,0,0,... on the left.
(End)
A formula based on the partitions of n with largest part k is given as a Sage program below. The 'conjugate' formula leads to A048004. - Peter Luschny, Jul 13 2015
From Wolfdieter Lang, Feb 17 2017: (Start)
The transposed of this lower triangular Riordan matrix of the associated type T provides the transition matrix between the monomial basis {x^n}, n >= 0, and the basis {y^n}, n >= 0, with y = x/(1-x): x^0 = 1 = y^0, x^n = Sum_{m >= n} Ttrans(n,m) y^m, for n >= 1, with Ttrans(n,m) = binomial(m-1,n-1).
Therefore, if a transformation with this Riordan matrix from a sequence {a} to the sequence {b} is given by b(n) = Sum_{m=0..n} T(n, m)*a(m), with T(n, m) = binomial(n-1, m-1), for n >= 1, then Sum_{n >= 0} a(n)*x^n = Sum_{n >= 0} b(n)*y^n, with y = x/(1-x) and vice versa. This is a modified binomial transformation; the usual one belongs to the Pascal Riordan matrix A007318. (End)
From Gus Wiseman, Jan 23 2022: (Start)
Also the number of compositions of n with alternating sum k, with k ranging from -n to n in steps of 2. For example, row n = 6 counts the following compositions (empty column indicated by dot):
. (15) (24) (33) (42) (51) (6)
(141) (132) (123) (114)
(1113) (231) (222) (213)
(1212) (1122) (321) (312)
(1311) (1221) (1131) (411)
(2112) (2121)
(2211) (3111)
(11121) (11112)
(12111) (11211)
(111111) (21111)
The reverse-alternating version is the same. Counting compositions by all three parameters (sum, length, alternating sum) gives A345197. Compositions of 2n with alternating sum 2k with k ranging from -n + 1 to n are A034871. (End)
Also the convolution triangle of A000012. - Peter Luschny, Oct 07 2022
From Sergey Kitaev, Nov 18 2023: (Start)
Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with k right-to-left maxima. A right-to-left maximum in a permutation a(1)a(2)...a(n) is position i such that a(j) < a(i) for all i < j.
Number of permutations of length n avoiding simultaneously the patterns 231 and 312 with k right-to-left minima (resp., left-to-right maxima). A right-to-left minimum (resp., left-to-right maximum) in a permutation a(1)a(2)...a(n) is position i such that a(j) > a(i) for all j > i (resp., a(j) < a(i) for all j < i).
Number of permutations of length n avoiding simultaneously the patterns 213 and 312 with k right-to-left maxima (resp., left-to-right maxima).
Number of permutations of length n avoiding simultaneously the patterns 213 and 231 with k right-to-left maxima (resp., right-to-left minima). (End)

Examples

			G.f. = 1 + x * (x + x^3 * (1 + x) + x^6 * (1 + x)^2 + x^10 * (1 + x)^3 + ...). - _Michael Somos_, Aug 20 2006
The triangle T(n, k) begins:
n\k  0 1 2  3  4   5   6  7  8 9 10 ...
0:   1
1:   0 1
2:   0 1 1
3:   0 1 2  1
4:   0 1 3  3  1
5:   0 1 4  6  4   1
6:   0 1 5 10 10   5   1
7:   0 1 6 15 20  15   6  1
8:   0 1 7 21 35  35  21  7  1
9:   0 1 8 28 56  70  56 28  8 1
10:  0 1 9 36 84 126 126 84 36 9  1
... reformatted _Wolfdieter Lang_, Jul 31 2017
From _Paul Weisenhorn_, Feb 09 2011: (Start)
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+c = 18 with (r+1)=6 summands: (5+5+4+2+1+1), (5+5+3+3+1+1), (5+4+4+3+1+1), (5+5+3+2+2+1), (5+4+4+2+2+1), (5+4+3+3+2+1).
T(r=5,c=3) = binomial(4,2) = 6 unordered partitions of the number n = r*(r+1)/2+(c-1) = 17 with r=5 summands: (5+5+4+2+1), (5+5+3+3+1), (5+5+3+2+2), (5+4+4+3+1), (5+4+4+2+2), (5+4+3+3+2).  (End)
From _James East_, Apr 11 2014: (Start)
a(0,0)=1 since there is a unique (order-preserving) function {}->{}.
a(m,0)=0 for m>0 since there is no function from a nonempty set to the empty set.
a(3,2)=4 because there are four order-preserving functions {1,2,3}->{1,2}: these are [1,1,1], [2,2,2], [1,1,2], [1,2,2]. Here f=[a,b,c] denotes the function defined by f(1)=a, f(2)=b, f(3)=c.
a(2,3)=6 because there are six order-preserving functions {1,2}->{1,2,3}: these are [1,1], [1,2], [1,3], [2,2], [2,3], [3,3].
(End)
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Part 1, Section 7.2.1.3, 2011.

Crossrefs

Case m=0 of the polynomials defined in A278073.
Cf. A000012 (diagonal), A011782 (row sums), A088218 (central terms).
The terms just left of center in odd-indexed rows are A001791, even A002054.
The odd-indexed rows are A034871.
Row sums without the center are A058622.
The unordered version is A072233, without zeros A008284.
Right half without center has row sums A027306(n-1).
Right half with center has row sums A116406(n).
Left half without center has row sums A294175(n-1).
Left half with center has row sums A058622(n-1).
A025047 counts alternating compositions.
A098124 counts balanced compositions, unordered A047993.
A106356 counts compositions by number of maximal anti-runs.
A344651 counts partitions by sum and alternating sum.
A345197 counts compositions by sum, length, and alternating sum.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
          expand(add(b(n-i*j, i-1, p+j)/j!*x^j, j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)):
    seq(T(n), n=0..20);  # Alois P. Heinz, May 25 2014
    # Alternatively:
    T := proc(k,n) option remember;
    if k=n then 1 elif k=0 then 0 else
    add(T(k-1,n-i), i=1..n-k+1) fi end:
    A097805 := (n,k) -> T(k,n):
    for n from 0 to 12 do seq(A097805(n,k), k=0..n) od; # Peter Luschny, Mar 12 2016
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> 1);  # Peter Luschny, Oct 07 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := Binomial[n-1, k-1]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Sep 03 2014, after Paul Weisenhorn *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[#]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Jan 23 2022 *)
  • PARI
    {a(n) = my(m); if( n<2, n==0, n--; m = (sqrtint(8*n + 1) - 1)\2; binomial(m-1, n - m*(m + 1)/2))}; /* Michael Somos, Aug 20 2006 */
    
  • PARI
    T(n,k) = if (k==0, 0^n, binomial(n-1, k-1)); \\ Michel Marcus, May 06 2022
    
  • PARI
    row(n) = vector(n+1, k, k--; if (k==0, 0^n, binomial(n-1, k-1))); \\ Michel Marcus, May 06 2022
    
  • Python
    from math import comb
    def T(n, k): return comb(n-1, k-1) if k != 0 else k**n  # Peter Luschny, May 06 2022
  • Sage
    # Illustrates a basic partition formula, is not efficient as a program for large n.
    def A097805_row(n):
        r = []
        for k in (0..n):
            s = 0
            for q in Partitions(n, max_part=k, inner=[k]):
                s += mul(binomial(q[j],q[j+1]) for j in range(len(q)-1))
            r.append(s)
        return r
    [A097805_row(n) for n in (0..9)] # Peter Luschny, Jul 13 2015
    

Formula

Number triangle T(n, k) defined by T(n,k) = Sum_{j=0..n} binomial(n, j)*if(k<=j, (-1)^(j-k), 0).
T(r,c) = binomial(r-1,c-1), 0 <= c <= r. - Paul Weisenhorn, Feb 09 2011
G.f.: (-1+x)/(-1+x+x*y). - R. J. Mathar, Aug 11 2015
a(0,0) = 1, a(n,k) = binomial(n-1,n-k) = binomial(n-1,k-1) Juergen Will, Jan 04 2016
G.f.: (x^1 + x^2 + x^3 + ...)^k = (x/(1-x))^k. - Juergen Will, Jan 04 2016
From Tom Copeland, Nov 15 2016: (Start)
E.g.f.: 1 + x*[e^((x+1)t)-1]/(x+1).
This padded Pascal matrix with the odd columns negated is NpdP = M*S = S^(-1)*M^(-1) = S^(-1)*M, where M(n,k) = (-1)^n A130595(n,k), the inverse Pascal matrix with the odd rows negated, S is the summation matrix A000012, the lower triangular matrix with all elements unity, and S^(-1) = A167374, a finite difference matrix. NpdP is self-inverse, i.e., (M*S)^2 = the identity matrix, and has the e.g.f. 1 - x*[e^((1-x)t)-1]/(1-x).
M = NpdP*S^(-1) follows from the well-known recursion property of the Pascal matrix, implying NpdP = M*S.
The self-inverse property of -NpdP is implied by the self-inverse relation of its embedded signed Pascal submatrix M (cf. A130595). Also see A118800 for another proof.
Let P^(-1) be A130595, the inverse Pascal matrix. Then T = A200139*P^(-1) and T^(-1) = padded P^(-1) = P*A097808*P^(-1). (End)
The center (n>0) is T(2n+1,n+1) = A000984(n) = 2*A001700(n-1) = 2*A088218(n) = A126869(2n) = 2*A138364(2n-1). - Gus Wiseman, Jan 25 2022

Extensions

Corrected by Philippe Deléham, Oct 05 2005
New name using classical terminology by Peter Luschny, Feb 05 2019

A038207 Triangle whose (i,j)-th entry is binomial(i,j)*2^(i-j).

Original entry on oeis.org

1, 2, 1, 4, 4, 1, 8, 12, 6, 1, 16, 32, 24, 8, 1, 32, 80, 80, 40, 10, 1, 64, 192, 240, 160, 60, 12, 1, 128, 448, 672, 560, 280, 84, 14, 1, 256, 1024, 1792, 1792, 1120, 448, 112, 16, 1, 512, 2304, 4608, 5376, 4032, 2016, 672, 144, 18, 1, 1024, 5120, 11520, 15360, 13440, 8064, 3360, 960, 180, 20, 1
Offset: 0

Keywords

Comments

This infinite matrix is the square of the Pascal matrix (A007318) whose rows are [ 1,0,... ], [ 1,1,0,... ], [ 1,2,1,0,... ], ...
As an upper right triangle, table rows give number of points, edges, faces, cubes,
4D hypercubes etc. in hypercubes of increasing dimension by column. - Henry Bottomley, Apr 14 2000. More precisely, the (i,j)-th entry is the number of j-dimensional subspaces of an i-dimensional hypercube (see the Coxeter reference). - Christof Weber, May 08 2009
Number of different partial sums of 1+[1,1,2]+[2,2,3]+[3,3,4]+[4,4,5]+... with entries that are zero removed. - Jon Perry, Jan 01 2004
Row sums are powers of 3 (A000244), antidiagonal sums are Pell numbers (A000129). - Gerald McGarvey, May 17 2005
Riordan array (1/(1-2x), x/(1-2x)). - Paul Barry, Jul 28 2005
T(n,k) is the number of elements of the Coxeter group B_n with descent set contained in {s_k}, 0<=k<=n-1. For T(n,n), we interpret this as the number of elements of B_n with empty descent set (since s_n does not exist). - Elizabeth Morris (epmorris(AT)math.washington.edu), Mar 01 2006
Let S be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xSy if x is a subset of y. Then T(n,k) = the number of elements (x,y) of S for which y has exactly k more elements than x. - Ross La Haye, Oct 12 2007
T(n,k) is number of paths in the first quadrant going from (0,0) to (n,k) using only steps B=(1,0) colored blue, R=(1,0) colored red and U=(1,1). Example: T(3,2)=6 because we have BUU, RUU, UBU, URU, UUB and UUR. - Emeric Deutsch, Nov 04 2007
T(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (0,1), and two kinds of step (1,0). - Joerg Arndt, Jul 01 2011
T(i,j) is the number of i-permutations of {1,2,3} containing j 1's. Example: T(2,1)=4 because we have 12, 13, 21 and 31; T(3,2)=6 because we have 112, 113, 121, 131, 211 and 311. - Zerinvary Lajos, Dec 21 2007
Triangle of coefficients in expansion of (2+x)^n. - N-E. Fahssi, Apr 13 2008
Sum of diagonals are Jacobsthal-numbers: A001045. - Mark Dols, Aug 31 2009
Triangle T(n,k), read by rows, given by [2,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 15 2009
Eigensequence of the triangle = A004211: (1, 3, 11, 49, 257, 1539, ...). - Gary W. Adamson, Feb 07 2010
f-vectors ("face"-vectors) for n-dimensional cubes [see e.g., Hoare]. (This is a restatement of Bottomley's above.) - Tom Copeland, Oct 19 2012
With P = Pascal matrix, the sequence of matrices I, A007318, A038207, A027465, A038231, A038243, A038255, A027466 ... = P^0, P^1, P^2, ... are related by Copeland's formula below to the evolution at integral time steps n= 0, 1, 2, ... of an exponential distribution exp(-x*z) governed by the Fokker-Planck equation as given in the Dattoli et al. ref. below. - Tom Copeland, Oct 26 2012
The matrix elements of the inverse are T^(-1)(n,k) = (-1)^(n+k)*T(n,k). - R. J. Mathar, Mar 12 2013
Unsigned diagonals of A133156 are rows of this array. - Tom Copeland, Oct 11 2014
Omitting the first row, this is the production matrix for A039683, where an equivalent differential operator can be found. - Tom Copeland, Oct 11 2016
T(n,k) is the number of functions f:[n]->[3] with exactly k elements mapped to 3. Note that there are C(n,k) ways to choose the k elements mapped to 3, and there are 2^(n-k) ways to map the other (n-k) elements to {1,2}. Hence, by summing T(n,k) as k runs from 0 to n, we obtain 3^n = Sum_{k=0..n} T(n,k). - Dennis P. Walsh, Sep 26 2017
Since this array is the square of the Pascal lower triangular matrix, the row polynomials of this array are obtained as the umbral composition of the row polynomials P_n(x) of the Pascal matrix with themselves. E.g., P_3(P.(x)) = 1 P_3(x) + 3 P_2(x) + 3 P_1(x) + 1 = (x^3 + 3 x^2 + 3 x + 1) + 3 (x^2 + 2 x + 1) + 3 (x + 1) + 1 = x^3 + 6 x^2 + 12 x + 8. - Tom Copeland, Nov 12 2018
T(n,k) is the number of 2-compositions of n+1 with some zeros allowed that have k zeros; see the Hopkins & Ouvry reference. - Brian Hopkins, Aug 16 2020
Also the convolution triangle of A000079. - Peter Luschny, Oct 09 2022

Examples

			Triangle begins with T(0,0):
   1;
   2,  1;
   4,  4,  1;
   8, 12,  6,  1;
  16, 32, 24,  8,  1;
  32, 80, 80, 40, 10,  1;
  ... -  corrected by _Clark Kimberling_, Aug 05 2011
Seen as an array read by descending antidiagonals:
[0] 1, 2,  4,   8,    16,    32,    64,     128,     256, ...     [A000079]
[1] 1, 4,  12,  32,   80,    192,   448,    1024,    2304, ...    [A001787]
[2] 1, 6,  24,  80,   240,   672,   1792,   4608,    11520, ...   [A001788]
[3] 1, 8,  40,  160,  560,   1792,  5376,   15360,   42240, ...   [A001789]
[4] 1, 10, 60,  280,  1120,  4032,  13440,  42240,   126720, ...  [A003472]
[5] 1, 12, 84,  448,  2016,  8064,  29568,  101376,  329472, ...  [A054849]
[6] 1, 14, 112, 672,  3360,  14784, 59136,  219648,  768768, ...  [A002409]
[7] 1, 16, 144, 960,  5280,  25344, 109824, 439296,  1647360, ... [A054851]
[8] 1, 18, 180, 1320, 7920,  41184, 192192, 823680,  3294720, ... [A140325]
[9] 1, 20, 220, 1760, 11440, 64064, 320320, 1464320, 6223360, ... [A140354]
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 155.
  • H. S. M. Coxeter, Regular Polytopes, Dover Publications, New York (1973), p. 122.

Programs

  • GAP
    Flat(List([0..15], n->List([0..n], k->Binomial(n, k)*2^(n-k)))); # Stefano Spezia, Nov 21 2018
  • Haskell
    a038207 n = a038207_list !! n
    a038207_list = concat $ iterate ([2,1] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Haskell
    a038207' n k = a038207_tabl !! n !! k
    a038207_row n = a038207_tabl !! n
    a038207_tabl = iterate f [1] where
       f row = zipWith (+) ([0] ++ row) (map (* 2) row ++ [0])
    -- Reinhard Zumkeller, Feb 27 2013
    
  • Magma
    /* As triangle */ [[(&+[Binomial(n,i)*Binomial(i,k): i in [k..n]]): k in [0..n]]: n in [0..15]]; // Vincenzo Librandi, Nov 16 2018
    
  • Maple
    for i from 0 to 12 do seq(binomial(i, j)*2^(i-j), j = 0 .. i) end do; # yields sequence in triangular form - Emeric Deutsch, Nov 04 2007
    # Uses function PMatrix from A357368. Adds column 1, 0, 0, ... to the left.
    PMatrix(10, n -> 2^(n-1)); # Peter Luschny, Oct 09 2022
  • Mathematica
    Table[CoefficientList[Expand[(y + x + x^2)^n], y] /. x -> 1, {n, 0,10}] // TableForm (* Geoffrey Critzer, Nov 20 2011 *)
    Table[Binomial[n,k]2^(n-k),{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, May 22 2020 *)
  • PARI
    {T(n, k) = polcoeff((x+2)^n, k)}; /* Michael Somos, Apr 27 2000 */
    
  • Sage
    def A038207_triangle(dim):
        M = matrix(ZZ,dim,dim)
        for n in range(dim): M[n,n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n,k] = M[n-1,k-1]+2*M[n-1,k]
        return M
    A038207_triangle(9)  # Peter Luschny, Sep 20 2012
    

Formula

T(n, k) = Sum_{i=0..n} binomial(n,i)*binomial(i,k).
T(n, k) = (-1)^k*A065109(n,k).
G.f.: 1/(1-2*z-t*z). - Emeric Deutsch, Nov 04 2007
Rows of the triangle are generated by taking successive iterates of (A135387)^n * [1, 0, 0, 0, ...]. - Gary W. Adamson, Dec 09 2007
From the formalism of A133314, the e.g.f. for the row polynomials of A038207 is exp(x*t)*exp(2x). The e.g.f. for the row polynomials of the inverse matrix is exp(x*t)*exp(-2x). p iterates of the matrix give the matrix with e.g.f. exp(x*t)*exp(p*2x). The results generalize for 2 replaced by any number. - Tom Copeland, Aug 18 2008
Sum_{k=0..n} T(n,k)*x^k = (2+x)^n. - Philippe Deléham, Dec 15 2009
n-th row is obtained by taking pairwise sums of triangle A112857 terms starting from the right. - Gary W. Adamson, Feb 06 2012
T(n,n) = 1 and T(n,k) = T(n-1,k-1) + 2*T(n-1,k) for kJon Perry, Oct 11 2012
The e.g.f. for the n-th row is given by umbral composition of the normalized Laguerre polynomials A021009 as p(n,x) = L(n, -L(.,-x))/n! = 2^n L(n, -x/2)/n!. E.g., L(2,x) = 2 -4*x +x^2, so p(2,x)= (1/2)*L(2, -L(.,-x)) = (1/2)*(2*L(0,-x) + 4*L(1,-x) + L(2,-x)) = (1/2)*(2 + 4*(1+x) + (2+4*x+x^2)) = 4 + 4*x + x^2/2. - Tom Copeland, Oct 20 2012
From Tom Copeland, Oct 26 2012: (Start)
From the formalism of A132440 and A218272:
Let P and P^T be the Pascal matrix and its transpose and H= P^2= A038207.
Then with D the derivative operator,
exp(x*z/(1-2*z))/(1-2*z)= exp(2*z D_z z) e^(x*z)= exp(2*D_x (x D_x)) e^(z*x)
= (1 z z^2 z^3 ...) H (1 x x^2/2! x^3/3! ...)^T
= (1 x x^2/2! x^3/3! ...) H^T (1 z z^2 z^3 ...)^T
= Sum_{n>=0} z^n * 2^n Lag_n(-x/2)= exp[z*EF(.,x)], an o.g.f. for the f-vectors (rows) of A038207 where EF(n,x) is an e.g.f. for the n-th f-vector. (Lag_n(x) are the un-normalized Laguerre polynomials.)
Conversely,
exp(z*(2+x))= exp(2D_x) exp(x*z)= exp(2x) exp(x*z)
= (1 x x^2 x^3 ...) H^T (1 z z^2/2! z^3/3! ...)^T
= (1 z z^2/2! z^3/3! ...) H (1 x x^2 x^3 ...)^T
= exp(z*OF(.,x)), an e.g.f for the f-vectors of A038207 where
OF(n,x)= (2+x)^n is an o.g.f. for the n-th f-vector.
(End)
G.f.: R(0)/2, where R(k) = 1 + 1/(1 - (2*k+1+ (1+y))*x/((2*k+2+ (1+y))*x + 1/R(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Nov 09 2013
A038207 = exp[M*B(.,2)] where M = A238385-I and (B(.,x))^n = B(n,x) are the Bell polynomials (cf. A008277). B(n,2) = A001861(n). - Tom Copeland, Apr 17 2014
T = (A007318)^2 = A112857*|A167374| = |A118801|*|A167374| = |A118801*A167374| = |P*A167374*P^(-1)*A167374| = |P*NpdP*A167374|. Cf. A118801. - Tom Copeland, Nov 17 2016
E.g.f. for the n-th subdiagonal, n = 0,1,2,..., equals exp(x)*P(n,x), where P(n,x) is the polynomial 2^n*Sum_{k = 0..n} binomial(n,k)*x^k/k!. For example, the e.g.f. for the third subdiagonal is exp(x)*(8 + 24*x + 12*x^2 + 4*x^3/3) = 8 + 32*x + 80*x^2/2! + 160*x^3/3! + .... - Peter Bala, Mar 05 2017
T(3*k+2,k) = T(3*k+2,k+1), T(2*k+1,k) = 2*T(2*k+1,k+1). - Yuchun Ji, May 26 2020
From Robert A. Russell, Aug 05 2020: (Start)
G.f. for column k: x^k / (1-2*x)^(k+1).
E.g.f. for column k: exp(2*x) * x^k / k!. (End)
Also the array A(n, k) read by descending antidiagonals, where A(n, k) = (-1)^n*Sum_{j= 0..n+k} binomial(n + k, j)*hypergeom([-n, j+1], [1], 1). - Peter Luschny, Nov 09 2021

A033184 Catalan triangle A009766 transposed.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 5, 5, 3, 1, 14, 14, 9, 4, 1, 42, 42, 28, 14, 5, 1, 132, 132, 90, 48, 20, 6, 1, 429, 429, 297, 165, 75, 27, 7, 1, 1430, 1430, 1001, 572, 275, 110, 35, 8, 1, 4862, 4862, 3432, 2002, 1001, 429, 154, 44, 9, 1
Offset: 1

Keywords

Comments

Triangle read by rows: T(n,k) = number of Dyck n-paths (A000108) containing k returns to ground level. E.g., the paths UDUUDD, UUDDUD each have 2 returns; so T(3,2)=2. Row sums over even-indexed columns are the Fine numbers A000957. - David Callan, Jul 25 2005
Triangular array of numbers a(n,k) = number of linear forests of k planted planar trees and n non-root nodes.
Catalan convolution triangle; with offset [0,0]: a(n,m)=(m+1)*binomial(2*n-m,n-m)/(n+1), n >= m >= 0, else 0. G.f. for column m: c(x)*(x*c(x))^m with c(x) g.f. for A000108 (Catalan). - Wolfdieter Lang, Sep 12 2001
a(n+1,m+1), n >= m >= 0, a(n,m) := 0, nA030528(n,m)*(-1)^(n-m).
a(n,k)=number of Dyck paths of semilength n and having k returns to the axis. Also number of Dyck paths of semilength n and having first peak at height k. Also number of ordered trees with n edges and root degree k. Also number of ordered trees with n edges and having the leftmost leaf at level k. Also number of parallelogram polyominoes of semiperimeter n+1 and having k cells in the leftmost column. - Emeric Deutsch, Mar 01 2004
Triangle T(n,k) with 1<=k<=n given by [0, 1, 1, 1, 1, 1, 1, 1, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] = 1; 0, 1; 0, 1, 1; 0, 2, 2, 1; 0, 5, 5, 3, 1; 0, 14, 14, 9, 4, 1; ... where DELTA is the operator defined in A084938; essentially the same triangle as A059365. - Philippe Deléham, Jun 14 2004
Number of Dyck paths of semilength and having k-1 peaks at height 2. - Emeric Deutsch, Aug 31 2004
Riordan array (c(x),x*c(x)), c(x) the g.f. of A000108. Inverse of Riordan array (1-x,x*(1-x)). - Paul Barry, Jun 22 2005
Subtriangle of triangle A106566. - Philippe Deléham, Jan 07 2007
T(n, k) is also the number of order-preserving and order-decreasing full transformations (of an n-chain) with exactly k fixed points. - Abdullahi Umar, Oct 02 2008
Triangle read by rows, product of A065600 and A007318 considered as infinite lower triangular arrays; A033184 = A065600*A007318. - Philippe Deléham, Dec 07 2009
The formula stating "Column k is the k-fold convolution of column 1" is equivalent to repeatedly applying M to [1,0,0,0,...], where M is an upper triangular matrix of all 1's with an additional single subdiagonal of 1's. - Gary W. Adamson, Jun 06 2011
4^(n-1) = (n-th row terms) dot (first n terms in A001792), where A001792 = binomial transform of the natural numbers: (1, 3, 8, 20, 48, 112, ...). Example: 4^4 = 256 = (14, 14, 9, 4, 1) dot (1, 3, 8, 20, 48) = (42 + 42 + 28 + 14 + 5 + 1) = 256. - Gary W. Adamson, Jun 17 2011
The e.g.f. for the n-th subdiagonal of the triangle has the form exp(x)*P(n,x), where P(n,x) is the e.g.f. for row n of triangle A039599. For example, the third row of A039599 is [5, 9, 5, 1] and so the third subdiagonal sequence of this triangle [5, 14, 28, 48, 75, ...] has the e.g.f. exp(x)*(5 + 9*x + 5*x^2/2! + x^3/3!). - Peter Bala, Oct 15 2019
Antidiagonals of convolution matrix of Table 1.3, p. 397, of Hoggatt and Bicknell. - Tom Copeland, Dec 25 2019
Also the convolution triangle of A120588(n) = A000108(n-1) for n > 0. - Peter Luschny, Oct 07 2022

Examples

			Triangle begins:
  ---+-----------------------------------
  n\k|   1    2    3    4    5    6    7
  ---+-----------------------------------
   1 |   1
   2 |   1    1
   3 |   2    2    1
   4 |   5    5    3    1
   5 |  14   14    9    4    1
   6 |  42   42   28   14    5    1
   7 | 132  132   90   48   20    6    1
From _Peter Bala_, Feb 17 2025: (Start)
The array factorizes as an infinite product (read from right to left) of triangular arrays:
  / 1               \        / 1              \ / 1              \ / 1             \
  | 1    1           |       | 0   1          | | 0  1           | | 1  1          |
  | 2    2   1       | = ... | 0   0   1      | | 0  1   1       | | 1  1  1       |
  | 5    5   3   1   |       | 0   0   1  1   | | 0  1   1  1    | | 1  1  1  1    |
  |14   14   9   4  1|       | 0   0   1  1  1| | 0  1   1  1  1 | | 1  1  1  1  1 |
  |...               |       |...             | |...             | |...            |
See Bala, Example 2.1. (End)
		

Crossrefs

Rows of Catalan triangle A009766 read backwards.
a(n, 1) = A000108(n-1). Row sums = A000108(n) (Catalan).
The following are all versions of (essentially) the same Catalan triangle: A009766, A030237, A033184, A059365, A099039, A106566, A130020, A047072.
Cf. A116364 (row squared sums), A120588.

Programs

  • Haskell
    a033184 n k = a033184_tabl !! (n-1) !! (k-1)
    a033184_row n = a033184_tabl !! (n-1)
    a033184_tabl = map reverse a009766_tabl
    -- Reinhard Zumkeller, Feb 19 2014
    
  • Magma
    /* As triangle: */ [[Binomial(2*n-k,n)*k/(2*n-k): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Oct 12 2015
  • Maple
    a := proc(n,k) if k<=n then k*binomial(2*n-k,n)/(2*n-k) else 0 fi end: seq(seq(a(n,k),k=1..n),n=1..10);
    # Uses function PMatrix from A357368. Adds row and column for n, k = 0.
    PMatrix(10, n -> binomial(2*(n-1), n-1) / n); # Peter Luschny, Oct 07 2022
  • Mathematica
    nn = 10; c = (1 - (1 - 4 x)^(1/2))/(2 x); f[list_] := Select[list, # > 0 &]; Map[f, Drop[CoefficientList[Series[y x c/(1 - y x c), {x, 0, nn}], {x, y}],1]] //Flatten (* Geoffrey Critzer, Jan 31 2012 *)
    Flatten[Reverse /@ NestList[Append[Accumulate[#], Last[Accumulate[#]]] &, {1}, 9]] (* Birkas Gyorgy, May 19 2012 *)
    T[1, 1] := 1; T[n_, k_]/;1<=k<=n := T[n, k] = T[n-1, k-1]+T[n, k+1]; T[n_, k_] := 0; Flatten@Table[T[n, k], {n, 1, 10}, {k, 1, n}] (* Oliver Seipel, Dec 31 2024 *)
  • PARI
    T(n,k)=binomial(2*(n-k)+k,n-k)*(k+1)/(n+1) \\ Paul D. Hanna, Aug 11 2008
    
  • Sage
    # The simplest way to construct the triangle.
    def A033184_triangle(n) :
        T = [0 for i in (0..n)]
        for k in (1..n) :
            T[k] = 1
            for i in range(k-1,0,-1) :
                T[i] = T[i-1] + T[i+1]
            print([T[i] for i in (1..k)])
    A033184_triangle(10) # Peter Luschny, Jan 27 2012
    

Formula

Column k is the k-fold convolution of column 1. The triangle is also defined recursively by (i) entries outside triangle are 0, (ii) top left entry is 1, (iii) every other entry is sum of its east and northwest neighbor. - David Callan, Jul 25 2005
G.f.: t*x*c/(1-t*x*c), where c=(1-sqrt(1-4*x))/(2*x) is the g.f. of the Catalan numbers (A000108). - Emeric Deutsch, Mar 01 2004
T(n+1,k+1) = C(2*n-k, n-k)*(k+1)/(n+1). - Paul D. Hanna, Aug 11 2008
T((m+1)*n+r-1,m*n+r-1)*r/(m*n+r) = Sum_{k=1..n} (k/n)*T((m+1)*n-k-1,m*n-1)*T(r+k,r), n >= m > 1. - Vladimir Kruchinin, Mar 17 2011
T(n-1,m-1) = (m/n)*Sum_{k=1..n-m+1} (k*A000108(k-1)*T(n-k-1,m-2)), n >= m > 1. - Vladimir Kruchinin, Mar 17 2011
T(n,k) = C(2*n-k-1,n-k) - C(2*n-k-1,n-k-1). - Dennis P. Walsh, Mar 19 2012
T(n,k) = C(2*n-k,n)*k/(2*n-k). - Dennis P. Walsh, Mar 19 2012
T(n,k) = T(n,k-1) - T(n-1,k-2). - Dennis P. Walsh, Mar 19 2012
G.f.: 2*x*y / (1 + sqrt(1 - 4*x) - 2*x*y) = Sum_{n >= k > 0} T(n, k) * x^n * y^k. - Michael Somos, Jun 06 2016

A039598 Triangle formed from odd-numbered columns of triangle of expansions of powers of x in terms of Chebyshev polynomials U_n(x). Sometimes called Catalan's triangle.

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 14, 14, 6, 1, 42, 48, 27, 8, 1, 132, 165, 110, 44, 10, 1, 429, 572, 429, 208, 65, 12, 1, 1430, 2002, 1638, 910, 350, 90, 14, 1, 4862, 7072, 6188, 3808, 1700, 544, 119, 16, 1, 16796, 25194, 23256, 15504, 7752, 2907, 798, 152, 18, 1
Offset: 0

Keywords

Comments

T(n,k) is the number of leaves at level k+1 in all ordered trees with n+1 edges. - Emeric Deutsch, Jan 15 2005
Riordan array ((1-2x-sqrt(1-4x))/(2x^2),(1-2x-sqrt(1-4x))/(2x)). Inverse array is A053122. - Paul Barry, Mar 17 2005
T(n,k) is the number of walks of n steps, each in direction N, S, W, or E, starting at the origin, remaining in the upper half-plane and ending at height k (see the R. K. Guy reference, p. 5). Example: T(3,2)=6 because we have ENN, WNN, NEN, NWN, NNE and NNW. - Emeric Deutsch, Apr 15 2005
Triangle T(n,k), 0<=k<=n, read by rows given by T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0) = 2*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + 2*T(n-1,k) + T(n-1,k+1) for k>=1. - Philippe Deléham, Mar 30 2007
Number of (2n+1)-step walks from (0,0) to (2n+1,2k+1) and consisting of steps u=(1,1) and d=(1,-1) in which the path stays in the nonnegative quadrant. Examples: T(2,0)=5 because we have uuudd, uudud, uuddu, uduud, ududu; T(2,1)=4 because we have uuuud, uuudu, uuduu, uduuu; T(2,2)=1 because we have uuuuu. - Philippe Deléham, Apr 16 2007, Apr 18 2007
Triangle read by rows: T(n,k)=number of lattice paths from (0,0) to (n,k) that do not go below the line y=0 and consist of steps U=(1,1), D=(1,-1) and two types of steps H=(1,0); example: T(3,1)=14 because we have UDU, UUD, 4 HHU paths, 4 HUH paths and 4 UHH paths. - Philippe Deléham, Sep 25 2007
This triangle belongs to the family of triangles defined by T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0) = x*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + y*T(n-1,k) + T(n-1,k+1) for k>=1. Other triangles arise by choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0) -> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - Philippe Deléham, Sep 25 2007
With offset [1,1] this is the (ordinary) convolution triangle a(n,m) with o.g.f. of column m given by (c(x)-1)^m, where c(x) is the o.g.f. for Catalan numbers A000108. See the Riordan comment by Paul Barry.
T(n, k) is also the number of order-preserving full transformations (of an n-chain) with exactly k fixed points. - Abdullahi Umar, Oct 02 2008
T(n,k)/2^(2n+1) = coefficients of the maximally flat lowpass digital differentiator of the order N=2n+3. - Pavel Holoborodko (pavel(AT)holoborodko.com), Dec 19 2008
The signed triangle S(n,k) := (-1)^(n-k)*T(n,k) provides the transformation matrix between f(n,l) := L(2*l)*5^n*F(2*l)^(2*n+1) (F=Fibonacci numbers A000045, L=Lucas numbers A000032) and F(4*l*(k+1)), k = 0, ..., n, for each l>=0: f(n,l) = Sum_{k=0..n} S(n,k)*F(4*l*(k+1)), n>=0, l>=0. Proof: the o.g.f. of the l.h.s., G(l;x) := Sum_{n>=0} f(n,l)*x^n = F(4*l)/(1 - 5*F(2*l)^2*x) is shown to match the o.g.f. of the r.h.s.: after an interchange of the n- and k-summation, the Riordan property of S = (C(x)/x,C(x)) (compare with the above comments by Paul Barry), with C(x) := 1 - c(-x), with the o.g.f. c(x) of A000108 (Catalan numbers), is used, to obtain, after an index shift, first Sum_{k>=0} F(4*l*(k))*GS(k;x), with the o.g.f of column k of triangle S which is GS(k;x) := Sum_{n>=k} S(n,k)*x^n = C(x)^(k+1)/x. The result is GF(l;C(x))/x with the o.g.f. GF(l,x) := Sum_{k>=0} F(4*l*k)*x^k = x*F(4*l)/(1-L(4*l)*x+x^2) (see a comment on A049670, and A028412). If one uses then the identity L(4*n) - 5*F(2*n)^2 = 2 (in Koshy's book [reference under A065563] this is No. 15, p. 88, attributed to Lucas, 1876), the proof that one recovers the o.g.f. of the l.h.s. from above boils down to a trivial identity on the Catalan o.g.f., namely 1/c^2(-x) = 1 + 2*x - (x*c(-x))^2. - Wolfdieter Lang, Aug 27 2012
O.g.f. for row polynomials R(x) := Sum_{k=0..n} a(n,k)*x^k:
((1+x) - C(z))/(x - (1+x)^2*z) with C the o.g.f. of A000108 (Catalan numbers). From Riordan ((C(x)-1)/x,C(x)-1), compare with a Paul Barry comment above. This coincides with the o.g.f. given by Emeric Deutsch in the formula section. - Wolfdieter Lang, Nov 13 2012
The A-sequence for this Riordan triangle is [1,2,1] and the Z-sequence is [2,1]. See a W. Lang link under A006232 with details and references. - Wolfdieter Lang, Nov 13 2012
From Wolfdieter Lang, Sep 20 2013: (Start)
T(n, k) = A053121(2*n+1, 2*k+1). T(n, k) appears in the formula for the (2*n+1)-th power of the algebraic number rho(N) := 2*cos(Pi/N) = R(N, 2) in terms of the even-indexed diagonal/side length ratios R(N, 2*(k+1)) = S(2*k+1, rho(N)) in the regular N-gon inscribed in the unit circle (length unit 1). S(n, x) are Chebyshev's S polynomials (see A049310): rho(N)^(2*n+1) = Sum_{k=0..n} T(n, k)*R(N, 2*(k+1)), n >= 0, identical in N >= 1. For a proof see the Sep 21 2013 comment under A053121. Note that this is the unreduced version if R(N, j) with j > delta(N), the degree of the algebraic number rho(N) (see A055034), appears. For the even powers of rho(n) see A039599. (End)
The tridiagonal Toeplitz production matrix P in the Example section corresponds to the unsigned Cartan matrix for the simple Lie algebra A_n as n tends to infinity (cf. Damianou ref. in A053122). - Tom Copeland, Dec 11 2015 (revised Dec 28 2015)
T(n,k) is the number of pairs of non-intersecting walks of n steps, each in direction N or E, starting at the origin, and such that the end points of the two paths are separated by a horizontal distance of k. See Shapiro 1976. - Peter Bala, Apr 12 2017
Also the convolution triangle of the Catalan numbers A000108. - Peter Luschny, Oct 07 2022

Examples

			Triangle T(n,k) starts:
n\k     0      1      2      3      4     5    6    7   8  9 10
0:      1
1:      2      1
2:      5      4      1
3:     14     14      6      1
4:     42     48     27      8      1
5:    132    165    110     44     10     1
6:    429    572    429    208     65    12    1
7:   1430   2002   1638    910    350    90   14    1
8:   4862   7072   6188   3808   1700   544  119   16   1
9:  16796  25194  23256  15504   7752  2907  798  152  18  1
10: 58786  90440  87210  62016  33915 14364 4655 1120 189 20  1
... Reformatted and extended by _Wolfdieter Lang_, Nov 13 2012.
Production matrix begins:
2, 1
1, 2, 1
0, 1, 2, 1
0, 0, 1, 2, 1
0, 0, 0, 1, 2, 1
0, 0, 0, 0, 1, 2, 1
0, 0, 0, 0, 0, 1, 2, 1
0, 0, 0, 0, 0, 0, 1, 2, 1
- _Philippe Deléham_, Nov 07 2011
From _Wolfdieter Lang_, Nov 13 2012: (Start)
Recurrence: T(5,1) = 165 = 1*42 + 2*48 +1*27. The Riordan A-sequence is [1,2,1].
Recurrence from Riordan Z-sequence [2,1]: T(5,0) = 132 = 2*42 + 1*48. (End)
From _Wolfdieter Lang_, Sep 20 2013: (Start)
  Example for rho(N) = 2*cos(Pi/N) powers:
  n=2: rho(N)^5 = 5*R(N, 2) + 4*R(N, 4) + 1*R(N, 6) = 5*S(1, rho(N)) + 4*S(3, rho(N)) + 1*S(5, rho(N)), identical in N >= 1. For N=5 (the pentagon with only one distinct diagonal) the degree delta(5) = 2, hence R(5, 4) and R(5, 6) can be reduced, namely to R(5, 1) = 1 and R(5, 6) = -R(5,1) = -1, respectively. Thus rho(5)^5 = 5*R(N, 2) + 4*1  + 1*(-1) = 3 + 5*R(N, 2) = 3 + 5*rho(5), with the golden section rho(5). (End)
		

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.
  • B. A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.

Crossrefs

Mirror image of A050166. Row sums are A001700.

Programs

  • Magma
    /* As triangle: */ [[Binomial(2*n,n-k) - Binomial(2*n,n-k-2): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jul 22 2015
    
  • Maple
    T:=(n,k)->binomial(2*n, n-k) - binomial(2*n, n-k-2); # N. J. A. Sloane, Aug 26 2013
    # Uses function PMatrix from A357368. Adds row and column above and to the left.
    PMatrix(10, n -> binomial(2*n, n) / (n + 1)); # Peter Luschny, Oct 07 2022
  • Mathematica
    Flatten[Table[Binomial[2n, n-k] - Binomial[2n, n-k-2], {n,0,9}, {k,0,n}]] (* Jean-François Alcover, May 03 2011 *)
  • PARI
    T(n,k)=binomial(2*n,n-k) - binomial(2*n,n-k-2) \\ Charles R Greathouse IV, Nov 07 2016
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of the triangle.
    def A039598_triangle(n) :
        D = [0]*(n+2); D[1] = 1
        b = True; h = 1
        for i in range(2*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
            if b : print([D[z] for z in (1..h-1) ])
    A039598_triangle(10)  # Peter Luschny, May 01 2012
    

Formula

Row n: C(2n, n-k) - C(2n, n-k-2).
a(n, k) = C(2n+1, n-k)*2*(k+1)/(n+k+2) = A050166(n, n-k) = a(n-1, k-1) + 2*a(n-1, k)+ a (n-1, k+1) [with a(0, 0) = 1 and a(n, k) = 0 if n<0 or nHenry Bottomley, Sep 24 2001
From Philippe Deléham, Feb 14 2004: (Start)
T(n, 0) = A000108(n+1), T(n, k) = 0 if n0, T(n, k) = Sum_{j=1..n} T(n-j, k-1)*A000108(j).
G.f. for column k: Sum_{n>=0} T(n, k)*x^n = x^k*C(x)^(2*k+2) where C(x) = Sum_{n>=0} A000108(n)*x^n is g.f. for Catalan numbers, A000108.
Sum_{k>=0} T(m, k)*T(n, k) = A000108(m+n+1). (End)
T(n, k) = A009766(n+k+1, n-k) = A033184(n+k+2, 2k+2). - Philippe Deléham, Feb 14 2004
Sum_{j>=0} T(k, j)*A039599(n-k, j) = A028364(n, k). - Philippe Deléham, Mar 04 2004
Antidiagonal Sum_{k=0..n} T(n-k, k) = A000957(n+3). - Gerald McGarvey, Jun 05 2005
The triangle may also be generated from M^n * [1,0,0,0,...], where M = an infinite tridiagonal matrix with 1's in the super- and subdiagonals and [2,2,2,...] in the main diagonal. - Gary W. Adamson, Dec 17 2006
G.f.: G(t,x) = C^2/(1-txC^2), where C = (1-sqrt(1-4x))/(2x) is the Catalan function. From here G(-1,x)=C, i.e., the alternating row sums are the Catalan numbers (A000108). - Emeric Deutsch, Jan 20 2007
Sum_{k=0..n} T(n,k)*x^k = A000957(n+1), A000108(n), A000108(n+1), A001700(n), A049027(n+1), A076025(n+1), A076026(n+1) for x=-2,-1,0,1,2,3,4 respectively (see square array in A067345). - Philippe Deléham, Mar 21 2007, Nov 04 2011
Sum_{k=0..n} T(n,k)*(k+1) = 4^n. - Philippe Deléham, Mar 30 2007
Sum_{j>=0} T(n,j)*binomial(j,k) = A035324(n,k), A035324 with offset 0 (0 <= k <= n). - Philippe Deléham, Mar 30 2007
T(n,k) = A053121(2*n+1,2*k+1). - Philippe Deléham, Apr 16 2007, Apr 18 2007
T(n,k) = A039599(n,k) + A039599(n,k+1). - Philippe Deléham, Sep 11 2007
Sum_{k=0..n+1} T(n+1,k)*k^2 = A029760(n). - Philippe Deléham, Dec 16 2007
Sum_{k=0..n} T(n,k)*A059841(k) = A000984(n). - Philippe Deléham, Nov 12 2008
G.f.: 1/(1-xy-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-2x-x^2/(1-.... (continued fraction).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A001700(n), A194723(n+1), A194724(n+1), A194725(n+1), A194726(n+1), A194727(n+1), A194728(n+1), A194729(n+1), A194730(n+1) for x = 0,1,2,3,4,5,6,7,8,9 respectively. - Philippe Deléham, Nov 03 2011
From Peter Bala, Dec 21 2014: (Start)
This triangle factorizes in the Riordan group as ( C(x), x*C(x) ) * ( 1/(1 - x), x/(1 - x) ) = A033184 * A007318, where C(x) = (1 - sqrt(1 - 4*x))/(2*x) is the o.g.f. for the Catalan numbers A000108.
Let U denote the lower unit triangular array with 1's on or below the main diagonal and zeros elsewhere. For k = 0,1,2,... define U(k) to be the lower unit triangular block array
/I_k 0\
\ 0 U/ having the k X k identity matrix I_k as the upper left block; in particular, U(0) = U. Then this array equals the bi-infinite product (...*U(2)*U(1)*U(0))*(U(0)*U(1)*U(2)*...). (End)
From Peter Bala, Jul 21 2015: (Start)
O.g.f. G(x,t) = (1/x) * series reversion of ( x/f(x,t) ), where f(x,t) = ( 1 + (1 + t)*x )^2/( 1 + t*x ).
1 + x*d/dx(G(x,t))/G(x,t) = 1 + (2 + t)*x + (6 + 4*t + t^2)*x^2 + ... is the o.g.f for A094527. (End)
Conjecture: Sum_{k=0..n} T(n,k)/(k+1)^2 = H(n+1)*A000108(n)*(2*n+1)/(n+1), where H(n+1) = Sum_{k=0..n} 1/(k+1). - Werner Schulte, Jul 23 2015
From Werner Schulte, Jul 25 2015: (Start)
Sum_{k=0..n} T(n,k)*(k+1)^2 = (2*n+1)*binomial(2*n,n). (A002457)
Sum_{k=0..n} T(n,k)*(k+1)^3 = 4^n*(3*n+2)/2.
Sum_{k=0..n} T(n,k)*(k+1)^4 = (2*n+1)^2*binomial(2*n,n).
Sum_{k=0..n} T(n,k)*(k+1)^5 = 4^n*(15*n^2+15*n+4)/4. (End)
The o.g.f. G(x,t) is such that G(x,t+1) is the o.g.f. for A035324, but with an offset of 0, and G(x,t-1) is the o.g.f. for A033184, again with an offset of 0. - Peter Bala, Sep 20 2015
Denote this lower triangular array by L; then L * transpose(L) is the Cholesky factorization of the Hankel matrix ( 1/(i+j)*binomial(2*i+2*j-2, i+j-1) )A172417%20read%20as%20a%20square%20array.%20See%20Chamberland,%20p.%201669.%20-%20_Peter%20Bala">i,j >= 1 = A172417 read as a square array. See Chamberland, p. 1669. - _Peter Bala, Oct 15 2023

Extensions

Typo in one entry corrected by Philippe Deléham, Dec 16 2007

A064189 Triangle T(n,k), 0 <= k <= n, read by rows, defined by: T(0,0)=1, T(n,k)=0 if n < k, T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-1,k+1).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 9, 12, 9, 4, 1, 21, 30, 25, 14, 5, 1, 51, 76, 69, 44, 20, 6, 1, 127, 196, 189, 133, 70, 27, 7, 1, 323, 512, 518, 392, 230, 104, 35, 8, 1, 835, 1353, 1422, 1140, 726, 369, 147, 44, 9, 1, 2188, 3610, 3915, 3288, 2235, 1242, 560, 200, 54, 10, 1
Offset: 0

Author

N. J. A. Sloane, Sep 21 2001

Keywords

Comments

Motzkin triangle read in reverse order.
T(n,k) = number of lattice paths from (0,0) to (n,k), staying weakly above the x-axis and consisting of steps U=(1,1), D=(1,-1) and H=(1,0). Example: T(3,1) = 5 because we have HHU, UDU, HUH, UHH and UUD. Columns 0,1,2 and 3 give A001006 (Motzkin numbers), A002026 (first differences of Motzkin numbers), A005322 and A005323, respectively. - Emeric Deutsch, Feb 29 2004
Riordan array ((1-x-sqrt(1-2x-3x^2))/(2x^2), (1-x-sqrt(1-2x-3x^2))/(2x)). Inverse is the array (1/(1+x+x^2), x/(1+x+x^2)) (A104562). - Paul Barry, Mar 15 2005
Inverse binomial matrix applied to A039598. - Philippe Deléham, Feb 28 2007
Triangle T(n,k), 0 <= k <= n, read by rows given by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-1,k+1) for k >= 1. - Philippe Deléham, Mar 27 2007
This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k < 0 or if k > n, T(n,0) = x*T(n-1,0) + T(n-1,1), T(n,k) = T(n-1,k-1) + y*T(n-1,k) + T(n-1,k+1) for k >= 1. Other triangles arise from choosing different values for (x,y): (0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970; (1,0)-> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877; (1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598; (2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954; (3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791; (4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. - Philippe Deléham, Sep 25 2007
Equals binomial transform of triangle A053121. - Gary W. Adamson, Oct 25 2008
Consider a semi-infinite chessboard with squares labeled (n,k), ranks or rows n >= 0, files or columns k >= 0; the number of king-paths of length n from (0,0) to (n,k), 0 <= k <= n, is T(n,k). The recurrence relation given above relates to the movements of the king. This is essentially the comment made by Harrie Grondijs for the Motzkin triangle A026300. - Johannes W. Meijer, Oct 10 2010

Examples

			Triangle begins:
  [0]   1;
  [1]   1,    1;
  [2]   2,    2,    1;
  [3]   4,    5,    3,    1;
  [4]   9,   12,    9,    4,   1;
  [5]  21,   30,   25,   14,   5,   1;
  [6]  51,   76,   69,   44,  20,   6,   1;
  [7] 127,  196,  189,  133,  70,  27,   7,  1;
  [8] 323,  512,  518,  392, 230, 104,  35,  8, 1;
  [9] 835, 1353, 1422, 1140, 726, 369, 147, 44, 9, 1;
  ...
From _Philippe Deléham_, Nov 04 2011: (Start)
Production matrix begins:
  1, 1
  1, 1, 1
  0, 1, 1, 1
  0, 0, 1, 1, 1
  0, 0, 0, 1, 1, 1
  0, 0, 0, 0, 1, 1, 1 (End)
		

References

  • See A026300 for additional references and other information.

Crossrefs

A026300 (the main entry for this sequence) with rows reversed.
Row sums give: A005773(n+1) or A307789(n+2).

Programs

  • Maple
    alias(C=binomial): A064189 := (n,k) -> add(C(n,j)*(C(n-j,j+k)-C(n-j,j+k+2)), j=0..n): seq(seq(A064189(n,k), k=0..n),n=0..10); # Peter Luschny, Dec 31 2019
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> simplify(hypergeom([1 -n/2, -n/2+1/2], [2], 4))); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[0, 0, x_, y_] := 1; T[n_, 0, x_, y_] := x*T[n - 1, 0, x, y] + T[n - 1, 1, x, y]; T[n_, k_, x_, y_] := T[n, k, x, y] = If[k < 0 || k > n, 0, T[n - 1, k - 1, x, y] + y*T[n - 1, k, x, y] + T[n - 1, k + 1, x, y]]; Table[T[n, k, 1, 1], {n, 0, 10}, {k, 0, n}] // Flatten (* G. C. Greubel, Apr 21 2017 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[(k - n)/2, (k - n + 1)/2, k + 2, 4];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten  (* Peter Luschny, May 19 2021 *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, polcoeff( polcoeff( 2 / (1 - x + sqrt(1 - 2*x - 3*x^2) - 2*x*y) + x * O(x^n), n), k))}; /* Michael Somos, Jun 06 2016 */
  • Sage
    def A064189_triangel(dim):
        M = matrix(ZZ,dim,dim)
        for n in range(dim): M[n,n] = 1
        for n in (1..dim-1):
            for k in (0..n-1):
                M[n,k] = M[n-1,k-1]+M[n-1,k]+M[n-1,k+1]
        return M
    A064189_triangel(9) # Peter Luschny, Sep 20 2012
    

Formula

Sum_{k=0..n} T(n, k)*(k+1) = 3^n.
Sum_{k=0..n} T(n, k)*T(n, n-k) = T(2*n, n) - T(2*n, n+2)
G.f.: M/(1-t*z*M), where M = 1 + z*M + z^2*M^2 is the g.f. of the Motzkin numbers (A001006). - Emeric Deutsch, Feb 29 2004
Sum_{k>=0} T(m, k)*T(n, k) = A001006(m+n). - Philippe Deléham, Mar 05 2004
Sum_{k>=0} T(n-k, k) = A005043(n+2). - Philippe Deléham, May 31 2005
Column k has e.g.f. exp(x)*(BesselI(k,2*x)-BesselI(k+2,2*x)). - Paul Barry, Feb 16 2006
T(n,k) = Sum_{j=0..n} C(n,j)*(C(n-j,j+k) - C(n-j,j+k+2)). - Paul Barry, Feb 16 2006
n-th row is generated from M^n * V, where M = the infinite tridiagonal matrix with all 1's in the super, main and subdiagonals; and V = the infinite vector [1,0,0,0,...]. E.g., Row 3 = (4, 5, 3, 1), since M^3 * V = [4, 5, 3, 1, 0, 0, 0, ...]. - Gary W. Adamson, Nov 04 2006
T(n,k) = A122896(n+1,k+1). - Philippe Deléham, Apr 21 2007
T(n,k) = (k/n)*Sum_{j=0..n} binomial(n,j)*binomial(j,2*j-n-k). - Vladimir Kruchinin, Feb 12 2011
Sum_{k=0..n} T(n,k)*(-1)^k*(k+1) = (-1)^n. - Werner Schulte, Jul 08 2015
Sum_{k=0..n} T(n,k)*(k+1)^3 = (2*n+1)*3^n. - Werner Schulte, Jul 08 2015
G.f.: 2 / (1 - x + sqrt(1 - 2*x - 3*x^2) - 2*x*y) = Sum_{n >= k >= 0} T(n, k) * x^n * y^k. - Michael Somos, Jun 06 2016
T(n,k) = binomial(n, k)*hypergeom([(k-n)/2, (k-n+1)/2], [k+2], 4). - Peter Luschny, May 19 2021
The coefficients of the n-th degree Taylor polynomial of the function (1 - x^2)*(1 + x + x^2)^n expanded about the point x = 0 give the entries in row n in reverse order. - Peter Bala, Sep 06 2022

Extensions

More terms from Vladeta Jovovic, Sep 23 2001

A101950 Product of A049310 and A007318 as lower triangular matrices.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, -1, 1, 3, 1, -1, -2, 3, 4, 1, 0, -4, -2, 6, 5, 1, 1, -2, -9, 0, 10, 6, 1, 1, 3, -9, -15, 5, 15, 7, 1, 0, 6, 3, -24, -20, 14, 21, 8, 1, -1, 3, 18, -6, -49, -21, 28, 28, 9, 1, -1, -4, 18, 36, -35, -84, -14, 48, 36, 10, 1, 0, -8, -4, 60, 50, -98, -126, 6, 75, 45, 11, 1, 1, -4, -30, 20, 145, 36, -210
Offset: 0

Author

Paul Barry, Dec 22 2004

Keywords

Comments

A Chebyshev and Pascal product.
Row sums are n+1, diagonal sums the constant sequence 1 resp. A023434(n+1). Riordan array (1/(1-x+x^2),x/(1-x+x^2)).
Apart from signs, identical with A104562.
Subtriangle of the triangle given by [0,1,-1,1,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, Jan 27 2010
The Fi1 and Fi2 sums lead to A004525 and the Gi1 sums lead to A077889, see A180662 for the definitions of these triangle sums. - Johannes W. Meijer, Aug 06 2011
Also the convolution triangle of the inverse of 6th cyclotomic polynomial A010892. - Peter Luschny, Oct 08 2022

Examples

			Triangle begins:
   1,
   1, 1,
   0, 2, 1,
  -1, 1, 3, 1,
  -1,-2, 3, 4, 1,
  ...
Triangle [0,1,-1,1,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] begins : 1 ; 0,1 ; 0,1,1 ; 0,0,2,1 ; 0,-1,1,3,1 ; 0,-1,-2,3,4,1 ; ... - _Philippe Deléham_, Jan 27 2010
		

Crossrefs

Programs

  • Maple
    A101950 := proc(n,k) local j,k1: add((-1)^((n-j)/2)*binomial((n+j)/2,j)*(1+(-1)^(n+j))* binomial(j,k)/2, j=0..n) end: seq(seq(A101950(n,k),k=0..n), n=0..11); # Johannes W. Meijer, Aug 06 2011
    # Uses function PMatrix from A357368. Adds a row on top and a column to the left.
    PMatrix(10, n -> [0, 1, 1, 0, -1,-1][irem(n, 6) + 1]); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] /; k>n || k<0 = 0; T[n_, k_] := T[n, k] = T[n-1, k-1]+T[n-1, k]-T[n-2, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)

Formula

T(n, k) = Sum_{j=0..n} (-1)^((n-j)/2)*C((n+j)/2,j)*(1+(-1)^(n+j))*C(j,k)/2.
T(0,0) = 1, T(n,k) = 0,if k>n or if k<0, T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k). - Philippe Deléham, Jan 26 2010
p(n,x) = (x+1)*p(n-1,x)-p(n-2,x) with p(0,x) = 1 and p(1,x) = x+1 [Dias].
G.f.: 1/(1-x-x^2-y*x). - Philippe Deléham, Feb 10 2012
T(n,0) = A010892(n), T(n+1,1) = A099254(n), T(n+2,2) = A128504(n). - Philippe Deléham, Mar 07 2014
T(n,k) = C(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], 4) for n>=1. - Peter Luschny, Apr 25 2016

Extensions

Typo in formula corrected and information added by Johannes W. Meijer, Aug 06 2011

A037027 Skew Fibonacci-Pascal triangle read by rows.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 5, 3, 1, 5, 10, 9, 4, 1, 8, 20, 22, 14, 5, 1, 13, 38, 51, 40, 20, 6, 1, 21, 71, 111, 105, 65, 27, 7, 1, 34, 130, 233, 256, 190, 98, 35, 8, 1, 55, 235, 474, 594, 511, 315, 140, 44, 9, 1, 89, 420, 942, 1324, 1295, 924, 490, 192, 54, 10, 1, 144, 744, 1836
Offset: 0

Author

Floor van Lamoen, Jan 01 1999

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,k) using steps (0,1), (1,0), (2,0). - Joerg Arndt, Jun 30 2011
T(n,k) is the number of lattice paths of length n, starting from the origin and ending at (n,k), using horizontal steps H=(1,0), up steps U=(1,1) and down steps D=(1,-1), never containing UUU, DD, HD. For instance, for n=4 and k=2, we have the paths; HHUU, HUHU, HUUH, UHHU, UHUH, UUHH, UUDU, UDUU, UUUD. - Emanuele Munarini, Mar 15 2011
Row sums form Pell numbers A000129, T(n,0) forms Fibonacci numbers A000045, T(n,1) forms A001629. T(n+k,n-k) is polynomial sequence of degree k.
T(n,k) gives a convolved Fibonacci sequence (A001629, A001872, etc.).
As a Riordan array, this is (1/(1-x-x^2),x/(1-x-x^2)). An interesting factorization is (1/(1-x^2),x/(1-x^2))*(1/(1-x),x/(1-x)) [abs(A049310) times A007318]. Diagonal sums are the Jacobsthal numbers A001045(n+1). - Paul Barry, Jul 28 2005
T(n,k) = T'(n+1,k+1), T' given by [0, 1, 1, -1, 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 19 2005
Equals A049310 * A007318 as infinite lower triangular matrices. - Gary W. Adamson, Oct 28 2007
This triangle may also be obtained from the coefficients of the Morgan-Voyce polynomials defined by: Mv(x, n) = (x + 1)*Mv(x, n - 1) + Mv(x, n - 2). - Roger L. Bagula, Apr 09 2008
Row sums are A000129. - Roger L. Bagula, Apr 09 2008
Absolute value of coefficients of the characteristic polynomial of tridiagonal matrices with 1's along the main diagonal, and i's along the superdiagonal and the subdiagonal (where i=sqrt(-1), see Mathematica program). - John M. Campbell, Aug 23 2011
A037027 is jointly generated with A122075 as an array of coefficients of polynomials v(n,x): initially, u(1,x)=v(1,x)=1; for n>1, u(n,x)=u(n-1,x)+(x+1)*v(n-1)x and v(n,x)=u(n-1,x)+x*v(n-1,x). See the Mathematica section at A122075. - Clark Kimberling, Mar 05 2012
For a closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 18 2013
For a closed-form formula for generalized Pascal's triangle see A228576. - Boris Putievskiy, Sep 09 2013
Row n, for n>=0, shows the coefficients of the polynomial u(n) = c(0) + c(1)*x + ... + c(n)*x^n which is the denominator of the n-th convergent of the continued fraction [x+1, x+1, x+1, ...]; see A230000. - Clark Kimberling, Nov 13 2013
T(n,k) is the number of ternary words of length n having k letters 2 and avoiding a runs of odd length for the letter 0. - Milan Janjic, Jan 14 2017
Let T(m, n, k) be an m-bonacci Pascal's triangle, where T(m, n, 0) gives the values of F(m, n), the n-th m-bonacci number, and T(m, n, k) gives the values for the k-th convolution of F(m, n). Then the classic Pascal triangle is T(1, n, k) and this sequence is T(2, n, k). T(m, n, k) is the number of compositions of n using only the positive integers 1, 1' and 2 through m, with the part 1' used exactly k times. G.f. for k-th column of T(m, n, k): x/(1 - x - x^2 - ... - x^m)^k. The row sum for T(m, n, k) is the number of compositions of n using only the positive integers 1, 1' and 2 through m. G.f. for row sum of T(m, n, k): 1/(1 - 2x - x^2 - ... - x^m). - Gregory L. Simay, Jul 24 2021

Examples

			Ratio of row polynomials R(3)/R(2) = (3 + 5*x + 3*x^2 + x^3)/(2 + 2*x + x^2) = [1+x; 1+x, 1+x].
Triangle begins:
                                 1;
                              1,    1;
                           2,    2,    1;
                        3,    5,    3,    1;
                     5,   10,    9,    4,    1;
                  8,   20,   22,   14,    5,    1;
              13,   38,   51,   40,   20,    6,    1;
           21,   71,  111,  105,   65,   27,    7,    1;
        34,  130,  233,  256,  190,   98,   35,    8,    1;
     55,  235,  474,  594,  511,  315,  140,   44,    9,    1;
  89,  420,  942, 1324, 1295,  924,  490,  192,   54,   10,    1;
		

Crossrefs

A038112(n) = T(2n, n). A038137 is reflected version. Maximal row entries: A038149.
Diagonal differences are in A055830. Vertical sums are in A091186.
Some other Fibonacci-Pascal triangles: A027926, A036355, A074829, A105809, A109906, A111006, A114197, A162741, A228074.

Programs

  • Haskell
    a037027 n k = a037027_tabl !! n !! k
    a037027_row n = a037027_tabl !! n
    a037027_tabl = [1] : [1,1] : f [1] [1,1] where
       f xs ys = ys' : f ys ys' where
         ys' = zipWith3 (\u v w -> u + v + w) (ys ++ [0]) (xs ++ [0,0]) ([0] ++ ys)
    -- Reinhard Zumkeller, Jul 07 2012
  • Maple
    T := (n,k) -> `if`(n=0,1,binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -4)): seq(seq(simplify(T(n,k)), k=0..n), n=0..10); # Peter Luschny, Apr 25 2016
    # Uses function PMatrix from A357368. Adds a row above and a column to the left.
    PMatrix(10, n -> combinat:-fibonacci(n)); # Peter Luschny, Oct 07 2022
  • Mathematica
    Mv[x, -1] = 0; Mv[x, 0] = 1; Mv[x, 1] = 1 + x; Mv[x_, n_] := Mv[x, n] = ExpandAll[(x + 1)*Mv[x, n - 1] + Mv[x, n - 2]]; Table[ CoefficientList[ Mv[x, n], x], {n, 0, 10}] // Flatten (* Roger L. Bagula, Apr 09 2008 *)
    Abs[Flatten[Table[CoefficientList[CharacteristicPolynomial[Array[KroneckerDelta[#1,#2]+KroneckerDelta[#1,#2+1]*I+KroneckerDelta[#1,#2-1]*I&,{n,n}],x],x],{n,1,20}]]] (* John M. Campbell, Aug 23 2011 *)
    T[n_, k_] := Binomial[n, k] Hypergeometric2F1[(k-n)/2, (k-n+1)/2, -n, -4];
    Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 16 2019, after Peter Luschny *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, if( n==0 && k==0, 1, T(n-1, k) + T(n-1, k-1) + T(n-2, k)))}; /* Michael Somos, Sep 29 2003 */
    
  • PARI
    T(n,k)=if(nPaul D. Hanna, Feb 27 2004
    

Formula

T(n, m) = T'(n-1, m) + T'(n-2, m) + T'(n-1, m-1), where T'(n, m) = T(n, m) for n >= 0 and 0< = m <= n and T'(n, m) = 0 otherwise.
G.f.: 1/(1 - y - y*z - y^2).
G.f. for k-th column: x/(1-x-x^2)^k.
T(n, m) = Sum_{k=0..n-m} binomial(m+k, m)*binomial(k, n-k-m), n >= m >= 0, otherwise 0. - Wolfdieter Lang, Jun 17 2002
T(n, m) = ((n-m+1)*T(n, m-1) + 2*(n+m)*T(n-1, m-1))/(5*m), n >= m >= 1; T(n, 0)= A000045(n+1); T(n, m)= 0 if n < m. - Wolfdieter Lang, Apr 12 2000
Chebyshev coefficient triangle (abs(A049310)) times Pascal's triangle (A007318) as product of lower triangular matrices. T(n, k) = Sum_{j=0..n} binomial((n+j)/2, j)*(1+(-1)^(n+j))*binomial(j, k)/2. - Paul Barry, Dec 22 2004
Let R(n) = n-th row polynomial in x, with R(0)=1, then R(n+1)/R(n) equals the continued fraction [1+x;1+x, ...(1+x) occurring (n+1) times ..., 1+x] for n >= 0. - Paul D. Hanna, Feb 27 2004
T(n,k) = Sum_{j=0..n} binomial(n-j,j)*binomial(n-2*j,k); in Egorychev notation, T(n,k) = res_w(1-w-w^2)^(-k-1)*w^(-n+k+1). - Paul Barry, Sep 13 2006
Sum_{k=0..n} T(n,k)*x^k = A000045(n+1), A000129(n+1), A006190(n+1), A001076(n+1), A052918(n), A005668(n+1), A054413(n), A041025(n), A099371(n+1), A041041(n), A049666(n+1), A041061(n), A140455(n+1), A041085(n), A154597(n+1), A041113(n) for x = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 respectively. - Philippe Deléham, Nov 29 2009
T((m+1)*n+r-1, m*n+r-1)*r/(m*n+r) = Sum_{k=1..n} k/n*T((m+1)*n-k-1, m*n-1)*(r+k,r), n >= m > 1.
T(n-1,m-1) = (m/n)*Sum_{k=1..n-m+1} k*A000045(k)*T(n-k-1,m-2), n >= m > 1. - Vladimir Kruchinin, Mar 17 2011
T(n,k) = binomial(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], -4) for n >= 1. - Peter Luschny, Apr 25 2016

Extensions

Examples from Paul D. Hanna, Feb 27 2004
Showing 1-10 of 65 results. Next