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.

A273719 Triangle read by rows: T(n,k) is the number of bargraphs of semiperimeter n having k horizontal steps in the peaks (n>=2, k>=1).

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 8, 3, 1, 1, 21, 9, 3, 1, 1, 55, 27, 10, 3, 1, 1, 144, 82, 33, 11, 3, 1, 1, 377, 251, 110, 39, 12, 3, 1, 1, 987, 770, 368, 139, 45, 13, 3, 1, 1, 2584, 2358, 1229, 495, 169, 51, 14, 3, 1, 1, 6765, 7191, 4085, 1755, 632, 200, 57, 15, 3, 1, 1
Offset: 2

Views

Author

Emeric Deutsch, Jun 01 2016

Keywords

Comments

Number of entries in row n is n-1.
Sum of entries in row n = A082582(n).
T(n,1) = A088305(n-2) = F(2n-4) where F(n) are the Fibonacci numbers A000045.
Sum(k*T(n,k), k>=0) = A273720(n).

Examples

			Row 4 is 3,1,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 they have 3,1,1,2,1 horizontal steps in their peaks.
Triangle starts
1;
1,1;
3,1,1;
8,3,1,1;
21,9,3,1,1
		

Crossrefs

Programs

  • Maple
    eq := G = z^2*s+z*(G-z^2*s/(1-z*s)+z^2*s^2/(1-z*s))+z*G+z^2*G+z*G*(G-z^2*s/(1-z*s)+z^2/(1-z)): G := RootOf(eq, G): Gser := simplify(series(G, z = 0, 20)): for n from 2 to 16 do P[n] := sort(expand(coeff(Gser, z, n))) end do: for n from 2 to 16 do seq(coeff(P[n], s, j), j = 1 .. n-1) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, y, t, h) option remember; expand(
          `if`(n=0, (1-t)*z^h, `if`(t<0, 0, b(n-1, y+1, 1, 0))+
          `if`(t>0 or y<2, 0, b(n, y-1, -1, 0)*z^h)+
          `if`(y<1, 0, b(n-1, y, 0, `if`(max(h, t)>0, h+1, 0)))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=1..n-1))(b(n, 0$3)):
    seq(T(n), n=2..16);  # Alois P. Heinz, Jun 06 2016
  • Mathematica
    b[n_, y_, t_, h_] := b[n, y, t, h] = Expand[If[n == 0, (1 - t)*z^h, If[t < 0, 0, b[n - 1, y + 1, 1, 0]] + If[t > 0 || y < 2, 0, b[n, y - 1, -1, 0]*z^h] + If[y < 1, 0, b[n - 1, y, 0, If[Max[h, t] > 0, h + 1, 0]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 1, n - 1}]][b[n, 0, 0, 0]];  Table[T[n], {n, 2, 16}] // Flatten (* Jean-François Alcover, Nov 29 2016 after Alois P. Heinz *)

Formula

G.f.: G(s,z), where s marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies the equation given in the Maple program.
G.f.: G(w,z), where w marks number of horizontal steps in the peaks and z marks semiperimeter, satisfies eq. (7) of the Blecher et al. reference, where one has to set x = z and y = z.
The trivariate g.f. G = G(t,s,z), where t marks number of peaks, s marks number of horizontal steps in the peaks, and z marks semiperimeter, satisfies z*(1-z)*(1-s*z)*G^2-(1-3*z-s*z+z^2+3*s*z^2-s*z^3+t*s*z^3-t*s*z^4)*G + t*s*z^2*(1-z)^2 = 0.