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 31-40 of 58 results. Next

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

Views

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)

A349812 Triangle read by rows: row 1 is [1]; for n >= 1, row n gives coefficients of expansion of (-1/x + x)*(1/x + 1 + x)^(n-1) in order of increasing powers of x.

Original entry on oeis.org

1, -1, 0, 1, -1, -1, 0, 1, 1, -1, -2, -2, 0, 2, 2, 1, -1, -3, -5, -4, 0, 4, 5, 3, 1, -1, -4, -9, -12, -9, 0, 9, 12, 9, 4, 1, -1, -5, -14, -25, -30, -21, 0, 21, 30, 25, 14, 5, 1, -1, -6, -20, -44, -69, -76, -51, 0, 51, 76, 69, 44, 20, 6, 1, -1, -7, -27, -70, -133, -189, -196, -127, 0, 127, 196, 189, 133, 70, 27, 7, 1
Offset: 0

Views

Author

N. J. A. Sloane, Dec 23 2021

Keywords

Comments

The rule for constructing this triangle (ignoring row 0) is the same as that for A027907: each number is the sum of the three numbers immediately above it in the previous row. Here row 1 is [-1, 0, 1] instead of [1, 1, 1].

Examples

			Triangle begins:
   1;
  -1,  0,   1;
  -1, -1,   0,   1,    1;
  -1, -2,  -2,   0,    2,    2,    1;
  -1, -3,  -5,  -4,    0,    4,    5,    3,  1;
  -1, -4,  -9, -12,   -9,    0,    9,   12,  9,   4,   1;
  -1, -5, -14, -25,  -30,  -21,    0,   21, 30,  25,  14,   5,   1;
  -1, -6, -20, -44,  -69,  -76,  -51,    0, 51,  76,  69,  44,  20,  6,  1;
  -1, -7, -27, -70, -133, -189, -196, -127,  0, 127, 196, 189, 133, 70, 27, 7, 1;
  ...
		

Crossrefs

The left half of the triangle is A026300, the right half is A064189 (or A122896). The central (nonzero) column gives the Motzkin numbers A001006.

Programs

  • Maple
    t1:=-1/x+x; m:=1/x+1+x;
    lprint([1]);
    for n from 1 to 12 do
    w1:=expand(t1*m^(n-1));
    w3:=expand(x^n*w1);
    w4:=series(w3,x,2*n+1);
    w5:=seriestolist(w4);
    lprint(w5);
    od:

A122896 Riordan array (1, (1 - x - sqrt(1 - 2*x - 3*x^2)) / (2*x)), a Riordan array for directed animals. Triangle read by rows.

Original entry on oeis.org

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

Views

Author

Paul Barry, Sep 18 2006

Keywords

Comments

Also the convolution triangle of the Motzkin numbers A001006. - Peter Luschny, Oct 08 2022

Examples

			Triangle begins:
[0] 1;
[1] 0,   1;
[2] 0,   1,   1;
[3] 0,   2,   2,   1;
[4] 0,   4,   5,   3,   1;
[5] 0,   9,  12,   9,   4,   1;
[6] 0,  21,  30,  25,  14,   5,   1;
[7] 0,  51,  76,  69,  44,  20,   6,  1;
[8] 0, 127, 196, 189, 133,  70,  27,  7, 1;
[9] 0, 323, 512, 518, 392, 230, 104, 35, 8, 1.
		

Crossrefs

Row sums are A005773, number of directed animals of size n.
Product of A007318 and this sequence is A122897.

Programs

  • Maple
    T := proc(n,k) option remember;
    if k=0 then return 0^n fi; if k>n then return 0 fi;
    T(n-1,k-1) + T(n-1,k) + T(n-1,k+1) end:
    for n from 0 to 9 do seq(T(n,k), k=0..n) od; # Peter Luschny, Aug 17 2016
    # Uses function PMatrix from A357368.
    PMatrix(10, n -> simplify(hypergeom([1 -n/2, -n/2+1/2], [2], 4))); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[n_, n_] = 1; T[, 0] = 0; T[n, k_] /; 0, ] = 0;
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] (* Jean-François Alcover, Jun 13 2019 *)
  • Sage
    # uses[riordan_array from A256893]
    riordan_array(1, (1-x-sqrt(1-2*x-3*x^2))/(2*x), 11) # Peter Luschny, Aug 17 2016

Formula

