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

A246182 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k hh's. 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 h of weight 1; a (1,0)-step H of weight 2; a (1,1)-step u of weight 2; a (1,-1)-step d of weight 1. The weight of a path is the sum of the weights of its steps.

Original entry on oeis.org

1, 1, 1, 1, 3, 0, 1, 5, 2, 0, 1, 9, 5, 2, 0, 1, 19, 9, 6, 2, 0, 1, 39, 21, 12, 7, 2, 0, 1, 79, 53, 27, 15, 8, 2, 0, 1, 167, 118, 74, 34, 18, 9, 2, 0, 1, 357, 269, 180, 96, 42, 21, 10, 2, 0, 1, 763, 639, 419, 254, 119, 51, 24, 11, 2, 0, 1, 1651, 1486, 1045, 605, 340, 143, 61, 27, 12, 2, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Aug 23 2014

Keywords

Comments

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

Examples

			Row 3 is 3,0,1. Indeed, the four paths of weight 3 are: ud, hH, Hh, and hhh, having 0, 0, 0, and 2 hh's, respectively.
Triangle starts:
1;
1;
1,1;
3,0,1;
5,2,0,1;
9,5,2,0,1;
		

Crossrefs

Programs

  • Maple
    eq := z^3*(1+z-t*z)*G^2-(-z^3+1-z^2-t*z+t*z^3)*G+1+z-t*z = 0: g := RootOf(eq, G): gser := simplify(series(g, z = 0, 18)): for j from 0 to 15 do P[j] := coeff(gser, z, j) end do: 1; for j to 13 do seq(coeff(P[j], t, q), q = 0 .. j-1) 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, 1)*`if`(t=1, x, 1)+ `if`(n>1, b(n-2, y, 0)+
          b(n-2, y+1, 0), 0) +b(n-1, y-1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
    seq(T(n), n=0..12); # Alois P. Heinz, Aug 24 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, 1] * If[t==1, x, 1] + If[n>1, b[n-2, y, 0] + b[n-2, y+1, 0], 0] + b[n-1, y-1, 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0, 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 z^3*(1+z-t*z)*G^2 - (1-t*z-z^2+t*z^3-z^3)*G+1+z-t*z=0.

A246183 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having k HH's. 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 h of weight 1; a (1,0)-step H of weight 2; a (1,1)-step u of weight 2; a (1,-1)-step d of weight 1. The weight of a path is the sum of the weights of its steps.

Original entry on oeis.org

1, 1, 2, 4, 7, 1, 15, 2, 33, 3, 1, 71, 9, 2, 158, 23, 3, 1, 357, 54, 10, 2, 812, 136, 26, 3, 1, 1869, 338, 63, 11, 2, 4338, 835, 167, 29, 3, 1, 10134, 2087, 428, 72, 12, 2, 23829, 5216, 1092, 199, 32, 3, 1, 56341, 13046, 2826, 523, 81, 13, 2
Offset: 0

Views

Author

Emeric Deutsch, Aug 23 2014

Keywords

Comments

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

Examples

			Row 3 is 4. Indeed, the four paths of weight 3 are: ud, hH, Hh, and hhh; none of them contain HH.
Triangle starts:
1;
1;
2;
4;
7,1;
15,2;
33,3,1;
		

Crossrefs

Programs

  • Maple
    eq := z^3*(1+z^2-t*z^2)*G^2-(1-z-t*z^2+t*z^3-z^3)*G+1+z^2-t*z^2 = 0: g := RootOf(eq, G): gser := simplify(series(g, z = 0, 22)): for j from 0 to 20 do P[j] := sort(coeff(gser, z, j)) end do: 1; for j to 20 do seq(coeff(P[j], t, q), q = 0 .. (1/2)*j-1) 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, 1)*`if`(t=1, x, 1)+
          b(n-2, y+1, 0), 0) +b(n-1, y-1, 0))))
        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, Aug 24 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, 1]*If[t==1, x, 1] + b[n-2, y+1, 0], 0] + b[n-1, y-1, 0]]]]; 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, Feb 08 2017, after Alois P. Heinz *)

Formula

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

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

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 36, 1, 80, 2, 180, 5, 410, 13, 946, 32, 2203, 80, 5173, 199, 1, 12233, 499, 3, 29108, 1255, 9, 69643, 3161, 28, 167437, 7984, 81, 404311, 20206, 231, 980125, 51228, 650, 1, 2384441, 130090, 1812, 4, 5819576, 330835, 5016, 14
Offset: 0

Views

Author

