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-3 of 3 results.

A247294 Triangle read by rows: T(n,k) is the number of weighted lattice paths B(n) having a total of k uhd and uHd strings.

Original entry on oeis.org

1, 1, 2, 4, 7, 1, 14, 3, 30, 7, 64, 18, 141, 43, 1, 316, 102, 5, 713, 249, 16, 1626, 608, 49, 3740, 1489, 143, 1, 8659, 3669, 400, 7, 20176, 9058, 1109, 29, 47274, 22407, 3046, 105, 111302, 55560, 8282, 357, 1, 263201, 138004, 22385, 1149, 9
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) = A247295(n).
Sum(k*T(n,k), k=0..n) = A247296(n).

Examples

			T(6,1)=7 because we have uhdhh, huhdh, hhuhd, Huhd, uhdH, uHdh, and huHd.
Triangle starts:
1;
1;
2;
4;
7,1;
14,3;
30,7;
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z-z^2+t*z+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/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-1, 0)*`if`(t=2, x, 1)+b(n-1, y, `if`(t=1, 2, 0))
          +`if`(n>1, b(n-2, y, `if`(t=1, 2, 0))+b(n-2, y+1, 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, 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-1, 0]*If[t == 2, x, 1] + b[n-1, y, If[t == 1, 2, 0]] + If[n>1, b[n-2, y, If[t == 1, 2, 0]] + b[n-2, y+1, 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, 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 - z^2 + t*z + t*z^2).

A247291 Number of weighted lattice paths B(n) having no uhd strings.

Original entry on oeis.org

1, 1, 2, 4, 7, 15, 32, 69, 154, 346, 786, 1806, 4180, 9745, 22865, 53938, 127865, 304447, 727733, 1745736, 4201350, 10140975, 24544000, 59551327, 144822097, 352940719, 861839226, 2108381480, 5166749329, 12681855551, 31174671514, 76742344774
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) = A247290(n,0).

Examples

			a(4)=7 because we have hhhh, hhH, hHh, Hhh, HH, hud, and udh.
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z)*G: G := RootOf(eq, G): Gser := series(G, z = 0, 37): seq(coeff(Gser, z, n), n = 0 .. 35);
    # second Maple program:
    b:= proc(n, y, t) option remember; `if`(y<0 or y>n or t=3, 0,
          `if`(n=0, 1, 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, `if`(t=2, 3, 0))))
        end:
    a:= n-> b(n, 0$2):
    seq(T(n), n=0..40); # Alois P. Heinz, Sep 16 2014
  • Mathematica
    b[n_, y_, t_] := b[n, y, t] = If[y<0 || y>n || t == 3, 0, If[n == 0, 1, 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, If[t == 2, 3, 0]]]]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, May 27 2015, after Alois P. Heinz *)

Formula

G.f. G = G(z) satisfies G = 1 + z*G + z^2*G + z^3*G*(G - z).
D-finite with recurrence +(n+3)*a(n) +(-2*n-3)*a(n-1) -n*a(n-2) +(-2*n+3)*a(n-3) +3*(n-3)*a(n-4) +(-2*n+9)*a(n-5) +2*(-n+6)*a(n-6) +(n-9)*a(n-8)=0. - R. J. Mathar, Sep 29 2021

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).
Showing 1-3 of 3 results.