Inverse of Riordan array (1, x / (1 + x + x^2)).
T(n+1, k+1) = A064189(n, k). - Philippe Deléham, Apr 21 2007
Riordan array (1, x*m(x)) where m(x) is the g.f. of Motzkin numbers (A001006). - Philippe Deléham, Nov 04 2009

A330799 Evaluation of the Motzkin polynomials at 1/2 and normalized with 2^n.

Original entry on oeis.org

1, 3, 13, 59, 285, 1419, 7245, 37659, 198589, 1059371, 5705517, 30976571, 169338781, 931239243, 5147825421, 28587660123, 159406327677, 892113040491, 5009160335085, 28210229053563, 159304938535773, 901845743050635, 5117144607546573, 29096321095698843, 165765778648482621
Offset: 0

Views

Author

Peter Luschny, Jan 01 2020

Keywords

Crossrefs

Programs

  • Magma
    m:=30;
    R:=PowerSeriesRing(Rationals(), m+2);
    A330799:= func< n | Coefficient(R!( 2/(1-4*x+Sqrt((1-6*x)*(1+2*x))) ), n) >;
    [A330799(n): n in [0..m]]; // G. C. Greubel, Sep 14 2023
  • Maple
    a := proc(n) option remember; if n < 3 then return [1, 3, 13][n+1] fi;
    (-84*(n - 2)*a(n-3) - 2*(8*n + 5)*a(n-2) + (11*n + 5)*a(n-1))/(n + 1) end:
    seq(a(n), n=0..24);
    # Alternative:
    gf := 2/(1 - 4*x + sqrt((1 - 6*x)*(2*x + 1))):
    ser := series(gf, x, 30): seq(coeff(ser,x,n), n=0..24);
    # Or:
    series((x^2+x)/(7*x^2+4*x+1), x, 30): gfun:-seriestoseries(%, 'revogf'):
    convert(%, polynom) / x: seq(coeff(%, x, n), n=0..24);
  • Mathematica
    With[{C = Binomial}, A064189[n_, k_] := Sum[C[n, j]* (C[n-j, j+k] - C[n-j, j+k+2]), {j, 0, n}]];
    a[n_] := 2^n*Sum[A064189[n, k]/2^k, {k, 0, n}];
    Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Sep 25 2022 *)
    (* Second program *)
    A330799[n_]:= Coefficient[Series[2/(1-4*x+Sqrt[(1-6*x)*(1+2*x)]), {x, 0,50}], x, n]; Table[A330799[n], {n,0,30}] (* G. C. Greubel, Sep 14 2023 *)
  • SageMath
    R. = PowerSeriesRing(QQ)
    f = (x^2 + x)/(7*x^2 + 4*x+1)
    f.reverse().shift(-1).list()
    

Formula

a(n) = Sum_{k=0..n} A201641(n,k).
a(n) = 2^n*Sum_{k=0..n} A064189(n,k)/2^k.
a(n) = (-84*(n - 2)*a(n-3) - 2*(8*n + 5)*a(n-2) + (11*n + 5)*a(n-1))/(n + 1).
a(n) = [x^n] 2/(1 - 4*x + sqrt((1 - 6*x)*(2*x + 1))).
a(n) = [x^n] reverse((x^2 + x)/(7*x^2 + 4*x+1))/x.

A097357 For definition see Comments lines.

Original entry on oeis.org

1, 2, 1, 3, 3, 4, 3, 6, 3, 6, 3, 7, 5, 8, 5, 11, 3, 6, 3, 9, 9, 12, 9, 16, 5, 10, 5, 13, 11, 16, 11, 22, 3, 6, 3, 9, 9, 12, 9, 18, 9, 18, 9, 21, 15, 24, 15, 31, 5, 10, 5, 15, 15, 20, 15, 28, 11, 22, 11, 27, 21, 32, 21, 43, 3, 6, 3, 9, 9, 12, 9, 18, 9, 18, 9, 21, 15, 24, 15, 33, 9, 18, 9, 27, 27
Offset: 1

Views

Author

Creighton Dement, Aug 08 2004

Keywords

Comments

