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

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).

A247295 Number of weighted lattice paths B(n) having no uhd and no uHd strings.

Original entry on oeis.org

1, 1, 2, 4, 7, 14, 30, 64, 141, 316, 713, 1626, 3740, 8659, 20176, 47274, 111302, 263201, 624860, 1488736, 3558412, 8530533, 20505468, 49413242, 119347708, 288873639, 700582008, 1702190653, 4142880297, 10099352082, 24656876772, 60283224645, 147581756005
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) = A247294(n,0).

Examples

			a(6)=30 because among the 37 (=A004148(7)) members of B(6) only uhdhh, huhdh, hhuhd, Huhd, uhdH, uHdh, and huHd contain uhd or uHd (or both).
		

Crossrefs

Programs

  • Maple
    eq := G = 1+z*G+z^2*G+z^3*(G-z-z^2)*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-1, `if`(t=2, 3, 0))+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:
    a:= n-> b(n, 0$2):
    seq(a(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-1, If[t == 2, 3, 0]] + 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]]]; 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- z^2 ).
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) +4*(-n+6)*a(n-6) +(-2*n+15)*a(n-7) +(n-9)*a(n-8) +(2*n-21)*a(n-9) +(n-12)*a(n-10)=0. - R. J. Mathar, Jul 26 2022

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