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

A182900 Triangle read by rows: T(n,k) is the number of weighted lattice paths in B(n) having k 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, 1, 78, 4, 171, 14, 379, 43, 1, 848, 125, 5, 1912, 351, 20, 4341, 960, 71, 1, 9915, 2579, 235, 6, 22767, 6833, 745, 27, 52526, 17916, 2281, 108, 1, 121698, 46593, 6805, 399, 7, 283043, 120385, 19885, 1400, 35, 660579, 309416, 57141, 4712, 155, 1
Offset: 0

Views

Author

Emeric Deutsch, Dec 15 2010

Keywords

Comments

Sum of entries in row n is A004148(n+1) (the 2ndary structure numbers).
T(n,0)=A182901(n).
Sum(k*T(n,k), k>=0) = A182902(n).
For the distribution of the statistic "number of peaks" see A162984. A peak is a (1,1)-step followed by a (1,-1)-step.

Examples

			T(7,1)=4. Indeed, denoting by h (H) the (1,0)-step of weight 1 (2), and U=(1,1), D=(1,-1), we have hUDUD, UDUDh, UDUhD, and UhDUD.
Triangle starts:
1;
1;
2;
4;
8;
17;
36,1;
78,4;
171,14;
		

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^3*(z+z^2+v-v*z-v*z^2)*F^2-(1-z-z^2-z^3+v*z^3)*F+1 = 0: F := RootOf(eq, F): Fser := simplify(series(F, z = 0, 20)): for n from 0 to 18 do P[n] := sort(coeff(Fser, z, n)) end do: 1; 1; 2; for n from 0 to 18 do seq(coeff(P[n], v, k), k = 0 .. floor((1/3)*n)-1) end do; # yields sequence in triangular form

Formula

G. f.: F=F(v,z) satisfies z^3*(z+z^2+v-vz-vz^2)F^2 - (1-z-z^2-z^3+vz^3)F+1=0 (z marks weight, v marks number of valleys).
The trivariate g.f. H(u,v,z), where u (v) marks peaks (valleys) and z marks weight is given by H=1+zH+z^2*H+z^3*(u-1+H)[v(H-1-zH-z^2*H)+1+zH+z^2*H].

A162985 Number of Dyck paths with no UUU's and no DDD's of semilength n and having no UUDUDD's (U=(1,1), D=(1,-1)).

Original entry on oeis.org

1, 1, 2, 3, 6, 12, 25, 53, 114, 249, 550, 1227, 2760, 6253, 14256, 32682, 75293, 174224, 404741, 943622, 2207135, 5177817, 12179904, 28722736, 67890481, 160812128, 381671061, 907529504, 2161622683, 5157014539, 12321750366, 29482362166
Offset: 0

Views

Author

Emeric Deutsch, Oct 11 2009

Keywords

Comments

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

Examples

			a(3)=3 because we have UDUDUD, UDUUDD, and UUDDUD.
		

Crossrefs

Cf. A162984.

Programs

  • Maple
    G := ((1-z-z^2+z^3-sqrt(1-2*z-z^2-z^4-2*z^5+z^6))*1/2)/z^3: Gser := series(G, z = 0, 36): seq(coeff(Gser, z, n), n = 0 .. 31);

Formula

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