Let b_n(m) represent the m-th entry of the n-th sequence (n > 0) of some family, with the following properties: (b_1(m)) = (0,1,0,0,0,0,0,0,0,0,...) (first term of sequence is m = 0 -> b_1(1)=1 ). For all m, n in naturals ( > 0 ):
Rule I: m > n > 0 -> b_n(m) = 0.
Rule II: b_n(n) = 1.
Rule III: |b_n(m+1) - b_n(m-1)| = 1 -> b_(n+1)(m) = 1 if b_n(m) = 0; b_(n+1)(m) = 0 if b_n(m) = 1; otherwise (i.e., |b_n(m+1) - b_n(m-1)| != 1 -> |b_n(m+1) - b_n(m-1)| = 0) b_(n+1)(m) = b_n(m).
Rule IV: b_n(0) = 0 (this is so that rule III can still be applied to b_n(1)).
The sequence (a(n)) = (a(1), a(2), ...) is then given by a(n) = Sum_{i>=0} b_n(i) = Sum_{i=1..n} b_n(i).
The sequence can be visualized as certain interactions between concentric rings.
This sequence may be connected with Sierpinski's triangle. Details of this as well as a visualization of the rules of "interaction" are given at the link. It is not currently known if this sequence is bounded. The various aligned "triangles of zeros" (apparently each with a number of rows equal to a factor of 8) one sees when using the computer program alude to Sierpinski's Triangle.
At certain points one notices that adjacent terms are all divisible by a certain number -- if this number is divided out one gets back initial terms of the sequence. For example, observe the subsequence (second line, above): 3,6,3,9,9,12,9,18,9,18,9,21,15,24,15,31,5,10,5,15,15,20,15,28,11,22,11,27, divide the first 15 terms by 3 -> 1,2,1,3,3,4,3,6,3,6,3,7,5,8,5 (this is the beginning of the sequence). Skip the number 31 and divide the next 7 terms by 5 -> (1,2,1,3,3,4,3). As the sequence gets longer, it apparently begins repeating (by some factor) an ever-increasing number of its initial terms; for example, another subsequence is: 3,6,3,9,9,12,9,18,9,18,9,21,15,24,15,33,9,18,9,27,27,36,27,48,15,30 = 3*(1,2,1,3,3,4,3,6,3,6,3,7,5,8,5,11,3,6,3,9,9,12,9,16,5,10).

Examples

			From _Philippe Deléham_, Apr 28 2007: (Start)
Table b_n(m), n >= 1, m >= 0, begins:
  0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
  0, 1, 1, 0, 0, 0, 0, 0, 0, 0, ...
  0, 0, 0, 1, 0, 0, 0, 0, 0, 0, ...
  0, 0, 1, 1, 1, 0, 0, 0, 0, 0, ...
  0, 1, 0, 1, 0, 1, 0, 0, 0, 0, ...
  0, 1, 0, 1, 0, 1, 1, 0, 0, 0, ...
  0, 1, 0, 1, 0, 0, 0, 1, 0, 0, ...
  0, 1, 0, 1, 1, 0, 1, 1, 1, 0, ...
See A128810 for another version. (End)
		

Programs

  • Java
    // A simple Java program is given at the link provided.

Formula

a(n+1) = Sum_{k=0..n} (T(n,k) mod 2) where T = A026300(Motzkin triangle), A064189, A084536, A091965, A110877, A125906, A126954. - Philippe Deléham, Apr 28 2007

A167630 Riordan array (1/(1-x),xm(x)) where m(x) is the g.f. of Motzkin numbers A001006.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 8, 8, 4, 1, 1, 17, 20, 13, 5, 1, 1, 38, 50, 38, 19, 6, 1, 1, 89, 126, 107, 63, 26, 7, 1, 1, 216, 322, 296, 196, 96, 34, 8, 1, 1, 539, 834, 814, 588, 326, 138, 43, 9, 1, 1, 1374, 2187, 2236, 1728, 1052, 507, 190, 53, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Nov 07 2009

Keywords

Examples

			Triangle begins:
  1;
  1,  1;
  1,  2,  1;
  1,  4,  3,  1;
  1,  8,  8,  4,  1;
  1, 17, 20, 13,  5, 1;
  1, 38, 50, 38, 19, 6, 1;
  ...
		

Crossrefs

Antidiagonal sums give A082395.
Row sums give A383527.
Diagonals include: A006416, A034856, A086615, A140662.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k=0, 1,
          `if`(k>n, 0, T(n-1, k-1)+T(n-1, k)+T(n-1, k+1)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);  # Alois P. Heinz, Apr 20 2018
  • Mathematica
    T[, 0] = T[n, n_] = 1;
    T[n_, k_] /; 0, ] = 0;
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2019 *)

Formula

