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.

A182901 Number of weighted lattice paths in B(n) having no valleys. 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 valley is a (1,-1)-step followed by a (1,1)-step.

Original entry on oeis.org

1, 1, 2, 4, 8, 17, 36, 78, 171, 379, 848, 1912, 4341, 9915, 22767, 52526, 121698, 283043, 660579, 1546556, 3631261, 8548643, 20174093, 47716388, 113095740, 268575321, 638954183, 1522668500, 3634346039, 8687404327, 20794957839, 49841956726, 119610395745
Offset: 0

Views

Author

Emeric Deutsch, Dec 15 2010

Keywords

Comments

a(n)=A182900(n,0).

Examples

			a(3)=4. 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 hhh, hH, Hh, and UD; none of them has a valley.
		

References

  • M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.

Crossrefs

Programs

  • Maple
    eq := z^4*(1+z)*g^2-(1-z-z^2-z^3)*g+1 = 0: g := RootOf(eq, g): gser := series(g, z = 0, 35): seq(coeff(gser, z, n), n = 0 .. 32);

Formula

G.f.: g=g(z) satisfies z^4*(1+z)g^2-(1-z-z^2-z^3)g+1=0.
D-finite with recurrence (n+4)*a(n) +(-n-1)*a(n-1) +3*(-n-2)*a(n-2) +(-n-1)*a(n-3) +(-n+2)*a(n-4) +3*(-n+3)*a(n-5) +(-n+2)*a(n-6) +(n-5)*a(n-7)=0. - R. J. Mathar, Jul 22 2022

A182902 Number of valleys in all weighted lattice paths in B(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 4, 14, 45, 135, 391, 1105, 3067, 8404, 22806, 61428, 164495, 438459, 1164363, 3082717, 8141422, 21457255, 56455195, 148323305, 389213825, 1020283146, 2672225692, 6993600748, 18291536552, 47814575243, 124929304664, 326280023426
Offset: 0

Views

Author

Emeric Deutsch, Dec 15 2010

Keywords

Comments

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 valley is a (1,-1)-step followed by a (1,1)-step.

Examples

			a(7) = 4. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U = (1,1), D = (1,-1), among the 82 paths in B(7) only hUDUD, UDUDh, UDUhD, and UhDUD have valleys (1 in each).
		

References

  • M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.

Crossrefs

Programs

  • Maple
    eq := g = 1+z*g+z^2*g+z^3*g^2: g := RootOf(eq, g): gser := series(z^6*g^4/(1-z^3*g^2), z = 0, 35): seq(coeff(gser, z, n), n = 0 .. 32);

Formula

a(n) = Sum(k*A182900(n,k), k>=0).
G.f.: G:=z^6*g^4/(1-z^3*g^2), where g=g(z) satisfies g=1+zg+z^2*g+z^3*g^2.
D-finite with recurrence -3*(n+3)*(n-6)*a(n) +(n+1)*(7*n-34)*a(n-1) +2*(5*n+26)*a(n-2) +(7*n^2-39*n+16)*a(n-3) +4*(-n^2+5*n+2)*a(n-4) +(3*n^2-29*n+64)*a(n-5) -(n-4)*(n-7)*a(n-6)=0. - R. J. Mathar, Jul 22 2022

A182903 Triangle read by rows: T(n,k) is the number of weighted lattice paths in L_n having k peaks.The members of L_n are paths of weight n that start at (0,0), end on 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.

Original entry on oeis.org

1, 1, 2, 4, 1, 9, 2, 21, 5, 48, 14, 1, 112, 38, 3, 263, 104, 9, 623, 276, 31, 1, 1484, 730, 99, 4, 3550, 1921, 309, 14, 8525, 5034, 929, 56, 1, 20537, 13145, 2739, 205, 5, 49612, 34208, 7956, 716, 20, 120136, 88780, 22804, 2394, 90, 1, 291519, 229860, 64650
Offset: 0

Views

Author

Emeric Deutsch, Dec 16 2010

Keywords

Comments

Number of entries in row n is 1+floor(n/3).
Sum of entries in row n is A051286(n).
T(n,0)= A182904(n).
Sum(k*T(n,k), k>=0)=A182884(n-2).

Examples

			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, UDUDh.
Triangle starts:
1;
1;
2;
4,1;
9,2;
21,5;
48,14,1;
		

References

  • M. Bona and A. Knopfmacher, On the probability that certain compositions have the same number of parts, Ann. Comb., 14 (2010), 291-306.
  • E. Munarini, N. Zagaglia Salvi, On the rank polynomial of the lattice of order ideals of fences and crowns, Discrete Mathematics 259 (2002), 163-177.

Crossrefs

Formula

Let F=F(t,s,x,y,z) be the 5-variate g.f. of the considered weighted lattice paths, where z marks weight, t (s) marks number of peaks (valleys), x (y) indicates that the path starts with a (1,1)-step ((1,-1)-step). Then F(t,s,x,y,z)=1+z(1+z)F(t,s,1,1,z)+xz^3[t+H(t,s,z)-1]F(t,s,s,1,z)+yz^3[s+H(s,t,z)-1]F(t,s,1,t,z), where H=H(t,s,z) is given by H=1+zH+z^2*H+z^3*(t-1+H)[s(H-1-zH-z^2*H)+1+zH+z^2*H] (see A182900).
Showing 1-3 of 3 results.