Emeric Deutsch, Sep 17 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/6) entries.
Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
T(n,0) = A247298(n).
Sum(k*T(n,k), k=0..n) =A110320(n-5) (n>=6)

Examples

			T(6,1)=1 because among the 37 (=A004148(7)) paths in B(6) only uudd contains uudd.
T(13,2)=3 because we have huudduudd, uuddhuudd, and uudduuddh.
Triangle starts:
1;
1;
2;
4;
8;
17;
36,1;
80,2;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z^3+t*z^3)*G: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, k), k = 0 .. floor((1/6)*n)) end do; # yields sequence in triangular form

Formula

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

A140639 Number of 4-noncrossing RNA structures with arc-length => 4.

Original entry on oeis.org

1, 1, 1, 1, 2, 5, 15, 51, 179, 647, 2397, 9081, 35181, 139307, 563218
Offset: 1

Views

Author

Jonathan Vos Post, Jul 07 2008

Keywords

Comments

Table 2, p. 30 of Han and Reidys. See diagrams p. 31. Combinatorial formulas and asymptotic results are also given.

Crossrefs

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

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 3, 1, 7, 7, 3, 13, 17, 6, 1, 26, 36, 16, 4, 52, 77, 45, 10, 1, 104, 173, 111, 30, 5, 212, 387, 268, 95, 15, 1, 438, 857, 666, 266, 50, 6, 910, 1911, 1641, 714, 175, 21, 1, 1903, 4287, 3975, 1940, 546, 77, 7, 4009, 9619, 9606, 5205, 1610, 294, 28, 1
Offset: 0

Views

Author

Emeric Deutsch, Oct 11 2009

Keywords

Comments

T(n,k) is also the number of weighted lattice paths B(n) having k (1,0)-steps of weight 2. 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. Example: row 3 is 2,2; 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 0 (1,0)-steps of weight 2, respectively. - Emeric Deutsch, Aug 23 2014
Row n contains 1+floor(n/2) entries.
Sum of entries in row n is A004148(n+1) (the secondary structure numbers).
T(n,0) = A023431(n).
Sum(k*T(n,k), k=0..floor(n/2)) = A110320(n-1).

Examples

			T(5,2)=3 because we have UDUUDDUUDD, UUDDUDUUDD, and UUDDUUDDUD.
Triangle starts:
1;
1;
1,1;
2,2;
4,3,1;
7,7,3;
13,17,6,1;
26,36,16,4;
		

Crossrefs

Programs

  • Maple
    F := RootOf(G = 1+z*G+t*z^2*G+z^3*G^2, G): Fser := series(F, z = 0, 18): for n from 0 to 15 do P[n] := sort(coeff(Fser, z, n)) end do: for n from 0 to 14 do seq(coeff(P[n], t, j), j = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form

Formula

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

A298309 Triangle read by rows: T(n,m) = Sum_{i=0..n+1} C(n-i+1,i-1)*C(n-i+1,i)*C(n-i+1,m-i+1).

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 3, 11, 13, 5, 4, 25, 51, 43, 13, 5, 49, 149, 203, 130, 32, 6, 86, 364, 716, 734, 382, 80, 7, 139, 787, 2099, 3061, 2521, 1105, 201, 8, 211, 1553, 5385, 10455, 12093, 8311, 3143, 505, 9, 305, 2851, 12473, 30918, 47064, 45075, 26581, 8843, 1273
Offset: 0

Views

Author

Vladimir Kruchinin, Jan 17 2018

Keywords

Examples

			Triangle begins
  0;
  1,    1;
  2,    4,    2;
  3,   11,   13,    5;
  4,   25,   51,   43,   13;
  5,   49,  149,  203,  130,   32;
  6,   86,  364,  716,  734,  382,   80;
  7,  139,  787, 2099, 3061, 2521, 1105,  201;
		

Crossrefs

T(n,n) is A110320(n).

Programs

  • Maxima
    T(n,m):=sum(binomial(n-i+1,i-1)*binomial(n-i+1,i)*binomial(n-i+1,m-i+1),i,0,n+1);
    
  • PARI
    T(n,m) = sum(i=0, n+1, binomial(n-i+1,i-1)*binomial(n-i+1,i)*binomial(n-i+1,m-i+1));
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n,k), ", ")); print()); \\ Michel Marcus, Jan 19 2018

Formula

G.f.: ((1-(1-x*y)*(x*y+x))/sqrt((1-(x*y+1)*(x*y+x))^2-4*x*y*(x*y+x)^2)-1)/(2*x*y).
Previous Showing 11-16 of 16 results.