T(n,0)=1, T(0,k)=0 for k>0, T(n,k)=0 if k>n, T(n,k)=T(n-1,k-1)+T(n-1,k)+T(n-1,k+1).
Sum_{k=0..n} k * T(n,k) = A003462(n). - Alois P. Heinz, Apr 20 2018
Sum_{k=0..n} (-1)^(k+1) * T(n,k) = A082397(n-2) for n>=2. - Alois P. Heinz, May 02 2025

A330800 Evaluation of the Motzkin polynomials at -1/2 and normalized with (-2)^n.

Original entry on oeis.org

1, -1, 5, -17, 77, -345, 1653, -8097, 40733, -208553, 1084421, -5708785, 30370861, -163019641, 881790357, -4801746753, 26302052925, -144825094473, 801155664933, -4450426297233, 24815385947469, -138842668857369, 779247587235765, -4385948395419873, 24750623835149661
Offset: 0

Views

Author

Peter Luschny, Jan 01 2020

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,-1,5]; [n le 3 select I[n] else ((6-n)*Self(n-1) + 6*(4*n-9)*Self(n-2) -36*(n-3)*Self(n-3))/n: n in [1..30]]; // G. C. Greubel, Sep 13 2023
  • Maple
    a := proc(n) option remember; if n < 3 then return [1, -1, 5][n+1] fi;
    (-36*(n - 2)*a(n-3) + 6*(4*n - 5)*a(n-2) - (n - 5)*a(n-1))/(n + 1) end:
    seq(a(n), n=0..24);
    # Alternative:
    gf := 2/(sqrt(4*x - 12*x^2 + 1) + 1):
    ser := series(gf, x, 30): seq(coeff(ser,x,n), n=0..24);
    # Or:
    series((x^2+x)/(3*x^2+1), x, 30): gfun:-seriestoseries(%, 'revogf'):
    convert(%, polynom) / x: seq(coeff(%, x, n), n=0..24);
  • Mathematica
    A330800[n_]:= Coefficient[Series[2/(Sqrt[4*x-12*x^2+1] +1), {x,0,50}], x, n]; Table[A330800[n], {n, 0, 30}] (* G. C. Greubel, Sep 13 2023 *)
  • SageMath
    R. = PowerSeriesRing(QQ)
    f = (x^2 + x)/(3*x^2 + 1)
    f.reverse().shift(-1).list()
    

Formula

a(n) = Sum_{k=0..n} (-1)^(n-k)*A201641(n,k).
a(n) = (-2)^n*Sum_{k=0..n} A064189(n,k)/(-2)^k.
a(n) = (-36*(n-2)*a(n-3) + 6*(4*n-5)*a(n-2) - (n-5)*a(n-1))/(n+1).
a(n) = [x^n] 2/(sqrt(4*x - 12*x^2 + 1) + 1).
a(n) = [x^n] reverse((x^2 + x)/(3*x^2 + 1))/x.

A342912 a(n) = [x^n] (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3).

Original entry on oeis.org

1, 1, 3, 6, 15, 36, 91, 232, 603, 1585, 4213, 11298, 30537, 83097, 227475, 625992, 1730787, 4805595, 13393689, 37458330, 105089229, 295673994, 834086421, 2358641376, 6684761125, 18985057351, 54022715451, 154000562758, 439742222071, 1257643249140, 3602118427251
Offset: 0

Views

Author

Peter Luschny, Apr 18 2021

Keywords

Crossrefs

The diagonal sums of the Motzkin triangle A064189 (with the Motzkin numbers A001006 as first column), the row sums of A020474, and a shifted version of the Riordan numbers A005043.

Programs

  • Maple
    gf := (1 - 2*x - sqrt((1 - 3*x)/(1 + x)))/(2*x^3): ser := series(gf, x, 36):
    seq(coeff(ser, x, n), n = 0..30);
    a := proc(n) option remember; `if`(n < 3, [1, 1, 3][n + 1],
    ((2*a(n - 1) + 3*a(n - 2))*(n + 1))/(n + 3)) end: seq(a(n), n=0..30);
  • Mathematica
    a[n_] := (-1)^n*HypergeometricPFQ[{1/2, -2 - n}, {2}, 4]
    Table[a[n], {n, 0, 30}]
  • Python
    def rnum():
        a, b, n = 1, 3, 3
        yield 1
        yield 1
        while True:
            yield b
            n += 1
            a, b = b, (n*(3*a + 2*b))//(n + 2)
    A342912 = rnum()
    print([next(A342912) for _ in range(31)])

Formula

