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

A274494 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k as the length of the longest initial sequence of the form UHUH... (n>=2, 1<=k<=2*floor(n/2)).

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 0, 1, 8, 2, 1, 2, 22, 5, 4, 3, 0, 1, 62, 13, 12, 6, 1, 3, 178, 35, 35, 15, 5, 6, 0, 1, 519, 97, 103, 40, 17, 13, 1, 4, 1533, 275, 306, 110, 53, 33, 6, 10, 0, 1, 4578, 794, 917, 310, 163, 90, 23, 24, 1, 5, 13800, 2327, 2770, 891, 501, 253, 77, 63, 7, 15, 0, 1
Offset: 2

Views

Author

Keywords

Comments

Number of entries in row n is 2*floor(n/2).
Sum of entries in row n = A082582(n).
Sum(k*T(n,k),k>=0) = A274495(n).

Examples

			Row 4 is 3,1,0,1 because the 5 (=A082582(4)) bargraphs of semiperimeter 4 correspond to the compositions [1,1,1],[1,2],[2,1],[2,2],[3] and the corresponding drawings show that the lengths of the longest initial sequence of the form UHUH... are 2,4,1,1,1, respectively.
Triangle starts
0,1;
1,1;
3,1,0,1;
8,2,1,2;
22,5,4,3,0,1;
		

Crossrefs

Programs

  • Maple
    a := z*(1-t^2*z-t^2*z^3+t^4*z^3): b := -t*(1-3*z+z^2+t*z^2-t^2*z^2-z^3+2*t^2*z^3+t*z^4-2*t^3*z^4+t^2*z^4): c := t^2*z^2*(t+z-2*t*z-t*z^2+t^2*z^2): eq := a*G^2+b*G+c = 0: G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 21)): for n from 2 to 18 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 18 do seq(coeff(P[n], t, j), j = 1 .. 2*floor((1/2)*n)) end do; # yields sequence in triangular form
  • Mathematica
    nmax = 12;
    a = z (1 - t^2 z - t^2 z^3 + t^4 z^3);
    b = -t (1 - 3z + z^2 + t z^2 - t^2 z^2 - z^3 + 2t^2 z^3 + t z^4 - 2t^3 z^4 + t^2 z^4);
    c = t^2 z^2 (t + z - 2t z - t z^2 + t^2 z^2);
    G = 0; Do[G = Series[(-c - a G^2)/b, {z, 0, nmax}, {t, 0, nmax}] // Normal, {nmax}];
    cc = CoefficientList[G, z];
    row[n_] := CoefficientList[cc[[n+1]], t] // Rest;
    Table[row[n], {n, 2, nmax}] // Flatten (* Jean-François Alcover, Jul 25 2018 *)

Formula

G.f.: G = G(t,z) satisfies aG^2 + bG + c = 0, where a = z(1-t^2*z-t^2*z^3+t^4*z^3), b = -t(1-3z+z^2+tz^2-t^2*z^2-z^3+2t^2*z^3+tz^4-2t^3*z^4+t^2*z^4), c = t^2*z^2*(t+z-2tz-tz^2+t^2*z^2).
Showing 1-1 of 1 results.