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

A109466 Riordan array (1, x(1-x)).

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Aug 28 2005

Keywords

Comments

Inverse is Riordan array (1, xc(x)) (A106566).
Triangle T(n,k), 0 <= k <= n, read by rows, given by [0, -1, 1, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.
Modulo 2, this sequence gives A106344. - Philippe Deléham, Dec 18 2008
Coefficient array of the polynomials Chebyshev_U(n, sqrt(x)/2)*(sqrt(x))^n. - Paul Barry, Sep 28 2009

Examples

			Rows begin:
  1;
  0,  1;
  0, -1,  1;
  0,  0, -2,  1;
  0,  0,  1, -3,  1;
  0,  0,  0,  3, -4,   1;
  0,  0,  0, -1,  6,  -5,   1;
  0,  0,  0,  0, -4,  10,  -6,   1;
  0,  0,  0,  0,  1, -10,  15,  -7,  1;
  0,  0,  0,  0,  0,   5, -20,  21, -8,  1;
  0,  0,  0,  0,  0,  -1,  15, -35, 28, -9, 1;
From _Paul Barry_, Sep 28 2009: (Start)
Production array is
  0,    1,
  0,   -1,    1,
  0,   -1,   -1,   1,
  0,   -2,   -1,  -1,   1,
  0,   -5,   -2,  -1,  -1,  1,
  0,  -14,   -5,  -2,  -1, -1,  1,
  0,  -42,  -14,  -5,  -2, -1, -1,  1,
  0, -132,  -42, -14,  -5, -2, -1, -1,  1,
  0, -429, -132, -42, -14, -5, -2, -1, -1, 1 (End)
		

Crossrefs

Cf. A026729 (unsigned version), A000108, A030528, A124644.

Programs

  • Magma
    /* As triangle */ [[(-1)^(n-k)*Binomial(k, n-k): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Jan 14 2016
  • Mathematica
    (* The function RiordanArray is defined in A256893. *)
    RiordanArray[1&, #(1-#)&, 13] // Flatten (* Jean-François Alcover, Jul 16 2019 *)

Formula

Number triangle T(n, k) = (-1)^(n-k)*binomial(k, n-k).
T(n, k)*2^(n-k) = A110509(n, k); T(n, k)*3^(n-k) = A110517(n, k).
Sum_{k=0..n} T(n,k)*A000108(k)=1. - Philippe Deléham, Jun 11 2007
From Philippe Deléham, Oct 30 2008: (Start)
Sum_{k=0..n} T(n,k)*A144706(k) = A082505(n+1).
Sum_{k=0..n} T(n,k)*A002450(k) = A100335(n).
Sum_{k=0..n} T(n,k)*A001906(k) = A100334(n).
Sum_{k=0..n} T(n,k)*A015565(k) = A099322(n).
Sum_{k=0..n} T(n,k)*A003462(k) = A106233(n). (End)
Sum_{k=0..n} T(n,k)*x^(n-k) = A053404(n), A015447(n), A015446(n), A015445(n), A015443(n), A015442(n), A015441(n), A015440(n), A006131(n), A006130(n), A001045(n+1), A000045(n+1), A000012(n), A010892(n), A107920(n+1), A106852(n), A106853(n), A106854(n), A145934(n), A145976(n), A145978(n), A146078(n), A146080(n), A146083(n), A146084(n) for x = -12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12 respectively. - Philippe Deléham, Oct 27 2008
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A010892(n), A099087(n), A057083(n), A001787(n+1), A030191(n), A030192(n), A030240(n), A057084(n), A057085(n+1), A057086(n) for x = 0,1,2,3,4,5,6,7,8,9,10 respectively. - Philippe Deléham, Oct 28 2008
G.f.: 1/(1-y*x+y*x^2). - Philippe Deléham, Dec 15 2011
T(n,k) = T(n-1,k-1) - T(n-2,k-1), T(n,0) = 0^n. - Philippe Deléham, Feb 15 2012
Sum_{k=0..n} T(n,k)*x^(n-k) = F(n+1,-x) where F(n,x)is the n-th Fibonacci polynomial in x defined in A011973. - Philippe Deléham, Feb 22 2013
Sum_{k=0..n} T(n,k)^2 = A051286(n). - Philippe Deléham, Feb 26 2013
Sum_{k=0..n} T(n,k)*T(n+1,k) = -A110320(n). - Philippe Deléham, Feb 26 2013
For T(0,0) = 0, the signed triangle below has the o.g.f. G(x,t) = [t*x(1-x)]/[1-t*x(1-x)] = L[t*Cinv(x)] where L(x) = x/(1-x) and Cinv(x)=x(1-x) with the inverses Linv(x) = x/(1+x) and C(x)= [1-sqrt(1-4*x)]/2, an o.g.f. for the shifted Catalan numbers A000108, so the inverse o.g.f. is Ginv(x,t) = C[Linv(x)/t] = [1-sqrt[1-4*x/(t(1+x))]]/2 (cf. A124644 and A030528). - Tom Copeland, Jan 19 2016

A132812 Triangle read by rows, n>=1, 1<=k<=n, T(n,k) = k*binomial(n,k)^2/(n-k+1).

Original entry on oeis.org

1, 2, 2, 3, 9, 3, 4, 24, 24, 4, 5, 50, 100, 50, 5, 6, 90, 300, 300, 90, 6, 7, 147, 735, 1225, 735, 147, 7, 8, 224, 1568, 3920, 3920, 1568, 224, 8, 9, 324, 3024, 10584, 15876, 10584, 3024, 324, 9, 10, 450, 5400, 25200, 52920, 52920, 25200, 5400, 450, 10
Offset: 1

Views

Author

Gary W. Adamson, Sep 01 2007

Keywords

Comments

A127648 * A001263. (Original name by Gary W. Adamson.)
Let a meander be defined as in the link and m = 2. Then T(n,k) counts the invertible meanders of length m(n+1) built from arcs with central angle 360/m whose binary representation have mk '1's. - Peter Luschny, Dec 19 2011
Antidiagonal sums = A110320. - Philippe Deléham, Jun 08 2013

Examples

			First few rows of the triangle are:
  1;
  2, 2;
  3, 9, 3;
  4, 24, 24, 4;
  5, 50, 100, 50, 5;
  6, 90, 300, 300, 90, 6;
  ...
Row 4 = (4, 24, 24, 4) = 4 * (1, 6, 6, 1), where (1, 6, 6, 1) = row 4 of the Narayana triangle. - _Gary W. Adamson_
T(3,1) = 3 because the invertible meanders of length 8 and central angle 180 degree which have two '1's in their binary representation are {10000100, 10010000, 11000000}. - _Peter Luschny_, Dec 19 2011
		

Crossrefs

Programs

  • Maple
    A132812 := (n,k) -> k*binomial(n,k)^2/(n-k+1);
    seq(print(seq(A132812(n,k),k=0..n-1)),n=1..6); # Peter Luschny, Dec 19 2011
  • Mathematica
    Table[k Binomial[n, k]^2/(n - k + 1), {n, 10}, {k, n}] // Flatten (* Michael De Vlieger, Nov 15 2017 *)

Formula

A127648 * A001263 as infinite lower triangular matrices.
a(n) = n * A001263(n,k).
T(n,k) = binomial(n,k)*binomial(n,k-1). - Philippe Deléham, Jun 08 2013
G.f.: x*d(N(x,y))/dx, where N(x,y) is g.f. for Narayana numbers A001263. - Vladimir Kruchinin, Oct 22 2021

Extensions

New name from Peter Luschny, Dec 19 2011
a(53) corrected by Michael De Vlieger, Nov 15 2017

A247290 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k uhd strings.

Original entry on oeis.org

1, 1, 2, 4, 7, 1, 15, 2, 32, 5, 69, 13, 154, 30, 1, 346, 74, 3, 786, 183, 9, 1806, 449, 28, 4180, 1114, 78, 1, 9745, 2767, 219, 4, 22865, 6882, 611, 14, 53938, 17170, 1674, 50, 127865, 42906, 4569, 161, 1, 304447, 107392, 12398, 506, 5, 727733, 269237, 33450, 1564, 20
Offset: 0

Views

Author

Emeric Deutsch, Sep 16 2014

Keywords

Comments

B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: h = (1,0) of weight 1, H = (1,0) of weight 2, u = (1,1) of weight 2, and d = (1,-1) of weight 1. The weight of a path is the sum of the weights of its steps.
Row n contains 1 + floor(n/4) entries.
Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
T(n,0) = A247291(n).
Sum(k*T(n,k), k=0..n) = A110320(n-3) (n>=3)

Examples

			T(5,1)=2 because we have huhd and uhdh.
Triangle starts:
1;
1;
2;
4;
7,1;
15,2;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z+t*z)*G: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 22 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 22 do seq(coeff(P[n], t, k), k = 0 .. floor((1/4)*n)) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t) option remember; `if`(y<0 or y>n, 0, `if`(n=0, 1,
          expand(b(n-1, y, `if`(t=1, 2, 0))+`if`(n>1, b(n-2, y, 0)+
          b(n-2, y+1, 1), 0)+b(n-1, y-1, 0)*`if`(t=2, x, 1))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Sep 16 2014
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n, 0, If[n == 0, 1, Expand[b[n-1, y, If[t == 1, 2, 0]] + If[n>1, b[n-2, y, 0] + b[n-2, y+1, 1], 0] + b[n-1, y-1, 0]*If[t == 2, x, 1]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)

Formula

G.f. G = G(t,z) satisfies G = 1 + z*G + z^2*G + z^3*G*(G - z + t*z).

A247292 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k uHd strings.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 1, 35, 2, 77, 5, 172, 13, 391, 32, 899, 78, 1, 2085, 195, 3, 4877, 487, 9, 11490, 1217, 28, 27236, 3055, 81, 64916, 7687, 228, 1, 155483, 19374, 641, 4, 374027, 48925, 1782, 14, 903286, 123760, 4908, 50, 2189219, 313512, 13451, 165, 5322965, 795263, 36690, 522, 1
Offset: 0

Views

Author

Emeric Deutsch, Sep 16 2014

Keywords

Comments

B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: h = (1,0) of weight 1, H = (1,0) of weight 2, u = (1,1) of weight 2, and d = (1,-1) of weight 1. The weight of a path is the sum of the weights of its steps.
Row n contains 1 + floor(n/5) entries.
Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
T(n,0) = A247293(n).
Sum(k*T(n,k), k=0..n) = A110320(n-4) (n>=4).

Examples

			T(6,1)=2 because we have uHdh and huHd.
Triangle starts:
1;
1;
2;
4;
8;
16,1;
35,2;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z^2+t*z^2)*G: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 22 do P[n] := sort(coeff(Gser, z, n)) end do; for n from 0 to 22 do seq(coeff(P[n], t, k), k = 0 .. floor((1/5)*n)) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t) option remember; `if`(y<0 or y>n, 0, `if`(n=0, 1,
          expand(b(n-1, y, 0)+`if`(n>1, b(n-2, y, `if`(t=1, 2, 0))+
          b(n-2, y+1, 1), 0)+b(n-1, y-1, 0)*`if`(t=2, x, 1))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Sep 16 2014
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n, 0, If[n == 0, 1, Expand[b[n-1, y, 0] + If[n>1, b[n-2, y, If[t == 1, 2, 0]] + b[n-2, y+1, 1], 0] + b[n-1, y-1, 0]*If[t == 2, x, 1]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 0]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)

Formula

G.f. G = G(t,z) satisfies G = 1 + z*G + z^2*G + z^3*G*(G - z^2 + t*z^2).

A110319 Triangle read by rows: T(n,k) (1 <= k <= n) is number of RNA secondary structures of size n (i.e., with n nodes) having k blocks (an RNA secondary structure can be viewed as a restricted noncrossing partition).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 3, 1, 0, 0, 1, 6, 1, 0, 0, 0, 6, 10, 1, 0, 0, 0, 1, 20, 15, 1, 0, 0, 0, 0, 10, 50, 21, 1, 0, 0, 0, 0, 1, 50, 105, 28, 1, 0, 0, 0, 0, 0, 15, 175, 196, 36, 1, 0, 0, 0, 0, 0, 1, 105, 490, 336, 45, 1, 0, 0, 0, 0, 0, 0, 21, 490, 1176, 540, 55, 1, 0, 0, 0, 0, 0, 0, 1, 196
Offset: 1

Views

Author

Emeric Deutsch, Jul 19 2005

Keywords

Comments

Row sums yield the RNA secondary structure numbers (A004148).
Column sums yield the Catalan numbers (A000108).
A rearrangement of the Narayana numbers triangle (A001263).

Examples

			Triangle begins:
  1;
  0, 1;
  0, 1, 1;
  0, 0, 3, 1;
  0, 0, 1, 6,  1;
  0, 0, 0, 6, 10,  1;
  0, 0, 0, 1, 20, 15,   1;
  0, 0, 0, 0, 10, 50,  21,   1;
  0, 0, 0, 0,  1, 50, 105,  28,  1;
  0, 0, 0, 0,  0, 15, 175, 196, 36, 1;
  ...
T(5,4)=6 because we have 13/2/4/5, 14/2/3/5. 15/2/3/4, 1/24/3/5, 1/25/3/4 and 1/2/35/4.
		

Crossrefs

Programs

  • Maple
    T:=(n,k)->(1/k)*binomial(k,n-k)*binomial(k,n-k+1): for n from 1 to 14 do seq(T(n,k),k=1..n) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := (1/k)*Binomial[k, n - k]*Binomial[k, n - k + 1];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jul 06 2018, from Maple *)
  • PARI
    T(n,k) = (1/k)*binomial(k, n-k)*binomial(k, n-k+1); \\ Andrew Howroyd, Feb 27 2018

Formula

Sum_{k=1..n} k*T(n,k) = A110320(n).
T(n,k) = (1/k)*binomial(k, n-k)*binomial(k, n-k+1).
G.f.: (1 - tz - tz^2 - sqrt(1 - 2tz - 2tz^2 + t^2*z^2 - 2t^2*z^3 + t^2*z^4))/(2tz^2).

A162984 Number of Dyck paths with no UUU's and no DDD's of semilength n and having k UUDUDD's (0<=k<=floor(n/3); U=(1,1), D=(1,-1)).

Original entry on oeis.org

1, 1, 2, 3, 1, 6, 2, 12, 5, 25, 11, 1, 53, 26, 3, 114, 62, 9, 249, 148, 25, 1, 550, 355, 69, 4, 1227, 853, 189, 14, 2760, 2057, 509, 46, 1, 6253, 4973, 1359, 145, 5, 14256, 12050, 3600, 446, 20, 32682, 29256, 9484, 1334, 75, 1, 75293, 71154, 24870, 3914, 265, 6
Offset: 0

Views

Author

Emeric Deutsch, Oct 11 2009

Keywords

Comments

T(n,k) is the number of weighted lattice paths in B(n) having k peaks. The members of B(n) are paths of weight n that start at (0,0), end on but never go below the horizontal axis, and whose steps are of the following four kinds: an (1,0)-step with weight 1, an (1,0)-step with weight 2, a (1,1)-step with weight 2, and a (1,-1)-step with weight 1. The weight of a path is the sum of the weights of its steps. A peak is a (1,1)-step followed by a (1,-1)-step. Example: T(7,2)=3. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), we have hUDUD, UDhUD, and UDUDh.
Number of entries in row n is 1+floor(n/3).

Examples

			T(4,1) = 2 because we have UDUUDUDD and UUDUDDUD.
Triangle starts:
1;
1;
2;
3,   1;
6,   2;
12,  5;
25, 11, 1;
53, 26, 3;
		

Crossrefs

Programs

  • Maple
    G := ((1-z-z^2+z^3-t*z^3-sqrt(1-2*z-z^2-2*t*z^3-z^4-2*z^5+z^6+2*t*z^4+2*t*z^5-2*t*z^6+t^2*z^6))*1/2)/z^3: Gser := simplify(series(G, z = 0, 20)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 16 do seq(coeff(P[n], t, j), j = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x or t=9, 0,
         `if`(x=0, 1, expand(b(x-1, y+1, [2, 3, 9, 5, 3, 2, 2, 2][t])+
         `if`(t=6, z, 1) *b(x-1, y-1, [8, 8, 4, 7, 6, 7, 9, 7][t]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Jun 10 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x || t == 9, 0, If[x == 0, 1, Expand[b[x-1, y+1, {2, 3, 9, 5, 3, 2, 2, 2}[[t]] ] + If[t == 6, z, 1]*b[x-1, y-1, {8, 8, 4, 7, 6, 7, 9, 7}[[t]] ]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)

Formula

G.f.: G=G(t,z) satisfies G = 1 + zG + z^2*G + z^3*(G-1+t)G.
Sum of entries in row n = A004148(n+1).
T(n,0) = A162985(n).
Sum(k*T(n,k), k=0..floor(n/3)) = A110320(n-2).

A247296 Number of uhd and uHd in all weighted lattice paths B(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 7, 18, 45, 112, 281, 706, 1778, 4490, 11363, 28814, 73199, 186257, 474635, 1211122, 3094171, 7913765, 20261142, 51921920, 133171656, 341836748, 878104607, 2257208148, 5805964495, 14942942127, 38480449261, 99145105834, 255573465001, 659114680270
Offset: 0

Views

Author

Emeric Deutsch, Sep 16 2014

Keywords

Comments

B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: h = (1,0) of weight 1, H = (1,0) of weight 2, u = (1,1) of weight 2, and d = (1,-1) of weight 1. The weight of a path is the sum of the weights of its steps.
a(n) = A110320(n-3) + A110320(n-4) (n>=5).

Examples

			a(6)=7 because among the 37 (=A004148(7)) members of B(6) only (uhd)hh, h(uhd)h, hh(uhd), H(uhd), (uhd)H, (uHd)h, and h(uHd) contain uhd or uHd (shown between parentheses).
G.f. = x^4 + 3*x^5 + 7*x^6 + 18*x^7 + 45*x^8 + 112*x^9 + 281*x^10 + ...
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0,0,0,0] cat Coefficients(R!(x*(x+1)*(-1 +(1-x-x^2 )/sqrt((1-3*x+x^2)*(1+x+x^2)) )/2)); // G. C. Greubel, Aug 05 2018
  • Maple
    eqg := g = 1+z*g+z^2*g+z^3*g^2: g := RootOf(eqg, g): H := z^4*(1+z)*g/(1-z-z^2-2*z^3*g): Hser := series(H, z = 0, 40): seq(coeff(Hser, z, n), n = 0 .. 35);
  • Mathematica
    a[ n_] := With[{t = (1 - 3 x + x^2) (1 + x + x^2)}, SeriesCoefficient[ x (x + 1) (-1 + (1 - x - x^2) / Sqrt[t]) / 2, {x, 0, n}]]; (* Michael Somos, Sep 16 2014 *)
  • PARI
    x='x+O('x^30); concat(vector(4), Vec(x*(x+1)*(-1 +(1-x-x^2 )/sqrt((1-3*x+x^2)*(1+x+x^2)))/2)) \\ G. C. Greubel, Aug 05 2018
    

Formula

G.f.: G = z^4*(1 + z)*g/(1 - z - z^2 - 2*z^3*g), where g = 1 + z*g + z^2*g + z^3*g^2.
D-finite with recurrence +(n-1)*(202*n-903)*a(n) +(-250*n^2+1095*n-691)*a(n-1) +(-510*n^2+4095*n-8039)*a(n-2) +(-558*n^2+4287*n-7831)*a(n-3) +(-106*n^2+1587*n-4575)*a(n-4) +(154*n-547)*(n-7)*a(n-5)=0. - R. J. Mathar, Jul 24 2022

A273713 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k doublerises (n>=2, k>=0). A doublerise in a bargraph is any pair of adjacent up steps.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 8, 13, 9, 4, 1, 17, 32, 28, 14, 5, 1, 37, 80, 81, 50, 20, 6, 1, 82, 201, 231, 165, 80, 27, 7, 1, 185, 505, 653, 526, 295, 119, 35, 8, 1, 423, 1273, 1824, 1644, 1036, 483, 168, 44, 9, 1, 978, 3217, 5058, 5034, 3535, 1848, 742, 228, 54, 10, 1
Offset: 2

Views

Author

Emeric Deutsch, May 28 2016

Keywords

Comments

Number of entries in row n is n-1.
Sum of entries in row n = A082582(n).
T(n,0) = A004148(n-1) (the 2ndary structure numbers).
T(n,1) = A110320(n-2).
Sum(k*T(n,k), k>=0) = A273714(n).

Examples

			Row 4 is 2,2,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1], [1,2], [2,1], [2,2], [3] and the corresponding drawings show that they have 0, 0, 1, 1, 2 doublerises.
Triangle starts
1;
1,1;
2,2,1;
4,5,3,1;
8,13,9,4,1
		

Crossrefs

Programs

  • Maple
    eq := z*G^2-(1-z-t*z-z^2)*G+z^2 = 0: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 22)): for n from 2 to 20 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 2 to 20 do seq(coeff(P[n], t, j), j = 0 .. n-2) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t) option remember; expand(`if`(n=0, (1-t),
          `if`(t<0, 0, b(n-1, y+1, 1)*`if`(t=1, z, 1))+
          `if`(t>0 or y<2, 0, b(n, y-1, -1))+
          `if`(y<1, 0, b(n-1, y, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..n-2))(b(n, 0$2)):
    seq(T(n), n=2..16);  # Alois P. Heinz, Jun 06 2016
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = Expand[If[n == 0, 1 - t, If[t < 0, 0, b[n - 1, y + 1, 1]*If[t == 1, z, 1]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1]] + If[y < 1, 0, b[n - 1, y, 0]]]];
    T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 0, n - 2}]][b[n, 0, 0]];
    Table[T[n], {n, 2, 16}] // Flatten (* Jean-François Alcover, Jul 29 2016, after Alois P. Heinz *)

Formula

G.f.: G = G(t,z) satisfies zG^2 - (1 - z - tz - z^2)G + z^2 = 0.

A125250 Square array, read by antidiagonals, where A(1,1) = A(2,2) = 1, A(1,2) = A(2,1) = 0, A(n,k) = 0 if n < 1 or k < 1, otherwise A(n,k) = A(n-2,k-2) + A(n-1,k-2) + A(n-2,k-1) + A(n-1,k-1).

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 5, 1, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 3, 11, 3, 0, 0, 0, 0, 0, 0, 1, 13, 13, 1, 0, 0, 0, 0, 0, 0, 0, 9, 26, 9, 0, 0, 0, 0, 0, 0, 0, 0, 4, 32, 32, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 26, 63, 26, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 80, 80, 14, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gerald McGarvey, Jan 15 2007

Keywords

Comments

It appears that the main diagonal (1,1,2,5,11,...) is A051286 (Whitney number of level n of the lattice of the ideals of the fence of size 2 n) that the diagonals (0,1,2,5,13,...) adjacent to the main diagonal are A110320 (Number of blocks in all RNA secondary structures with n nodes) and that the n-th antidiagonal sum = A094686(n-1) (a Fibonacci convolution). The n-th row sum = A002605(n).

Examples

			Array starts as:
1 0 0 0  0  0  0 ...
0 1 1 0  0  0  0 ...
0 1 2 2  1  0  0 ...
0 0 2 5  5  3  1   0 ...
0 0 1 5 11 13  9   4   1   0...
0 0 0 3 13 26 32  26  14   5   1  0 ...
0 0 0 1  9 32 63  80  71  45  20  6  1 0 ...
0 0 0 0  4 26 80 153 201 191 135 71 27 7 1 0 ...
...
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := Sum[Binomial[i, n-i] Binomial[i, k-i], {i, Floor[(n+1)/2], k}];
    Table[T[n-k, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 12 2019 *)
  • PARI
    A=matrix(22,22);A[1,1]=1;A[2,2]=1;A[2,1]=0;A[1,2]=0;A[3,2]=1;A[2,3]=1; for(n=3,22,for(k=3,22,A[n,k]=A[n-2,k-2]+A[n-1,k-2]+A[n-2,k-1]+A[n-1,k-1])); for(n=1,22,for(i=1,n,print1(A[n-i+1,i],", ")))

Formula

A(1,1) = A(2,2) = 1, A(1,2) = A(2,1) = 0, A(n,k) = 0 if n < 1 or k < 1, otherwise A(n,k) = A(n-2,k-2) + A(n-1,k-2) + A(n-2,k-1) + A(n-1,k-1).
From Peter Bala, Nov 07 2017: (Start)
T(n,k) = Sum_{i = floor((n+1)/2)..k} binomial(i,n-i)* binomial(i,k-i).
Square array = A026729 * transpose(A026729), where A026729 is viewed as a lower unit triangular array. Omitting the first row and column of square array = A030528 * transpose(A030528).
O.g.f. 1/(1 - t*(1 + t)*x - t*(1 + t)*x^2) = 1 + (t + t^2)*x + (t + 2*t^2 + 2*t^3 + t^4)*x^2 + .... Cf. A109466 with o.g.f. 1/(1 - t*x - t*x^2).
The n-th row polynomial R(n,t) satisfies R(n,t) = R(n,-1 - t).
R(n,t) = (-1)^n*sqrt(-t*(1 + t))^n*U(n, 1/2*sqrt(-t*(1 + t))), where U(n,x) denotes the n-th Chebyshev polynomial of the second kind.
The sequence of row polynomials R(n,t) is a divisibility sequence of polynomials, that is, if m divides n then R(m,t) divides R(n,t) in the polynomial ring Z[t].
R(n,1) = A002605; R(n,2) = A057089. (End)

A246181 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k (1,0)-steps of weight 1. B(n) is the set of lattice paths of weight n that start in (0,0), end on the horizontal axis and never go below this axis, whose steps are of the following four kinds: a (1,0)-step of weight 1; a (1,0)-step of weight 2; a (1,1)-step of weight 2; a (1,-1)-step of weight 1. The weight of a path is the sum of the weights of its steps.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 1, 3, 3, 0, 1, 3, 3, 6, 4, 0, 1, 3, 12, 6, 10, 5, 0, 1, 6, 14, 30, 10, 15, 6, 0, 1, 11, 30, 40, 60, 15, 21, 7, 0, 1, 15, 65, 90, 90, 105, 21, 28, 8, 0, 1, 31, 95, 225, 210, 175, 168, 28, 36, 9, 0, 1, 50, 216, 350, 595, 420, 308, 252, 36, 45, 10, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Aug 23 2014

Keywords

Comments

Number of entries in row n is n+1.
Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
T(n,0) = A025250(n+3).
Sum(k*T(n,k), k>=0) = A110320(n) (n>=1).

Examples

			Row 3 is 1,2,0,1. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and u=(1,1), d=(1,-1), the four paths of weight 3 are: ud, hH, Hh, and hhh, having 0, 1, 1, and 3 (1,0)-steps of weight 1, respectively.
Triangle starts:
1;
0,1;
1,0,1;
1,2,0,1;
1,3,3,0,1;
3,3,6,4,0,1;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+t*z*G+z^2*G+z^3*G^2: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 22)): for n from 0 to 17 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 15 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y) option remember; `if`(y<0 or y>n, 0,
          `if`(n=0, 1, expand(b(n-1, y)*x+ `if`(n>1,
           b(n-2, y)+b(n-2, y+1), 0) +b(n-1, y-1))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)):
    seq(T(n), n=0..12); # Alois P. Heinz, Aug 24 2014
  • Mathematica
    b[n_, y_] := b[n, y] = If[y<0 || y>n, 0, If[n==0, 1, Expand[b[n-1, y]*x + If[n>1, b[n-2, y] + b[n-2, y+1], 0] + b[n-1, y-1]]]]; T[n_] := Function[{p}, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jun 29 2015, after Alois P. Heinz *)

Formula

G.f. G=G(t,z) satisfies G = 1 + t*z*G + z^2*G + z^3*G^2.
Showing 1-10 of 16 results. Next