D-finite with recurrence a(n) = (2*a(n - 1) + 3*a(n - 2))*(n + 1)/(n + 3) for n >= 3.
a(n) = (-1)^n*hypergeom([1/2, -2 - n], [2], 4).
a(n) ~ (3^(n + 7/2)*(16*n + 11))/(128*sqrt(Pi)*(n + 2)^(5/2)).
G.f.: (M(x) - 1) / (x + x^2) where M(x) is the g.f. of A001006. - Werner Schulte, Jan 05 2025

A356692 Pascal-like triangle, where each entry is the sum of the four entries above it starting with 1 at the top.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 4, 6, 6, 4, 10, 16, 20, 16, 10, 26, 46, 62, 62, 46, 26, 72, 134, 196, 216, 196, 134, 72, 206, 402, 618, 742, 742, 618, 402, 206, 608, 1226, 1968, 2504, 2720, 2504, 1968, 1226, 608, 1834, 3802, 6306, 8418, 9696, 9696, 8418, 6306, 3802, 1834, 5636, 11942, 20360, 28222, 34116, 36228, 34116, 28222, 20360, 11942, 5636
Offset: 0

Views

Author

Greg Dresden and Sadek Mohammed, Aug 23 2022

Keywords

Comments

Similar in spirit to the regular Pascal triangle, except that here we have T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k) + T(n-1,k+1), with the understanding that T(0,0) is defined to be 1, and T(n,k) is defined as 0 for k<0 and k>n.
T(n,k) is the number of permutations p of [n+1] such that at most one element of {p(1),...,p(i-1)} is between p(i) and p(i+1) for all i <= n and p(n+1) = k+1. T(4,1) = 16: 13542, 14532, 15342, 15432, 31542, 35142, 35412, 41532, 45132, 45312, 51342, 51432, 53142, 53412, 54132, 54312. - Alois P. Heinz, Aug 31 2022

Examples

			T(4,0) = 10 because it is the sum of T(3,-2), T(3,-1), T(3,0), and T(3,1) which gives 0+0+4+6 = 10.
Triangle begins:
             1
           1   1
         2   2   2
       4   6   6   4
     10  16  20  16  10
   26  46  62  62  46  26
  ...
		

Crossrefs

Row sums give A216837(n+1).
Column k=0 and also main diagonal give A356832.
T(2n,n) gives A356853.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k<0 or k>n, 0,
          `if`(n=0, 1, add(T(n-1,j), j=k-2..k+1)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Aug 28 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0,
        T[n - 1, k - 2] + T[n - 1, k - 1] + T[n - 1, k] + T[n - 1, k + 1]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten

Formula

T(n,k) = T(n,n-k).

A171488 Riordan array (f(x), x*f(x)) where f(x) is the g.f. of A005773(n+1)= 1,2,5,13,35,96,267,...

Original entry on oeis.org

1, 2, 1, 5, 4, 1, 13, 14, 6, 1, 35, 46, 27, 8, 1, 96, 147, 107, 44, 10, 1, 267, 462, 396, 204, 65, 12, 1, 750, 1437, 1404, 858, 345, 90, 14, 1, 2123, 4438, 4835, 3388, 1625, 538, 119, 16, 1, 6046, 13637, 16305, 12802, 7072, 2805, 791, 152, 18, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 10 2009

Keywords

Comments

Equal to A064189*B = B*A054336 = B^(-1)*A035324, B = A007318.

Examples

			Triangle T(n,k) (0<=k<=n) begins:
   1;
   2,   1;
   5,   4,   1;
  13,  14,   6,  1;
  35,  46,  27,  8,  1;
  96, 147, 107, 44, 10, 1;
  ...
		

Crossrefs

Programs

  • Maxima
    T(n,k)=((k+1)*sum(binomial(2*j+k,j)*(-1)^j*3^(n-j-k)*binomial(n+1,j+k+1),j,0,n-k))/(n+1); /* Vladimir Kruchinin Sep 30 2020 */

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = A005043(n), A001006(n), A005773(n+1), A059738(n) for x = -2, -1, 0, 1 respectively.
T(n,k) = T(n-1,k-1) + 2*T(n-1,k) + sum_{i, i>=0} T(n-1,k+1+i)*(-1)^i. - Philippe Deléham, Feb 23 2012
T(n,k) = (k+1)*Sum_{j=0..n-k} C(2*j+k,j)*(-1)^j*3^(n-j-k)*C(n+1,j+k+1)/(n+1). - Vladimir Kruchinin Sep 30 2020
Previous Showing 31-40 of 58 results. Next